don't create app icon for flatpak/debian linux builds, fixes #3201

This commit is contained in:
zadam 2022-10-16 20:52:10 +02:00
parent 01910d3231
commit c11cf41f30

View File

@ -28,11 +28,17 @@ function installLocalAppIcon() {
return;
}
if (!fs.existsSync(path.resolve(ELECTRON_APP_ROOT_DIR, "trilium-portable.sh"))) {
// simple heuristic to detect ".tar.xz" linux build (i.e. not flatpak, not debian)
// only in such case it's necessary to create an icon
return;
}
const desktopDir = path.resolve(os.homedir(), '.local/share/applications');
fs.stat(desktopDir, function (err, stats) {
if (err) {
// Directory doesn't exist so we won't attempt to create the .desktop file
// Directory doesn't exist, so we won't attempt to create the .desktop file
return;
}
@ -64,4 +70,4 @@ function getExePath() {
module.exports = {
installLocalAppIcon
};
};