diff --git a/BUILD.md b/BUILD.md index 34c3ef5..ea2409c 100644 --- a/BUILD.md +++ b/BUILD.md @@ -81,10 +81,10 @@ Ensure you have a copy of `i2p.i2p` checked out adjacent to the building the jpackage, run the following command: ```sh -git clone https://i2pgit.org/i2p-hackers/i2p.i2p +git clone https://i2pgit.org/i2p-hackers/i2p.i2p "i2p.i2p-jpackage-mac" ``` -Change to the `i2p.i2p` directory and check out the release branch you want to +Change to the `i2p.i2p-jpackage-mac` directory and check out the release branch you want to build a package for, e.g. `i2p-1.9.0` ```sh diff --git a/README.md b/README.md index 9b4b572..68263d1 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,7 @@ JPackage scripts for packaging I2P on a Mac. ### Building -1. Clone `i2p.i2p` as a sibling to this module in the directory `../i2p.i2p-jpackage-mac` -1. Build it with `ant clean preppkg-osx-only` -1. Set the `I2P_SIGNER` environment variable to a string identifying the signer. -1. Set the `I2P_BUILD_NUMBER` environment variable to some integer >= 1 -1. Run `build.sh` +1. See [BUILD.md](BUILD.md) ### How does it work @@ -24,29 +20,3 @@ In order to build an AppBundle that can work from anywhere, it is necessary to u 1. Copies the contents of `../i2p.i2p/pkg-temp` inside the AppBundle, except for the `jars` directory 1. Signs the AppBundle 1. Invokes JPackage again to build the final .dmg - -### Notarization - -1. You need an "app-specific password" which you can create at https://appleid.apple.com -2. Execute -``` -xcrun notarytool store-credentials "$AC_PASSWORD" - --apple-id "$AC_USERNAME" - --team-id "$WWDRTeamID" - --password "$secret_2FA_password" -``` - - In this example command: - - `AC_PASSWORD` is the name of the credentials config. - - `AC_USERNAME` is the username of the Apple Account. - - `WWDRTeamID` is the developer/team ID available from the Apple Account. - - `secret_2FA_Password` is the app-specific password you set up in the first step. -3. Periodically execute the following to check the progress of the notarisation: -``` -xcrun altool --eval-info -u -```` -4. If that returns success, staple the notarization to the dmg: -``` -xcrun stapler staple -``` - -- [This StackOverflow thread contains invaluable information about how to successfully notarize jpackage-based software](https://stackoverflow.com/questions/60953329/code-signing-notarization-using-jpackage-utility-isnt-working-on-macos) diff --git a/build.sh b/build.sh index 85bcd44..4e95350 100755 --- a/build.sh +++ b/build.sh @@ -45,9 +45,22 @@ echo "cleaning" ARCH=$(uname -m) HERE=$PWD I2P_SRC=$HERE/../i2p.i2p-jpackage-mac/ + +if [ ! -d "$I2P_SRC" ]; then + git clone https://i2pgit.org/i2p-hackers/i2p.i2p "$I2P_SRC" +fi + I2P_JARS=$HERE/../i2p.i2p-jpackage-mac/pkg-temp/lib I2P_PKG=$HERE/../i2p.i2p-jpackage-mac/pkg-temp +if [ ! -d "$I2P_PKG" ]; then + cd "$I2P_SRC" + git pull --tags + git checkout "$I2P_VERSION" + ant clean preppkg-osx-only +fi +cd "$HERE" + mkdir build echo "compiling custom launcher and update processor" diff --git a/config.sh b/config.sh index 17bca79..639e832 100644 --- a/config.sh +++ b/config.sh @@ -23,16 +23,22 @@ fi if [ -z $I2P_SIGNER ]; then # This is the team ID of the Apple account associated with the app. It is used to sign the DMG. # it is a unique ID which is a short, random-looking string. + # OR + # the sha256 fingerprint of the cert(recommended) echo "I2P_SIGNER not set, signing will not work" fi if [ -z $I2P_CODE_SIGNER ]; then # This is the code signing ID of the team associated with the Apple Account. it is used to sign the libraries. # it is a unique ID which is a short, random-looking string. + # OR + # the sha256 fingerprint of the cert(recommended) echo "I2P_CODE_SIGNER not set, signing will not work" fi if [ -z "$I2P_SIGNER_USERPHRASE" ]; then # This is an the phrase identifying the third party developer(I2P) in the following form: # 3rd Party Mac Developer Application: John Smith (ABCDEFGHIJ) + # OR + # the sha256 fingerprint of the cert(recommended) echo "I2P_SIGNER_USERPHRASE not set, signing will not work" fi