使用电子构建器为不同的OS构建本机模块

时间:2018-05-05 11:59:00

标签: electron electron-builder native-module

当我尝试使用DBI->connect使用以下命令构建应用时,我正在使用electronnodejs创建应用:

electron-builder

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

1 个答案:

答案 0 :(得分:3)

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

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.