JPackage scripts for packaging I2P on a Mac.
- Java 16 or newer. Even though JPackage existed since 14, it was broken.
- An Apple signing certificate. The JBigi and JRE libs and the final bundle MUST be signed or users will get a scary warning.
- See BUILD.md
In order to build an AppBundle that can work from anywhere, it is necessary to use a dedicated main class which determines the current working directory and sets i2p.dir.base to the correct location inside the AppBundle. Therefore the build.sh script:
- Compiles the custom main class and puts it in a
launcher.jar - Invokes JPackage with the
--app-imageswitch to create the directory structure of the bundle - Copies the contents of
../i2p.i2p/pkg-tempinside the AppBundle, except for thejarsdirectory - Signs the AppBundle
- Invokes JPackage again to build the final .dmg
source config.sh && I2P_VERSION="i2p-2.10.0" PUBLISH_VERSION="2.10.0" ./build.sh