forked from cory/tildefriends
build: This creates a working AppImage.
This commit is contained in:
parent
03c8b75994
commit
6dc099809f
31
GNUmakefile
31
GNUmakefile
@ -9,8 +9,8 @@ VERSION_NAME := Honey bunches of boats.
|
|||||||
|
|
||||||
SQLITE_URL := https://www.sqlite.org/2024/sqlite-amalgamation-3460100.zip
|
SQLITE_URL := https://www.sqlite.org/2024/sqlite-amalgamation-3460100.zip
|
||||||
BUNDLETOOL_URL := https://github.com/google/bundletool/releases/download/1.17.0/bundletool-all-1.17.0.jar
|
BUNDLETOOL_URL := https://github.com/google/bundletool/releases/download/1.17.0/bundletool-all-1.17.0.jar
|
||||||
LINUXDEPLOY_URL := https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20240109-1/linuxdeploy-x86_64.AppImage
|
APPIMAGETOOL_URL := https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
|
||||||
LINUXDEPLOY_MD5 := 659d69326199524552bfbbe46cb0adae out/linuxdeploy
|
APPIMAGETOOL_MD5 := e989fadfc4d685fd3d6aeeb9b525d74d out/appimagetool
|
||||||
|
|
||||||
PROJECT = tildefriends
|
PROJECT = tildefriends
|
||||||
BUILD_DIR ?= out
|
BUILD_DIR ?= out
|
||||||
@ -1077,17 +1077,22 @@ endif
|
|||||||
|
|
||||||
out/tildefriends-x86_64.AppImage: out/release/tildefriends out/data.zip
|
out/tildefriends-x86_64.AppImage: out/release/tildefriends out/data.zip
|
||||||
@echo "[appimage] $$@"
|
@echo "[appimage] $$@"
|
||||||
@mkdir -p out/AppDir/usr/bin
|
@rm -rf out/tildefriends.AppDir
|
||||||
@mkdir -p out/AppDir/usr/share/applications
|
@mkdir -p out/tildefriends.AppDir/usr/bin
|
||||||
@mkdir -p out/AppDir/usr/share/icons/hicolor/scalable/apps
|
@mkdir -p out/tildefriends.AppDir/usr/share/applications
|
||||||
@echo $(LINUXDEPLOY_MD5) > out/linuxdeploy.md5
|
@mkdir -p out/tildefriends.AppDir/usr/share/icons/hicolor/scalable/apps
|
||||||
@test -x out/linuxdeploy || curl -q -L -o out/linuxdeploy $(LINUXDEPLOY_URL) && md5sum -c out/linuxdeploy.md5 && chmod +x out/linuxdeploy
|
@mkdir -p out/tildefriends.AppDir/usr/share/tildefriends
|
||||||
@echo "[Desktop Entry]\nName=tildefriends\nExec=tildefriends\nIcon=tildefriends\nType=Application\nCategories=Network" > out/AppDir/usr/share/applications/tildefriends.desktop
|
@echo $(APPIMAGETOOL_MD5) > out/appimagetool.md5
|
||||||
@cp src/ios/tildefriends.svg out/AppDir/usr/share/icons/hicolor/scalable/apps/
|
@test -x out/appimagetool || curl -q -L -o out/appimagetool $(APPIMAGETOOL_URL) && md5sum -c out/appimagetool.md5 && chmod +x out/appimagetool
|
||||||
@cat out/release/tildefriends out/data.zip > out/AppDir/usr/bin/tildefriends
|
@echo "[Desktop Entry]\nName=tildefriends\nExec=/usr/bin/tildefriends\nIcon=/usr/share/icons/hicolor/scalable/apps/tildefriends\nType=Application\nCategories=Network" > out/tildefriends.AppDir/tildefriends.desktop
|
||||||
@chmod +x out/AppDir/usr/bin/tildefriends
|
@cp src/ios/tildefriends.svg out/tildefriends.AppDir/usr/share/icons/hicolor/scalable/apps/
|
||||||
@cd out; ./linuxdeploy --appimage-extract; cd ..
|
@cp src/ios/tildefriends.svg out/tildefriends.AppDir/
|
||||||
@unset SOURCE_DATE_EPOCH; cd out; squashfs-root/usr/bin/linuxdeploy --appdir AppDir --output appimage; cd ..
|
@cp out/release/tildefriends out/tildefriends.AppDir/usr/bin/
|
||||||
|
@cp out/data.zip out/tildefriends.AppDir/usr/share/tildefriends/data.zip
|
||||||
|
@echo "#!/bin/sh\n\$${APPDIR}/usr/bin/tildefriends run -z \$$APPDIR/usr/share/tildefriends/data.zip" > out/tildefriends.AppDir/AppRun
|
||||||
|
@chmod +x out/tildefriends.AppDir/AppRun
|
||||||
|
@cd out; ./appimagetool --appimage-extract; cd ..
|
||||||
|
@unset SOURCE_DATE_EPOCH; PATH=$$PATH:out/squashfs-root/usr/bin ARCH=x86_64 out/squashfs-root/usr/bin/appimagetool out/tildefriends.AppDir out/tildefriends-x86_64.AppImage
|
||||||
|
|
||||||
appimage: out/tildefriends-x86_64.AppImage
|
appimage: out/tildefriends-x86_64.AppImage
|
||||||
.PHONY: appimage
|
.PHONY: appimage
|
||||||
|
Loading…
Reference in New Issue
Block a user