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

NSIS_CONFIG_LOG not defined #6715

Closed
hgouveia opened this issue Mar 11, 2022 · 6 comments · Fixed by #6729 or #6730
Closed

NSIS_CONFIG_LOG not defined #6715

hgouveia opened this issue Mar 11, 2022 · 6 comments · Fixed by #6729 or #6730
Labels

Comments

@hgouveia
Copy link

  • Electron-Builder Version: 22.14.13
  • Node Version: 14.19.0
  • Electron Version: 16.1.0
  • Electron Type (current, beta, nightly): current
  • Target: Windows

I recently upgrade from electron-builder 22.9.1 to latest 22.14.13 and now i get this error when making the installer with nsis

Error output:
Error: LogSet specified, NSIS_CONFIG_LOG not defined.
Error in macro LogSetMacro on macroline 2
Error in script "<stdin>" on line 123 -- aborting creation process
  failedTask=build stackTrace=Error: C:\Users\{user}\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\Bin\makensis.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Output:

i use a custom install.nsh where i have at the beginning

!define ENABLE_LOGGING

if i remove it, the installer is built, but i need to enable it, i also tried by spcifing debug in the config

nsis: {
   debugLogging: true
}

but same error

@github-actions github-actions bot added the nsis label Mar 11, 2022
@mmaietta
Copy link
Collaborator

That's being set from here:

!define LogSet "!insertmacro LogSetMacro"
!macro LogSetMacro SETTING
!ifdef ENABLE_LOGGING
LogSet ${SETTING}
!endif
!macroend

Any chance you can use a different variable name instead of ENABLE_LOGGING?

@hgouveia
Copy link
Author

well i intentionally added ENABLE_LOGGING to enable logging in nisis i could remove it if there is another way to activate logging?

because for example i removed ENABLE_LOGGING , and added nsis: { debugLogging: true } ,but i get the same error

@mmaietta
Copy link
Collaborator

mmaietta commented Mar 13, 2022

Hmmm, looks like debugLogging feature was removed in 22.14.8 by virtue of downgrading nsis binaries, this was required due to #6334 (Trojan (potentially false) positive detected). The nsh script never was updated accordingly.

@hgouveia
Copy link
Author

@mmaietta due that I can't use ENABLE_LOGGING and debugLogging, is there any other way to enable the logs?

@mmaietta
Copy link
Collaborator

I think I just need to remove the feature entirely since the integrated makensis no longer supports it. I'll try and work on it this weekend

mmaietta added a commit that referenced this issue Mar 19, 2022
…tomNsisBinary` config (#6729)

* Exposing `customNsisBinary` and changing env var for `debugLogging` so that it doesn't conflict with other custom nsis scripts that use `DEBUG_LOGGING` env var. Fixes #6715
@mqliutie
Copy link

mqliutie commented Oct 13, 2022

electron-builder version 23.0.3
I have modified common.nsh and comment

# !ifdef ENABLE_LOGGING_ELECTRON_BUILDER
# !endif

The error will be shown
**LogSet specified , NSIS_CONFIG_LOG not defined **

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