From 91fbf4f93bf191a187553c572636920004074bc6 Mon Sep 17 00:00:00 2001 From: puttaalu Date: Sat, 26 Sep 2026 10:51:39 +0200 Subject: [PATCH] Name the desktop binary photog The CMake target stays 'uploader' but the output binary is now 'photog', matching the package and app, so 'nix run' and the desktop entry resolve it (nix run looked for bin/photog and failed on bin/uploader). Also set meta.mainProgram. --- desktop/CMakeLists.txt | 4 ++++ desktop/flake.nix | 1 + desktop/photog.desktop | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index c78249e..04363f1 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -26,6 +26,10 @@ target_link_libraries(uploader PRIVATE Qt6Keychain::Qt6Keychain ) +# The binary is "photog" (matching the app + package), so `nix run` and the +# desktop entry find it; the CMake target stays "uploader". +set_target_properties(uploader PROPERTIES OUTPUT_NAME photog) + # Installation — the binary, a desktop entry, and the app icon in the hicolor # theme, so `nix profile install ./desktop` puts "Photog" in the app menu. include(GNUInstallDirs) diff --git a/desktop/flake.nix b/desktop/flake.nix index 9d975bd..5d2cef2 100644 --- a/desktop/flake.nix +++ b/desktop/flake.nix @@ -34,6 +34,7 @@ qt6.wrapQtAppsHook ]; buildInputs = [ pkgs.qt6Packages.qtkeychain ] ++ qtModules; + meta.mainProgram = "photog"; }; devShells.default = pkgs.mkShell { diff --git a/desktop/photog.desktop b/desktop/photog.desktop index 4c61052..5be7a12 100644 --- a/desktop/photog.desktop +++ b/desktop/photog.desktop @@ -3,7 +3,7 @@ Type=Application Name=Photog GenericName=Photo Uploader Comment=Upload photos to your gallery -Exec=uploader +Exec=photog Icon=photog Terminal=false Categories=Graphics;Photography;Network;