简体   繁体   English

使用电子打包器在 Cent OS 64 位上的电子应用程序的 Windows 构建失败并显示错误

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

I'm trying to set up build on a remote Cent OS server and stuck with error.我正在尝试在远程 Cent OS 服务器上设置构建并遇到错误。 I installed wine, but since the server has 64-bit architecture, wine command is wine64 , not just wine .我安装了 wine,但由于服务器是 64 位架构,所以 wine 命令是wine64 ,而不仅仅是wine Each time I try to make a Windows build, I get the Could not find "wine" on your system... Make sure that the "wine" executable is in your PATH.每次我尝试进行 Windows 构建时,我都会Could not find "wine" on your system... Make sure that the "wine" executable is in your PATH. error.错误。 It seems like it's trying to execute "wine" command, but I have "wine64" instead, and according to various guides, it's ok.似乎它正在尝试执行“wine”命令,但我使用的是“wine64”,并且根据各种指南,没关系。 Making an alias didn't help.制作别名没有帮助。 Could someone suggest how I can workaround this issue?有人可以建议我如何解决这个问题吗?

Thanks.谢谢。

I was getting the same error:我遇到了同样的错误:

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.

Running these steps in terminal, allowed me to resolve this issue:在终端中运行这些步骤,让我解决了这个问题:

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

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

As it turned out, I built only 64-bit version, but I had to build and install 32-bit version as well.事实证明,我只构建了 64 位版本,但我还必须构建和安装 32 位版本。 Even though compilation and installation went with warning that some 32-bit stuff is missing, the electron builds seem to be OK and work OK.尽管编译和安装伴随着缺少某些 32 位内容的警告,但电子构建似乎没问题并且工作正常。

The tutorial I finally followed is here .我最终遵循的教程是here

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM