-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 build fails #503
Comments
Works for me on OS X. Please specify OS X version. |
el capitan, latest |
|
I did, but same error. |
If possible, please send me your app to test. |
ok, i'll send it tomorrow, thanks |
I just tried it with a new test app, cloned electron-quick-start and built that (two package json), but the error is the same, so it seems it has nothing to do with the app itself. |
When I copy the command myself it complains about spaces in certain filenames, not sure if that's the issue?
(coming from has "DUNINSTALL_FILENAME=Uninstall electron-quick-start.exe" parameter), and for some other parameters also. When I fix all that and run the command again, this is the output;
|
|
@kunkinkan You can expect some fix tomorrow. Not ready to push yet.
-X arg must be enclosed in quotes. |
Cool, I changed nsis.js to include the quotes, still fails though. When running the command itself get the error "Can't open script "Setup". This is just FYI, maybe it's because I run the command standalone. There is no real error message in the builder, just "command failed". Will try your version when you push it. thanks. |
Please try 5.4.4 But before delete ~/.cache dir. |
Deleted .cache dir; `Error: Command failed: /Users/kunkinkan/.cache/nsis/nsis-3.0rc1/mac/makensis -DAPP_ID=com.app.my -DPRODUCT_NAME=My App -DINST_DIR_NAME=My App -DAPP_DESCRIPTION=My App -DAPP_ARCHIVE=/Users/kunkinkan/Desktop/app/dist/app.7z -DVERSION=0.9.22-beta -DMUI_ICON=/Users/kunkinkan/Desktop/app/build/icon.ico -DMUI_UNICON=/Users/kunkinkan/Desktop/app/build/icon.ico -DCOMPANY_NAME=app Foundation -DAPP_EXECUTABLE_FILENAME=My App.exe -DUNINSTALL_FILENAME=Uninstall My App.exe -DMULTIUSER_INSTALLMODE_INSTDIR=85125e2a-0211-5c49-9018-9358da1074b1 -DMULTIUSER_INSTALLMODE_INSTALL_REGISTRY_KEY=85125e2a-0211-5c49-9018-9358da1074b1 -DMULTIUSER_INSTALLMODE_UNINSTALL_REGISTRY_KEY=85125e2a-0211-5c49-9018-9358da1074b1 -DMULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME=UninstallString -DMULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME=InstallLocation -DMULTIUSER_INSTALLMODE_DEFAULT_CURRENTUSER -DMULTIUSER_INSTALLMODE_ALLOW_ELEVATION -DCOMPRESS=auto -DONE_CLICK -XFileBufSize 64 -XName "My App" -XOutFile "/Users/kunkinkan/Desktop/app/dist/My App Setup 0.9.22-beta-ia32.exe" -XUnicode true -XVIProductVersion 0.9.22.0 -XVIAddVersionKey ProductName "My App" -XVIAddVersionKey CompanyName "app Foundation" -XVIAddVersionKey LegalCopyright "Copyright © 2016 app Foundation" -XVIAddVersionKey FileDescription "My App" -XVIAddVersionKey FileVersion "0.9.22-beta" -XShowInstDetails nevershow -XShowUninstDetails nevershow -XBrandingText " " -XSetCompressor lzma -XSetCompressorDictSize 64 -XAutoCloseWindow true /Users/kunkinkan/Desktop/app/node_modules/electron-builder/templates/nsis/installer.nsi Command line defined: "APP_ID=com.app.my" libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
From previous event: |
Oh , seems to be the same issue again with not adding quotes to the parameters? |
Issue is not yet clear. Ok, if you want to help, please install git lfs (https://git-lfs.github.com) and
to run tests on your machine (not all tests will be succeeded, it is ok). |
NSIS test passed on CI also — https://travis-ci.org/develar/electron-builder/jobs/138433525 Could you please try on another machine? |
|
The same error. Something wrong with your machine. Could you please try on another? |
seems to work on this other one?
|
@kunkinkan Yes, test passed. |
Hmm, ok I've now created a VM on my developer machine, works there too. Weird.. Sorry for wasting your time :-) What are the things that don't yet work with NSIS? Can we customize a title in the installer? (Now all is blank except icon + progress bar). |
Use splash for one-click installer |
Cool cool, is that a splash screen before the installation window shows, or is it instead of the installation window? Will we still see the progress bar or will it be like squirrel, hiding all progress? Oh, and auto-update I guess is also on that list. Thanks though, great stuff, much better than squirrel! |
Current installation window for one-click installer contains only progress bar and nothing else. And it is a full size window — so, we should use simple splash + progress. I cannot find such nsis plugin — so, for now it will be splash + progress bar in the task bar icon. Opposite for Squirrel it will be real progress bar and splash will use real delay. Auto update and file associations are another not yet implemented features. |
Alright very cool. 1 small thing though, is it possible to put dist files in win32 / win folders similar as squirrel did? I need to copy the exes programatically and this makes it easy to differentiate the architecture. |
If you need to distribute both arch — nsis allows you pack both into one installer and solid LZMA compression will keep installer size small. It is not yet supported — file issue if need. It will be the only recommended way because it is better for end user — avoid choose type of installer. And it is another reason why nsis is better than squirrel. |
So to add to this issue. Building on the Mac Mini by screen sharing into it and cd-ing to the Jenkins workspace, works perfectly fine. The binaries are signed and all. Building through clicking the 'Build Now' button on Jenkins, still throws the exception. |
@McPo Please see Maybe "I solved the problem related to NSIS. Was caused by disk permissions errors..." #850 (comment) I cannot reproduce and, so, cannot fix it. PR is welcome. |
So I finally figured out what the issue was. It was caused by encoding. https://sourceforge.net/p/nsis/bugs/1165/ Modyfing the generated script which is piped into stdin to state I also discovered the reason why it worked in SSH-ing into the builder server vs Jenkins. When SSH-ing into the builder server and typing
When making Jenkins run
So the solution for me was to change the environment variables within Jenkins to match the ones which exist when SSH-ing. Apparently this is a well known issue http://unix.stackexchange.com/questions/164779/jenkins-does-not-use-systems-locales |
@McPo You are hero :) So, electron-builder should explicitly set this env vars for spawned process? |
Well..... Ultimately I think this issue is with makensis. However Id proposed checking the value of Im not sure if changing |
@McPo Your locale solution works for me! |
@McPo Thanks again. Your fix will be included into the electron-builder. Because now it doesn't work even on my local dev macOS. If |
|
@develar How does makensis fail? Error message? makensis uses the current locale when dealing with command line parameters and the filesystem on the local machine (and probably a couple of other places). It does not really care what the locale is but your input data needs to be able to be converted to wchar_t with mbsrtowcs etc. |
Not sure if it's already supposed to be buildable, in any case here is the output:
The text was updated successfully, but these errors were encountered: