mirror of https://github.com/PCSX2/pcsx2.git
deps: Build MoltenVK on MacOS
This commit is contained in:
parent
fb1a5eab7e
commit
18e3a9987e
|
@ -150,7 +150,6 @@ jobs:
|
|||
|
||||
- name: Prepare Build Artifacts
|
||||
run: |
|
||||
cp /usr/local/lib/libMoltenVK.dylib build/pcsx2*/PCSX2.app/Contents/Frameworks/
|
||||
TAG="$(git tag --points-at HEAD)"
|
||||
if [ -z "$TAG" ]; then
|
||||
APPNAME="${{ steps.artifact-metadata.outputs.artifact-name }}"
|
||||
|
|
|
@ -18,6 +18,7 @@ LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
|
|||
PNG=1.6.37
|
||||
WEBP=1.3.2
|
||||
FFMPEG=6.0
|
||||
MOLTENVK=1.2.8
|
||||
QT=6.6.2
|
||||
|
||||
if [ "${INSTALLDIR:0:1}" != "/" ]; then
|
||||
|
@ -47,6 +48,7 @@ cat > SHASUMS <<EOF
|
|||
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca libpng-$PNG.tar.xz
|
||||
2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4 libwebp-$WEBP.tar.gz
|
||||
57be87c22d9b49c112b6d24bc67d42508660e6b718b3db89c44e47e289137082 ffmpeg-$FFMPEG.tar.xz
|
||||
85beaf8abfcc54d9da0ff0257ae311abd9e7aa96e53da37e1c37d6bc04ac83cd v$MOLTENVK.tar.gz
|
||||
b89b426b9852a17d3e96230ab0871346574d635c7914480a2a27f98ff942677b qtbase-everywhere-src-$QT.tar.xz
|
||||
71584c9136d4983ad19fa2d017abbae57b055eb90c62a36bf3f45d6d21a87cb3 qtimageformats-everywhere-src-$QT.tar.xz
|
||||
5a231d59ef1b42bfbaa5174d4ff39f8e1b4ba070ef984a70b069b4b2576d8181 qtsvg-everywhere-src-$QT.tar.xz
|
||||
|
@ -62,6 +64,7 @@ curl -L \
|
|||
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$PNG/libpng-$PNG.tar.xz" \
|
||||
-O "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$WEBP.tar.gz" \
|
||||
-O "https://ffmpeg.org/releases/ffmpeg-$FFMPEG.tar.xz" \
|
||||
-O "https://github.com/KhronosGroup/MoltenVK/archive/refs/tags/v$MOLTENVK.tar.gz" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtimageformats-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
|
||||
|
@ -137,6 +140,15 @@ make -C build "-j$NPROCS"
|
|||
make -C build install
|
||||
cd ..
|
||||
|
||||
# MoltenVK already builds universal binaries, nothing special to do here.
|
||||
echo "Installing MoltenVK..."
|
||||
tar xf "v$MOLTENVK.tar.gz"
|
||||
cd "MoltenVK-${MOLTENVK}"
|
||||
./fetchDependencies --macos
|
||||
make macos
|
||||
cp Package/Latest/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib "$INSTALLDIR/lib/"
|
||||
cd ..
|
||||
|
||||
echo "Installing Qt Base..."
|
||||
tar xf "qtbase-everywhere-src-$QT.tar.xz"
|
||||
cd "qtbase-everywhere-src-$QT"
|
||||
|
|
|
@ -1314,6 +1314,20 @@ function(setup_main_executable target)
|
|||
|
||||
pcsx2_resource(${target} ${PCSX2_SOURCE_DIR}/Resources/PCSX2.icns ${PCSX2_SOURCE_DIR}/Resources)
|
||||
|
||||
# Copy MoltenVK into the bundle
|
||||
unset(MOLTENVK_PATH CACHE)
|
||||
find_file(MOLTENVK_PATH NAMES
|
||||
libMoltenVK.dylib
|
||||
lib/libMoltenVK.dylib
|
||||
)
|
||||
if (MOLTENVK_PATH)
|
||||
target_sources(${target} PRIVATE "${MOLTENVK_PATH}")
|
||||
set_source_files_properties("${MOLTENVK_PATH}" PROPERTIES MACOSX_PACKAGE_LOCATION Frameworks)
|
||||
message(STATUS "Using MoltenVK from ${MOLTENVK_PATH}")
|
||||
else()
|
||||
message(WARNING "MoltenVK not found in path, it will depend on the target system having it.")
|
||||
endif()
|
||||
|
||||
# If they say to skip postprocess bundle, leave the target in but make it so they have
|
||||
# to manually run it
|
||||
if (SKIP_POSTPROCESS_BUNDLE)
|
||||
|
|
Loading…
Reference in New Issue