Update depends install, add Debian support

This commit is contained in:
LukeZGD 2021-03-22 15:28:12 +08:00
parent 127f0d88be
commit b1ede8a2b1
2 changed files with 18 additions and 16 deletions

View File

@ -80,6 +80,7 @@
- [Arch Linux](https://www.archlinux.org/) and Arch-based distros like [EndeavourOS](https://endeavouros.com/) - [Arch Linux](https://www.archlinux.org/) and Arch-based distros like [EndeavourOS](https://endeavouros.com/)
- [Fedora 32 to 33](https://getfedora.org/) - [Fedora 32 to 33](https://getfedora.org/)
- openSUSE [Tumbleweed](https://software.opensuse.org/distributions/tumbleweed), [Leap 15.2](https://software.opensuse.org/distributions/leap) - openSUSE [Tumbleweed](https://software.opensuse.org/distributions/tumbleweed), [Leap 15.2](https://software.opensuse.org/distributions/leap)
- [Debian Buster, Bullseye, Sid](https://www.debian.org/); and Debian-based distros like [MX Linux](https://mxlinux.org/)
- macOS 10.12 to 11 - macOS 10.12 to 11
## Other notes: ## Other notes:

View File

@ -53,7 +53,8 @@ function Main {
futurerestore1="sudo LD_PRELOAD=resources/lib/libcurl.so.3 LD_LIBRARY_PATH=resources/lib resources/tools/futurerestore1_linux" futurerestore1="sudo LD_PRELOAD=resources/lib/libcurl.so.3 LD_LIBRARY_PATH=resources/lib resources/tools/futurerestore1_linux"
futurerestore2="sudo LD_LIBRARY_PATH=resources/lib resources/tools/futurerestore2_linux" futurerestore2="sudo LD_LIBRARY_PATH=resources/lib resources/tools/futurerestore2_linux"
tsschecker="env LD_LIBRARY_PATH=resources/lib resources/tools/tsschecker_linux" tsschecker="env LD_LIBRARY_PATH=resources/lib resources/tools/tsschecker_linux"
if [[ $UBUNTU_CODENAME == "bionic" ]] || [[ $PRETTY_NAME == "openSUSE Leap 15.2" ]]; then if [[ $UBUNTU_CODENAME == "bionic" ]] || [[ $VERSION == "10 (buster)" ]] ||
[[ $PRETTY_NAME == "openSUSE Leap 15.2" ]]; then
futurerestore2="${futurerestore2}_bionic" futurerestore2="${futurerestore2}_bionic"
idevicerestore="${idevicerestore}_bionic" idevicerestore="${idevicerestore}_bionic"
elif [[ $UBUNTU_CODENAME == "xenial" ]]; then elif [[ $UBUNTU_CODENAME == "xenial" ]]; then
@ -617,25 +618,29 @@ function InstallDependencies {
ln -sf /usr/lib/libzip.so.5 ../resources/lib/libzip.so.4 ln -sf /usr/lib/libzip.so.5 ../resources/lib/libzip.so.4
elif [[ $UBUNTU_CODENAME == "xenial" ]] || [[ $UBUNTU_CODENAME == "bionic" ]] || elif [[ $UBUNTU_CODENAME == "xenial" ]] || [[ $UBUNTU_CODENAME == "bionic" ]] ||
[[ $UBUNTU_CODENAME == "focal" ]] || [[ $UBUNTU_CODENAME == "groovy" ]]; then [[ $UBUNTU_CODENAME == "focal" ]] || [[ $UBUNTU_CODENAME == "groovy" ]] ||
# Ubuntu [[ $VERSION == "10 (buster)" ]] || [[ $PRETTY_NAME == "Debian GNU/Linux bullseye/sid" ]]; then
sudo add-apt-repository universe # Ubuntu, Debian
[[ ! -z $UBUNTU_CODENAME ]] && sudo add-apt-repository universe
sudo apt update sudo apt update
sudo apt install -y autoconf automake bsdiff build-essential checkinstall curl git libglib2.0-dev libimobiledevice-utils libreadline-dev libtool-bin libusb-1.0-0-dev libusbmuxd-tools openssh-client usbmuxd usbutils sudo apt install -y autoconf automake bsdiff build-essential curl git libglib2.0-dev libimobiledevice6 libimobiledevice-utils libreadline-dev libtool-bin libusb-1.0-0-dev libusbmuxd-tools openssh-client usbmuxd usbutils
SavePkg SavePkg
cp libcurl.so.4.5.0 ../resources/lib/libcurl.so.3 cp libcrypto.so.1.0.0 libcurl.so.3 libssl.so.1.0.0 ../resources/lib
if [[ $UBUNTU_CODENAME == "bionic" ]]; then if [[ $UBUNTU_CODENAME == "bionic" ]] || [[ $VERSION == "10 (buster)" ]]; then
sudo apt install -y libzip4 python sudo apt install -y libzip4 python
sudo dpkg -i libpng12_bionic.deb libzip5.deb cp libpng12.so.0 libzip.so.5 ../resources/lib
SaveFile https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/tools/tools_linux_bionic.zip tools_linux_bionic.zip 959abbafacfdaddf87dd07683127da1dab6c835f SaveFile https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/tools/tools_linux_bionic.zip tools_linux_bionic.zip 959abbafacfdaddf87dd07683127da1dab6c835f
unzip tools_linux_bionic.zip -d ../resources/tools unzip tools_linux_bionic.zip -d ../resources/tools
elif [[ $UBUNTU_CODENAME == "xenial" ]]; then elif [[ $UBUNTU_CODENAME == "xenial" ]]; then
sudo apt install -y libzip4 python libpng12-0 sudo apt install -y libzip4 python libpng12-0
SaveFile https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/tools/tools_linux_xenial.zip tools_linux_xenial.zip b74861fd87511a92e36e27bf2ec3e1e83b6e8200 SaveFile https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/tools/tools_linux_xenial.zip tools_linux_xenial.zip b74861fd87511a92e36e27bf2ec3e1e83b6e8200
unzip tools_linux_xenial.zip -d ../resources/tools unzip tools_linux_xenial.zip -d ../resources/tools
elif [[ $PRETTY_NAME == "Debian GNU/Linux bullseye/sid" ]]; then
sudo apt install -y libzip4 python2
cp libpng12.so.0 libzip.so.5 ../resources/lib
else else
sudo apt install -y libzip5 python2 sudo apt install -y libzip5 python2
sudo dpkg -i libpng12.deb libssl1.0.0.deb libzip4.deb cp libpng12.so.0 libzip.so.4 ../resources/lib
fi fi
if [[ $UBUNTU_CODENAME == "focal" ]]; then if [[ $UBUNTU_CODENAME == "focal" ]]; then
ln -sf /usr/lib/x86_64-linux-gnu/libimobiledevice.so.6 ../resources/lib/libimobiledevice-1.0.so.6 ln -sf /usr/lib/x86_64-linux-gnu/libimobiledevice.so.6 ../resources/lib/libimobiledevice-1.0.so.6
@ -647,11 +652,7 @@ function InstallDependencies {
# Fedora # Fedora
sudo dnf install -y automake binutils bsdiff git libimobiledevice-utils libpng12 libtool libusb-devel libusbmuxd-utils make libzip perl-Digest-SHA python2 readline-devel sudo dnf install -y automake binutils bsdiff git libimobiledevice-utils libpng12 libtool libusb-devel libusbmuxd-utils make libzip perl-Digest-SHA python2 readline-devel
SavePkg SavePkg
ar x libssl1.0.0.deb data.tar.xz cp libcrypto.so.1.0.0 libssl.so.1.0.0 ../resources/lib
tar xf data.tar.xz
cd usr/lib/x86_64-linux-gnu
cp libcrypto.so.1.0.0 libssl.so.1.0.0 ../../../../resources/lib
cd ../../..
if (( $VERSION_ID <= 32 )); then if (( $VERSION_ID <= 32 )); then
ln -sf /usr/lib64/libimobiledevice.so.6 ../resources/lib/libimobiledevice-1.0.so.6 ln -sf /usr/lib64/libimobiledevice.so.6 ../resources/lib/libimobiledevice-1.0.so.6
ln -sf /usr/lib64/libplist.so.3 ../resources/lib/libplist-2.0.so.3 ln -sf /usr/lib64/libplist.so.3 ../resources/lib/libplist-2.0.so.3
@ -737,7 +738,7 @@ function SaveFile {
function SavePkg { function SavePkg {
if [[ ! -d ../saved/pkg ]]; then if [[ ! -d ../saved/pkg ]]; then
Log "Downloading packages..." Log "Downloading packages..."
SaveFile https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/tools/depends_linux.zip depends_linux.zip 7daf991e0e80647547f5ceb33007eae6c99707d2 SaveFile https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/tools/depends2_linux.zip depends_linux.zip 38cf1db21c9aba88f0de95a1a7959ac2ac53c464
mkdir -p ../saved/pkg mkdir -p ../saved/pkg
unzip depends_linux.zip -d ../saved/pkg unzip depends_linux.zip -d ../saved/pkg
fi fi