Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to divide an NSIS script among developers?

I'd like to divide tasks for the development of a NSIS installer among a couple of developers. How can I physically organize the code? Do they have to edit and merge the single .nsi script when they check into SVN? Is it possible to divide NSIS scripts into modular, separate files? This would be ideal.

Thanks!

like image 715
Cuga Avatar asked Dec 13 '25 04:12

Cuga


1 Answers

I use a "main" nsi file that makes up the actual installer generation and MUI code, but it includes "extra" function definitions from nsi files as well as seperate files for each installer "section".

Example:


!include "LibraryFunction1.nsh"
!include "LibraryFunction2.nsh"
!include "LibraryFunction3.nsh"

; Basic Defines and MUI code Go HERE

; Output file information
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "File-${BUILD_VER_ABRV}-${BUILD_VER_MIN}.exe"
InstallDir "$PROGRAMFILES\Location\"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""

; now include file sections
!include "FileSectionDefinition1.nsh"
!include "FileSectionDefinition2.nsh"
!include "FileSectionDefinition3.nsh"
!include "Uninstall.nsh"
like image 84
crashmstr Avatar answered Dec 14 '25 20:12

crashmstr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!