Addresses issues mentioned by #355

This commit is contained in:
Lior Halphon 2021-02-28 15:17:00 +02:00
parent 5cc2dcc864
commit d2eb8e0996
1 changed files with 5 additions and 0 deletions

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
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 $@)