From bd21d1422646ab76beec26a1c97f247cdb4d590a Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 30 Jun 2022 15:00:35 +0300 Subject: [PATCH] refactoring... Signed-off-by: Alex A. Naanou --- Viewer/App.desktop.tpl | 13 +++++++------ Viewer/Makefile | 5 +++-- Viewer/templates/App.desktop | 9 --------- 3 files changed, 10 insertions(+), 17 deletions(-) delete mode 100644 Viewer/templates/App.desktop diff --git a/Viewer/App.desktop.tpl b/Viewer/App.desktop.tpl index 6a6d6f22..b3de158d 100644 --- a/Viewer/App.desktop.tpl +++ b/Viewer/App.desktop.tpl @@ -1,8 +1,9 @@ [Desktop Entry] -Encoding=UTF-8 -Version=1.0 -Type=Application -Terminal=false -Exec=$APP_PATH Name=$APP_NAME -Icon=$ICON_PATH +Comment=Image sorting and editing +Categories=Photography;Graphics;Database;Viewer; +Exec=$LAUNCHER +Icon=$ICON +Terminal=false +Type=Application +StartupNotify=true diff --git a/Viewer/Makefile b/Viewer/Makefile index 13e3cf46..93ccd3f7 100644 --- a/Viewer/Makefile +++ b/Viewer/Makefile @@ -731,9 +731,10 @@ $(BUILD_INFO): $(CSS_FILES) $(NODE_DIR) $(PROJECT_FILES) \ %.css: %.less $(LESSC) $< > $@ -# XXX get this from the install path... -$(APP_NAME).desktop: templates/App.desktop + +$(APP_NAME).desktop: App.desktop.tpl cat $< \ + | sed 's#\$$APP_NAME#$(APP_NAME)#' \ | sed 's#\$$LAUNCHER#$(INSTALL_PATH)/$(APP_LAUNCHER)#' \ | sed 's#\$$ICON#$(ICON_PATH)#' \ > $@ diff --git a/Viewer/templates/App.desktop b/Viewer/templates/App.desktop deleted file mode 100644 index 14d9eef6..00000000 --- a/Viewer/templates/App.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=ImageGrid.Viewer -Comment=Image sorting and editing -Categories=Photography;Graphics;Database;Viewer; -Exec=$LAUNCHER -Icon=$ICON -Terminal=false -Type=Application -StartupNotify=true