Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build NSIS installer on Mac: NSIS_CONFIG_LOG not defined #32

Open
larrywalters opened this issue Jun 4, 2020 · 2 comments
Open

Comments

@larrywalters
Copy link

larrywalters commented Jun 4, 2020

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 0a8031d. 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.

@larrywalters larrywalters changed the title Failed to build NSIS installer on Mac: NSIS_CONFIG_LOG not undefined Failed to build NSIS installer on Mac: NSIS_CONFIG_LOG not defined Jun 10, 2020
@mmaietta
Copy link
Collaborator

mmaietta commented Jul 4, 2021

@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 electron-userland/electron-builder#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.

@asterizk
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants