Skip to content

Commit

Permalink
fix: shortcut does not include cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
KochiyaOcean committed Aug 15, 2022
1 parent c64eeab commit f373373
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ if (process.platform === 'win32' && config.get('poi.misc.shortcut', true)) {
app.getPath('appData') + '\\Microsoft\\Windows\\Start Menu\\Programs\\poi.lnk'
const targetPath = app.getPath('exe')
const argPath = app.getAppPath()
const cwdPath = process.cwd()
const option = {
target: targetPath,
args: argPath,
cwd: cwdPath,
appUserModelId: 'org.poooi.poi',
description: 'poi the KanColle Browser Tool',
}
Expand All @@ -71,12 +73,12 @@ if (process.platform === 'win32' && config.get('poi.misc.shortcut', true)) {
shell.writeShortcutLink(shortcutPath, option)
const safeModeShortcutPath =
app.getPath('appData') + '\\Microsoft\\Windows\\Start Menu\\Programs\\poi (safe mode).lnk'
const safeModeOption = Object.assign({}, option)
Object.assign(safeModeOption, {
const safeModeOption = {
...option,
description: 'poi the KanColle Browser Tool (safe mode)',
args: `${argPath} --safe`,
appUserModelId: 'org.poooi.poi.safe',
})
}
shell.writeShortcutLink(safeModeShortcutPath, safeModeOption)
}

Expand Down

0 comments on commit f373373

Please sign in to comment.