2

我正在使用electronand创建一个应用程序nodejs,当我尝试electron-builder使用以下命令构建它时:

electron-builder --mac --linux --win --x64

它仅为我当前的操作系统构建本机模块。有没有办法为所有操作系统构建原生模块?

4

1 回答 1

6

你不能。https://www.electron.build/multi-platform-b​​uild

If your app has native dependency, 
it can be compiled only on the target platform unless prebuild is not used.

prebuild is a solution, but most node modules don't provide prebuilt binaries.
macOS Code Signing works only on macOS. Cannot be fixed.
于 2018-05-05T17:12:40.210 回答