From c99be9dd0829757ccf8ffea1bb330d4dc928fe7c Mon Sep 17 00:00:00 2001 From: maron2000 <68574602+maron2000@users.noreply.github.com> Date: Fri, 13 Oct 2023 17:55:16 +0900 Subject: [PATCH 1/3] Specify the architecture of executable to patch (macOS) --- Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.am b/Makefile.am index b5342d91f4a..7a7c574b7d9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -69,10 +69,12 @@ dosbox-x.app: $(MACOS_BINARIES) contrib/macos/dosbox.icns src/tool/mach-o-matic done # Remove the signatures from the architecture-dependant executables, and fix their linker search paths. @if [ -f dosbox-x.app/Contents/MacOS/arm64/dosbox-x ]; then \ + export ARCHPREF=arm64 codesign --remove-signature dosbox-x.app/Contents/MacOS/arm64/dosbox-x || exit 1; \ src/tool/mach-o-matic dosbox-x.app/Contents/MacOS/arm64/dosbox-x || exit 1; \ fi @if [ -f dosbox-x.app/Contents/MacOS/x86_64/dosbox-x ]; then \ + export ARCHPREF=x86_64 codesign --remove-signature dosbox-x.app/Contents/MacOS/x86_64/dosbox-x || exit 1; \ src/tool/mach-o-matic dosbox-x.app/Contents/MacOS/x86_64/dosbox-x || exit 1; \ fi From 904cb3514b49f17b7f4ff92c8188ac679e62b356 Mon Sep 17 00:00:00 2001 From: maron2000 <68574602+maron2000@users.noreply.github.com> Date: Fri, 13 Oct 2023 18:29:51 +0900 Subject: [PATCH 2/3] Fix build error --- Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 7a7c574b7d9..d3fa966803a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -69,12 +69,12 @@ dosbox-x.app: $(MACOS_BINARIES) contrib/macos/dosbox.icns src/tool/mach-o-matic done # Remove the signatures from the architecture-dependant executables, and fix their linker search paths. @if [ -f dosbox-x.app/Contents/MacOS/arm64/dosbox-x ]; then \ - export ARCHPREF=arm64 + export ARCHPREF=arm64; \ codesign --remove-signature dosbox-x.app/Contents/MacOS/arm64/dosbox-x || exit 1; \ src/tool/mach-o-matic dosbox-x.app/Contents/MacOS/arm64/dosbox-x || exit 1; \ fi @if [ -f dosbox-x.app/Contents/MacOS/x86_64/dosbox-x ]; then \ - export ARCHPREF=x86_64 + export ARCHPREF=x86_64; \ codesign --remove-signature dosbox-x.app/Contents/MacOS/x86_64/dosbox-x || exit 1; \ src/tool/mach-o-matic dosbox-x.app/Contents/MacOS/x86_64/dosbox-x || exit 1; \ fi From fd9d1844f1b527884f7729ef4de45ca9c04fda12 Mon Sep 17 00:00:00 2001 From: maron2000 <68574602+maron2000@users.noreply.github.com> Date: Fri, 13 Oct 2023 19:23:00 +0900 Subject: [PATCH 3/3] Pack artifact with 7-zip to prevent executable permissions being lost --- .github/workflows/macos.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index f93ce63df8e..c96db670509 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v4 - name: Install libraries run: | - brew install autoconf automake nasm glfw glew sdl_net sdl2 coreutils + brew install autoconf automake nasm glfw glew sdl_net sdl2 coreutils sevenzip mkdir -p package/dosbox-x mkdir -p package/dosbox-x-sdl2 cd vs/sdlnet && ./build-dosbox.sh @@ -66,13 +66,13 @@ jobs: cp $top/COPYING $top/package/dosbox-x-sdl2/COPYING.txt cp $top/contrib/macos/readme.txt $top/package/dosbox-x-sdl2/README.txt cd $top/package/ - zip -r -9 $top/dosbox-x-macosx-x86_64-${{ env.timestamp }}.zip * + 7zz a $top/dosbox-x-macosx-x86_64-${{ env.timestamp }}.zip * cd $top - name: Upload preview package uses: actions/upload-artifact@v3.1.3 with: name: dosbox-x-macosx-x86_64-${{ env.timestamp }} - path: ${{ github.workspace }}/package/ + path: ${{ github.workspace }}/dosbox-x-macosx-x86_64-${{ env.timestamp }}.zip - name: Upload release package uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/')