git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit cd2e4b3cefef65a1f239dcefcb01ad5a85368d81
parent 3c0f4d458d5aa7ba897fd4d07f956104af20456b
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Sat, 27 Feb 2021 17:34:11 +0200

Fixes and improvements to XDG installation

Diffstat:
AFreeDesktop/sameboy.xml17+++++++++++++++++
AFreeDesktop/x-gameboy-color-rom.xml10++++++++++
MMakefile16+++++++++++++---
3 files changed, 40 insertions(+), 3 deletions(-)

diff --git a/FreeDesktop/sameboy.xml b/FreeDesktop/sameboy.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> +<mime-type type="application/x-gameboy-rom"> + <comment>Game Boy ROM</comment> + <icon name="x-gameboy-rom"/> + <glob-deleteall/> + <glob pattern="*.gb"/> + <glob pattern="*.sgb"/> +</mime-type> +<mime-type type="application/x-gameboy-color-rom"> + <comment>Game Boy Color ROM</comment> + <icon name="x-gameboy-color-rom"/> + <glob-deleteall/> + <glob pattern="*.gbc"/> + <glob pattern="*.cgb"/> +</mime-type> +</mime-info> diff --git a/FreeDesktop/x-gameboy-color-rom.xml b/FreeDesktop/x-gameboy-color-rom.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> +<mime-type type="application/x-gameboy-color-rom"> + <comment>YOUR MOM</comment> + <icon name="application-x-gameboy-color-rom"/> + <glob pattern="*.gbc"/> + <glob pattern="*.cgb"/> + <glob pattern="*.quacky"/> +</mime-type> +</mime-info> diff --git a/Makefile b/Makefile @@ -434,23 +434,33 @@ libretro: # If you somehow find a reasonable way to make associate an icon with an extension in this dumpster # fire of a desktop environment, open an issue or a pull request ifneq ($(CAN_INSTALL),) -ICON_NAMES := apps/sameboy +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/applications/sameboy.desktop $(ICONS)(PREFIX)/share/mime/application/x-gameboy-color-rom.xml +install: sdl $(DESTDIR)$(PREFIX)/share/applications/sameboy.desktop $(ICONS) FreeDesktop/sameboy.xml mkdir -p $(DESTDIR)$(PREFIX)/share/sameboy/ cp -rf $(BIN)/SDL/* $(DESTDIR)$(PREFIX)/share/sameboy/ mv $(DESTDIR)$(PREFIX)/share/sameboy/sameboy $(DESTDIR)$(PREFIX)/bin/sameboy ifeq ($(DESTDIR),) + -update-mime-database -n $(PREFIX)/mime + -xdg-desktop-menu install --mode system FreeDesktop/sameboy.xml -xdg-icon-resource forceupdate --mode system -xdg-desktop-menu forceupdate --mode system + -su $(SUDO_USER) -c "xdg-desktop-menu forceupdate --mode system" endif $(DESTDIR)$(PREFIX)/share/icons/hicolor/%/apps/sameboy.png: FreeDesktop/AppIcon/%.png -@$(MKDIR) -p $(dir $@) cp -f $^ $@ - +$(DESTDIR)$(PREFIX)/share/icons/hicolor/%/mimetypes/x-gameboy-rom.png: FreeDesktop/Cartridge/%.png + -@$(MKDIR) -p $(dir $@) + cp -f $^ $@ + +$(DESTDIR)$(PREFIX)/share/icons/hicolor/%/mimetypes/x-gameboy-color-rom.png: FreeDesktop/ColorCartridge/%.png + -@$(MKDIR) -p $(dir $@) + cp -f $^ $@ + $(DESTDIR)$(PREFIX)/share/applications/sameboy.desktop: FreeDesktop/sameboy.desktop -@$(MKDIR) -p $(dir $@) cp -f $^ $@

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.