mirror of
https://github.com/SoPat712/YTLitePlus.git
synced 2025-08-21 18:48:45 -04:00
new buildapp.sh & 18.23.3 to 18.25.1 text in settings
This commit is contained in:
2
.github/workflows/buildapp.yml
vendored
2
.github/workflows/buildapp.yml
vendored
@@ -18,7 +18,7 @@ on:
|
||||
type: string
|
||||
ytliteplus_version:
|
||||
description: "The version of YTLitePlus"
|
||||
default: "2.0"
|
||||
default: "2.1"
|
||||
required: true
|
||||
type: string
|
||||
bundle_id:
|
||||
|
2
Makefile
2
Makefile
@@ -4,7 +4,7 @@ ARCHS = arm64
|
||||
MODULES = jailed
|
||||
FINALPACKAGE = 1
|
||||
CODESIGN_IPA = 0
|
||||
PACKAGE_VERSION = 18.23.3-2.0
|
||||
PACKAGE_VERSION = 18.25.1-2.1
|
||||
|
||||
TWEAK_NAME = YTLitePlus
|
||||
DISPLAY_NAME = YouTube
|
||||
|
@@ -57,7 +57,7 @@ extern NSBundle *YTLitePlusBundle();
|
||||
accessibilityIdentifier:nil
|
||||
detailTextBlock:nil
|
||||
selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) {
|
||||
return [%c(YTUIUtils) openURL:[NSURL URLWithString:@"https://github.com/Balackburn/YTLitePlusExtra/releases/latest"]];
|
||||
return [%c(YTUIUtils) openURL:[NSURL URLWithString:@"https://github.com/Balackburn/YTLitePlus/releases/latest"]];
|
||||
}];
|
||||
[sectionItems addObject:main];
|
||||
|
||||
|
@@ -122,20 +122,20 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
|
||||
%end
|
||||
|
||||
%hook YTAppView
|
||||
- (void)setBackgroundColor:(UIColor *)color {
|
||||
%orig([UIColor blackColor]);
|
||||
- (UIColor *)backgroundColor:(NSInteger)pageStyle {
|
||||
return pageStyle == 1 ? [UIColor blackColor] : %orig;
|
||||
}
|
||||
%end
|
||||
|
||||
%hook YTPivotBarView
|
||||
- (void)setBackgroundColor:(UIColor *)color {
|
||||
%orig([UIColor blackColor]);
|
||||
- (UIColor *)backgroundColor:(NSInteger)pageStyle {
|
||||
return pageStyle == 1 ? [UIColor blackColor] : %orig;
|
||||
}
|
||||
%end
|
||||
|
||||
%hook YTAsyncCollectionView
|
||||
- (void)setBackgroundColor:(UIColor *)color {
|
||||
%orig([UIColor blackColor]);
|
||||
- (UIColor *)backgroundColor:(NSInteger)pageStyle {
|
||||
return pageStyle == 1 ? [UIColor blackColor] : %orig;
|
||||
}
|
||||
%end
|
||||
|
||||
|
124
buildapp.sh
124
buildapp.sh
@@ -1,55 +1,93 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
cleanup() {
|
||||
echo "==> Cleaning up..."
|
||||
rm -f YouTube.ipa
|
||||
rm -rf tmp
|
||||
rm -f packages/ipa/YTLitePlus_$youtube_version.ipa
|
||||
}
|
||||
|
||||
# Check Cercube
|
||||
if [ ! -f Tweaks/Cercube/me.alfhaily.cercube_5.3.11_iphoneos-arm.deb ]
|
||||
then
|
||||
echo -e "==> \033[1mCercube v5.3.13 is not found. Downloading Cercube (v5.3.11)...\033[0m"
|
||||
curl https://dl.dropboxusercontent.com/s/b01erqbp3ajc5e2/me.alfhaily.cercube_5.3.11_iphoneos-arm.deb --output Tweaks/Cercube/me.alfhaily.cercube_5.3.11_iphoneos-arm.deb
|
||||
revert_makefile_changes() {
|
||||
echo "==> Reverting Makefile changes..."
|
||||
if [ "$app_name" != "YouTube" ]; then
|
||||
sed -i '' "11s#.*#DISPLAY_NAME = YouTube#g" Makefile
|
||||
fi
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
# Set your inputs here
|
||||
decrypted_youtube_url="https://cdn-141.anonfiles.com/J4GdS7zez9/59a30fb9-1688414260/com.google.ios.youtube-18.25.1-Decrypted.ipa"
|
||||
youtube_version="18.25.1"
|
||||
ytliteplus_version="2.1"
|
||||
bundle_id="com.google.ios.youtube"
|
||||
app_name="YouTube"
|
||||
|
||||
if [ -z "$decrypted_youtube_url" ]; then
|
||||
echo "Please enter a decrypted YouTube URL"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$youtube_version" ]; then
|
||||
echo "Please enter the YouTube version"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install Dependencies
|
||||
brew install ldid dpkg make
|
||||
|
||||
# Setup Theos
|
||||
if [ ! -d "theos" ]; then
|
||||
git clone --recursive https://github.com/theos/theos.git
|
||||
else
|
||||
echo -e "==> \033[1mFounded Cercube (v5.3.13)\033[0m"
|
||||
echo "==> Theos already cached"
|
||||
fi
|
||||
|
||||
# Extract Cercube
|
||||
echo -e "==> \033[1mExtracting Cercube...\033[0m"
|
||||
if (cd Tweaks/Cercube && tar -xf me.alfhaily.cercube_5.3.11_iphoneos-arm.deb && tar -xf data.tar.*)
|
||||
then
|
||||
echo -e "\033[1m> Extracted Cercube!\033[0m"
|
||||
# Download iOS 15.5 SDK
|
||||
if [ ! -d "theos/sdks/iPhoneOS15.5.sdk" ]; then
|
||||
if command -v svn > /dev/null; then
|
||||
svn checkout -q https://github.com/chrisharper22/sdks/trunk/iPhoneOS15.5.sdk
|
||||
mv iPhoneOS15.5.sdk theos/sdks/
|
||||
else
|
||||
echo "==> svn command not found, please install svn"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "> \033[1mCouldn't extract Cercube\033[0m"
|
||||
echo "==> iPhoneOS15.5.sdk already cached"
|
||||
fi
|
||||
|
||||
# Makefile
|
||||
if [ -d ./tmp ]
|
||||
then
|
||||
rm -rf ./tmp
|
||||
fi
|
||||
read -e -p "==> Path to the decrypted YouTube.ipa or YouTube.app: " PATHTOYT
|
||||
if [[ $PATHTOYT == *.ipa ]]
|
||||
then
|
||||
unzip -q "$PATHTOYT" -d tmp
|
||||
rm -rf tmp/Payload/YouTube.app/_CodeSignature/CodeResources
|
||||
rm -rf tmp/Payload/YouTube.app/PlugIns/*.appex
|
||||
cp -R Extensions/*.appex tmp/Payload/YouTube.app/PlugIns
|
||||
make package FINALPACKAGE=1
|
||||
open packages
|
||||
|
||||
elif [[ $PATHTOYT == *.app ]]
|
||||
then
|
||||
mkdir -p ./tmp/Payload/
|
||||
cp -R "$PATHTOYT" tmp/Payload 2>/dev/null
|
||||
rm -rf tmp/Payload/YouTube.app/_CodeSignature/CodeResources
|
||||
rm -rf tmp/Payload/YouTube.app/PlugIns/*.appex
|
||||
cp -R Extensions/*.appex tmp/Payload/YouTube.app/PlugIns
|
||||
make package FINALPACKAGE=1
|
||||
open packages
|
||||
# Setup Theos Jailed
|
||||
if [ ! -d "theos-jailed" ]; then
|
||||
git clone --recursive https://github.com/qnblackcat/theos-jailed.git
|
||||
else
|
||||
echo "This is not an ipa/app!"
|
||||
echo "==> theos-jailed already cached"
|
||||
fi
|
||||
|
||||
# Clean up
|
||||
tput setaf 1 && echo -e "==> \033[1mCleaning up...\033[0m"
|
||||
find Tweaks/Cercube -mindepth 1 ! -name "me.alfhaily.cercube_5.3.11_iphoneos-arm.deb" ! -name ".gitkeep" -exec rm -rf {} \; 2>/dev/null
|
||||
rm -rf tmp/ Resources .theos/_/Payload
|
||||
echo -e "==> \033[1mSHASUM256: $(shasum -a 256 packages/*.ipa | cut -f1 -d' ')\033[0m"
|
||||
# Install Theos Jailed
|
||||
./theos-jailed/install
|
||||
|
||||
# Prepare YouTube iPA
|
||||
wget "$decrypted_youtube_url" --no-verbose -O YouTube.ipa
|
||||
echo "==> YouTube v$youtube_version downloaded!"
|
||||
unzip -q YouTube.ipa -d tmp
|
||||
rm -rf tmp/Payload/YouTube.app/_CodeSignature/CodeResources
|
||||
rm -rf tmp/Payload/YouTube.app/PlugIns/*
|
||||
cp -R Extensions/*.appex tmp/Payload/YouTube.app/PlugIns
|
||||
echo "==> YouTube v$youtube_version unpacked!"
|
||||
|
||||
# Fix Compiling & Build Package
|
||||
echo "PATH=\"$(brew --prefix make)/libexec/gnubin:\$PATH\"" >> ~/.zprofile
|
||||
sed -i '' "12s#.*#BUNDLE_ID = $bundle_id#g" Makefile
|
||||
if [ "$app_name" != "YouTube" ]; then
|
||||
sed -i '' "11s#.*#DISPLAY_NAME = $app_name#g" Makefile
|
||||
fi
|
||||
make package FINALPACKAGE=1
|
||||
mkdir -p packages/ipa
|
||||
mv "packages/$(ls -t packages | head -n1)" "packages/ipa/YTLitePlus_$youtube_version.ipa"
|
||||
echo "==> SHASUM256: $(shasum -a 256 packages/ipa/*.ipa | cut -f1 -d' ')"
|
||||
echo "==> Bundle ID: $bundle_id"
|
||||
|
||||
revert_makefile_changes
|
||||
|
||||
# Disable the cleanup function when the script exits successfully
|
||||
trap - EXIT
|
Reference in New Issue
Block a user