Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit 765b61f

Browse files
committed
add ci actions
Signed-off-by: 82Flex <82flex@gmail.com>
1 parent 89306b5 commit 765b61f

File tree

5 files changed

+195
-30
lines changed

5 files changed

+195
-30
lines changed

.github/workflows/build-release.yml

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
name: Build Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
env:
9+
THEOS: ''
10+
GIT_TAG: ''
11+
XCODE_VERSION: '14.3.1'
12+
13+
jobs:
14+
build:
15+
name: Build and upload release package for TrollStore
16+
runs-on: macos-13
17+
18+
steps:
19+
- name: Setup Xcode version
20+
uses: maxim-lobanov/setup-xcode@v1
21+
with:
22+
xcode-version: ${{ env.XCODE_VERSION }}
23+
24+
- name: Install Homebrew Dependencies
25+
run: |
26+
brew install dpkg ldid make libplist openssl@3
27+
echo "/usr/local/opt/make/libexec/gnubin" >> $GITHUB_PATH
28+
29+
- name: Checkout XXTouchNG/theos
30+
uses: actions/checkout@v3
31+
with:
32+
repository: XXTouchNG/theos
33+
ref: 78ee784d8d3238982c9abdc58cd39919263648b1
34+
path: theos
35+
submodules: recursive
36+
37+
- name: Add THEOS Environment Variables
38+
run: |
39+
rm -rf $GITHUB_WORKSPACE/theos/sdks
40+
echo "THEOS=$GITHUB_WORKSPACE/theos" >> $GITHUB_ENV
41+
42+
- name: Restore Additional SDKs
43+
id: cached-sdks-restore
44+
uses: actions/cache/restore@v3
45+
with:
46+
path: ${{ env.THEOS }}/sdks
47+
key: ${{ runner.os }}-sdks-${{ env.XCODE_VERSION }}
48+
49+
- if: ${{ steps.cached-sdks-restore.outputs.cache-hit != 'true' }}
50+
name: Checkout theos/sdks
51+
uses: actions/checkout@v3
52+
with:
53+
repository: theos/sdks
54+
ref: master
55+
path: ${{ env.THEOS }}/sdks
56+
57+
- if: ${{ steps.cached-sdks-restore.outputs.cache-hit != 'true' }}
58+
name: Checkout XXTouchNG/tbd
59+
uses: actions/checkout@v3
60+
with:
61+
repository: XXTouchNG/tbd
62+
ref: 30a6883092221e13d814c02ac41af1e565a40617
63+
path: tbd
64+
65+
- if: ${{ steps.cached-sdks-restore.outputs.cache-hit != 'true' }}
66+
name: Build tbd
67+
run: |
68+
cd $GITHUB_WORKSPACE/tbd
69+
make
70+
cp bin/tbd /usr/local/bin/tbd
71+
72+
- if: ${{ steps.cached-sdks-restore.outputs.cache-hit != 'true' }}
73+
name: Generate Additional SDKs
74+
run: |
75+
cd $THEOS/sdks
76+
python3 create_patched_sdk.py --no-overwrite -x $(dirname $(dirname $(xcode-select -p)))
77+
78+
- if: ${{ steps.cached-sdks-restore.outputs.cache-hit != 'true' }}
79+
name: Save Additional SDKs
80+
id: cached-sdks-save
81+
uses: actions/cache/save@v3
82+
with:
83+
path: ${{ env.THEOS }}/sdks
84+
key: ${{ steps.cached-sdks-restore.outputs.cache-primary-key }}
85+
86+
- name: Checkout
87+
uses: actions/checkout@v3
88+
with:
89+
repository: Lessica/TrollSpeed
90+
ref: main
91+
path: TrollSpeed
92+
submodules: recursive
93+
94+
- name: Setup Build Environment
95+
run: |
96+
echo "Available SDKs: $(find $THEOS/sdks -name "*.sdk" -maxdepth 1 -print)"
97+
echo "FINALPACKAGE=1" >> $GITHUB_ENV
98+
cd $GITHUB_WORKSPACE/TrollSpeed
99+
git fetch --tags
100+
echo "GIT_TAG=$(git describe --tags --always --abbrev=0)" >> $GITHUB_ENV
101+
102+
- name: Build Package
103+
run: |
104+
cd $GITHUB_WORKSPACE/TrollSpeed
105+
./gen-control.sh ${{ env.GIT_TAG }}
106+
FINALPACKAGE=1 make stage
107+
108+
- name: Collect Symbols
109+
run: |
110+
cd $GITHUB_WORKSPACE/TrollSpeed
111+
find .theos/obj -name "*.dSYM" -print | zip -r packages/TrollSpeed_${{ env.GIT_TAG }}_symbols.zip -@
112+
113+
- name: Upload Artifacts
114+
uses: actions/upload-artifact@v3
115+
with:
116+
name: TrollSpeed_${{ env.GIT_TAG }}
117+
path: |
118+
TrollSpeed/packages/TrollSpeed_*.tipa
119+
120+
- name: Upload Symbols
121+
uses: actions/upload-artifact@v3
122+
with:
123+
name: TrollSpeed_${{ env.GIT_TAG }}_symbols
124+
path: |
125+
TrollSpeed/packages/TrollSpeed_${{ env.GIT_TAG }}_symbols.zip
126+
127+
- name: Upload Release
128+
uses: softprops/action-gh-release@v1

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
ARCHS := arm64 # arm64e
2-
TARGET := iphone:clang:16.4:14.0
2+
TARGET := iphone:clang:latest:14.0
33
INSTALL_TARGET_PROCESSES := TrollSpeed
44

