From 03312c520d59097ac834ff6cbe8084711d75f8e7 Mon Sep 17 00:00:00 2001 From: Logan McNaughton <848146+loganmc10@users.noreply.github.com> Date: Wed, 28 Dec 2022 15:09:20 -0700 Subject: [PATCH] Add mac build (#316) --- .github/workflows/build.yml | 38 +++++++++++++++++-------------------- build.sh | 1 - link-mac.sh | 5 ++--- 3 files changed, 19 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index be32062..71a22ea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,24 +51,20 @@ jobs: with: name: simple64-win64 path: simple64-*.zip -# build-mac: -# runs-on: macos-10.15 -# steps: -# - uses: actions/checkout@v3 -# - name: brew update -# run: | -# brew update -# brew install hidapi sdl2_net sdl2 qt@5 -# - name: Run build script -# run: | -# export qt_version=$(ls /usr/local/Cellar/qt@5) -# sudo ln -s /usr/local/Cellar/qt@5/$qt_version/plugins /usr/local/plugins -# sudo ln -s /usr/local/Cellar/qt@5/$qt_version/mkspecs /usr/local/mkspecs -# sudo ln -s /usr/local/Cellar/qt@5/$qt_version/bin/qmake /usr/local/bin/qmake -# export PATH=$PATH:/usr/local/Cellar/qt@5/$qt_version/bin -# sudo sh ./build.sh -# - name: Upload dmg -# uses: actions/upload-artifact@v3 -# with: -# name: simple64-osx -# path: simple64/simple64-*.dmg + build-mac: + runs-on: macos-11 + steps: + - uses: actions/checkout@v3 + - name: brew update + run: | + brew update + brew upgrade || true + brew install hidapi sdl2_net sdl2 ninja molten-vk vulkan-loader qt@6 + - name: Run build script + run: | + sudo sh ./build.sh + - name: Upload dmg + uses: actions/upload-artifact@v3 + with: + name: simple64-osx + path: simple64/simple64-*.dmg diff --git a/build.sh b/build.sh index 075c296..c864f31 100755 --- a/build.sh +++ b/build.sh @@ -133,7 +133,6 @@ if [[ ${UNAME} == *"MINGW"* ]]; then cp -v "${base_dir}/simple64-input-qt/vosk/vosk.dll" "${install_dir}" elif [[ ${UNAME} == *"Darwin"* ]]; then cp "${base_dir}/simple64-gui/discord/discord_game_sdk.dylib" "${install_dir}" - cp "${base_dir}/simple64-input-qt/vosk/libvosk.dylib" "${install_dir}" cd "${base_dir}" sh ./link-mac.sh else diff --git a/link-mac.sh b/link-mac.sh index 7d2e99d..005ae9d 100755 --- a/link-mac.sh +++ b/link-mac.sh @@ -17,11 +17,10 @@ mv simple64/mupencheat.txt "${contents}/MacOS" mv simple64/pif.ntsc.rom "${contents}/MacOS" mv simple64/pif.pal.rom "${contents}/MacOS" mv simple64/discord_game_sdk.dylib "${contents}/MacOS" -mv simple64/libvosk.dylib "${contents}/MacOS" # SDL -cp /usr/local/opt/sdl2_net/lib/libSDL2-2.0.0.dylib "${contents}/Frameworks" -otool -L "${contents}/Frameworks/libSDL2_net-2.0.0.dylib" +cp /usr/local/opt/sdl2/lib/libSDL2-2.0.0.dylib "${contents}/Frameworks" +otool -L "${contents}/Frameworks/libSDL2-2.0.0.dylib" cp /usr/local/opt/sdl2_net/lib/libSDL2_net-2.0.0.dylib "${contents}/Frameworks" install_name_tool -change /usr/local/opt/sdl2/lib/libSDL2-2.0.0.dylib @executable_path/../Frameworks/libSDL2-2.0.0.dylib "${contents}/Frameworks/libSDL2_net-2.0.0.dylib"