問題描述
Mac Os 10.11.6 中 Windows 的 Electron Pakaging 問題 (Electron Pakaging issue for Windows in Mac Os 10.11.6)
我使用的是 Mac OS 10.11.6。我為 mac OS 構建的 elecron 是成功的,但對於 Windows,它給出了以下錯誤
⨯ cannot execute cause=exit status 1 errorOut=wine: failed to initialize: dlopen (/tmp/wine‑stage/wine/usr/lib/wine/ntdll.dll.so, 258): 找不到圖片
我正在使用"electron‑builder": "22.3.2" in package.json
我已經看到了關於這個問題的各種帖子,但沒有合適的解決方案。請幫忙
參考解法
方法 1:
The Only Option for me to make it work is to upgrade MacOs(OSX EI Captain) to macOS Mojave( 10.14.6).
Somewhere I read some packaging tools have issues with macOS catalina , So I did not opt for it for upgrade and considered Mojave.
Note: The upgrade experience was not that smooth. a) Upgrade Process itself took more than 8hrs and I had to leave the laptop for overnight after waiting for 3hrs. But luckily , when I checked in the morning , the laptop was booted up to login screen b) When I tried to login, it stuck for hrs there, but I realised after googling it is a common issue and many people faced it. Then I had to follow safe mode booting clearing of NVM etc process . But finally it is thru c) Finally npm install of my app which was working before , broke and the solution was to do
xcode‑select ‑‑install
d) Subsequently the windows build was done without any issue and app is working fine now.
So in short, unless you have at least one day to keep aside , do not attempt the OS upgrade.
(by Raghu Vallikkat、Raghu Vallikkat)