mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
added basic .desktop support...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
36e4debfaa
commit
678aef7809
@ -232,6 +232,9 @@ ELECTRON_DOWNOAD_URL ?= \
|
||||
ELECTRON_DIST ?= electron-$(ELECTRON_VERSION)-$(TARGET_OS)-$(ARCH).zip
|
||||
|
||||
|
||||
APP_DIR ?= $(HOME)/.local/share/applications/
|
||||
|
||||
|
||||
BUILD_MODE ?= in-place
|
||||
|
||||
|
||||
@ -645,6 +648,18 @@ electron-run: dev
|
||||
|
||||
|
||||
|
||||
##---------------------------------------------------- Open Desktop ---
|
||||
|
||||
.PHONY: desktop
|
||||
desktop: dev $(APP_NAME).desktop
|
||||
desktop-file-install --dir="$(APP_DIR)" $(APP_NAME).desktop
|
||||
|
||||
.PHONY: desktop-remove
|
||||
desktop-remove:
|
||||
rm -f $(APP_DIR)/$(APP_NAME).desktop
|
||||
|
||||
|
||||
|
||||
#**********************************************************************
|
||||
# helpers...
|
||||
|
||||
@ -699,8 +714,12 @@ $(BUILD_INFO): $(CSS_FILES) $(NODE_DIR) $(PROJECT_FILES) \
|
||||
$(LESSC) $< > $@
|
||||
|
||||
|
||||
$(APP_NAME).desktop: App.desktop
|
||||
mv $< $@
|
||||
# XXX get this from the install path...
|
||||
$(APP_NAME).desktop: APP_LAUNCHER := $(shell pwd)/ig.js gui
|
||||
$(APP_NAME).desktop: templates/App.desktop
|
||||
cat $< \
|
||||
| sed 's#\$$LAUNCHER#$(APP_LAUNCHER)#' \
|
||||
> $@
|
||||
|
||||
|
||||
# XXX might be a good idea to install directly to $(BUILD_DIR) so as not
|
||||
|
||||
9
Viewer/templates/App.desktop
Normal file
9
Viewer/templates/App.desktop
Normal file
@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Name=ImageGrid.Viewer
|
||||
Comment=Image sorting and editing application
|
||||
Exec=$LAUNCHER
|
||||
Icon=
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Categories=
|
||||
Loading…
x
Reference in New Issue
Block a user