diff --git a/.github/workflows/build-installer.yml b/.github/workflows/build-installer.yml index 35e47df88..48a56b54d 100755 --- a/.github/workflows/build-installer.yml +++ b/.github/workflows/build-installer.yml @@ -125,6 +125,13 @@ jobs: run: | machine=${{ matrix.wsystem }} if [ "$machine" = "macosx" ] ; then + mkdir jar_contents + unzip "${{ env.WEASIS_INPUT_BIN }}"/weasis-launcher.jar -d jar_contents + codesign --force --deep --timestamp --sign "${{ secrets.MACOS__DEVELOPER_ID }}" -vvv --keychain "$HOME/Library/Keychains/signing_temp.keychain-db" jar_contents/com/formdev/flatlaf/natives/libflatlaf-macos-arm64.dylib + codesign --force --deep --timestamp --sign "${{ secrets.MACOS__DEVELOPER_ID }}" -vvv --keychain "$HOME/Library/Keychains/signing_temp.keychain-db" jar_contents/com/formdev/flatlaf/natives/libflatlaf-macos-x86_64.dylib + jar cfv weasis-launcher.jar -C jar_contents . + mv -f weasis-launcher.jar "${{ env.WEASIS_INPUT_BIN }}"/weasis-launcher.jar + rm -rf jar_contents declare -a customOptions=("--java-options" "-splash:\$APPDIR/resources/images/about-round.png" "--java-options" "-Dapple.laf.useScreenMenuBar=true" "--java-options" "-Dapple.awt.application.appearance=NSAppearanceNameDarkAqua") declare -a signArgs=("--mac-package-identifier" "${{ env.IDENTIFIER }}" "--mac-signing-keychain" "$HOME/Library/Keychains/signing_temp.keychain-db" "--mac-sign") elif [ "$machine" = "windows" ] ; then diff --git a/weasis-distributions/script/package-weasis.sh b/weasis-distributions/script/package-weasis.sh index 860b083d7..24ec614db 100755 --- a/weasis-distributions/script/package-weasis.sh +++ b/weasis-distributions/script/package-weasis.sh @@ -198,6 +198,16 @@ if [ "$arc" = "x86" ] ; then find "$INPUT_DIR"/bundle/*-x86* -type f -name "*-${machine}-x86-64-*" -exec rm -f {} \; fi +if [ "$machine" = "macosx" ] ; then + mkdir jar_contents + unzip "$INPUT_DIR"/weasis-launcher.jar -d jar_contents + codesign --force --deep --timestamp --sign "$CERTIFICATE" -vvv jar_contents/com/formdev/flatlaf/natives/libflatlaf-macos-arm64.dylib + codesign --force --deep --timestamp --sign "$CERTIFICATE" -vvv jar_contents/com/formdev/flatlaf/natives/libflatlaf-macos-x86_64.dylib + jar cfv weasis-launcher.jar -C jar_contents . + mv -f weasis-launcher.jar "$INPUT_DIR"/weasis-launcher.jar + rm -rf jar_contents +fi + # Remove previous package if [ -d "${OUTPUT_PATH}" ] ; then rm -rf "${OUTPUT_PATH}"