PDA

View Full Version : Passing a Constant or Variable Name to Install File(s)



LoboMgr
12-13-2005, 12:11 AM
I have a file which I wish to "Install", whose name will change from time to time. I'd like set a constant (or variable) to the name, so that I can easily change it, and avoid doing a massive find/replace.

Unfortunately, the following throws an error on the Install File line:

#const $FNAME$ = "HelloWorld.txt"
Install File "D:\$FNAME$ to %_SB_INSTALLDIR%\$FNAME$

Any suggestions?
Thx

linder
12-13-2005, 12:28 AM
Yes :) Use compiler variables instead of constants.

#set compiler variable "[FNAME] = $FNAME$
Install File "D:\[FNAME] to %_SB_INSTALLDIR%\[FNAME]

Does this help?

LoboMgr
12-13-2005, 11:15 AM
Thx. Works Great!