Skip to content

Commit

Permalink
Merge pull request BandarHL#272 from asdfzxcvbn/master
Browse files Browse the repository at this point in the history
  • Loading branch information
BandarHL authored Oct 17, 2024
2 parents 99eb394 + 0a217a2 commit e137e2c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 33 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,9 @@ jobs:
path: theos
submodules: recursive

- name: Download Azule
- name: Install cyan
if: inputs.deploy_format == 'sideloaded' || inputs.deploy_format == 'trollstore'
uses: actions/checkout@v4
with:
repository: Al4ise/Azule
ref: main
path: azule

- name: Add Azule to PATH
if: inputs.deploy_format == 'sideloaded' || inputs.deploy_format == 'trollstore'
run: |
echo "${{ github.workspace }}/azule" >> "$GITHUB_PATH"
run: pip install https://github.com/asdfzxcvbn/pyzule-rw/archive/main.zip

- name: iOS SDK Caching
id: SDK
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
## Local

- install [Theos](https://github.com/theos/theos)
- install [Azule](https://github.com/Al4ise/Azule) if you want to build for sideload or TrollStore
- install [cyan](https://github.com/asdfzxcvbn/pyzule-rw) if you want to build for sideload or TrollStore

- Clone the BHTwitter project repository:
```bash
Expand Down
26 changes: 5 additions & 21 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

LONG=sideloaded:,rootless:,trollstore
OPTS=$(getopt -a weather --longoptions "$LONG" -- "$@")
libcephei_URL="https://web.archive.org/web/20240222081324/https://cdn.discordapp.com/attachments/755439561454256132/1184388888475738243/libcephei.zip"
PROJECT_PATH=$PWD

while :; do
case "$1" in
Expand All @@ -22,16 +20,10 @@ while :; do
fi

if [ -e ./packages/com.atebits.Tweetie2.ipa ]; then

echo -e '\033[1m\033[32mDownloading libcephei SDK.\033[0m'
temp_dir=$(mktemp -d)
curl -L -o "$temp_dir/libcephei.zip" "$libcephei_URL"
unzip -o "$temp_dir/libcephei.zip" -d ./packages
rm -rf "$temp_dir"
rm -rf ./packages/__MACOSX

echo -e '\033[1m\033[32mBuilding the IPA.\033[0m'
azule -i "$PROJECT_PATH/packages/com.atebits.Tweetie2.ipa" -o "$PROJECT_PATH/packages" -n BHTwitter-sideloaded -r -f "$PROJECT_PATH/.theos/obj/debug/keychainfix.dylib" "$PROJECT_PATH/.theos/obj/debug/libbhFLEX.dylib" "$PROJECT_PATH/.theos/obj/debug/BHTwitter.dylib" "$PROJECT_PATH/packages/Cephei.framework" "$PROJECT_PATH/packages/CepheiUI.framework" "$PROJECT_PATH/packages/CepheiPrefs.framework" "$PROJECT_PATH/layout/Library/Application Support/BHT/BHTwitter.bundle"
cyan -i packages/com.atebits.Tweetie2.ipa -o packages/BHTwitter-sideloaded --ignore-encrypted \
-uwf .theos/obj/debug/keychainfix.dylib .theos/obj/debug/libbhFLEX.dylib \
.theos/obj/debug/BHTwitter.dylib layout/Library/Application\ Support/BHT/BHTwitter.bundle

echo -e '\033[1m\033[32mDone, thanks for using BHTwitter.\033[0m'
else
Expand Down Expand Up @@ -65,18 +57,10 @@ while :; do
fi

if [ -e ./packages/com.atebits.Tweetie2.ipa ]; then

echo -e '\033[1m\033[32mDownloading libcephei SDK.\033[0m'
temp_dir=$(mktemp -d)
curl -L -o "$temp_dir/libcephei.zip" "$libcephei_URL"
unzip -o "$temp_dir/libcephei.zip" -d ./packages
rm -rf "$temp_dir"
rm -rf ./packages/__MACOSX

echo -e '\033[1m\033[32mBuilding the IPA.\033[0m'

azule -i "$PROJECT_PATH/packages/com.atebits.Tweetie2.ipa" -o "$PROJECT_PATH/packages" -n BHTwitter-trollstore -r -f "$PROJECT_PATH/.theos/obj/debug/BHTwitter.dylib" "$PROJECT_PATH/.theos/obj/debug/libbhFLEX.dylib" "$PROJECT_PATH/packages/Cephei.framework" "$PROJECT_PATH/packages/CepheiUI.framework" "$PROJECT_PATH/packages/CepheiPrefs.framework" "$PROJECT_PATH/layout/Library/Application Support/BHT/BHTwitter.bundle"
mv "$PROJECT_PATH/packages/BHTwitter-trollstore.ipa" "$PROJECT_PATH/packages/BHTwitter-trollstore.tipa"
cyan -i packages/com.atebits.Tweetie2.ipa -o packages/BHTwitter-trollstore.tipa --ignore-encrypted \
-uwf .theos/obj/debug/BHTwitter.dylib .theos/obj/debug/libbhFLEX.dylib layout/Library/Application\ Support/BHT/BHTwitter.bundle

echo -e '\033[1m\033[32mDone, thanks for using BHTwitter.\033[0m'
else
Expand Down

0 comments on commit e137e2c

Please sign in to comment.