Archive: Trouble with specifying file


Trouble with specifying file
Is it possible to use absolute file names with the File command? I'm doing the following in the main section of the script:

StrCpy $R0 "$TEMP\Sample"
CreateDirectory "$R0"
SetOutPath "$R0"

File "/oname=\bin\DLLs\mydll.dll" "C:\dev\SomeDirectory\bin\DLLs\mydll.dll"
It compiles fine and I'm pretty sure the files are being found because the exe size is large. However, when I run the setup the files are not extracted. The documentation on this command is very brief, so am I missing some crucial point?

Thanks

This line:


"/oname=\bin\DLLs\mydll.dll"

is not specifying an absolute path, so the file is being extracted, but you don't know where. Specifying an absolute path like:

File "/oname=$R0\bin\DLLs\mydll.dll" "mine.dll"
or
File "/oname=$INSTDIR\bin\DLLs\mydll.dll" "mine.dll"

should extract the file to where you want it.

[edit] Forgot to add the end onto the post.[/edit]

Sorry for the confusion, I meant specifying an absolute path as the source file.

I didn't think I have to specify an absolute path for the destination file. The documentation said that it will create the file as $OUTDIR\$X where /oname=$X. And I am setting the output path correctly.

I tried removing the /oname option and my files are extracted to the Sample directory. So it seems like I am misusing this option. One guess is that the /oname option does not create the directory structure for you, and that I have to create it manually. Can somebody verify if this is true?

I will try your suggestion and simply specify the absolute path for the /oname option as well.

Thanks for the help!


I had to test some of the things to determing the real behavior. Here is how it works:

Personally, I prefer the long way as it gives more control and allows more files to be added to a single directory. Plus, adding more files to the list later is much easier. But either way will work.

Hope this helps clear up the confusion.

Thanks! This is exactly the information I needed. I couldn't find this in the docs. Is it available somewhere else? IMHO, this information should be in the documentation, at least the bit about the /oname option not creating the directory structure.