Update update_exe to extract updater from Firefox ZIP as well

We don't have to actually update updater.exe.tar.xz every time we update
the launcher, but we might as well stage it from the same script.
This commit is contained in:
Dan Stillman 2024-04-06 09:56:08 +01:00
parent bcf8d72b0b
commit a9e57541cf

View file

@ -17,19 +17,22 @@ if [[ -z "${1:-}" ]]; then
fi fi
version=$1 version=$1
for arch in win32 win-x64; do for arch in win32 win-x64 win-aarch64; do
if [ $arch = "win-x64" ]; then if [ $arch = "win32" ]; then
zip="firefox-115.5.0.en-US.$arch.zip"
elif [ $arch = "win-x64" ]; then
zip="firefox-$version.en-US.win64.zip" zip="firefox-$version.en-US.win64.zip"
else elif [ $arch = "win-aarch64" ]; then
zip="firefox-$version.en-US.$arch.zip" zip="firefox-$version.en-US.win64-aarch64.zip"
fi fi
if [ ! -f "$zip" ]; then if [ ! -f "$zip" ]; then
echo "$zip not found" >&2 echo "$zip not found" >&2
exit 1 exit 1
fi fi
rm -f firefox-$arch.exe rm -f firefox-$arch.exe
unzip -oj $zip firefox/firefox.exe unzip -oj $zip firefox/firefox.exe firefox/updater.exe
mv firefox.exe firefox-$arch.exe mv firefox.exe firefox-$arch.exe
mv updater.exe updater-$arch.exe
$rh -open VersionInfo1.rc -save VersionInfo1.res -action compile $rh -open VersionInfo1.rc -save VersionInfo1.res -action compile
@ -42,6 +45,7 @@ for arch in win32 win-x64; do
rm VersionInfo1.res rm VersionInfo1.res
done done
tar -Jcv zotero_win32.exe zotero_win-x64.exe > zotero.exe.tar.xz tar -Jcv zotero_win32.exe zotero_win-x64.exe zotero_win-aarch64.exe > zotero.exe.tar.xz
tar -Jcv updater-win32.exe updater-win-x64.exe updater-win-aarch64.exe > updater.exe.tar.xz
rm firefox-win*.exe zotero_win*.exe rm firefox-win*.exe updater-win*.exe zotero_win*.exe