View Single Post
Old 12th October 2021, 10:58   #6
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 916
${EXEDIR} doesn't exist because it's not a compile time variable. If you really want to set it (I would not recommend it though because it makes things more ambiguous), use: !define EXEDIR "."

You can use the path relative to the script file, like this:

File /r "dist/SecureCoop/*.*"

The '/r' flag means recurse into subdirectories too (the default is to stay in the specified directory). Just be aware that any files that don't have a dot in them will be skipped (basically, files with no extension will be skipped). To include all files, use a single wildcard.

SetOutPath just changes which directory the files go into, if you need it.

PHP Code:
'script.nsi, somefile.txt, and anotherfile.txt are all in the same directory.'

relative to script path    installer output path

SetOutPath 
"$INSTDIR"      C:\yourprogram
File 
"somefile.txt"        C:\yourprogram\somefile.txt
SetOutPath 
"$INSTDIR\bin"  C:\yourprogram\bin
File 
"anotherfile.txt"     C:\yourprogram\bin\anotherfile.txt 

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote