mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 12:42:06 +00:00
writeShortcut on windows
This commit is contained in:
14
index.js
14
index.js
@ -255,8 +255,18 @@ app.on("ready", () => {
|
|||||||
}, 20000);
|
}, 20000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is.windows()) {
|
if (!is.dev() && is.windows()) {
|
||||||
app.setAppUserModelId("com.github.th-ch.youtube-music");
|
const appID = "com.github.th-ch.youtube-music";
|
||||||
|
electron.shell.writeShortcutLink(
|
||||||
|
path.join(app.getPath("appData"), 'Microsoft', 'Windows', 'Start Menu', 'Programs', 'YouTube Music.lnk'),
|
||||||
|
'update',
|
||||||
|
{
|
||||||
|
target: process.execPath,
|
||||||
|
description: "YouTube Music Desktop App - including custom plugins",
|
||||||
|
appUserModelId: appID
|
||||||
|
}
|
||||||
|
);
|
||||||
|
app.setAppUserModelId(appID);
|
||||||
}
|
}
|
||||||
|
|
||||||
mainWindow = createMainWindow();
|
mainWindow = createMainWindow();
|
||||||
|
|||||||
Reference in New Issue
Block a user