[AutoStart > Linux] Fix for system electron

This commit is contained in:
Ducko 2022-02-13 19:13:29 +00:00
parent 4a33d5a1c4
commit 600bc953be

View file

@ -8,8 +8,7 @@ const buildInfo = require('../utils/buildInfo');
const desktopPath = join(app.getPath('appData'), 'autostart', app.name + '-' + buildInfo.releaseChannel + '.desktop'); const desktopPath = join(app.getPath('appData'), 'autostart', app.name + '-' + buildInfo.releaseChannel + '.desktop');
// Vars for use in desktop file content template // Vars for use in desktop file content template
const exePath = global.systemElectron ? '/usr/share/pixmaps/Discord' : app.getPath('exe'); const exePath = app.getPath('exe');
const iconPath = join(dirname(exePath), 'discord.png');
// Template for desktop file // Template for desktop file
const desktopContent = `[Desktop Entry] const desktopContent = `[Desktop Entry]
@ -18,7 +17,7 @@ Exec=${exePath}
Hidden=false Hidden=false
NoDisplay=false NoDisplay=false
Name=${basename(process.execPath, '.exe')} Name=${basename(process.execPath, '.exe')}
Icon=${iconPath} Icon=${join(global.systemElectron ? '/usr/share/pixmaps/Discord' : dirname(exePath), 'discord.png')}
Comment=Text and voice chat for gamers. Comment=Text and voice chat for gamers.
X-GNOME-Autostart-enabled=true`; X-GNOME-Autostart-enabled=true`;