55
include $(THEOS)/makefiles/common.mk
66

7-
APPLICATION_VERSION = 1.8.6
8-
APPLICATION_NAME = TrollSpeed
7+
GIT_TAG_SHORT := $(shell git describe --tags --always --abbrev=0)
8+
APPLICATION_NAME := TrollSpeed
99

1010
TrollSpeed_USE_MODULES := 0
1111
TrollSpeed_FILES += $(wildcard *.mm *.m)
@@ -16,6 +16,7 @@ TrollSpeed_CFLAGS += -include hud-prefix.pch
1616
TrollSpeed_CCFLAGS += -DNOTIFY_LAUNCHED_HUD=\"ch.xxtou.notification.hud.launched\"
1717
TrollSpeed_CCFLAGS += -DNOTIFY_DISMISSAL_HUD=\"ch.xxtou.notification.hud.dismissal\"
1818
TrollSpeed_CCFLAGS += -DNOTIFY_RELOAD_HUD=\"ch.xxtou.notification.hud.reload\"
19+
MainApplication.mm_CCFLAGS += -std=c++14
1920
TrollSpeed_FRAMEWORKS += CoreGraphics QuartzCore UIKit
2021
TrollSpeed_PRIVATE_FRAMEWORKS += BackBoardServices GraphicsServices IOKit SpringBoardServices
2122
ifeq ($(TARGET_CODESIGN),ldid)
@@ -29,5 +30,5 @@ include $(THEOS_MAKE_PATH)/application.mk
2930
after-stage::
3031
$(ECHO_NOTHING)mkdir -p packages $(THEOS_STAGING_DIR)/Payload$(ECHO_END)
3132
$(ECHO_NOTHING)cp -rp $(THEOS_STAGING_DIR)/Applications/TrollSpeed.app $(THEOS_STAGING_DIR)/Payload$(ECHO_END)
32-
$(ECHO_NOTHING)cd $(THEOS_STAGING_DIR); zip -qr TrollSpeed_$(APPLICATION_VERSION).tipa Payload; cd -;$(ECHO_END)
33-
$(ECHO_NOTHING)mv $(THEOS_STAGING_DIR)/TrollSpeed_$(APPLICATION_VERSION).tipa packages/TrollSpeed_$(APPLICATION_VERSION).tipa $(ECHO_END)
33+
$(ECHO_NOTHING)cd $(THEOS_STAGING_DIR); zip -qr TrollSpeed_${GIT_TAG_SHORT}.tipa Payload; cd -;$(ECHO_END)
34+
$(ECHO_NOTHING)mv $(THEOS_STAGING_DIR)/TrollSpeed_${GIT_TAG_SHORT}.tipa packages/TrollSpeed_${GIT_TAG_SHORT}.tipa $(ECHO_END)

gen-control.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/sh
2+
3+
# This script is used to generate the control file for the Debian package.
4+
if [ $# -ne 1 ]; then
5+
echo "Usage: $0 <version>"
6+
exit 1
7+
fi
8+
9+
VERSION=$1
10+
11+
# Strip leading "v" from version if present
12+
VERSION=${VERSION#v}
13+
14+
# Create the layout directory
15+
mkdir -p layout/DEBIAN
16+
17+
# Write the control file
18+
cat > layout/DEBIAN/control << __EOF__
19+
Package: ch.xxtou.hud
20+
Name: HUD App
21+
Version: $VERSION
22+
Section: Tweaks
23+
Depends: firmware (>= 13.0), mobilesubstrate (>= 0.9.7000), com.rpetrich.rocketbootstrap (>= 1.0.9)
24+
Architecture: iphoneos-arm
25+
Author: XXTouch Team.
26+
Maintainer: XXTouch Team.
27+
Description: Next generation XXTouch for iOS 13 and above.
28+
__EOF__
29+
30+
# Set permissions
31+
chmod 0644 layout/DEBIAN/control
32+
33+
# Write the Info.plist file
34+
defaults write $(pwd)/layout/Applications/TrollSpeed.app/Info.plist CFBundleVersion $VERSION
35+
defaults write $(pwd)/layout/Applications/TrollSpeed.app/Info.plist CFBundleShortVersionString $VERSION
36+
plutil -convert xml1 $(pwd)/layout/Applications/TrollSpeed.app/Info.plist

layout/Applications/TrollSpeed.app/Info.plist

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>English</string>
7+
<key>CFBundleDisplayName</key>
8+
<string>TrollSpeed</string>
9+
<key>CFBundleExecutable</key>
10+
<string>TrollSpeed</string>
11+
<key>CFBundleIconFile</key>
12+
<string>icon.png</string>
513
<key>CFBundleIdentifier</key>
614
<string>ch.xxtou.hudapp</string>
715
<key>CFBundleInfoDictionaryVersion</key>
816
<string>6.0</string>
917
<key>CFBundleName</key>
1018
<string>TrollSpeed</string>
11-
<key>CFBundleDisplayName</key>
12-
<string>TrollSpeed</string>
13-
<key>CFBundleVersion</key>
14-
<string>1.8.6</string>
15-
<key>CFBundleExecutable</key>
16-
<string>TrollSpeed</string>
17-
<key>NSPrincipalClass</key>
18-
<string>HUDMainApplication</string>
1919
<key>CFBundlePackageType</key>
2020
<string>APPL</string>
21-
<key>CFBundleIconFile</key>
22-
<string>icon.png</string>
21+
<key>CFBundleShortVersionString</key>
22+
<string>1.8.7</string>
2323
<key>CFBundleSignature</key>
2424
<string>????</string>
2525
<key>CFBundleURLTypes</key>
@@ -33,10 +33,14 @@
3333
</array>
3434
</dict>
3535
</array>
36-
<key>UIApplicationShowsViewsWhileLocked</key>
37-
<false/>
38-
<key>UIApplicationSystemWindowsSecureKey</key>
39-
<true/>
36+
<key>CFBundleVersion</key>
37+
<string>1.8.7</string>
38+
<key>LSApplicationCategoryType</key>
39+
<string>public.app-category.developer-tools</string>
40+
<key>NSHumanReadableCopyright</key>
41+
<string>Copyright © 2009 Apple Inc. All Rights Reserved.</string>
42+
<key>NSPrincipalClass</key>
43+
<string>HUDMainApplication</string>
4044
<key>UIApplicationShortcutItems</key>
4145
<array>
4246
<dict>
@@ -48,10 +52,12 @@
4852
<string>ch.xxtou.shortcut.toggle-hud</string>
4953
</dict>
5054
</array>
55+
<key>UIApplicationShowsViewsWhileLocked</key>
56+
<false/>
57+
<key>UIApplicationSystemWindowsSecureKey</key>
58+
<true/>
5159
<key>UIBackgroundStyle</key>
5260
<string>UIBackgroundStyleDarkBlur</string>
53-
<key>UIViewControllerBasedStatusBarAppearance</key>
54-
<false/>
5561
<key>UILaunchStoryboardName</key>
5662
<string>LaunchScreen</string>
5763
<key>UIStatusBarStyle</key>
@@ -60,13 +66,7 @@
6066
<array>
6167
<string>UIInterfaceOrientationPortrait</string>
6268
</array>
63-
<key>LSApplicationCategoryType</key>
64-
<string>public.app-category.developer-tools</string>
65-
<key>CFBundleDevelopmentRegion</key>
66-
<string>English</string>
67-
<key>NSHumanReadableCopyright</key>
68-
<string>Copyright © 2009 Apple Inc. All Rights Reserved.</string>
69-
<key>CFBundleShortVersionString</key>
70-
<string>1.8.6</string>
69+
<key>UIViewControllerBasedStatusBarAppearance</key>
70+
<false/>
7171
</dict>
7272
</plist>

layout/DEBIAN/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: ch.xxtou.hud
22
Name: HUD App
3-
Version: 1.8.6
3+
Version: 1.8.7
44
Section: Tweaks
55
Depends: firmware (>= 13.0), mobilesubstrate (>= 0.9.7000), com.rpetrich.rocketbootstrap (>= 1.0.9)
66
Architecture: iphoneos-arm

0 commit comments

Comments
 (0)