PRO CODE Asked:2022-06-07 22:08:40 +0800 CST2022-06-07 22:08:40 +0800 CST 2022-06-07 22:08:40 +0800 CST 电子,为 Windows 构建 772 是否可以在 macOS 上构建 .exe 文件,如果可以,如何构建?我会很感激。我尝试使用电子锻造,它在那里不起作用。 windows 1 个回答 Voted Best Answer nörbörnën 2022-06-07T22:12:00+08:002022-06-07T22:12:00+08:00 使用电子生成器 { "name": "PRO-CODE", "version": "0.0.4", "main": "app/dist/main/index.js", "scripts": { "build": "yarn workspace main build", "electron-build": "yarn build && electron-builder", "build:app": "yarn electron-build --dir", "build:all": "yarn electron-build build -mwl", "build:mac": "yarn electron-build build --mac", "build:linux": "yarn electron-build build --linux", "build:windows": "yarn electron-build build --windows --x64" }, "dependencies": { }, "devDependencies": { "electron": "^12.0.5", "electron-builder": "^22.10.5" }, "workspaces": [ "src/*" ], "build": { "appId": "org.dev.PRO-CODE", "productName": "PRO-CODE", "artifactName": "${productName}.${ext}", "directories": { "output": "release" }, "files": [ "app/**/*" ], "mac": { "icon": "resources/icons/icon.icns" }, "win": { "target": [ "portable" ] }, "linux": { "target": [ "deb", "AppImage" ], "category": "Development" } } }
使用电子生成器