fetch_xulrunner: Use local copies of Firefox on Windows if available

Allows for faster fetch_xulrunner development without repeatedly
downloading Firefox from Mozilla servers. Already possible on macOS.
This commit is contained in:
Dan Stillman 2023-05-20 12:34:24 +01:00
parent 1e78025726
commit 4a68c04891

View file

@ -357,10 +357,15 @@ if [ $BUILD_WIN == 1 ]; then
rm -rf $xdir
mkdir $xdir
if [ $arch = "win-x64" ]; then
curl -O "$DOWNLOAD_URL/win64/en-US/Firefox%20Setup%20$GECKO_VERSION.exe"
if [ -e "Firefox Setup $GECKO_VERSION-$arch.exe" ]; then
echo "Using Firefox Setup $GECKO_VERSION-$arch.exe"
cp "Firefox Setup $GECKO_VERSION-$arch.exe" "Firefox%20Setup%20$GECKO_VERSION.exe"
else
curl -O "$DOWNLOAD_URL/$arch/en-US/Firefox%20Setup%20$GECKO_VERSION.exe"
if [ $arch = "win-x64" ]; then
curl -O "$DOWNLOAD_URL/win64/en-US/Firefox%20Setup%20$GECKO_VERSION.exe"
else
curl -O "$DOWNLOAD_URL/$arch/en-US/Firefox%20Setup%20$GECKO_VERSION.exe"
fi
fi
7z x Firefox%20Setup%20$GECKO_VERSION.exe -o$xdir 'core/*'