writeShortcut on windows

This commit is contained in:
Araxeus
2021-05-10 22:13:45 +03:00
parent 8284b56075
commit 93d4d3c976

View File

@ -255,8 +255,18 @@ app.on("ready", () => {
}, 20000);
}
if (is.windows()) {
app.setAppUserModelId("com.github.th-ch.youtube-music");
if (!is.dev() && is.windows()) {
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();