3.7 KiB
Compiling Futurerestore
Required/Optional Dependencies
-
External libs
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)
-
Submodules
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 --recursivewhich will clone these submodules for you.
Building from source
-
dep_root
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/liband headers indep_root/includefor building statically -
build.sh
Executing build.sh will configure and building in debug mode by default and an arch must be provided.
- Example:
./build.sh -DARCH=x86_64orARCH=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_64orRELEASE=0 ./build.sh -DARCH=x86_64
If you want to disable pkg-config linking you can provide the
NO_PKGCFGflag.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_XCODEflag.- 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_CLEANflag.- 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
ASANflag.- 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/futurerestorefor release buildscmake-build-debug/src/futurerestorefor debug builds
Otherwise you can install the binary via:
make -C cmake-build-release installfor release buildsmake -C cmake-build-debug installfor debug builds
- Example: