Don't show "Firefox Software Updater" on Windows

And fix other .exe metadata

Fixes #3571
This commit is contained in:
Dan Stillman 2024-05-28 06:36:40 +01:00
parent a7ae98c4c8
commit 81edd1ee1c
4 changed files with 28 additions and 7 deletions

View file

@ -659,7 +659,12 @@ if [ $BUILD_WIN == 1 ]; then
check_lfs_file "$CALLDIR/win/zotero.exe.tar.xz"
tar xf "$CALLDIR/win/zotero.exe.tar.xz" --to-stdout zotero_$arch.exe > "$APPDIR/zotero.exe"
# Update .exe version number (only possible on Windows)
# Use our own updater, because Mozilla's requires updates signed by Mozilla
check_lfs_file "$CALLDIR/win/updater.exe.tar.xz"
tar xf "$CALLDIR/win/updater.exe.tar.xz" --to-stdout updater-$arch.exe > "$APPDIR/updater.exe"
cat "$CALLDIR/win/installer/updater_append.ini" >> "$APPDIR/updater.ini"
# Update .exe version numbers (only possible on Windows)
if [ $WIN_NATIVE == 1 ]; then
# FileVersion is limited to four integers, so it won't be properly updated for non-release
# builds (e.g., we'll show 5.0.97.0 for 5.0.97-beta.37). ProductVersion will be the full
@ -667,13 +672,11 @@ if [ $BUILD_WIN == 1 ]; then
rcedit "`cygpath -w \"$APPDIR/zotero.exe\"`" \
--set-file-version "$VERSION_NUMERIC" \
--set-product-version "$VERSION"
rcedit "`cygpath -w \"$APPDIR/updater.exe\"`" \
--set-file-version "$VERSION_NUMERIC" \
--set-product-version "$VERSION"
fi
# Use our own updater, because Mozilla's requires updates signed by Mozilla
check_lfs_file "$CALLDIR/win/updater.exe.tar.xz"
tar xf "$CALLDIR/win/updater.exe.tar.xz" --to-stdout updater-$arch.exe > "$APPDIR/updater.exe"
cat "$CALLDIR/win/installer/updater_append.ini" >> "$APPDIR/updater.ini"
# Sign updater
if [ $SIGN -eq 1 ]; then
"$CALLDIR/win/codesign" "$APPDIR/updater.exe" "$SIGNATURE_DESC Updater"

Binary file not shown.

View file

@ -0,0 +1,7 @@
[FILENAMES]
Open=updater-{{ARCH}}.exe
Save=updater-{{ARCH}}-new.exe
Log=CONSOLE
[COMMANDS]
-delete VERSIONINFO,1
-addoverwrite VersionInfo1-updater.res, VERSIONINFO,1,

View file

@ -35,14 +35,25 @@ for arch in win32 win-x64 win-aarch64; do
mv updater.exe updater-$arch.exe
$rh -open VersionInfo1.rc -save VersionInfo1.res -action compile
$rh -open VersionInfo1-updater.rc -save VersionInfo1-updater.res -action compile
config=`cat resource-hacker-config.txt`
config_file="resource-hacker-config-$arch.txt"
echo "${config//\{\{ARCH\}\}/$arch}" > $config_file
$rh -script $config_file
rm $config_file
config=`cat resource-hacker-config-updater.txt`
config_file="resource-hacker-config-updater-$arch.txt"
echo "${config//\{\{ARCH\}\}/$arch}" > $config_file
$rh -script $config_file
rm $config_file
mv updater-$arch-new.exe updater-$arch.exe
rm VersionInfo1.res
rm VersionInfo1-updater.res
done
tar -Jcv zotero_win32.exe zotero_win-x64.exe zotero_win-aarch64.exe > zotero.exe.tar.xz