From 31063bbc9ccc9e70ebc1d91029fd811da1a1fa0f Mon Sep 17 00:00:00 2001 From: crschnick Date: Sat, 8 Nov 2025 11:34:38 +0000 Subject: [PATCH] [stage] --- .../io/xpipe/app/util/DesktopShortcuts.java | 21 ++++++++++++++++++- dist/changelog/19.0.md | 1 + version | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/util/DesktopShortcuts.java b/app/src/main/java/io/xpipe/app/util/DesktopShortcuts.java index e2a612b67..c89de2e64 100644 --- a/app/src/main/java/io/xpipe/app/util/DesktopShortcuts.java +++ b/app/src/main/java/io/xpipe/app/util/DesktopShortcuts.java @@ -1,13 +1,16 @@ package io.xpipe.app.util; import io.xpipe.app.core.AppInstallation; +import io.xpipe.app.core.AppNames; import io.xpipe.app.core.AppSystemInfo; import io.xpipe.app.process.CommandBuilder; import io.xpipe.app.process.LocalShell; import io.xpipe.app.process.OsFileSystem; +import io.xpipe.app.update.AppDistributionType; import io.xpipe.core.FilePath; import io.xpipe.core.OsType; +import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; @@ -41,10 +44,26 @@ public class DesktopShortcuts { return shortcutPath; } + private static Path getOrCreateIcon() throws IOException { + if (AppDistributionType.get() != AppDistributionType.APP_IMAGE) { + return AppInstallation.ofCurrent().getLogoPath(); + } + + var target = AppSystemInfo.ofCurrent().getUserHome().resolve(".local", "share", "icons", "256x256", "apps"); + var file = target.resolve(AppNames.ofCurrent().getKebapName() + ".png"); + if (Files.exists(file)) { + return file; + } + + Files.createDirectories(target); + Files.copy(AppInstallation.ofCurrent().getLogoPath(), file); + return file; + } + private static Path createLinuxShortcut(String executable, String args, String name) throws Exception { // Linux .desktop names are very restrictive var fixedName = name.replaceAll("[^\\w _]", ""); - var icon = AppInstallation.ofCurrent().getLogoPath(); + var icon = getOrCreateIcon(); var content = String.format( """ [Desktop Entry] diff --git a/dist/changelog/19.0.md b/dist/changelog/19.0.md index 3cee449af..daeb5f76f 100644 --- a/dist/changelog/19.0.md +++ b/dist/changelog/19.0.md @@ -60,6 +60,7 @@ There is also now a checkout page for chinese users, which supports common chine - The nixpkg package now also supports macOS - Add option to control application behavior on system hibernation - Add workaround when default beacon HTTP server port was not usable +- Improve reliability of session restarts when a connection was interrupted ## Fixes diff --git a/version b/version index 4602cf08e..ae5a62858 100644 --- a/version +++ b/version @@ -1 +1 @@ -19.0-14 +19.0-15