Ai
1 Star 0 Fork 0

leopald/joplin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
electronRebuild.js 1.15 KB
一键复制 编辑 原始数据 按行查看 历史
Laurent Cozic 提交于 2019-03-03 08:58 +08:00 . Trying to fix Windows 32-bit build
const execCommand = function(command) {
const exec = require('child_process').exec
console.info('Running: ' + command);
return new Promise((resolve, reject) => {
let childProcess = exec(command, (error, stdout, stderr) => {
if (error) {
if (error.signal == 'SIGTERM') {
resolve('Process was killed');
} else {
reject(error);
}
} else {
resolve(stdout.trim());
}
});
});
}
const isLinux = () => {
return process && process.platform === 'linux';
}
const isWindows = () => {
return process && process.platform === 'win32';
}
const isMac = () => {
return process && process.platform === 'darwin';
}
async function main() {
// electron-rebuild --arch ia32 && electron-rebuild --arch x64
let exePath = __dirname + '/node_modules/.bin/electron-rebuild';
if (isWindows()) exePath += '.cmd';
if (isWindows()) {
console.info(await execCommand(['"' + exePath + '"', '--arch ia32'].join(' ')));
console.info(await execCommand(['"' + exePath + '"', '--arch x64'].join(' ')));
} else {
console.info(await execCommand(['"' + exePath + '"'].join(' ')));
}
}
main().catch((error) => {
console.error(error);
process.exit(1);
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/letmethinking/joplin.git
git@gitee.com:letmethinking/joplin.git
letmethinking
joplin
joplin
master

搜索帮助