From d2eb8e0996894b3cccdf45011e667016be850fbb Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Sun, 28 Feb 2021 15:17:00 +0200 Subject: [PATCH] Addresses issues mentioned by #355 --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index caf059b..13747cb 100644 --- a/Makefile +++ b/Makefile @@ -438,6 +438,7 @@ ICON_NAMES := apps/sameboy mimetypes/x-gameboy-rom mimetypes/x-gameboy-color-rom ICON_SIZES := 16x16 32x32 64x64 128x128 256x256 512x512 ICONS := $(foreach name,$(ICON_NAMES), $(foreach size,$(ICON_SIZES),$(DESTDIR)$(PREFIX)/share/icons/hicolor/$(size)/$(name).png)) install: sdl $(DESTDIR)$(PREFIX)/share/mime/packages/sameboy.xml $(ICONS) FreeDesktop/sameboy.desktop + -@$(MKDIR) -p $(dir $(DESTDIR)$(PREFIX)) mkdir -p $(DESTDIR)$(PREFIX)/share/sameboy/ $(DESTDIR)$(PREFIX)/bin/ cp -rf $(BIN)/SDL/* $(DESTDIR)$(PREFIX)/share/sameboy/ mv $(DESTDIR)$(PREFIX)/share/sameboy/sameboy $(DESTDIR)$(PREFIX)/bin/sameboy @@ -446,8 +447,12 @@ ifeq ($(DESTDIR),) -xdg-desktop-menu install --novendor --mode system FreeDesktop/sameboy.desktop -xdg-icon-resource forceupdate --mode system -xdg-desktop-menu forceupdate --mode system +ifneq ($(SUDO_USER),) -su $(SUDO_USER) -c "xdg-desktop-menu forceupdate --mode system" endif +else + cp FreeDesktop/sameboy.desktop $(DESTDIR)$(PREFIX)/share/applications/sameboy.desktop +endif $(DESTDIR)$(PREFIX)/share/icons/hicolor/%/apps/sameboy.png: FreeDesktop/AppIcon/%.png -@$(MKDIR) -p $(dir $@)