2020-03-27 14:37:27 +01:00
|
|
|
#!/bin/sh -ex
|
|
|
|
|
|
2025-06-12 19:07:54 +02:00
|
|
|
# First let's print some info about our caches
|
2025-02-28 08:08:52 +01:00
|
|
|
"$(cygpath -u "$CCACHE_BIN_DIR")"/ccache.exe --show-stats -v
|
|
|
|
|
|
2025-06-08 16:33:45 +02:00
|
|
|
# BUILD_blablabla is CI specific, so we wrap it for portability
|
2020-03-27 14:37:27 +01:00
|
|
|
ARTIFACT_DIR="$BUILD_ARTIFACTSTAGINGDIRECTORY"
|
|
|
|
|
|
|
|
|
|
# Remove unecessary files
|
2021-04-04 10:34:12 +02:00
|
|
|
rm -f ./bin/rpcs3.exp ./bin/rpcs3.lib ./bin/rpcs3.pdb ./bin/vc_redist.x64.exe
|
2020-03-27 14:37:27 +01:00
|
|
|
|
2023-12-06 18:52:27 +01:00
|
|
|
# Prepare compatibility and SDL database for packaging
|
2023-08-26 12:24:47 +02:00
|
|
|
mkdir ./bin/config
|
|
|
|
|
mkdir ./bin/config/input_configs
|
|
|
|
|
curl -fsSL 'https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt' 1> ./bin/config/input_configs/gamecontrollerdb.txt
|
2023-08-02 11:30:00 +02:00
|
|
|
curl -fsSL 'https://rpcs3.net/compatibility?api=v1&export' | iconv -t UTF-8 1> ./bin/GuiConfigs/compat_database.dat
|
2023-12-06 18:52:27 +01:00
|
|
|
|
2025-10-24 02:08:02 +02:00
|
|
|
# Download translations
|
2025-10-24 01:17:04 +02:00
|
|
|
mkdir -p ./bin/qt6/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 "./bin/qt6/translations" >/dev/null 2>&1 || \
|
|
|
|
|
echo "Failed to extract translations.zip. Continuing without translations."
|
|
|
|
|
rm -f translations.zip
|
|
|
|
|
fi
|
2025-10-24 01:17:04 +02:00
|
|
|
|
2023-12-06 18:52:27 +01:00
|
|
|
# Download SSL certificate (not needed with CURLSSLOPT_NATIVE_CA)
|
|
|
|
|
#curl -fsSL 'https://curl.haxx.se/ca/cacert.pem' 1> ./bin/cacert.pem
|
2020-03-27 14:37:27 +01:00
|
|
|
|
|
|
|
|
# Package artifacts
|
|
|
|
|
7z a -m0=LZMA2 -mx9 "$BUILD" ./bin/*
|
|
|
|
|
|
|
|
|
|
# Generate sha256 hashes
|
|
|
|
|
# Write to file for GitHub releases
|
|
|
|
|
sha256sum "$BUILD" | awk '{ print $1 }' | tee "$BUILD.sha256"
|
|
|
|
|
echo "$(cat "$BUILD.sha256");$(stat -c %s "$BUILD")B" > GitHubReleaseMessage.txt
|
|
|
|
|
|
|
|
|
|
# Move files to publishing directory
|
2021-04-04 10:34:12 +02:00
|
|
|
cp -- "$BUILD" "$ARTIFACT_DIR"
|
|
|
|
|
cp -- "$BUILD.sha256" "$ARTIFACT_DIR"
|