Archive: Creating folders needed for OutFile


Creating folders needed for OutFile
My installer will be used by many different applications. And I'd like to create a release folder that helps organize all the setup files. For example:

/Release/App1/Setup.exe
/Release/App2/Setup.exe
/Release/App3/Setup.exe

But if an App folders doesn't exist, then I run into problems. For example, the compile fails if I try something like:

OutFile /Release/${App_Folder_Name}/Setup.exe

And I assume it fails because OutFile doesn't create any missing folders, it just writes the file.

Is there a workaround solution? I'd prefer to have the compiler create any missing output folders.


You may use !system to create folders in compile time,

http://nsis.sourceforge.net/Docs/Chapter5.html#5.1.11


Argh, it's always something right there in the manual! And worse, I just read that section an hour earlier while reading up on the !if statement. And it didn't click with me.

But I am happy that such a thing exists. This will save me a ton of time...the NSIS installer has been a breath of fresh air after having to deal with MSI installer complexities.