使用电子打包器在Cent OS 64位上构建电子应用程序失败

Windows builds of an Electron app on Cent OS 64 bit with electron-packager fails with error

本文关键字:64位 构建 应用程序 OS 失败 包器 Cent      更新时间:2023-09-26

我试图在远程Cent OS服务器上设置构建,并遇到错误。我安装了wine,但由于服务器是64位架构,wine命令是wine64,而不仅仅是wine。每次我尝试做一个Windows构建,我得到Could not find "wine" on your system... Make sure that the "wine" executable is in your PATH.错误。它似乎试图执行"wine"命令,但我有"wine64"代替,根据各种指南,这是可以的。用化名也没用。有人能建议我如何解决这个问题吗?

谢谢。

我得到相同的错误:

Packaging app for platform win32 x64 using electron v4.2.12
Could not find "wine64" on your system.
Wine is required to use the appCopyright, appVersion, buildVersion, icon, and 
win32metadata parameters for Windows targets.
Make sure that the "wine64" executable is in your PATH.
See https://github.com/electron/electron-packager#building-windows-apps-from-non-windows-platforms for details.

在终端运行这些步骤,让我解决了这个问题:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew cask install wine-stable

来源:https://www.davidbaumgold.com/tutorials/wine-mac/

结果,我只构建了64位版本,但我也必须构建和安装32位版本。尽管编译和安装过程中会提示缺少一些32位元的东西,但电子版本似乎没有问题,工作正常。

我最终遵循的教程在这里。