opensumi / ide-electron

OpenSumi Electron Version
https://opensumi.com
MIT License
171 stars 56 forks source link

ide-electron项目可以打包windows平台吗 #68

Open LuoTianStyle opened 1 year ago

LuoTianStyle commented 1 year ago

我运行pnpm run pack:all的时候打包的项目中只有mac平台的安装包,怎么才可以打出windows的安装包呢

yantze commented 1 year ago

如果是 mac 系统,生成的就是 mac dmg,如果是 windows 系统环境会生成 windows exe 安装包

yantze commented 1 year ago

生成其它系统的安装包需要的条件比较多, 在 ide-electron 中 你可以改为 把 package.json scripts 字段 "pack:x64": "pnpm build && cross-env TARGET_ARCHES=x64 node build/pack.js", 改为 "pack:x64": "pnpm build && cross-env TARGET_PLATFORMS=win32 TARGET_ARCHES=x64 node build/pack.js",

但最后编译报错,因为 ide-elecron 用到了 Node.js 的 Addon ,需要 Windows 下才能编译出来