How to add a file to NSIS from different folders

I have already configured and working:

File file1.bat File file2.xml File common.file1.dll File common.file2.dll File common.file3.exe 

So that I would like to avoid storing shared files in the source directory, it refers to them from the parent directory as follows:

 File file1.bat File file2.xml File ..\common.file1.dll File ..\common.file2.dll File ..\common.file3.exe 

Edit: This really works when I tried it again.

But, apparently, this is not recognized. Is there any way to link to these files?

+6
source share
4 answers

The file belongs to .nsi and .. \ xyz should work ...

+12
source

You can define an environment variable that points to the folder where you want to save your dependencies. Then use this var environment in your nsi script.

+1
source

You can specify separate paths for the output files and paths to the source files for the File command:

 File /oname=$INSTDIR\common.file3.exe ..\common.file3.exe 
+1
source

try adding the following line to the script:

 File file1.bat File file2.xml SetOutpath "<source directory path>" File common.file1.dll File common.file2.dll File common.file3.exe 
0
source

All Articles