Skip to content

Building

airsquared edited this page Oct 27, 2023 · 6 revisions

Follow these instructions to build blobsaver yourself:

  1. Install JDK 21 on your machine.
  2. Download the source code for the release you want, or from master.
  3. If you are building for a platform that's not macOS (Intel/Apple Silicon), Windows (x86_64), or Linux (x86_64), download tsschecker for your architecture from here and replace the file in the correct location for your platform:
    • dist/linux/tsschecker (Linux)
    • dist/macos/Contents/MacOS/tsschecker (macOS)
    • dist/windows/files/lib/tsschecker.exe (Windows).
  4. On any Linux platform or not one of the aforementioned platforms, install the libraries libimobiledevice and libirecovery, which should be in your distribution's default repositories.
  5. Run ./gradlew assemble in the root of the repository and you should have the compiled installers in the directory build/distributions

You can supply additional arguments to the build:

  • -PnoCompress=true: don't compress the java bytecode and keep debug information, useful for debugging
  • -PnoConsole=false: (windows only) show console by default when running app
  • -PinstallerType=[value]: [value] can be one of:
    • zip
    • tgz
    • deb: (linux only)
    • rpm: (linux only)
    • pkg: (mac only) build pkg installer

For example: ./gradlew build -PnoCompress=true -PnoConsole=false -PinstallerType=zip

If you don't want to build an installer and just want the directory, run ./gradlew jpackageImage instead and you will find the files in build/jpackage.

Development

The recommended IDE to use for developing blobsaver is IntelliJ IDEA. The repository includes IntelliJ run configurations so you can just select your OS from the run dropdown to run. For other IDEs or from the command line, you can use the Gradle run and test tasks: ./gradlew run or ./gradlew test.