Archive: Concatenation of variables


Concatenation of variables
Hello
I'm a newbie and I have the following problem:


!include Library.nsh
Name "test"
OutFile "test.exe"
InstallDir "C:\test"

Var /global aaa
Var /global bbb
Var /global STRING

section
StrCpy $aaa "C:\temp\aaa"
StrCpy $bbb "bbb"

File "c:\temp\aaa\bbb\test.txt" 1)
;File "$aaa\$bbb\test.txt" 2)
StrCpy $STRING "$aaa\$bbb\test.txt" 3)
;File $STRING 4)
;MessageBox MB_OK $STRING 5)
SectionEnd

1) is ok
activating 2) results in a 'No files found' error in MakeNSISW
activating 4) results in a 'No files found error as well
activating 5) delivers the path as in 1)

What's wrong with the code?

Thank's for your support.

Ulrich


Variables are set at runtime, and files are packed at compile time. You can't use variables to tell the compiler where to include files from.