Giter Site home page Giter Site logo

Comments (5)

Bug-Reaper avatar Bug-Reaper commented on August 23, 2024

I may try and build on my x64 Win11 VM to see if error is specific to my M1 mac. Also want to try customNsisBinary but the correct usage is not clear.

from electron-builder.

Bug-Reaper avatar Bug-Reaper commented on August 23, 2024

Essentially this is the same problem as #6738 .

However the fix used there does not fix for me :'(

from electron-builder.

Bug-Reaper avatar Bug-Reaper commented on August 23, 2024

Build completes with no errors but I end up with an installer.exe that is empty except for the uninstaller.


Continued debug attempts:

  1. Tried $env /usr/bin/arch -x86_64 /bin/zsh --login before build to see if it did any magic.
  2. Tried the XL Nsis binary drop-in work-around (in case max nsis size was messing me up) electron-userland/electron-builder-binaries#44
  3. Used system wine (got rid of some wine warnings but otherwise no change)

EDIT: have now also tried:

  1. Went through the pain of building directly on Windows 11 x64 and got rekt by the same issue.
  2. Removed all config options and went with defaults.
  3. Tried bumping electron version to @latest ^31.3.1

from electron-builder.

Bug-Reaper avatar Bug-Reaper commented on August 23, 2024

After days of all-in debugging for days 10+ hrs I'm happy to report I have some progress.

Was able to get a windows-installer that is functional via the nsis-installer-large-files workaround but only when building on windows x64. The exact instructions were as follows:

  1. Download special NSISBI from https://sourceforge.net/projects/nsisbi/
  2. Extract and copy all contained filed into C:\Users\user\AppData\Local\electron-builder\Cache\electron-builder\nsis\nsis-3.0.4.1 and "replace all" when prompted.
  3. Delete NSIS.exe from above cache folder and rename newly copied makensisw.exe => NSIS.exe.
  4. re-run build

This type of NSIS build changes the output as a side-effect, you'll see two files now comprise the installer:
.exe (~100kb).
.nsisbin (Your actual app-size (~4Gib for me)).


What's next for this issue

First I'd like to test if the two-file installer setup (.exe && .nsbin) files breaks my ability to auto-update. Looking at the generated latest.yml that only mentions the exe file I'd wager it does brick auto-updates. If someone more intimate with the auto-updater wants to weigh in though that'd be appreciated.

Here's a bunch of other stuff I hope to PR in fixes for (any help appreciated) :

  1. Builder should throw an error for large-apps instead of building an unusable nsis installer with no warnings/errors.
  2. Document proper build instructions for NSIS builds of large-apps. Add a config option for it if possible.
  3. Figure out how to build large NSIS installers on non-windows devices. Following the above workaround on macOS for example results in an error from nsis-3.0.4.1/mac/makensis.sh Invalid command: "GetWinVer".

TLDR: Most egregious thing is:

Builder should throw an error for large-apps instead of building an unusable nsis installer with no warnings/errors."
Other build types work fine so the error should happen specifically during NSIS flavored builds. We're hitting some ancient window98 restriction on max NSIS file size either 2 or 4Gib I think.

If you read through the whole post and want to leave a comment/emoji for moral support that'd be appreciated.

from electron-builder.

Bug-Reaper avatar Bug-Reaper commented on August 23, 2024

Builder should throw an error for large-apps instead of building an unusable nsis installer with no warnings/errors.

I want to check the <installerName>.nsis.7z file size prior to it making the final exe. Maybe need to PR this upstream @electron-forge-nsis-maker? Does electron-builder use forge for all NSIS builds?

https://github.com/electron-userland/electron-builder/blob/12c52a81420f04ec0e205dd83798c2b0b773011d/packages/electron-forge-maker-nsis/main.js

from electron-builder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.