Merge branch 'desktop-file' of sloum/bombadillo into develop

This commit is contained in:
Sloom Sloum Sluom IV 2019-11-24 00:29:25 -05:00 committed by Gitea
commit 76cf3da4ae
3 changed files with 29 additions and 1 deletions

View File

@ -26,7 +26,7 @@ build:
${GOCMD} build ${LDFLAGS} -o ${BINARY}
.PHONY: install
install: install-bin install-man clean
install: install-bin install-man install-desktop clean
.PHONY: install-man
install-man: bombadillo.1
@ -34,6 +34,20 @@ install-man: bombadillo.1
install -d ${DESTDIR}${MAN1DIR}
install -m 0644 ./bombadillo.1.gz ${DESTDIR}${MAN1DIR}
.PHONY: install-desktop
install-desktop:
ifeq ($(shell uname), Linux)
# These steps will not work on Darwin, Plan9, or Windows
# They would likely work on BSD systems
install -d ${DESTDIR}${DATAROOTDIR}/applications
install -m 0644 ./bombadillo.desktop ${DESTDIR}${DATAROOTDIR}/applications
install -d ${DESTDIR}${DATAROOTDIR}/pixmaps
install -m 0644 ./bombadillo-icon.png ${DESTDIR}${DATAROOTDIR}/pixmaps
-update-desktop-database 2> /dev/null
else
@echo "* Skipping protocol handler associations and desktop file creation for non-linux system *"
endif
.PHONY: install-bin
install-bin: build
install -d ${DESTDIR}${BINDIR}
@ -48,6 +62,10 @@ clean:
uninstall: clean
rm -f ${DESTDIR}${MAN1DIR}/bombadillo.1.gz
rm -f ${DESTDIR}${BINDIR}/${BINARY}
rm -f ${DESTDIR}${DATAROOTDIR}/applications/bombadillo.desktop
rm -f ${DESTDIR}${DATAROOTDIR}/pixmaps/bombadillo-icon.png
-update-desktop-database 2> /dev/null
.PHONY: test
test: clean build

BIN
bombadillo-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

10
bombadillo.desktop Normal file
View File

@ -0,0 +1,10 @@
[Desktop Entry]
Type=Application
Name=Bombadillo
GenericName=Non-Web Browser
Comment=View gopher, gemini, finger, telnet, http(s) sites over the internet
Terminal=true
Categories=Network;WebBrowser;ConsoleOnly;
Exec=bombadillo %U
Icon=bombadillo-icon
MimeType=x-scheme-handler/gopher;x-scheme-handler/gemini;x-scheme-handler/finger;