electron-userland / electron-builder-binaries

172 stars 60 forks source link

Nsis installer large files #44

Open bahadirdogru opened 3 years ago

bahadirdogru commented 3 years ago

I need the installer like 10gb. NSIS has limit but NSISBI can break the limit. can we use that or there is another way to have big installers.

Nowadays x64 systems has no limit something like 2gb.

$ electron-builder --x64
  • electron-builder  version=22.11.7 os=6.3.9600
  • loaded configuration  file=C:\edamla-bilgiatolyesi2\electron-builder.json
  • writing effective config  file=dist\builder-effective-config.yaml
  • packaging       platform=win32 arch=x64 electron=13.2.2 appOutDir=dist\win-unpacked
  • building        target=nsis file=dist\edamla-bilgiatolyesi2-Setup-Latest.exe archs=x64 oneClick=true perMachine=false
  ⨯ 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:
Command line defined: "APP_ID=tr.com.e-damla.dbook3.bilgiatolyesi2"
Command line defined: "APP_GUID=d61b5a11-ae31-5801-97b9-2ae451cf676c"
Command line defined: "UNINSTALL_APP_KEY=d61b5a11-ae31-5801-97b9-2ae451cf676c"
Command line defined: "PRODUCT_NAME=E-DamlaBilgiAt�lyesi2"
Command line defined: "PRODUCT_FILENAME=E-DamlaBilgiAt�lyesi2"
Command line defined: "APP_FILENAME=edamla-bilgiatolyesi2"
Command line defined: "APP_DESCRIPTION=E-Damla Dijital Kitap"
Command line defined: "VERSION=2021.7.26"
Command line defined: "PROJECT_DIR=C:\edamla-bilgiatolyesi2"
Command line defined: "BUILD_RESOURCES_DIR=C:\edamla-bilgiatolyesi2\build"
Command line defined: "APP_PACKAGE_NAME=edamla-bilgiatolyesi2"
Command line defined: "MUI_ICON=C:\edamla-bilgiatolyesi2\assets\icons\installer.ico"
Command line defined: "MUI_UNICON=C:\edamla-bilgiatolyesi2\assets\icons\installer.ico"
Command line defined: "APP_64=C:\edamla-bilgiatolyesi2\dist\edamla-bilgiatolyesi2-2021.7.26-x64.nsis.7z"
Command line defined: "APP_64_NAME=edamla-bilgiatolyesi2-2021.7.26-x64.nsis.7z"
Command line defined: "APP_64_HASH=12AD29A41F0410E9C6BF67B8FE590945229B7730A144EA76A9E19D4BB438ED34BECADFCEFD4ED909778882339C298A4E279692EB173A05979BD3D8F77C4399C5"
Command line defined: "COMPANY_NAME=Damla Yay�nevi"
Command line defined: "APP_PRODUCT_FILENAME=E-DamlaBilgiAt�lyesi2"
Command line defined: "APP_INSTALLER_STORE_FILE=edamla-bilgiatolyesi2-updater\installer.exe"
Command line defined: "COMPRESSION_METHOD=7z"
Command line defined: "ONE_CLICK"
Command line defined: "RUN_AFTER_FINISH"
Command line defined: "MENU_FILENAME=E-Damla"
Command line defined: "SHORTCUT_NAME=E-DamlaBilgiAt�lyesi2"
Command line defined: "DELETE_APP_DATA_ON_UNINSTALL"
Command line defined: "UNINSTALL_DISPLAY_NAME=E-DamlaBilgiAt�lyesi2 2021.7.26"
Command line defined: "UNINSTALLER_ICON=C:\edamla-bilgiatolyesi2\assets\icons\installer.ico"
Command line defined: "HEADER_ICO=C:\edamla-bilgiatolyesi2\assets\icons\installer.ico"
Command line defined: "ESTIMATED_SIZE=5621423"
Command line defined: "COMPRESS=auto"
Command line defined: "UNINSTALLER_OUT_FILE=C:\edamla-bilgiatolyesi2\dist\__uninstaller-nsis-edamla-bilgiatolyesi2.exe"
Processing config: C:\Users\user\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\nsisconf.nsh
Processing script file: "<stdin>" (ACP)

Processed 1 file, 10 command line commands, writing output (x86-unicode):

Output: "C:\edamla-bilgiatolyesi2\dist\edamla-bilgiatolyesi2-Setup-Latest.exe"
Output: "C:\edamla-bilgiatolyesi2\dist\edamla-bilgiatolyesi2-Setup-Latest.nsisbin"
Install: 1 page (64 bytes), 1 section (2072 bytes), 835 instructions (30060 bytes), 1190 strings (9430 bytes), 1 language table (250 bytes).
Datablock optimizer saved 36583 bytes (~0.0%).

Using zlib compression.

EXE header size:              342016 / 40960 bytes
Install code:                   6484 / 42348 bytes
Install data:                   5178 / 5179 MiB

