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

How to customize the log output file location #8313

Open
KyleRicardo opened this issue Jul 10, 2024 · 2 comments
Open

How to customize the log output file location #8313

KyleRicardo opened this issue Jul 10, 2024 · 2 comments
Labels

Comments

@KyleRicardo
Copy link

  • Electron-Builder Version: 24.6.4
  • Node Version: 20.5.0
  • Electron Version:28.0.0
  • Electron Type (current, beta, nightly):current
  • Target: Windows x64 NSIS

Hi community,

I need to log the NSIS install and uninstall process, so I change the electron-builder.json5 file to

{
  "nsis": {
    "customNsisBinary": {
      "url": null,
      "debugLogging": true
    }
  }
}

as per #5119 (comment) and https://www.electron.build/configuration/nsis

customNsisBinary module:app-builder-lib/out/targets/nsis/nsisOptions.CustomNsisBinary | “undefined” - Allows you to provide your own makensis, such as one with support for debug logging via LogSet and LogText. (Logging also requires option debugLogging = true)

But it seems the output log file's location cannot be customized, the installation log is put under "C:\" and the uninstallation log is put under $INSTDIR

BTW I use /allsuers /S args to do slient installation.

That's very weird, because the $INSTDIR itself should be removed too in the uninstallation process.

Anyone can help on this? I want to customize the log output file location. Many thanks!

@mmaietta
Copy link
Collaborator

This is where the output path is being set: https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/templates/nsis/common.nsh#L137

I'm not familiar enough with nsis scripting to advise where/what to change in order for the output location to be changed though. Fully in favor of having it in a different location, especially since the uninstallation logs I assume are getting deleted during the uninstall process since it's located in the $INSTDIR

Copy link
Contributor

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants