Skip to content

Instantly share code, notes, and snippets.

@Bios597407
Forked from Lessica/build-idevicerestore.sh
Created July 9, 2020 16:04
Show Gist options
  • Save Bios597407/57a75fbb28748764fca6b88714ef9b09 to your computer and use it in GitHub Desktop.
Save Bios597407/57a75fbb28748764fca6b88714ef9b09 to your computer and use it in GitHub Desktop.
Build script for futurerestore and all its dependencies for macOS.
#!/bin/sh
# macOS 10.15
# Xcode 11.2
# Homebrew 2.1.16
# Homebrew/homebrew-core (git revision f466; last commit 2019-11-07)
# Homebrew/homebrew-cask (git revision 9ff44; last commit 2019-11-07)
# yum install python python-devel
# echo '[group_kdesig-cmake3_EPEL]
# name=Copr repo for cmake3_EPEL owned by @kdesig
# baseurl=https://copr-be.cloud.fedoraproject.org/results/@kdesig/cmake3_EPEL/epel-7-$basearch/
# type=rpm-md
# skip_if_unavailable=True
# gpgcheck=1
# gpgkey=https://copr-be.cloud.fedoraproject.org/results/@kdesig/cmake3_EPEL/pubkey.gpg
# repo_gpgcheck=0
# enabled=1
# enabled_metadata=1' >> /etc/yum.repos.d/cmake3.repo
# yum install cmake3
mkdir BuildFutureRestore
cd BuildFutureRestore
rm -f /usr/local/lib/libfragmentzip.*
rm -f /usr/local/lib/libideviceactivation.*
rm -f /usr/local/lib/libimobiledevice.*
rm -f /usr/local/lib/libirecovery.*
rm -f /usr/local/lib/libplist++.*
rm -f /usr/local/lib/libplist.*
rm -f /usr/local/lib/libusbmuxd.*
rm -f /usr/local/lib/libzip.*
rm -rf /usr/local/include/libfragmentzip
rm -f /usr/local/include/libideviceactivation.h
rm -rf /usr/local/include/libimobiledevice
rm -f /usr/local/include/libirecovery.h
rm -rf /usr/local/include/plist
rm -f /usr/local/include/usbmuxd*
rm -f /usr/local/include/zip.h
rm -f /usr/local/include/zipconf.h
rm -f /usr/local/lib/libfragmentzip.la
rm -f /usr/local/lib/libideviceactivation.la
rm -f /usr/local/lib/libimobiledevice.la
rm -f /usr/local/lib/libirecovery.la
rm -f /usr/local/lib/libplist++.la
rm -f /usr/local/lib/libplist.la
rm -f /usr/local/lib/libusbmuxd.la
rm -f /usr/local/lib/pkgconfig/libfragmentzip.pc
rm -f /usr/local/lib/pkgconfig/libideviceactivation*.pc
rm -f /usr/local/lib/pkgconfig/libimobiledevice*.pc
rm -f /usr/local/lib/pkgconfig/libirecovery.pc
rm -f /usr/local/lib/pkgconfig/libplist++.pc
rm -f /usr/local/lib/pkgconfig/libplist.pc
rm -f /usr/local/lib/pkgconfig/libusbmuxd.pc
rm -f /usr/local/lib/pkgconfig/libzip.pc
rm -f /usr/local/lib/libfragmentzip.a
rm -f /usr/local/lib/libideviceactivation.a
rm -f /usr/local/lib/libimobiledevice.a
rm -f /usr/local/lib/libirecovery.a
rm -f /usr/local/lib/libjssy.a
rm -f /usr/local/lib/libplist++.a
rm -f /usr/local/lib/libplist.a
rm -f /usr/local/lib/libusbmuxd.a
brew install make cmake automake autoconf libtool pkg-config curl openssl readline
echo 'export PKG_CONFIG_PATH="/usr/local/opt/curl/lib/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.zshrc
echo 'export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.zshrc
echo 'export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.zshrc
# echo 'export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.zshrc
source ~/.zshrc
git clone https://github.com/libimobiledevice/libplist.git
cd libplist
./autogen.sh # --enable-static
make && make install
cd ..
git clone --recursive https://github.com/nih-at/libzip.git
cd libzip
cmake . # -DBUILD_SHARED_LIBS=off
# cmake3 .
# ln -s /usr/local/lib64/libzip.so.5.0 /lib64/libzip.so
# ln -s /usr/local/lib64/libzip.so.5.0 /lib64/libzip.so.5
make && make install
cd ..
git clone --recursive https://github.com/tihmstar/libgeneral.git
cd libgeneral
./autogen.sh # --enable-static
make && make install
cd ..
git clone --recursive https://github.com/tihmstar/libfragmentzip.git
cd libfragmentzip
./autogen.sh # --enable-static
make && make install
cd ..
git clone --recursive https://github.com/libimobiledevice/libirecovery.git
cd libirecovery
./autogen.sh # --enable-static
make && make install
cd ..
git clone --recursive https://github.com/tihmstar/tsschecker.git
cd tsschecker
./autogen.sh # --enable-static
make && make install
cd ..
git clone --recursive https://github.com/tihmstar/img4tool.git
cd img4tool
./autogen.sh # --enable-static
make && make install
cd ..
git clone --recursive https://github.com/libimobiledevice/libusbmuxd.git
cd libusbmuxd
./autogen.sh # --enable-static
make && make install
cd ..
git clone --recursive https://github.com/libimobiledevice/libimobiledevice.git
cd libimobiledevice
./autogen.sh # --enable-static
make && make install
cd ..
git clone --recursive https://github.com/libimobiledevice/usbmuxd.git
cd usbmuxd
./autogen.sh # --enable-static
make && make install
cd ..
git clone --recursive https://github.com/tihmstar/idevicerestore.git
cd idevicerestore
./autogen.sh # --enable-static
make && make install
cd ..
git clone --recursive https://github.com/tihmstar/futurerestore.git
cd futurerestore
./autogen.sh # --enable-static
make && make install
cd ..
echo "succeed"
futurerestore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment