if build or checkout are incomplete do them in the build script

This commit is contained in:
idk
2023-02-01 21:58:27 +00:00
parent f1aca4c67a
commit b23e6e6a46
4 changed files with 22 additions and 33 deletions

View File

@ -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

View File

@ -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 <the long UUID string> -u <your Apple id>
````
4. If that returns success, staple the notarization to the dmg:
```
xcrun stapler staple <name of the .dmg>
```
- [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)

View File

@ -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"

View File

@ -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