@ -45,6 +45,15 @@
|
|||||||
"from": "./imports/win",
|
"from": "./imports/win",
|
||||||
"to": "."
|
"to": "."
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"target": [
|
||||||
|
{
|
||||||
|
"target": "nsis",
|
||||||
|
"arch": [
|
||||||
|
"x64",
|
||||||
|
"ia32"
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"linux": {
|
"linux": {
|
||||||
|
@ -10,10 +10,18 @@ export default (app) => {
|
|||||||
return `./${app}.exe`
|
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`)) {
|
if(/^win/.test(process.platform) && fs.existsSync(path.dirname(process.execPath) + `/${app}.exe`)) {
|
||||||
return 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}`)) {
|
if (fs.existsSync(fs.realpathSync(__dirname) + `/${app}`)) {
|
||||||
return fs.realpathSync(__dirname) + `/${app}`
|
return fs.realpathSync(__dirname) + `/${app}`
|
||||||
}
|
}
|
||||||
@ -32,6 +40,10 @@ export default (app) => {
|
|||||||
return `imports/win/${app}.exe`
|
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}`)) {
|
if (process.platform === 'linux' && fs.existsSync(`imports/linux/${app}`)) {
|
||||||
return `imports/linux/${app}`
|
return `imports/linux/${app}`
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user