Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add file in NSIS from different folders

I have the following already set up and working:

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

What I would want, to avoid keeping the common files in the source directory, is reference them from the parent directory like so:

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

Edit: This actually works when I tried it again.

But apparently, this is not recognized.
Is there another way to reference these files?

like image 661
sjlewis Avatar asked Jan 18 '13 13:01

sjlewis


People also ask

How do you write a NSIS script?

NSIS Setup You can use the NSIS Menu and under the Compiler section click Compile NSI scripts to start MakeNSISW. The makensisw.exe in the NSIS installation folder is the actual compiler. It has a graphical front end that explains three ways to load scripts, so it's very easy to use.

What are NSIS files?

Text file written using NSIS (Nullsoft Scriptable Install System) script, a language used for declaring the logic and tasks for software installers; often references files and folders to install as well as Windows registry actions.


2 Answers

File's are relative to the .nsi and ..\xyz should work...

like image 200
Anders Avatar answered Oct 05 '22 09:10

Anders


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

File /oname=$INSTDIR\common.file3.exe ..\common.file3.exe
like image 25
Oliver Avatar answered Oct 05 '22 08:10

Oliver