diff --git a/.github/workflows/macos-pkg-build.yml b/.github/workflows/macos-pkg-build.yml new file mode 100644 index 0000000..76509e5 --- /dev/null +++ b/.github/workflows/macos-pkg-build.yml @@ -0,0 +1,88 @@ +name: macOS PKG Build & Notarize + +on: + push: + branches: [ "release/**" ] + workflow_dispatch: + +jobs: + build-pkg: + runs-on: macos-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set up JDK 25 + uses: actions/setup-java@v4 + with: + java-version: '25' + distribution: 'oracle' + + - name: Install Ant + run: brew install ant + + # Import both Developer ID Application and Developer ID Installer certs + # into a temporary keychain so codesign/productsign never prompt for a password. + - name: Install signing certificates + env: + MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} + MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} + KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} + run: | + KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db + + # Decode the base64-encoded .p12 that contains both Developer ID certs + echo -n "$MACOS_CERTIFICATE" | base64 --decode -o /tmp/build_certificate.p12 + + # Create a temporary keychain and import the certificate + security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" + security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH" + security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" + security import /tmp/build_certificate.p12 -P "$MACOS_CERTIFICATE_PWD" \ + -A -t cert -f pkcs12 -k "$KEYCHAIN_PATH" + + # Grant codesign and productsign access without any UI password prompt + security set-key-partition-list -S apple-tool:,apple: -s \ + -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" + + # Add this keychain to the search path + security list-keychain -d user -s "$KEYCHAIN_PATH" + + - name: Write private.properties + env: + APPLE_ID: ${{ secrets.APPLE_ID }} + APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} + APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} + run: | + cat > private.properties < - + @@ -122,7 +122,13 @@ - + + + + @@ -223,7 +229,7 @@ - + @@ -242,7 +248,7 @@ - + @@ -257,6 +263,206 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -281,8 +487,10 @@ + + diff --git a/entitlements.plist b/entitlements.plist new file mode 100644 index 0000000..9acbcfa --- /dev/null +++ b/entitlements.plist @@ -0,0 +1,12 @@ + + + + + com.apple.security.cs.allow-jit + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.cs.disable-library-validation + + + \ No newline at end of file diff --git a/libs/flatlaf-3.7.jar b/libs/flatlaf-3.7.jar index 6706d56..b27832d 100644 Binary files a/libs/flatlaf-3.7.jar and b/libs/flatlaf-3.7.jar differ diff --git a/pkg/macos/JDM.icns b/pkg/macos/images/JDiskMark.icns similarity index 100% rename from pkg/macos/JDM.icns rename to pkg/macos/images/JDiskMark.icns diff --git a/pkg/macos/scripts/preinstall b/pkg/macos/scripts/preinstall new file mode 100755 index 0000000..648bc0d --- /dev/null +++ b/pkg/macos/scripts/preinstall @@ -0,0 +1,6 @@ +#!/bin/bash +# Remove any existing jdiskmark installation before installing fresh. +# This prevents macOS from skipping the install when the same bundle ID +# and version is already on disk (upgrade-bundle version check behaviour). +rm -rf /Applications/jdiskmark*.app 2>/dev/null +exit 0