Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 22nd November 2009, 13:33   #1
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 569
${__TIMESTAMP__} is not always predefined

Some of my scripts use the ${__TIMESTAMP__} predefine to record the date and time of the last modification to the script. I have found that in some cases the compiler gives an "unknown variable/constant" warning for this predefine.

This warning seems to be generated if the script file is not in the current directory. Here is my test script:
code:
Name "Test"

OutFile test.exe

ShowInstDetails show

RequestExecutionLevel "user"

Page instfiles

Section default
DetailPrint "Filename : ${__FILE__}"
DetailPrint "Timestamp: ${__TIMESTAMP__}"
SectionEnd

The command-line "makensis.exe test.nsi" works properly but if I put the script in a subdirectory and use the command-line

makensis.exe subdir\test.nsi

then the compiler issues this warning:

unknown variable/constant "{__TIMESTAMP__}" detected, ignoring (subdir\test.nsi:13)

and, of course, the test program displays:

Filename : test.nsi
Timestamp: ${__TIMESTAMP__}
Completed
pengyou is offline   Reply With Quote
Old 22nd November 2009, 15:41   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,839
I wonder if the precompiler even keeps that define per-file...

Anyway, please file a bug report about this in the bug tracker, if it doesn't already exist at least.
MSG is offline   Reply With Quote
Old 22nd November 2009, 16:20   #3
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 569
If I use the command-line

makensis.exe /NOCD subdir\test.nsi

then test.exe gets generated in the current directory without any warnings and it produces the correct output:

Filename : test.nsi
Timestamp: 19 November 2009 17:18:42
Completed

I'll have a look at the bug tracker now.
pengyou is offline   Reply With Quote
Reply
Go Back   Winamp 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