feat(win): win 32bit build

Fix #18
This commit is contained in:
Alexey Kasyanchuk
2018-03-25 06:23:32 +03:00
parent c549e6b266
commit d353edc56f
2 changed files with 21 additions and 0 deletions

View File

@ -45,6 +45,15 @@
"from": "./imports/win",
"to": "."
}
],
"target": [
{
"target": "nsis",
"arch": [
"x64",
"ia32"
]
}
]
},
"linux": {

View File

@ -10,10 +10,18 @@ export default (app) => {
return `./${app}.exe`
}
if (/^win/.test(process.platform) && fs.existsSync(`./${process.arch}/${app}.exe`)) {
return `./${process.arch}/${app}.exe`
}
if(/^win/.test(process.platform) && fs.existsSync(path.dirname(process.execPath) + `/${app}.exe`)) {
return path.dirname(process.execPath) + `/${app}.exe`
}
if(/^win/.test(process.platform) && fs.existsSync(path.dirname(process.execPath) + `/${process.arch}/${app}.exe`)) {
return path.dirname(process.execPath) + `/${process.arch}/${app}.exe`
}
if (fs.existsSync(fs.realpathSync(__dirname) + `/${app}`)) {
return fs.realpathSync(__dirname) + `/${app}`
}
@ -32,6 +40,10 @@ export default (app) => {
return `imports/win/${app}.exe`
}
if (/^win/.test(process.platform) && fs.existsSync(`imports/win/${process.arch}/${app}.exe`)) {
return `imports/win/${process.arch}/${app}.exe`
}
if (process.platform === 'linux' && fs.existsSync(`imports/linux/${app}`)) {
return `imports/linux/${app}`
}