Improve Mac Translation download (#18598)
Switch from API to direct download. Fixes 403 error code. jammy-aarch64 needs `unzip` from universe in the Dockerfile. eg: ``` add-apt-repository universe apt update -qq apt-get install -y unzip ``` Fixes https://github.com/RPCS3/rpcs3/issues/18560
This commit is contained in:
+11
-14
@@ -31,21 +31,18 @@ rm -rf "rpcs3.app/Contents/Frameworks/QtPdf.framework" \
|
|||||||
|
|
||||||
# Download translations
|
# Download translations
|
||||||
mkdir -p "rpcs3.app/Contents/translations"
|
mkdir -p "rpcs3.app/Contents/translations"
|
||||||
ZIP_URL=$(curl -fsSL "https://api.github.com/repos/RPCS3/rpcs3_translations/releases/latest" \
|
ZIP_URL="https://github.com/RPCS3/rpcs3_translations/releases/latest/download/RPCS3-languages.zip"
|
||||||
| grep "browser_download_url" \
|
echo "Downloading translations from: $ZIP_URL"
|
||||||
| grep "RPCS3-languages.zip" \
|
if curl -fsSL "$ZIP_URL" -o "translations.zip"; then
|
||||||
| cut -d '"' -f 4)
|
echo "Successfully downloaded translations."
|
||||||
if [ -z "$ZIP_URL" ]; then
|
if unzip -o translations.zip -d "rpcs3.app/Contents/translations" >/dev/null 2>&1; then
|
||||||
echo "Failed to find RPCS3-languages.zip in the latest release. Continuing without translations."
|
rm -f translations.zip
|
||||||
else
|
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."
|
echo "Failed to extract translations.zip. Continuing without translations."
|
||||||
rm -f translations.zip
|
rm -f translations.zip
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Warning: Failed to download translations. Skipping..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy Qt translations manually
|
# Copy Qt translations manually
|
||||||
|
|||||||
Reference in New Issue
Block a user