-
Notifications
You must be signed in to change notification settings - Fork 0
NSIS
If you build both ia32 and x64 arch, you in any case get one installer. Appropriate arch will be installed automatically.
Two options are available — include and script. script allows you to provide completely different NSIS script. For most cases it is not required as you need only to customise some aspects, but still use well-tested and maintained default NSIS script. So, include is recommended.
Keep in mind — if you customize NSIS script, you should always state about it in the issue reports. And don't expect that your issue will be resolved.
- Add file
build/installer.nsh. - Define wanted macro to customise:
customHeader,customInit,customUnInit,customInstall,customUnInstall. Example:!macro customHeader !system "echo '' > ${BUILD_RESOURCES_DIR}/customHeader" !macroend !macro customInit !system "echo '' > ${BUILD_RESOURCES_DIR}/customInit" !macroend !macro customInstall !system "echo '' > ${BUILD_RESOURCES_DIR}/customInstall" !macroend
-
BUILD_RESOURCES_DIRandPROJECT_DIRare defined. -
buildis added asaddincludedir(i.e. you don't need to useBUILD_RESOURCES_DIRto include files). - File associations macro
registerFileAssociationsandunregisterFileAssociationsare still defined. - All other electron-builder specific flags (e.g.
ONE_CLICK) are still defined.
Windows requires to use registry keys (e.g. INSTALL/UNINSTALL info). Squirrel.Windows simply uses application name as key. But it is not robust — Google can use key Google Chrome SxS, because it is a Google.
So, it is better to use GUID.
You are not forced to explicitly specify it — name-based UUID v5 will be generated from your appId or name.
It means that you should not change appId once your application in use (or name if appId was not set). Application product name (title) or description can be safely changed.
You can explicitly set guid using option nsis.guid, but it is not recommended — consider using appId.