mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
writeShortcut on windows
This commit is contained in:
14
index.js
14
index.js
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user