mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	tweaking the desktop file...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									53fe308fe8
								
							
						
					
					
						commit
						8229616ad7
					
				| @ -168,20 +168,34 @@ SHELL := bash | |||||||
| 
 | 
 | ||||||
| APP_NAME ?= ImageGrid.Viewer | APP_NAME ?= ImageGrid.Viewer | ||||||
| 
 | 
 | ||||||
|  | DEVEL_PATH  := $(shell pwd) | ||||||
| 
 | 
 | ||||||
| # XXX move these to a better spot...
 | # install mode...
 | ||||||
| # XXX install path should depend on type of install...
 | # XXX revise...
 | ||||||
| # 	- dev		- run from repo dir
 |  | ||||||
| # 	- user		- install in user dir
 |  | ||||||
| # 	- system	- global install
 |  | ||||||
| INSTALL_PATH ?= | INSTALL_PATH ?= | ||||||
|  | INSTALL ?= dev | ||||||
|  | ifeq ($(INSTALL_PATH),) | ||||||
|  | 	ifeq ($(INSTALL),dev) | ||||||
|  | 		INSTALL_PATH := $(DEVEL_PATH) | ||||||
|  | 		DESKTOP_PATH ?= $(HOME)/.local/share/applications/ | ||||||
|  | 	endif | ||||||
|  | 	ifeq ($(INSTALL),user) | ||||||
|  | 		# XXX | ||||||
|  | 		INSTALL_PATH := | ||||||
|  | 		DESKTOP_PATH ?= $(HOME)/.local/share/applications/ | ||||||
|  | 	endif | ||||||
|  | 	ifeq ($(INSTALL),system) | ||||||
|  | 		# XXX | ||||||
|  | 		INSTALL_PATH := | ||||||
|  | 		DESKTOP_PATH ?= /usr/local/share/applications/ | ||||||
|  | 	endif | ||||||
|  | endif | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| APP_PATH ?= ig | APP_PATH ?= ig | ||||||
| ICON_PATH ?= | ICON_PATH ?= | ||||||
| 
 | 
 | ||||||
| # XXX not sure about these yet...
 | APP_LAUNCHER := ig.js gui | ||||||
| INSTALL_PATH ?= $(shell pwd) |  | ||||||
| APP_LAUNCHER ?= $(INSTALL_PATH)/ig.js gui |  | ||||||
| 
 | 
 | ||||||
| VERSION_FALLBACK ?= 4.0.0a | VERSION_FALLBACK ?= 4.0.0a | ||||||
| # NOTE: we are not using './ig --version 2> /dev/null' because it will 
 | # NOTE: we are not using './ig --version 2> /dev/null' because it will 
 | ||||||
| @ -235,9 +249,6 @@ ELECTRON_DOWNOAD_URL ?= \ | |||||||
| ELECTRON_DIST ?= electron-$(ELECTRON_VERSION)-$(TARGET_OS)-$(ARCH).zip | ELECTRON_DIST ?= electron-$(ELECTRON_VERSION)-$(TARGET_OS)-$(ARCH).zip | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| APP_DIR ?= $(HOME)/.local/share/applications/ |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| BUILD_MODE ?= in-place | BUILD_MODE ?= in-place | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -653,13 +664,17 @@ electron-run: dev | |||||||
| 
 | 
 | ||||||
| ##---------------------------------------------------- Open Desktop ---
 | ##---------------------------------------------------- Open Desktop ---
 | ||||||
| 
 | 
 | ||||||
|  | .PHONY: desktop-file | ||||||
|  | desktop-file: $(APP_NAME).desktop | ||||||
|  | 
 | ||||||
| .PHONY: desktop | .PHONY: desktop | ||||||
| desktop: dev $(APP_NAME).desktop | desktop: dev desktop-file | ||||||
| 	desktop-file-install --dir="$(APP_DIR)" $(APP_NAME).desktop | 	desktop-file-install --dir="$(DESKTOP_PATH)" $(APP_NAME).desktop | ||||||
|  | 	update-desktop-database "$(DESKTOP_PATH)" | ||||||
| 
 | 
 | ||||||
| .PHONY: desktop-remove | .PHONY: desktop-remove | ||||||
| desktop-remove: | desktop-remove: | ||||||
| 	rm -f $(APP_DIR)/$(APP_NAME).desktop | 	rm -f $(DESKTOP_PATH)/$(APP_NAME).desktop | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -719,7 +734,8 @@ $(BUILD_INFO): $(CSS_FILES) $(NODE_DIR) $(PROJECT_FILES) \ | |||||||
| # XXX get this from the install path...
 | # XXX get this from the install path...
 | ||||||
| $(APP_NAME).desktop: templates/App.desktop | $(APP_NAME).desktop: templates/App.desktop | ||||||
| 	cat $< \
 | 	cat $< \
 | ||||||
| 		| sed 's#\$$LAUNCHER#$(APP_LAUNCHER)#' \
 | 		| sed 's#\$$LAUNCHER#$(INSTALL_PATH)/$(APP_LAUNCHER)#' \
 | ||||||
|  | 		| sed 's#\$$ICON#$(ICON_PATH)#' \
 | ||||||
| 		> $@ | 		> $@ | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,9 +1,9 @@ | |||||||
| [Desktop Entry] | [Desktop Entry] | ||||||
| Name=ImageGrid.Viewer | Name=ImageGrid.Viewer | ||||||
| Comment=Image sorting and editing | Comment=Image sorting and editing | ||||||
| Categories=Graphics;Database;Viewer;Photography; | Categories=Photography;Graphics;Database;Viewer; | ||||||
| Exec=$LAUNCHER | Exec=$LAUNCHER | ||||||
| Icon= | Icon=$ICON | ||||||
| Terminal=false | Terminal=false | ||||||
| Type=Application | Type=Application | ||||||
| StartupNotify=true | StartupNotify=true | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user