Addresses issues mentioned by #355

This commit is contained in:
Lior Halphon 2021-02-28 15:17:00 +02:00
parent 5cc2dcc864
commit d2eb8e0996

View File

@ -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 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)) 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 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/ mkdir -p $(DESTDIR)$(PREFIX)/share/sameboy/ $(DESTDIR)$(PREFIX)/bin/
cp -rf $(BIN)/SDL/* $(DESTDIR)$(PREFIX)/share/sameboy/ cp -rf $(BIN)/SDL/* $(DESTDIR)$(PREFIX)/share/sameboy/
mv $(DESTDIR)$(PREFIX)/share/sameboy/sameboy $(DESTDIR)$(PREFIX)/bin/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-desktop-menu install --novendor --mode system FreeDesktop/sameboy.desktop
-xdg-icon-resource forceupdate --mode system -xdg-icon-resource forceupdate --mode system
-xdg-desktop-menu forceupdate --mode system -xdg-desktop-menu forceupdate --mode system
ifneq ($(SUDO_USER),)
-su $(SUDO_USER) -c "xdg-desktop-menu forceupdate --mode system" -su $(SUDO_USER) -c "xdg-desktop-menu forceupdate --mode system"
endif endif
else
cp FreeDesktop/sameboy.desktop $(DESTDIR)$(PREFIX)/share/applications/sameboy.desktop
endif
$(DESTDIR)$(PREFIX)/share/icons/hicolor/%/apps/sameboy.png: FreeDesktop/AppIcon/%.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/%/apps/sameboy.png: FreeDesktop/AppIcon/%.png
-@$(MKDIR) -p $(dir $@) -@$(MKDIR) -p $(dir $@)