xiaojunnuo
3 years ago
8 changed files with 46 additions and 9 deletions
@ -1,2 +1,2 @@
|
||||
VUE_APP_PUBLISH_URL=http://dev-sidecar.docmirror.cn/update/ |
||||
VUE_APP_PUBLISH_PROVIDER=generic |
||||
VUE_APP_PUBLISH_PROVIDER=generic |
||||
|
@ -1,7 +1,26 @@
|
||||
import path from 'path' |
||||
import os from 'os' |
||||
function getSystemPlatform () { |
||||
switch (os.platform()) { |
||||
case 'darwin': |
||||
return 'mac' |
||||
case 'linux': |
||||
return 'linux' |
||||
case 'win32': |
||||
return 'windows' |
||||
case 'win64': |
||||
return 'windows' |
||||
case 'unknown os': |
||||
default: |
||||
throw new Error(`UNKNOWN OS TYPE ${os.platform()}`) |
||||
} |
||||
} |
||||
export default { |
||||
getAppRootPath (app) { |
||||
const exePath = app.getPath('exe') |
||||
if (getSystemPlatform() === 'mac') { |
||||
return path.join(exePath, '../../') |
||||
} |
||||
return path.join(exePath, '../') |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue