Old 28th January 2005, 23:38   #1
mancini
Junior Member
 
mancini's Avatar
 
Join Date: Sep 2003
Posts: 45
adding build number or time stamp to outfile

Normally it is usefull if some kind of unique string can be added to name of the installer like a build date or number

i tried
OutFile "installer${__TIME__}.exe"
but it contains a space and i would really like to keep track of build numbers intead

i am now investingating making a batch script that would create a file with a number , incrementing it every time it is runned , then running makensis , and reading from the nsi script the number file then appending the number to outfile

any other sugestions ?
would the developers think they can implement something in the lines of this ?
mancini is offline   Reply With Quote
Old 29th January 2005, 00:11   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
There already is such a thing. Use:
code:
!define /date NOW "%d %b, %Y"
OutFile "installer${NOW}.exe"


NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 29th January 2005, 00:16   #3
mancini
Junior Member
 
mancini's Avatar
 
Join Date: Sep 2003
Posts: 45
ok , i assumed the date format can not be configured , thanks

however as for the build incrementing counter , what do you think ?
mancini is offline   Reply With Quote
Old 29th January 2005, 00:23   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
I don't think I'll add something that reads from another file and increments. However, I might add math operations to !define. You can use !system to do it for now (write to temporary file and then include it).

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 29th January 2005, 00:31   #5
mancini
Junior Member
 
mancini's Avatar
 
Join Date: Sep 2003
Posts: 45
can the time format be defined like the date too ?

yea i did not mean including those operations , math functionality would be great
mancini is offline   Reply With Quote
Old 29th January 2005, 00:34   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
/date works with both time and date. See !define in the documentation for more information.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump