I'm reading over how to properly update PATH with the NSIS installer. On the very beginning of the wiki page, it says
WARNING: Strings longer than ${NSIS_MAX_STRLEN} will get truncated/corrupted. Do NOT use this function to update %PATH%. (See below for a link to an alternative implementation.)
The default NSIS_MAX_STRLEN size are 1024 byte?
I know electron-builder are using NSIS 3.0.1 but how would I tell if we are running the Speical Build? and how can we update the NSIS variable NSIS_MAX_STRLEN=8192 from custom nsh scripts?
Thank you!
Nsis will be changed to special build. For now you can override nsis in the cache (requires latest version of electron-builder).
I see, right make sense. Thanks @develar !!
@develar I did try the solution you suggested replacing the nsis from special build to .cache/electron-builder/nsis/nsis-3.0.1.8/
In your nsis.ts I found references and hash check for the latest version of nsis
const nsisPathPromise = getBinFromBintray("nsis", "3.0.1.8", "d9429cc33d06198b48b939e51f48fc95b3b7ccd5584dd9fe3f3f4eacce9d8275")
I wonder if this hash will be the cause of the error below?
Essentially the installer crashes at launch.
Problem signature:
Problem Event Name: APPCRASH
Application Name: test.exe
Application Version: 2.6.0.0
Application Timestamp: 584dca80
Fault Module Name: USER32.dll
Fault Module Version: 6.1.7601.23594
Fault Module Timestamp: 58249e1c
Exception Code: c0000005
Exception Offset: 0003f186
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 4105
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
If you have plan to support the special build on the way, this can wait.
Thank you again!!
Please try 13.10.0
Thanks so much @develar !
I updated to electron-builder 13.10.0
and ran the same build script as I've always got the following error back. Any ideas?
> [email protected] pack:win /home/jonathan/Documents/Git/sdt
> build --win --x64
module.js:471
throw err;
^
Error: Cannot find module 'bluebird-lst-c'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/jonathan/Documents/Git/sdt/node_modules/fs-extra-p/index.js:4:17)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
npm ERR! Linux 4.4.0-62-generic
npm ERR! argv "/home/jonathan/.nvm/versions/node/v6.9.2/bin/node" "/home/jonathan/.nvm/versions/node/v6.9.2/bin/npm" "run" "pack:win"
npm ERR! node v6.9.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] pack:win: `build --win --x64`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] pack:win script 'build --win --x64'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the sdt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! build --win --x64
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs sdt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls sdt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/jonathan/Documents/Git/sdt/npm-debug.log
Fixed in 13.10.1.
Thank You @develar again !! Much much appreciated!
I've just tested and confirmed that with 13.11.1, nsis special build is able to append variable to PATH without running into NSIS_MAX_STRLEN math length at 1024 issue.