Open thre-isdd opened 7 years ago
Its appeared, that building installer under debian 8 gives similar result:
Failed with exit code: 255 Output: System.AggregateException: One or more errors occurred. ---> System.Exception: err:process:create_process 64-bit application L"Z:\home\buildadmin\buildAgent\work\c7b333e02a3535f1\node_modules\electron-winstaller\vendor\7z.exe" not supported in 32-bit prefix wine: Bad EXE format for Z:\home\buildadmin\buildAgent\work\c7b333e02a3535f1\node_modules\electron-winstaller\vendor\7z.exe.
I even tired to change x64 to ia32 while packaging app, but got the same result
mono 5.0.1.1 wine 2.0.1
OS X mono 5.0.1.1 wine 2.10
I get error when wine is 32:
System.AggregateException: One or more errors occurred. ---> System.Exception: err:process:create_process 64-bit application L"Z:\Users\baize\Work\agent\client\node_modules\electron-winstaller\vendor\7z.exe" not supported in 32-bit prefix
if I use 64 wine build is ok, but on first install i get error: squirrel.exe 0xc000007b
Yep, the version of 7-Zip included is 64-bit, you'll need to switch to 64-bit Wine instead.
@paulcbetts I installed wine with 64 bit support. How do I actually switch to 64-bit Wine?
@paulcbetts could this be the root cause of #184 or does it only apply when using wine?
I am also with this error. How to switch to 64-bit wine?
@thre-isdd This is not a solution, but here how I managed to make it work.
@paulcbetts , is there any reason why the 7z.exe
is in 64 bit format? I guess that the 32 bit version would also work in x64 machines and would not suppose a problem when building 32 bits applications.
+1 on @robertohuertasm's question. The problem with assuming 64 bit is that 64bit support in Wine is officially sketchy, see their FAQ
Probably 64bit 7z.exe is an artifact of a recent SquirrelWin update? Only reason I could think of is that maybe 7z 32 bit has issues with very large files (the magical 2GB barrier)?
Anyway, if at all possible, I would vote for a downgrade to 32 bit 7z.exe.
@fredguth, I have to use your way to solve the problem.
Packaging app for platform win32 x64 using electron v4.0.0 WARNING: Found 'electron' but not as a devDependency, pruning anyway rcedit.exe failed with exit code 193. wine: Bad EXE format for Z:\usr\local\lib\node_modules\electron-packager\node_modules\rcedit\bin\rcedit.exe.
@thre-isdd This is not a solution, but here how I managed to make it work.
- downloaded 7-zip 32bit at http://www.7-zip.org/a/7z1604.exe
- installed it via wine
- copied .exe and .dll from .wine/drive_c/Program Files/7-Zip to electron-winstaller/vendor
@fredguth , this is a dumb question as I don't typically use wine. can you explain step 2? how do i install that via wine?
@dfeinzeig, the exe
in the link is the installer, you should just need to run it in wine and go through the installation wizard
thanks @davidsharp . couldn't run the installer on WSL so I just ran it in windows and grabbed the exe and dll. all works now. thanks!
Using wine64 is not solution, as packaging under Linux not work than https://github.com/electron-userland/electron-packager/issues/519, I need use wine32 to pack app, and now I cant make installer because I have wine32 :/
@robmro27 what issue are you having? i was able to get the whole build working with wine32.
I mean I use wine x32 so I can't use 7z x64 as I understand above posts, for me wine x32 works as well while packaging, but I needed also get x32 version of 7z to make installer, so I just mean we cant use wine x64 probably to make installer because than packaging not work under linux.
And error while make installer with 7z x64
System.AggregateException: One or more errors occurred. (0009:err:process:create_process L"Z:\\home\\robert\\projects\\ts\\angular\\node_modules\\electron-installer-windows\\vendor\\squirrel\\7z.exe" not supported on this installation (x86_64 binary)
wine: Bad EXE format for Z:\home\robert\projects\ts\angular\node_modules\electron-installer-windows\vendor\squirrel\7z.exe.) ---> System.Exception: 0009:err:process:create_process L"Z:\\home\\robert\\projects\\ts\\angular\\node_modules\\electron-installer-windows\\vendor\\squirrel\\7z.exe" not supported on this installation (x86_64 binary)
wine: Bad EXE format for Z:\home\robert\projects\ts\angular\node_modules\electron-installer-windows\vendor\squirrel\7z.exe.
at Squirrel.Utility.CreateZipFromDirectory (System.String zipFilePath, System.String inFolder) [0x00119] in <4a7c1713912342669b34f9db87354d63>:0
ah, yes :) i agree, i could not get wine64 to work. wine32 and swapping out 7z with the 32-bit version worked for me per the above suggestions.
@thre-isdd This is not a solution, but here how I managed to make it work.
- downloaded 7-zip 32bit at http://www.7-zip.org/a/7z1604.exe
- installed it via wine
- copied .exe and .dll from .wine/drive_c/Program Files/7-Zip to electron-winstaller/vendor
@fredguth , this is a dumb question as I don't typically use wine. can you explain step 2? how do i install that via wine?
I didn't get it to work with the wine installation, but I have installed the 7-Zip.exe on a windows computer and moved the relevant files (7z.exe
7z.dll
) to the project. After that I have copied them to the build process electron-winstaller/vendor
directory.
This is my build config:
deploy:desktop:win:
stage: deploy
image: electronuserland/builder:wine-mono
before_script:
- apt-get update -yqq
- apt-get install -yqq zip git
# NPM
- npm install
# Fix 7z
- chmod -R 777 ~/.wine
- cp ./resources/electron/vendor/7-zip/7z.exe ./node_modules/electron-winstaller/vendor/
- cp ./resources/electron/vendor/7-zip/7z.dll ./node_modules/electron-winstaller/vendor/
script:
- npm run build-win
- npm run create-installer-win
electron-winstaller@2.6.3 windows 10, 64-bit.
Cant build setup.exe with error:
Then I decided to get squirrel logs with
set DEBUG=electron-windows-installer
And got these messages from node_modules\electron-winstaller\vendor\SquirrelSetup.log:Could anyone explain what happened?