Archive: Using variable as part of a string?


Using variable as part of a string?
I've been yanking my hair out for over an hour with this stupid thing...

I am trying to do this.

I want to add the date to my output file name like: myfile_20080430.exe

The ${__DATE__} function gives: 04\30\2008

I figured using the CharStrip function from the wiki would be useful so I could strip the "\" slashes from the date.

But how do I use the variable in my file name?

I have:


Section "strip" Section0

${CharStrip} "\" ${__DATE__} $R0
DetailPrint ${R0}

SectionEnd

OutFile "\\fshare08\iscommon\is_development\QA\QA Tools\OSF_Test.exe_${R0}"



But it is displaying the actual text: "R0" not the value stored there. I've tried $R0, "$R0", '$R0',"${R0}", etc.. nothing works.

The NSIS documentation says I can use DetailPrint to display the contents of a variable. But it also shows the literal text, R0 not the contents.

Man you are mixing up compile time and runtime things totogether. You can't name the installer at compile time with a function that runs in the installer at the runtime. :D

You should define date with your own format and use it instead of messing around with ${__DATE__}...

See topic:
http://forums.winamp.com/showthread.php?threadid=291084


Ah I see now. Thanks for the help. I didn't even know i could use the %x wildcards