From 848ef21c7c3112f6d795dd0155faf3e91a38b700 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Wed, 17 Apr 2024 20:16:07 -0400 Subject: [PATCH] Build a windows standalone executable with attached data for dist. #28 --- GNUmakefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 9a2d76ee..db1c4420 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -17,6 +17,8 @@ UNAME_M := $(shell uname -m) ANDROID_SDK ?= ~/Android/Sdk +HAVE_WIN := 0 + ifeq ($(UNAME_S),Darwin) BUILD_TYPES := macosdebug macosrelease iosdebug iosrelease iossimdebug iossimrelease else ifeq ($(UNAME_S),Linux) @@ -39,7 +41,6 @@ LDFLAGS += \ -lc++abi HAVE_ANDROID := 0 HAVE_LINUX_IOS := 0 -HAVE_WIN := 0 else $(error Unexpected host platform $(UNAME_S).) endif @@ -792,6 +793,10 @@ out/%/tildefriends.standalone: out/%/tildefriends out/data.zip @echo "[standalone] $@" @cat $< out/data.zip > $@ @chmod +x $@ +out/%/tildefriends.standalone.exe: out/%/tildefriends.exe out/data.zip + @echo "[standalone] $@" + @cat $< out/data.zip > $@ + @chmod +x $@ iossimdebug-app: out/tildefriends-iossimdebug.app/tildefriends iossimrelease-app: out/tildefriends-iossimrelease.app/tildefriends @@ -853,7 +858,7 @@ clean: rm -rf $(BUILD_DIR) .PHONY: clean -dist: release-apk iosrelease-ipa +dist: release-apk iosrelease-ipa $(if $(HAVE_WIN), out/winrelease/tildefriends.standalone.exe) @echo [archive] dist/tildefriends-$(VERSION_NUMBER).tar.xz @rm -rf out/tildefriends-$(VERSION_NUMBER) @mkdir -p dist/ out/tildefriends-$(VERSION_NUMBER) @@ -882,6 +887,8 @@ dist: release-apk iosrelease-ipa @cp out/TildeFriends-arm-release.zopfli.apk dist/TildeFriends-arm-$(VERSION_NUMBER).apk @echo "[cp] TildeFriends-$(VERSION_NUMBER).ipa" @cp out/tildefriends-release.ipa dist/TildeFriends-$(VERSION_NUMBER).ipa + @test $(HAVE_WIN) && echo "[cp] tildefriends-$(VERSION_NUMBER).exe" + @test $(HAVE_WIN) && cp out/winrelease/tildefriends.standalone.exe dist/tildefriends-$(VERSION_NUMBER).exe .PHONY: dist dist-test: dist