Files
i2p-jpackage-mac/README.md

27 lines
1.1 KiB
Markdown
Raw Normal View History

2021-03-20 14:04:48 +00:00
# I2P JPackage Mac
2021-03-20 14:21:27 +00:00
JPackage scripts for packaging I2P on a Mac.
2021-03-21 19:38:43 +00:00
### Requirements
* Java 16 or newer. Even though JPackage existed since 14, it was broken.
* An Apple signing certificate. The JBigi libs and the final bundle MUST be signed or users will get a scary warning.
2021-03-20 14:21:27 +00:00
### Building
1. Clone `i2p.i2p` as a sibling to this module
2021-03-20 16:59:30 +00:00
1. Build it with `ant clean preppkg-osx-only`
2021-03-20 14:21:27 +00:00
1. Set the `I2P_SIGNER` environment variable to a string identifying the signer.
1. Set the `I2P_BUILD_VERSION` environment variable to some integer >= 1
2021-03-20 14:21:27 +00:00
1. Run `build.sh`
### How does it work
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:
2021-03-20 16:59:30 +00:00
1. Compiles the custom main clas and puts it in a `launcher.jar`
2021-03-20 14:21:27 +00:00
1. Invokes JPackage with the `--app-image` switch to create the directory structure of the bundle
1. Copies the contents of `../i2p.i2p/pkg-temp` inside the AppBundle, except for the `jars` directory
2021-03-20 16:59:30 +00:00
1. Signs the AppBundle
2021-03-20 14:21:27 +00:00
1. Invokes JPackage again to build the final .dmg