NSIS - How to include all folders from source to Installer
Asked Answered
F

1

34

I have an application which consists one .exe, many .dlls and a few folders.

I use NSIS to create an installer. It works but when I install the software, I don't see all the folders inside my application. What do I have to do to bundle all the folders within my application into the installer?

This is the code I set the data source at this time:

File "c:\MyProject\MyApp\*"
Fireweed answered 1/11, 2011 at 21:36 Comment(0)
J
61

The documentation tells us that the /r argument of the File command includes all sub folders and files. So you would use something like this:

File /r "c:\MyProject\MyApp\*"

The relevant section of the documentation can be found here:

http://nsis.sourceforge.net/Docs/Chapter4.html#file

Jerboa answered 1/11, 2011 at 21:42 Comment(2)
When using the /r switch, both matching directories and files will be searched. This is always done with or without the use of wildcards. nsis.sourceforge.net/Docs/Chapter4.html#fileSoldier
Won't this cause problems with an uninstaller? As you can't delete * as you need to wait for uninstaller.exe to be last?Quirinal

© 2022 - 2024 — McMap. All rights reserved.