How to split NSIS script among developers?

I would like to share the tasks for developing an NSIS installer among several developers. How can I physically organize the code? Do I need to edit and combine a single .nsi script when they check for SVN? Is it possible to split NSIS scripts into modular, separate files? That would be perfect.

Thanks!

+3
source share
4 answers

I use the "main" nsi file, which makes up the actual installer creation and the MUI code, but includes the "additional" function definitions from the nsi files, as well as separate 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"
+6

! "uninstaller.nsh" .. ( , .nsh)

0

(.nsh) script . , MUI, , , (.NET framework). , include, MUI ! ! Insertmacro MUI_PAGE_x. , .

0

, , NSI. .

-1

Source: https://habr.com/ru/post/1708414/


All Articles