mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-10-17 16:30:18 +02:00
[Mac OS X] Switch all Mac OS X CI to use MacPorts because of Homebrew 7 dropping Intel far too early.
This change really is the last straw I've had with Homebrew, I simply cannot trust that they won't do something similar to Apple Silicon in the future. Inevitably much of the Intel CI's downloaded deps will get built from source due to this which would cause build times to skyrocket, were we to keep using Homebrew.
This commit is contained in:
1 parent
ac6dc84e84
commit
4b9f2af41f
6 files changed
+29
-55
No files matched your search
+10
-25
@@ -9,23 +9,12 @@ AVVER="${COMM_TAG}-${COMM_COUNT}"
|
||||
export LVER="${COMM_TAG}-${COMM_COUNT}-${COMM_HASH}"
|
||||
echo "AVVER=$AVVER" >> .ci/ci-vars.env
|
||||
|
||||
export HOMEBREW_NO_AUTO_UPDATE=1
|
||||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
||||
export HOMEBREW_NO_ENV_HINTS=1
|
||||
export HOMEBREW_NO_INSTALL_CLEANUP=1
|
||||
brew install -f --overwrite --quiet ccache "llvm@$LLVM_COMPILER_VER"
|
||||
brew link -f --overwrite --quiet "llvm@$LLVM_COMPILER_VER"
|
||||
brew install -f --overwrite --quiet googletest opencv@4 sdl3 vulkan-headers vulkan-loader molten-vk
|
||||
brew unlink --quiet ffmpeg fmt qtbase qtsvg qtdeclarative protobuf || true
|
||||
# Clang depends on LLVM_COMPILER_VER so it needs to be installed here.
|
||||
sudo port install "clang-$LLVM_COMPILER_VER"
|
||||
|
||||
export CXX=clang++
|
||||
export CC=clang
|
||||
|
||||
export BREW_PATH;
|
||||
BREW_PATH="$(brew --prefix)"
|
||||
export BREW_BIN="$BREW_PATH/bin"
|
||||
export BREW_SBIN="$BREW_PATH/sbin"
|
||||
|
||||
export WORKDIR;
|
||||
WORKDIR="$(pwd)"
|
||||
|
||||
@@ -53,20 +42,16 @@ cd "$WORKDIR"
|
||||
ditto "/tmp/Qt/$QT_VER" "qt-downloader/$QT_VER"
|
||||
|
||||
export Qt6_DIR="$WORKDIR/qt-downloader/$QT_VER/clang_64/lib/cmake/Qt$QT_VER_MAIN"
|
||||
export SDL3_DIR="$BREW_PATH/opt/sdl3/lib/cmake/SDL3"
|
||||
export SDL3_DIR="/opt/local/lib/cmake/SDL3"
|
||||
export OpenCV_DIR="/opt/local/libexec/opencv4"
|
||||
export PATH="/opt/local/libexec/llvm-$LLVM_COMPILER_VER/bin:/$WORKDIR/qt-downloader/$QT_VER/clang_64/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:$PATH"
|
||||
export LDFLAGS="-L/opt/local/lib -Wl,-rpath,/opt/local/lib"
|
||||
export VULKAN_SDK="/opt/local"
|
||||
export LLVM_DIR="/opt/local/libexec/llvm-$LLVM_COMPILER_VER"
|
||||
|
||||
export PATH="$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/bin:$PATH"
|
||||
export LDFLAGS="-L$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/c++ -L$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/unwind -lunwind"
|
||||
|
||||
export VULKAN_SDK
|
||||
VULKAN_SDK="$BREW_PATH/opt/molten-vk"
|
||||
ln -s "$BREW_PATH/opt/vulkan-loader/lib/libvulkan.dylib" "$VULKAN_SDK/lib/libvulkan.dylib"
|
||||
|
||||
export LLVM_DIR
|
||||
LLVM_DIR="$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER"
|
||||
# Pull all the submodules except some
|
||||
# shellcheck disable=SC2046
|
||||
git submodule -q update --init --depth=1 --jobs=8 $(awk '/path/ && !/llvm/ && !/opencv/ && !/SDL/ && !/feralinteractive/ { print $3 }' .gitmodules)
|
||||
git submodule -q update --init --depth=1 --jobs=8 $(awk '/path/ && !/llvm/ && !/opencv/ && !/libsdl-org/ && !/feralinteractive/ && !/curl/ && !/zlib/ { print $3 }' .gitmodules)
|
||||
|
||||
mkdir build && cd build || exit 1
|
||||
# The below should be uncommented once bugs with Qt 6 QListWidgets when using the OS 26 visual style are resolved.
|
||||
@@ -91,7 +76,7 @@ cmake .. \
|
||||
-DUSE_SYSTEM_OPENCV=ON \
|
||||
-G Ninja
|
||||
|
||||
ninja -j4; build_status=$?;
|
||||
ninja; build_status=$?;
|
||||
|
||||
cd ..
|
||||
|
||||
|
||||
+1
-24
@@ -5,15 +5,12 @@ cd build || exit 1
|
||||
|
||||
cd bin
|
||||
mkdir -p "rpcs3.app/Contents/Resources/vulkan/icd.d" || true
|
||||
wget https://github.com/KhronosGroup/MoltenVK/releases/download/v1.4.2-rc1/MoltenVK-macos-privateapi.tar
|
||||
wget https://github.com/KhronosGroup/MoltenVK/releases/download/v1.4.2/MoltenVK-macos-privateapi.tar
|
||||
tar -xvf MoltenVK-macos-privateapi.tar
|
||||
cp "MoltenVK/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib" "rpcs3.app/Contents/Frameworks/libMoltenVK.dylib"
|
||||
cp "MoltenVK/MoltenVK/dynamic/dylib/macOS/MoltenVK_icd.json" "rpcs3.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json"
|
||||
sed -i '' "s/.\//..\/..\/..\/Frameworks\//g" "rpcs3.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json"
|
||||
|
||||
cp "$(realpath $BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/c++/libc++abi.1.0.dylib)" "rpcs3.app/Contents/Frameworks/libc++abi.1.dylib"
|
||||
cp "$(realpath $BREW_PATH/opt/gcc/lib/gcc/current/libgcc_s.1.1.dylib)" "rpcs3.app/Contents/Frameworks/libgcc_s.1.1.dylib"
|
||||
|
||||
rm -rf "rpcs3.app/Contents/Frameworks/QtPdf.framework" \
|
||||
"rpcs3.app/Contents/Frameworks/QtQml.framework" \
|
||||
"rpcs3.app/Contents/Frameworks/QtQmlModels.framework" \
|
||||
@@ -52,26 +49,6 @@ rm -f rpcs3.app/Contents/translations/qt_help_*.qm || true
|
||||
mv rpcs3.app RPCS3_.app
|
||||
mv RPCS3_.app RPCS3.app
|
||||
|
||||
# Hack to fix rpath issues
|
||||
BIN="RPCS3.app/Contents/MacOS/rpcs3"
|
||||
install_name_tool -delete_rpath /opt/homebrew/lib $BIN || true
|
||||
install_name_tool -delete_rpath /usr/local/lib $BIN || true
|
||||
|
||||
# Fix dylib IDs
|
||||
for lib in RPCS3.app/Contents/Frameworks/*.dylib; do
|
||||
name=$(basename "$lib")
|
||||
install_name_tool -id "@rpath/$name" "$lib"
|
||||
done
|
||||
|
||||
# Rewrite any hardcoded Homebrew paths to use @rpath
|
||||
find "RPCS3.app/Contents/" -type f \( -perm +111 -o -name "*.dylib" \) | while read -r bin; do
|
||||
otool -L "$bin" | grep -E "/opt/homebrew|/usr/local" | awk '{print $1}' | while read -r dep; do
|
||||
base=$(basename "$dep")
|
||||
echo "Fixing $dep -> @rpath/$base in $bin"
|
||||
install_name_tool -change "$dep" "@rpath/$base" "$bin"
|
||||
done
|
||||
done
|
||||
|
||||
# NOTE: "--deep" is deprecated
|
||||
codesign --deep -fs - RPCS3.app
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
ports:
|
||||
- name: abseil
|
||||
- name: ccache
|
||||
- name: gtest
|
||||
- name: opencv4
|
||||
- name: sdl3
|
||||
- name: vulkan-headers
|
||||
- name: vulkan-loader
|
||||
- name: MoltenVK
|
||||
@@ -185,12 +185,17 @@ jobs:
|
||||
RELEASE_MESSAGE: ../GitHubReleaseMessage.txt
|
||||
UPLOAD_COMMIT_HASH: ${{ matrix.UPLOAD_COMMIT_HASH }}
|
||||
UPLOAD_REPO_FULL_NAME: ${{ matrix.UPLOAD_REPO_FULL_NAME }}
|
||||
RUN_UNIT_TESTS: ${{ matrix.name == 'Apple Silicon' && (github.event_name == 'pull_request' && 'ON') || 'OFF' }}
|
||||
RUN_UNIT_TESTS: github.event_name == 'pull_request' && 'ON' || 'OFF'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@main
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup MacPorts
|
||||
uses: melusina-org/setup-macports@v1
|
||||
with:
|
||||
cache: 'disable'
|
||||
|
||||
- name: Restore Build Ccache
|
||||
uses: actions/cache/restore@main
|
||||
|
||||
@@ -16,11 +16,6 @@ typedef BOOL (WINAPI* PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
||||
#undef OPENGL_PROC
|
||||
#undef WGL_PROC
|
||||
#undef OPENGL_PROC2
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
#include <OpenGL/gl.h>
|
||||
#include <OpenGL/glu.h>
|
||||
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#ifdef HAVE_X11
|
||||
|
||||
@@ -56,7 +56,10 @@
|
||||
#include <clocale>
|
||||
|
||||
#include "Emu/RSX/Null/NullGSRender.h"
|
||||
|
||||
#ifndef __APPLE__
|
||||
#include "Emu/RSX/GL/GLGSRender.h"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_VULKAN)
|
||||
#include "Emu/RSX/VK/VKGSRender.h"
|
||||
|
||||
Reference in new issue
Block a user