- NSIS Discussion
- Automatic revisoning
Archive: Automatic revisoning
trankyfunky
7th July 2003 14:54 UTC
Automatic revisoning
After about one year of developing small and crappy NSIS scripts, I finally started to organize them in a logical structure.
The first thing I suppose to deploy is a "EXE versioning system", that could tell me the build number of my script.
Actually, I use a very simple build number (it's time-related: CrappyScript v.{YYMMDD}) that I set manually thru a !define directive.
It's simple, i know, but for me is enough!
I wonder if there is a simple method to gain the system date to set automatically the !define parameter (or to launch something via !system and get the output, maybe a NSIS script ;)) )...
Vytautas
7th July 2003 14:58 UTC
You should check out this archive page and modify the function used there to suit your needs.
Vytautas
Joost Verburg
7th July 2003 15:04 UTC
It's already possible :D Grab the latest development version and use ${__DATE__}
trankyfunky
7th July 2003 15:35 UTC
What do you mean with "latest development version"?
Should I use a CVS snapshot or can I use a simple 2.0b3? :confused:
Thanks a lot, Vytautas. I will try it anyway :up: ....
Joost Verburg
7th July 2003 16:05 UTC
Vytautas' solution is for getting the date on run-time.
You need to get the date on compile time, so you should use ${__DATE__}. You have to get the latest CVS version.
trankyfunky
7th July 2003 16:10 UTC
Anyone knows how to compile a CVS snapshot without a C compiler ?:cry:
Or, maybe, someome knows where could I download a binary CVS build? :weird:
(Maybe a sticky topic on the forum "Latest CVS Binaries" will be useful...)
pengyou
7th July 2003 16:20 UTC
The "nightly" CVS snapshot includes the binaries - I am using ${__DATE__} and all the other useful things like it even though I do not have a suitable C compiler. The VersionInformation feature is proving very useful.
trankyfunky
7th July 2003 18:10 UTC
Ok... Obtained the "nightly" CVS...
Is the ${__DATE__} function already documented? (I cannot find it on the documentation... maybe I'm blind ;) )
I never heard/seen anything about "VersionInformation". Maybe I've missed something about it?
Joost Verburg
7th July 2003 18:14 UTC
It has been added a few weeks ago and has not been documented yet.
With the version information commands, you can add a version info resource (File Properties > Version tab).
Vytautas
8th July 2003 01:02 UTC
Sorry for any confusion I caused, it was late and my brain was not functioning very well.
Vytautas
trankyfunky
8th July 2003 07:43 UTC
You're welcome, Vytautas.
Seems interesting... The version info commands, I mean.
The only thing I need is some documentation about ${__DATE__}.
I will wait until some documentation will be released.
trankyfunky
8th July 2003 08:28 UTC
Just for information, can I format ${__DATE__} contents to fit my needs (YYMMDD or YY.MM.DD) ?
Or maybe there is a method to pass the contents of a $n/$Rn variable to the !define statement (so I will do the dirty job with some crappy script snippet)?
kichik
8th July 2003 10:52 UTC
NSIS uses your local date format to set ${__DATE__}. You can't set the format through NSIS. If you want to pass some variables as defines you can create a script that will compile your script calling to makensis with some command line arguments. /Ddefine_name=value will probably be the most useful one for this task.
Afrow UK
8th July 2003 17:13 UTC
Originally posted by Joost Verburg
It has been added a few weeks ago and has not been documented yet.
With the version information commands, you can add a version info resource (File Properties > Version tab).
This would be in resource hacker yes?
-Stu
kichik
8th July 2003 17:19 UTC
No, that's the whole point, you no longer need Resource Hacker to add it.
Afrow UK
8th July 2003 18:20 UTC
Hmm, where is this then?
Edit: ok sorry, I thought that he meant that you need to goto File Properties > Version tab to add one :)
-Stu
iceman_k
11th July 2003 21:52 UTC
Here is some rudimentary documentation on the compile time "standard predefines".
I had a programming itch and I scratched it. :)
I had considered putting in options for formatting the date, but decided to put it off till later. So, for now you will have to live with it grabbing the date format from the user locale settings.