2022-01-05 09:32:13 +01:00
|
|
|
#!/bin/sh -ex
|
|
|
|
|
|
2024-09-22 20:39:43 +02:00
|
|
|
# shellcheck disable=SC2086
|
2022-01-05 09:32:13 +01:00
|
|
|
cd build || exit 1
|
|
|
|
|
|
|
|
|
|
# Gather explicit version number and number of commits
|
|
|
|
|
COMM_TAG=$(awk '/version{.*}/ { printf("%d.%d.%d", $5, $6, $7) }' ../rpcs3/rpcs3_version.cpp)
|
|
|
|
|
COMM_COUNT=$(git rev-list --count HEAD)
|
|
|
|
|
COMM_HASH=$(git rev-parse --short=8 HEAD)
|
|
|
|
|
|
|
|
|
|
AVVER="${COMM_TAG}-${COMM_COUNT}"
|
|
|
|
|
|
|
|
|
|
# AVVER is used for GitHub releases, it is the version number.
|
|
|
|
|
echo "AVVER=$AVVER" >> ../.ci/ci-vars.env
|
|
|
|
|
|
|
|
|
|
cd bin
|
|
|
|
|
mkdir "rpcs3.app/Contents/lib/"
|
2023-01-21 21:21:41 +01:00
|
|
|
|
2025-10-26 10:00:16 +01:00
|
|
|
cp "/usr/local/opt/llvm@$LLVM_COMPILER_VER/lib/c++/libc++abi.1.0.dylib" "rpcs3.app/Contents/Frameworks/libc++abi.1.dylib"
|
2025-10-26 10:56:29 +01:00
|
|
|
cp "/usr/local/opt/llvm@$LLVM_COMPILER_VER/lib/unwind/libunwind.1.dylib" "rpcs3.app/Contents/Frameworks/libunwind.1.dylib"
|
2023-08-29 04:18:36 +02:00
|
|
|
cp "$(realpath /usr/local/lib/libsharpyuv.0.dylib)" "rpcs3.app/Contents/lib/libsharpyuv.0.dylib"
|
|
|
|
|
cp "$(realpath /usr/local/lib/libintl.8.dylib)" "rpcs3.app/Contents/lib/libintl.8.dylib"
|
2023-01-21 21:21:41 +01:00
|
|
|
|
2022-01-05 09:32:13 +01:00
|
|
|
rm -rf "rpcs3.app/Contents/Frameworks/QtPdf.framework" \
|
|
|
|
|
"rpcs3.app/Contents/Frameworks/QtQml.framework" \
|
|
|
|
|
"rpcs3.app/Contents/Frameworks/QtQmlModels.framework" \
|
|
|
|
|
"rpcs3.app/Contents/Frameworks/QtQuick.framework" \
|
|
|
|
|
"rpcs3.app/Contents/Frameworks/QtVirtualKeyboard.framework" \
|
|
|
|
|
"rpcs3.app/Contents/Plugins/platforminputcontexts" \
|
2023-04-30 13:39:40 +02:00
|
|
|
"rpcs3.app/Contents/Plugins/virtualkeyboard" \
|
|
|
|
|
"rpcs3.app/Contents/Resources/git"
|
2022-01-05 09:32:13 +01:00
|
|
|
|
2024-09-22 20:39:43 +02:00
|
|
|
../../.ci/optimize-mac.sh rpcs3.app
|
|
|
|
|
|
2025-10-24 21:21:44 +02:00
|
|
|
# Download translations
|
2025-10-25 01:00:33 +02:00
|
|
|
mkdir -p "rpcs3.app/Contents/translations"
|
2025-11-02 15:29:59 +01:00
|
|
|
ZIP_URL=$(curl -fsSL "https://api.github.com/repos/RPCS3/rpcs3_translations/releases/latest" \
|
|
|
|
|
| grep "browser_download_url" \
|
|
|
|
|
| grep "RPCS3-languages.zip" \
|
|
|
|
|
| cut -d '"' -f 4)
|
|
|
|
|
if [ -z "$ZIP_URL" ]; then
|
|
|
|
|
echo "Failed to find RPCS3-languages.zip in the latest release. Continuing without translations."
|
|
|
|
|
else
|
|
|
|
|
echo "Downloading translations from: $ZIP_URL"
|
|
|
|
|
curl -L -o translations.zip "$ZIP_URL" || {
|
|
|
|
|
echo "Failed to download translations.zip. Continuing without translations."
|
|
|
|
|
exit 0
|
|
|
|
|
}
|
|
|
|
|
unzip -o translations.zip -d "rpcs3.app/Contents/translations" >/dev/null 2>&1 || \
|
|
|
|
|
echo "Failed to extract translations.zip. Continuing without translations."
|
|
|
|
|
rm -f translations.zip
|
|
|
|
|
fi
|
2025-10-24 21:21:44 +02:00
|
|
|
|
2022-01-05 09:32:13 +01:00
|
|
|
# Need to do this rename hack due to case insensitive filesystem
|
|
|
|
|
mv rpcs3.app RPCS3_.app
|
|
|
|
|
mv RPCS3_.app RPCS3.app
|
|
|
|
|
|
2024-09-22 20:39:43 +02:00
|
|
|
# Hack
|
2025-08-29 16:01:19 +02:00
|
|
|
install_name_tool -delete_rpath /usr/local/lib RPCS3.app/Contents/MacOS/rpcs3
|
2025-01-24 08:27:08 +01:00
|
|
|
#-delete_rpath /usr/local/Cellar/sdl3/3.2.8/lib
|
2024-09-22 20:39:43 +02:00
|
|
|
|
|
|
|
|
# NOTE: "--deep" is deprecated
|
|
|
|
|
codesign --deep -fs - RPCS3.app
|
|
|
|
|
|
2022-01-05 09:32:13 +01:00
|
|
|
echo "[InternetShortcut]" > Quickstart.url
|
|
|
|
|
echo "URL=https://rpcs3.net/quickstart" >> Quickstart.url
|
|
|
|
|
echo "IconIndex=0" >> Quickstart.url
|
|
|
|
|
|
2023-12-11 19:21:06 +01:00
|
|
|
ARCHIVE_FILEPATH="$BUILD_ARTIFACTSTAGINGDIRECTORY/rpcs3-v${COMM_TAG}-${COMM_COUNT}-${COMM_HASH}_macos.7z"
|
2025-08-28 18:43:05 +02:00
|
|
|
"/opt/homebrew/bin/7z" a -mx9 "$ARCHIVE_FILEPATH" RPCS3.app Quickstart.url
|
2023-12-11 19:21:06 +01:00
|
|
|
FILESIZE=$(stat -f %z "$ARCHIVE_FILEPATH")
|
|
|
|
|
SHA256SUM=$(shasum -a 256 "$ARCHIVE_FILEPATH" | awk '{ print $1 }')
|
|
|
|
|
|
2022-01-05 09:32:13 +01:00
|
|
|
cd ..
|
|
|
|
|
echo "${SHA256SUM};${FILESIZE}B" > "$RELEASE_MESSAGE"
|
|
|
|
|
cd bin
|