Error output:
Error: can't write 67108864 bytes to output
Error - 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:
Command line defined: "APP_ID=tr.com.e-damla.dbook3.bilgiatolyesi2"
Command line defined: "APP_GUID=d61b5a11-ae31-5801-97b9-2ae451cf676c"
Command line defined: "UNINSTALL_APP_KEY=d61b5a11-ae31-5801-97b9-2ae451cf676c"
Command line defined: "PRODUCT_NAME=E-DamlaBilgiAt�lyesi2"
Command line defined: "PRODUCT_FILENAME=E-DamlaBilgiAt�lyesi2"
Command line defined: "APP_FILENAME=edamla-bilgiatolyesi2"
Command line defined: "APP_DESCRIPTION=E-Damla Dijital Kitap"
Command line defined: "VERSION=2021.7.26"
Command line defined: "PROJECT_DIR=C:\edamla-bilgiatolyesi2"
Command line defined: "BUILD_RESOURCES_DIR=C:\edamla-bilgiatolyesi2\build"
Command line defined: "APP_PACKAGE_NAME=edamla-bilgiatolyesi2"
Command line defined: "MUI_ICON=C:\edamla-bilgiatolyesi2\assets\icons\installer.ico"
Command line defined: "MUI_UNICON=C:\edamla-bilgiatolyesi2\assets\icons\installer.ico"
Command line defined: "APP_64=C:\edamla-bilgiatolyesi2\dist\edamla-bilgiatolyesi2-2021.7.26-x64.nsis.7z"
Command line defined: "APP_64_NAME=edamla-bilgiatolyesi2-2021.7.26-x64.nsis.7z"
Command line defined: "APP_64_HASH=12AD29A41F0410E9C6BF67B8FE590945229B7730A144EA76A9E19D4BB438ED34BECADFCEFD4ED909778882339C298A4E279692EB173A05979BD3D8F77C4399C5"
Command line defined: "COMPANY_NAME=Damla Yay�nevi"
Command line defined: "APP_PRODUCT_FILENAME=E-DamlaBilgiAt�lyesi2"
Command line defined: "APP_INSTALLER_STORE_FILE=edamla-bilgiatolyesi2-updater\installer.exe"
Command line defined: "COMPRESSION_METHOD=7z"
Command line defined: "ONE_CLICK"
Command line defined: "RUN_AFTER_FINISH"
Command line defined: "MENU_FILENAME=E-Damla"
Command line defined: "SHORTCUT_NAME=E-DamlaBilgiAt�lyesi2"
Command line defined: "DELETE_APP_DATA_ON_UNINSTALL"
Command line defined: "UNINSTALL_DISPLAY_NAME=E-DamlaBilgiAt�lyesi2 2021.7.26"
Command line defined: "UNINSTALLER_ICON=C:\edamla-bilgiatolyesi2\assets\icons\installer.ico"
Command line defined: "HEADER_ICO=C:\edamla-bilgiatolyesi2\assets\icons\installer.ico"
Command line defined: "ESTIMATED_SIZE=5621423"
Command line defined: "COMPRESS=auto"
Command line defined: "UNINSTALLER_OUT_FILE=C:\edamla-bilgiatolyesi2\dist\__uninstaller-nsis-edamla-bilgiatolyesi2.exe"
Processing config: C:\Users\user\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\nsisconf.nsh
Processing script file: "<stdin>" (ACP)

Processed 1 file, 10 command line commands, writing output (x86-unicode):

Output: "C:\edamla-bilgiatolyesi2\dist\edamla-bilgiatolyesi2-Setup-Latest.exe"
Output: "C:\edamla-bilgiatolyesi2\dist\edamla-bilgiatolyesi2-Setup-Latest.nsisbin"
Install: 1 page (64 bytes), 1 section (2072 bytes), 835 instructions (30060 bytes), 1190 strings (9430 bytes), 1 language table (250 bytes).
Datablock optimizer saved 36583 bytes (~0.0%).

Using zlib compression.

EXE header size:              342016 / 40960 bytes
Install code:                   6484 / 42348 bytes
Install data:                   5178 / 5179 MiB

Error output:
Error: can't write 67108864 bytes to output
Error - aborting creation process

at ChildProcess.<anonymous> (C:\edamla-bilgiatolyesi2\node_modules\builder-util\src\util.ts:249:14)
    at Object.onceWrapper (events.js:482:26)
    at ChildProcess.emit (events.js:375:28)
    at maybeClose (internal/child_process.js:1055:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Joyce-creator commented 1 month ago

i have similar issue. do u have final solutions?

bahadirdogru commented 1 month ago

I solved it this way. After all the normal installation processes, the nsisbi package is downloaded. from here: https://sourceforge.net/projects/nsisbi/

and copied to the C:\Users\user\AppData\Local\electron-builder\Cache nsis folder in this directory.

Thanks to this special version, installation can be done without being stuck with the 2GB limit.

This idea was originally written here: https://github.com/electron-userland/electron-builder/issues/1850

codeerspl commented 3 weeks ago

I solved it this way. After all the normal installation processes, the nsisbi package is downloaded. from here: https://sourceforge.net/projects/nsisbi/

and copied to the C:\Users\user\AppData\Local\electron-builder\Cache nsis folder in this directory.

Thanks to this special version, installation can be done without being stuck with the 2GB limit.

This idea was originally written here: electron-userland/electron-builder#1850

Thanks,

Works for me. Just download nsis binary, and replace it in C:\Users\user\AppData\Local\electron-builder\Cache\nsis-folder