Archive: Fast and versatile recompilation process


Fast and versatile recompilation process
Hello,

I am migrating my vb6 installer into NSIS installer. One of my priorities/requirements is to recompile all the needed files in the least number of steps possible. Ideally, a 1 click build-to-release process.

At the moment, I am planning to create several folders. One for app_path files, one for system_files, etc. So, every time that a file is modified or a new file added, I just drop it in the right folder and recompile. However, if a completely new file is included, steps like registering a DLL still need to be implemented in code.

Do you have any suggestions on how to create a fast and versatile recompilation process?

Thanks


You can for example execute a bat or vbs script (or nsis exe, for that matter) during compilation using the !system command etc, and let it create a file list and save as NSIS script. Then !include that list.


MSG, I am a newbie, so I am not sure what you mean nor how to implement it.

By chance, do you have a concrete example that I can look at? Thanks.


Well my idea is basically to run an external script/program that lists all the files in your project directory, and writes it to an .nsh file for you, using either

SetOutPath $INSTDIR
File "FoundFileXYZ.ext"
or
SetOutPath $SYSDIR
File "FoundFileZYX.dll"
call DLLRegisterFunction
...depending on whether it found a dll or another file. Then, if you !include that file list into your section, the NSIS compiler will simply paste the contents of the list into your NSIS script, and compile it.

Sorry for the late reply.

I am not sure if I understand well the advantage of including the files using an external file instead of directly including them in my NSIS script?


The advantage is that you can execute external scripts/exe's during compilation, but you cannot add dll-registration code if one of the release files happens to have the .dll extension, during compilation. As far as I know, anyway.


Hey MSG,

I was just wondering what do you mean with "you cannot add dll-registration code if one of the release files happens to have the .dll extension".

Thanks


What I mean with that is that it's just not possible to do what you want to do using NSIS script. Here's what: Try to find a way to do it in NSIS code, and you'll find out it's impossible. My method IS possible. Let's just say the advantage is that it works. >_>