代码之家  ›  专栏  ›  技术社区  ›  StackedQ the red crafteryt

使用electron builder为不同的操作系统构建本机模块

  •  2
  • StackedQ the red crafteryt  · 技术社区  · 6 年前

    我正在使用创建应用程序 electron nodejs ,当我尝试使用 electron-builder 使用以下命令:

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

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

    1 回复  |  直到 6 年前
        1
  •  6
  •   OJ Kwon    6 年前

    你不能。 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.