From 603d3126be75f7ac2cf825c9573c1c3e926e4684 Mon Sep 17 00:00:00 2001 From: 82Flex <82flex@gmail.com> Date: Sun, 18 Aug 2024 12:46:56 +0800 Subject: [PATCH] ci: packaging Signed-off-by: 82Flex <82flex@gmail.com> --- Makefile | 11 +++-------- rootless.sh => devkit/rootless.sh | 0 devkit/tipa.sh | 22 ++++++++++++++++++++++ 3 files changed, 25 insertions(+), 8 deletions(-) rename rootless.sh => devkit/rootless.sh (100%) mode change 100644 => 100755 create mode 100755 devkit/tipa.sh diff --git a/Makefile b/Makefile index bf156f9..596107e 100644 --- a/Makefile +++ b/Makefile @@ -15,12 +15,7 @@ include $(THEOS_MAKE_PATH)/aggregate.mk before-package:: $(ECHO_NOTHING)ldid -STrollFools/TrollFools.entitlements $(THEOS_STAGING_DIR)/Applications/TrollFools.app$(ECHO_END) +export THEOS_PACKAGE_INSTALL_PREFIX +export THEOS_STAGING_DIR after-package:: - $(ECHO_NOTHING)mkdir -p packages $(THEOS_STAGING_DIR)/Payload$(ECHO_END) - $(ECHO_NOTHING)cp -rp $(THEOS_STAGING_DIR)$(THEOS_PACKAGE_INSTALL_PREFIX)/Applications/TrollFools.app $(THEOS_STAGING_DIR)/Payload$(ECHO_END) - $(ECHO_NOTHING)chmod 0644 $(THEOS_STAGING_DIR)/Payload/TrollFools.app/Info.plist$(ECHO_END) - $(ECHO_NOTHING)rm $(THEOS_STAGING_DIR)/Payload/TrollFools.app/ldid-14 || true$(ECHO_END) - $(ECHO_NOTHING)cd $(THEOS_STAGING_DIR); 7z a -tzip -mm=LZMA TrollFools.tipa Payload; cd -;$(ECHO_END) - $(ECHO_NOTHING)cp -p TrollFools/ldid-14 $(THEOS_STAGING_DIR)/Payload/TrollFools.app/ldid-14$(ECHO_END) - $(ECHO_NOTHING)cd $(THEOS_STAGING_DIR); zip -qr TrollFools14.tipa Payload; cd -;$(ECHO_END) - $(ECHO_NOTHING)cp -p $(THEOS_STAGING_DIR)/TrollFools.tipa $(THEOS_STAGING_DIR)/TrollFools14.tipa packages$(ECHO_END) + devkit/tipa.sh \ No newline at end of file diff --git a/rootless.sh b/devkit/rootless.sh old mode 100644 new mode 100755 similarity index 100% rename from rootless.sh rename to devkit/rootless.sh diff --git a/devkit/tipa.sh b/devkit/tipa.sh new file mode 100755 index 0000000..c0ff65e --- /dev/null +++ b/devkit/tipa.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +XCCONFIG_NAME=TrollFools/Version.xcconfig +VERSION=$(awk -F "=" '/VERSION/ {print $2}' $XCCONFIG_NAME | tr -d ' ') +BUILD_NUMBER=$(awk -F "=" '/BUILD_NUMBER/ {print $2}' $XCCONFIG_NAME | tr -d ' ') + +mkdir -p packages $THEOS_STAGING_DIR/Payload +cp -rp $THEOS_STAGING_DIR$THEOS_PACKAGE_INSTALL_PREFIX/Applications/TrollFools.app $THEOS_STAGING_DIR/Payload +chmod 0644 $THEOS_STAGING_DIR/Payload/TrollFools.app/Info.plist +rm $THEOS_STAGING_DIR/Payload/TrollFools.app/ldid-14 || true + +cd $THEOS_STAGING_DIR +7z a -tzip -mm=LZMA TrollFools_$VERSION-$BUILD_NUMBER.tipa Payload +cd - + +cp -p TrollFools/ldid-14 $THEOS_STAGING_DIR/Payload/TrollFools.app/ldid-14 + +cd $THEOS_STAGING_DIR +zip -qr TrollFools14_$VERSION-$BUILD_NUMBER.tipa Payload +cd - + +cp -p $THEOS_STAGING_DIR/TrollFools_$VERSION-$BUILD_NUMBER.tipa $THEOS_STAGING_DIR/TrollFools14_$VERSION-$BUILD_NUMBER.tipa packages