diff --git a/.ci/deploy-linux.sh b/.ci/deploy-linux.sh index 9f917c8172..b0599400d2 100755 --- a/.ci/deploy-linux.sh +++ b/.ci/deploy-linux.sh @@ -33,12 +33,23 @@ if [ "$DEPLOY_APPIMAGE" = "true" ]; then rm -rf ./AppDir/usr/share/rpcs3/git # Download translations - curl -fsSL "https://api.github.com/repos/RPCS3/rpcs3_translations/contents/qm" \ - | grep '"download_url":' \ - | cut -d '"' -f 4 \ - | while read -r url; do - curl -fsSL "$url" -o "./AppDir/usr/translations/$(basename "$url")" - done + mkdir -p "./AppDir/usr/translations" + 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 "./AppDir/usr/translations" >/dev/null 2>&1 || \ + echo "Failed to extract translations.zip. Continuing without translations." + rm -f translations.zip + fi curl -fsSLo /uruntime "https://github.com/VHSgunzo/uruntime/releases/download/v0.3.4/uruntime-appimage-dwarfs-$CPU_ARCH" chmod +x /uruntime diff --git a/.ci/deploy-mac-arm64.sh b/.ci/deploy-mac-arm64.sh index 02608a8d8a..6e067bde9f 100755 --- a/.ci/deploy-mac-arm64.sh +++ b/.ci/deploy-mac-arm64.sh @@ -33,12 +33,22 @@ rm -rf "rpcs3.app/Contents/Frameworks/QtPdf.framework" \ # Download translations mkdir -p "rpcs3.app/Contents/translations" -curl -fsSL "https://api.github.com/repos/RPCS3/rpcs3_translations/contents/qm" \ - | grep '"download_url":' \ - | cut -d '"' -f 4 \ - | while read -r url; do - curl -fsSL "$url" -o "rpcs3.app/Contents/translations/$(basename "$url")" - done +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 # Hack install_name_tool -delete_rpath /opt/homebrew/lib RPCS3.app/Contents/MacOS/rpcs3 || echo "Hack for deleting rpath /opt/homebrew/lib not needed" diff --git a/.ci/deploy-mac.sh b/.ci/deploy-mac.sh index f0004d5915..4b54267539 100755 --- a/.ci/deploy-mac.sh +++ b/.ci/deploy-mac.sh @@ -34,12 +34,22 @@ rm -rf "rpcs3.app/Contents/Frameworks/QtPdf.framework" \ # Download translations mkdir -p "rpcs3.app/Contents/translations" -curl -fsSL "https://api.github.com/repos/RPCS3/rpcs3_translations/contents/qm" \ - | grep '"download_url":' \ - | cut -d '"' -f 4 \ - | while read -r url; do - curl -fsSL "$url" -o "rpcs3.app/Contents/translations/$(basename "$url")" - done +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 # Need to do this rename hack due to case insensitive filesystem mv rpcs3.app RPCS3_.app diff --git a/.ci/deploy-windows-clang.sh b/.ci/deploy-windows-clang.sh index e8f4c8f7c3..c95f82e7b8 100644 --- a/.ci/deploy-windows-clang.sh +++ b/.ci/deploy-windows-clang.sh @@ -26,12 +26,22 @@ curl -fsSL 'https://rpcs3.net/compatibility?api=v1&export' | iconv -t UTF-8 1> . # Download translations mkdir -p ./bin/share/qt6/translations -curl -fsSL "https://api.github.com/repos/RPCS3/rpcs3_translations/contents/qm" \ - | grep '"download_url":' \ - | cut -d '"' -f 4 \ - | while read -r url; do - curl -fsSL "$url" -o "./bin/share/qt6/translations/$(basename "$url")" - done +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/share/qt6/translations" >/dev/null 2>&1 || \ + echo "Failed to extract translations.zip. Continuing without translations." + rm -f translations.zip +fi # Package artifacts 7z a -m0=LZMA2 -mx9 "$BUILD" ./bin/* diff --git a/.ci/deploy-windows.sh b/.ci/deploy-windows.sh index 5882db049a..069f8fb637 100755 --- a/.ci/deploy-windows.sh +++ b/.ci/deploy-windows.sh @@ -17,12 +17,22 @@ curl -fsSL 'https://rpcs3.net/compatibility?api=v1&export' | iconv -t UTF-8 1> . # Download translations mkdir -p ./bin/qt6/translations -curl -fsSL "https://api.github.com/repos/RPCS3/rpcs3_translations/contents/qm" \ - | grep '"download_url":' \ - | cut -d '"' -f 4 \ - | while read -r url; do - curl -fsSL "$url" -o "./bin/qt6/translations/$(basename "$url")" - done +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 # Download SSL certificate (not needed with CURLSSLOPT_NATIVE_CA) #curl -fsSL 'https://curl.haxx.se/ca/cacert.pem' 1> ./bin/cacert.pem