Windows 使用 electron-packager 在 Cent OS 64 位上构建 Electron 应用程序失败并出现错误

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

我正在尝试在远程 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" 相反,根据各种指南,没关系。制作别名没有帮助。 有人可以建议我如何解决这个问题吗?

谢谢。

事实证明,我只构建了 64 位版本,但我还必须构建和安装 32 位版本。尽管编译和安装时警告说缺少一些 32 位的东西,但电子构建似乎没问题并且工作正常。

我终于遵循的教程 is here

我遇到了同样的错误:

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/