今天楼主用electron写好的一个应用想打包, 去看了下官方的打包教程, 看的过程中遇到了一个问题.To distribute your app with Electron, the folder containing your app should be named app and placed under Electron’s resources directory (on macOS it is Electron.app/Contents/Resources/ and on Linux and Windows it is resources/), like this:这是官方文档的描述, 这个Electron.app目录是哪里来的?
1 回答

慕慕森
TA贡献1856条经验 获得超17个赞
打包可以用这个electron-packager
写个 gulpfile
gulp.task('electron-pack', (cb) => { let opts = { name: 'name', dir: path.join(__dirname, 'build'), arch: 'all', platform: 'darwin', version: '1.1.2', appVersion: '1.2.0', overwrite: true, out: path.join(__dirname, 'installer'), asar: true, } return ElectronPackager(opts, (err, appPath) => { if (err) { console.log(err) cb(err) } else { cb() } }) })
添加回答
举报
0/150
提交
取消