-
Make sure these are installed
- curl (Linux/Windows only, macOS already has curl preinstalled);
- openssl 3.0.3 (or CommonCrypto on macOS);
- libusb 1.0.25 (Linux/Windows only, macOS can use IOKit for libirecovery);
- libzip;
- libplist;
- libusbmuxd;
- libirecovery;
- libimobiledevice;
- libimobiledevice-glue;
- libpng16;
- xpwn(fork);
- libgeneral;
- libfragmentzip;
- libinsn;
- lzfse (Linux/Windows only, macOS has built in libcompression);
- img4tool;
- liboffsetfinder64(fork));
- libipatcher(fork)
-
Make sure these projects compile on your system (install it's dependencies):
- tsschecker(fork);
-
- jssy (This is a submodule of tsschecker);
- idevicerestore(fork)
If you are cloning this repository you may run:
git clone https://github.com/futurerestore/futurerestore --recursive
which will clone these submodules for you.
-
After obtaining all the required/optional dependencies you can either install them to your
system for building dynamically or place the static libs in
dep_root/lib
and headers indep_root/include
for building statically -
Executing build.sh will configure and building in debug mode by default and an arch must be provided.
- Example:
./build.sh -DARCH=x86_64
orARCH=x86_64 ./build.sh
If you want to build in release mode pass in the RELEASE=1 environment variable.
- Example:
RELEASE=1 ./build.sh -DARCH=x86_64
orRELEASE=0 ./build.sh -DARCH=x86_64
If you want to disable pkg-config linking you can provide the
NO_PKGCFG
flag.By default pkg-config linking is enabled. dep_root will be used when disabled.
- Example:
./build.sh -DARCH=x86_64 -DNO_PKGCFG=1
- or
NO_PKGCFG=1 ./build.sh -DARCH=x86_64
If you want to overwrite the compiler on mac you can provide
NO_XCODE
flag.- Example:
CC=gcc CXX=g++ ./build.sh -DARCH=x86_64 -DNO_XCODE=1
- or
NO_XCODE=1 CC=gcc CXX=g++ ./build.sh -DARCH=x86_64
If you want to disable cmake reconfigure for each build, you can provide the
NO_CLEAN
flag.- Example:
NO_CLEAN=1 ./build.sh -DARCH=x86_64
- By default it will remove cmake and cache and reconfigure for each subsequent build.
If you enable the os built in AddressSanitizer feature use the
ASAN
flag.- Example:
ASAN=1 ./build.sh -DARCH=x86_64
- or
./build.sh -DARCH=x86_64 -DASAN=1
The compiled binary will be located at:
cmake-build-release/src/futurerestore
for release buildscmake-build-debug/src/futurerestore
for debug builds
Otherwise you can install the binary via:
make -C cmake-build-release install
for release buildsmake -C cmake-build-debug install
for debug builds
- Example: