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

Commit 7aa2d14

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

File tree

5 files changed

+192
-29
lines changed

5 files changed

+192
-29
lines changed

.github/workflows/build-release.yml

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

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ 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 --abbrev=0)
8+
APPLICATION_NAME := TrollSpeed
99

1010
TrollSpeed_USE_MODULES := 0
1111
TrollSpeed_FILES += $(wildcard *.mm *.m)
@@ -29,5 +29,5 @@ include $(THEOS_MAKE_PATH)/application.mk
2929
after-stage::
3030
$(ECHO_NOTHING)mkdir -p packages $(THEOS_STAGING_DIR)/Payload$(ECHO_END)
3131
$(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)
32+
$(ECHO_NOTHING)cd $(THEOS_STAGING_DIR); zip -qr TrollSpeed_${GIT_TAG_SHORT}.tipa Payload; cd -;$(ECHO_END)
33+
$(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)