Archive: Help me in fixing the compilation error.


Help me in fixing the compilation error.
.
.
.
Var /GLOBAL srcpath
StrCpy $srcpath_ado "C:\Official\myproject\myproject\Release"

File /oname=temp\ $srcpath\rk.exe
.
.
.
getting the following error during compilation
File: "$srcpath\rk.exe" -> no files found.

if i give exact path instead of variable $srcpath it is working fine. But i want to use a variable for that...coz i need to us this at multiple times in the file & also want to get this path using 'Locate'

Thanks.


First of all, you use $srcpath_ado as a variable in the StrCpy command, while you use $srcpath in the File command.

But the real problem is that a variable is for runtime, while the File command is a compiletime command (at least the filesource parameter).

You should use a define instead, like

!define SRCPATH "C:\Official\myproject\myproject\Release"
...
File /oname=temp\ ${SRCPATH}\rk.exe

Thanks Jpderuiter for the quick response.

but in some cases I am getting this srcpath from 'Locate' vai $R0 copying from $R9
so in that case how can i use this 'File' command


You're still confusing run time and compile time. How can the compiler compress a file at compile time when the path is only known at run time? If you need to specify the path to extract to use SetOutPath or use the File /oname= switch (read the ... manual).

Stu


If you think about it: Locate will give you a location on the PC of the client who is running your installer (Runtime), while you want to include files with the File command from your development PC (Compiletime).
That's obviously not going to work together.


thank you.
How to add an empty folder to $INSTDIR. coz i want to copy few of the files/folders in it during compile time.

File /oname=temp\ ${SRCPATH}\rk.exe
it seems in the above example installer is not creating 'temp' folder.
getting runtime error & asking for aborting.


i tried as follows & is working fine.

SetOutPath $INSTDIR\temp
File ${SRCPATH}\rk.exe