electron-builder-binaries
electron-builder-binaries copied to clipboard
Failed to build NSIS installer on Mac: NSIS_CONFIG_LOG not defined
I am experiencing a failure to build Windows NSIS installer/uninstaller on macOS, whenever the installer.nsh script references LogSet and/or LogText. If I comment those out, it builds fine. Here is the error I'm getting:
Processing script file: "<stdin>" (UTF8)
Error: LogSet specified, NSIS_CONFIG_LOG not defined.
Error in macro customUnInit on macroline 2
!include: error in script: "uninstaller.nsh" on line 18
Error in script "<stdin>" on line 167 -- aborting creation process
• exited command=makensis code=1 pid=51368
• async task error error=/Users/lwalters/Library/Caches/electron-builder/nsis/nsis-3.0.4.2/mac/makensis exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
⨯ /Users/lwalters/Library/Caches/electron-builder/nsis/nsis-3.0.4.2/mac/makensis exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE stackTrace=
Error: /Users/lwalters/Library/Caches/electron-builder/nsis/nsis-3.0.4.2/mac/makensis exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
at ChildProcess.<anonymous> (/Users/lwalters/<redacted>/node_modules/builder-util/src/util.ts:239:14)
at Object.onceWrapper (events.js:422:26)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1026:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
Based on my understanding, the 3.0.4.2 version of the NSIS binary from this repo should contain the fix to set NSIS_CONFIG_LOG=1, in this commit https://github.com/electron-userland/electron-builder-binaries/commit/0a8031d2326f420b8b3496d1fe82e28f5855040e. Therefore, logging should be enabled. Building on Windows has no problem.
It would be great to know if this is an issue with building for NSIS logging on Mac, or if something is wrong in my configuration. Thank you.
@develar would you be able to upload a v3.0.4.2 (incl. Log + StrLength) for MacOS?
Right now I receive
/Library/Caches/electron-builder/nsis/nsis-3.0.4.2/mac/makensis exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
...
Processing script file: "<stdin>" (UTF8)
Error output:
Error: LogSet specified, NSIS_CONFIG_LOG not defined.
Error in macro LogSetMacro on macroline 2
Error in script "<stdin>" on line 120 -- aborting creation process
This is probably a blocker for this feature to be added to electron-builder https://github.com/electron-userland/electron-builder/pull/6024 as NSIS tests with 3.0.4.2 pass on Windows, but fail on Mac.
Alternatively, we could add electron-builder NSIS logging to be a windows-only feature for an initial release, but if it'd be possible to have a 3.0.4.2 mac makensis compiled, I think it'd\ be the best route for our userbase.
Any progress on this one? Right now I make all my Windows NSIS builds on a Mac and it would be nice to be able to do so with logging enabled.