Browse Source

[appstore] drop ARM32 from packaged builds and use our own PE data extractor instead of exiftool

* exiftool is way too cumbersome as a "standalone" commandline executable for our purpose.
* Also update French translation.
pull/2730/head
Pete Batard 4 months ago
parent
commit
7ff68dc7af
No known key found for this signature in database GPG Key ID: 38E0CF5E69EDD671
  1. 13
      ChangeLog.txt
  2. 62
      res/appstore/get_pe_info.c
  3. 14
      res/appstore/packme.cmd
  4. 38
      res/loc/po/fr-FR.po
  5. 7
      res/loc/rufus.loc
  6. 10
      src/rufus.rc

13
ChangeLog.txt

@ -1,3 +1,16 @@
o Version 4.7 (2025.04.??)
Add a mechanism to detect and download updated DBXs from the official UEFI repository
Add ztsd compression support for disk images
Add a new exclusion feature in the settings, to ignore disks with a specific GPT GUID
Improve detection for compressed VHD images that are too large to fit the target drive
Fix commandline hogger not being deleted when running Rufus from a different directory
Fix FAT filenames from embedded images being potentially truncated on image extraction
Fix a side-loading vulnerability [CVE-2025-26624] with cfgmgr32.dll (with thanks to @EmperialX)
Fix UI memory leaks (courtesy of @ozone10)
Fall back to user/system default locale when getting error description (courtesy of @Rairii)
Don't run the commandline hogger on POSIX shells
Drop ARM 32-bit support (Note that ARM 64-bit support is *NOT* affected by this)
o Version 4.6 (2024.10.21)
Add a new setup.exe wrapper to bypass Windows 11 24H2 in-place upgrade restrictions
Add TimeZone to regional options replication

62
res/appstore/get_pe_info.c

@ -0,0 +1,62 @@
// Compile with: gcc -lversion -o get_pe_info get_pe_info.c
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
VS_FIXEDFILEINFO *file_info;
DWORD handle, size;
WORD lang, codepage;
UINT len;
void *buffer = NULL, *translation, *version_info;
char sub_block[50];
int ret = 1;
if (argc != 3 || argv[1][0] != '-') {
printf("Usage: %s [-i|-v] <path_to_executable>\n", argv[0]);
goto out;
}
size = GetFileVersionInfoSizeA(argv[2], &handle);
if (size == 0) {
fprintf(stderr, "Failed to get version info size.\n");
goto out;
}
buffer = malloc(size);
if (buffer == NULL)
goto out;
if (!GetFileVersionInfoA(argv[2], handle, size, buffer)) {
fprintf(stderr, "Failed to get version info.\n");
goto out;
}
if (argv[1][1] == 'i') {
if (!VerQueryValueA(buffer, "\\VarFileInfo\\Translation", &translation, &len) || len < 4) {
fprintf(stderr, "Failed to retrieve language and codepage information.\n");
goto out;
}
lang = *(WORD*)translation;
codepage = *((WORD*)translation + 1);
snprintf(sub_block, sizeof(sub_block), "\\StringFileInfo\\%04x%04x\\InternalName", lang, codepage);
if (!VerQueryValueA(buffer, sub_block, &version_info, &len)) {
fprintf(stderr, "Failed to retrieve Internal Name.\n");
goto out;
}
printf("%s\n", (char*)version_info);
} else {
if (!VerQueryValueA(buffer, "\\", (LPVOID*)&file_info, &len) || len < sizeof(VS_FIXEDFILEINFO)) {
fprintf(stderr, "Failed to retrieve file info.\n");
goto out;
}
printf("%d.%d.%d.%d\n", HIWORD(file_info->dwFileVersionMS), LOWORD(file_info->dwFileVersionMS),
HIWORD(file_info->dwFileVersionLS), LOWORD(file_info->dwFileVersionLS));
}
ret = 0;
out:
free(buffer);
return ret;
}

14
res/appstore/packme.cmd

@ -29,7 +29,7 @@ set WDK_PATH=C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64
set ZIP_PATH=C:\Program Files\7-Zip
set SIGNATURE_SHA1=fc4686753937a93fdcd48c2bb4375e239af92dcb
set MANIFEST=AppxManifest.xml
set ARCHS=x86 x64 arm arm64
set ARCHS=x86 x64 arm64
set DEFAULT_SCALE=200
set OTHER_SCALES=100 125 150 400
set SCALED_IMAGES=LargeTile SmallTile Square44x44Logo Square150x150Logo StoreLogo Wide310x150Logo
@ -69,25 +69,25 @@ for %%a in (%ARCHS%) do (
)
)
rem exiftool.exe can't be installed in the Windows system directories...
if not exist exiftool.exe (
echo exiftool.exe must exist in this directory
rem Use our own get_pe_info executable - source is in this directory
if not exist get_pe_info.exe (
echo get_pe_info.exe must exist in this directory. Compile it with MinGW.
goto out
)
rem Make sure we're not trying to create a package from an ALPHA or BETA version!
exiftool -s3 -*InternalName* rufus_x64.exe | findstr /C:"ALPHA" 1>nul && (
get_pe_info.exe -i rufus_x64.exe | findstr /C:"ALPHA" 1>nul && (
echo Alpha version detected - ABORTED
goto out
)
exiftool -s3 -*InternalName* rufus_x64.exe | findstr /C:"BETA" 1>nul && (
get_pe_info.exe -i rufus_x64.exe | findstr /C:"BETA" 1>nul && (
echo Beta version detected - ABORTED
goto out
)
rem Populate the version from the executable
if "%VERSION_OVERRIDE%"=="" (
exiftool -s3 -*FileVersionNumber* rufus_x64.exe > version.txt
get_pe_info.exe -v rufus_x64.exe > version.txt
set /p VERSION=<version.txt
del version.txt
) else (

38
res/loc/po/fr-FR.po

@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: 4.5\n"
"Report-Msgid-Bugs-To: pete@akeo.ie\n"
"POT-Creation-Date: 2024-04-25 12:25+0100\n"
"PO-Revision-Date: 2024-12-17 14:54+0100\n"
"POT-Creation-Date: 2025-04-02 11:34+0100\n"
"PO-Revision-Date: 2025-04-02 11:51+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr_FR\n"
@ -13,7 +13,7 @@ msgstr ""
"X-Poedit-SourceCharset: UTF-8\n"
"X-Rufus-LanguageName: French (Français)\n"
"X-Rufus-LCID: 0x040c, 0x080c, 0x0c0c, 0x100c, 0x140c, 0x180c, 0x1c0c, 0x200c, 0x240c, 0x280c, 0x2c0c, 0x300c, 0x340c, 0x380c, 0xe40c\n"
"X-Generator: Poedit 3.5\n"
"X-Generator: Poedit 3.6\n"
#. • IDD_DIALOG → IDS_DRIVE_PROPERTIES_TXT
msgid "Drive Properties"
@ -1080,7 +1080,7 @@ msgid "Version %d.%d (Build %d)"
msgstr ""
#. • MSG_176
msgid "mailto:support@akeo.ie"
msgid "English translation: Pete Batard <mailto:pete@akeo.ie>"
msgstr "Traduction Française : Pete Batard <mailto:pete@akeo.ie>"
#. • MSG_177
@ -1914,6 +1914,36 @@ msgstr "Extraction d'archive : %s"
msgid "Use Rufus MBR"
msgstr "Utilisation du MBR Rufus"
#. • MSG_350
msgid "Use 'Windows UEFI CA 2023' signed bootloaders [EXPERIMENTAL]"
msgstr "Utiliser les bootloaders signés par 'Windows UEFI CA 2023' [EXPÉRIMENTAL]"
#. • MSG_351
msgid "Checking for UEFI bootloader revocation..."
msgstr "Vérification de la revocation des bootloaders UEFI..."
#. • MSG_352
msgid "Checking for UEFI DBX updates..."
msgstr "Vérification des mises à jour de DBX UEFI..."
#. • MSG_353
msgid "DBX update available"
msgstr "Mise à jour DBX disponible"
#. • MSG_354
msgid ""
"Rufus has found an updated version of the DBX files used to perform UEFI Secure Boot revocation checks. Do you want to download this update?\n"
"- Select 'Yes' to connect to the Internet and download this content\n"
"- Select 'No' to cancel the operation\n"
"\n"
"Note: The files will be downloaded in the application's directory and will be reused automatically if present."
msgstr ""
"Rufus a trouvé une mise à jour des fichiers DBX utilisés pour effectuer la validation des revocations Secure Boot sous UEFI. Voulez-vous télécharger cette mise à jour ?\n"
"- Sélectionnez 'Oui' pour vous connecter à Internet et le télécharger ce contenu\n"
"- Sélectionnez 'Non' pour annuler l’opération\n"
"\n"
"Note : Ces fichiers seront téléchargés dans le répertoire de l'application et réutilisés automatiquement si ils sont présent."
#. • MSG_900
#.
#. The following messages are for the Windows Store listing only and are not used by the application

7
res/loc/rufus.loc

@ -614,7 +614,7 @@ t MSG_351 "Checking for UEFI bootloader revocation..."
t MSG_352 "Checking for UEFI DBX updates..."
t MSG_353 "DBX update available"
t MSG_354 "Rufus has found an updated version of the DBX files used to perform UEFI Secure Boot revocation checks. Do you want to download this update?\n"
"- Select 'Yes' to connect to the Internet and download the DBX content\n"
"- Select 'Yes' to connect to the Internet and download this content\n"
"- Select 'No' to cancel the operation\n\n"
"Note: The files will be downloaded in the application's directory and will be reused automatically if present."
# The following messages are for the Windows Store listing only and are not used by the application
@ -4815,6 +4815,11 @@ t MSG_346 "Restreint Windows au mode \"S\" (INCOMPATIBLE avec l'option de désac
t MSG_347 "Mode expert"
t MSG_348 "Extraction d'archive : %s"
t MSG_349 "Utilisation du MBR Rufus"
t MSG_350 "Utiliser les bootloaders signés par 'Windows UEFI CA 2023' [EXPÉRIMENTAL]"
t MSG_351 "Vérification de la revocation des bootloaders UEFI..."
t MSG_352 "Vérification des mises à jour de DBX UEFI..."
t MSG_353 "Mise à jour DBX disponible"
t MSG_354 "Rufus a trouvé une mise à jour des fichiers DBX utilisés pour effectuer la validation des revocations Secure Boot sous UEFI. Voulez-vous télécharger cette mise à jour ?\n- Sélectionnez 'Oui' pour vous connecter à Internet et le télécharger ce contenu\n- Sélectionnez 'Non' pour annuler l’opération\n\nNote : Ces fichiers seront téléchargés dans le répertoire de l'application et réutilisés automatiquement si ils sont présent."
t MSG_900 "Rufus est un utilitaire permettant de formater et de créer des média USB amorçables, tels que clés USB, mémoire flash, etc."
t MSG_901 "Site officiel : %s"
t MSG_902 "Code source: %s"

10
src/rufus.rc

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 4.7.2229"
CAPTION "Rufus 4.7.2230"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -407,8 +407,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,7,2229,0
PRODUCTVERSION 4,7,2229,0
FILEVERSION 4,7,2230,0
PRODUCTVERSION 4,7,2230,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -426,13 +426,13 @@ BEGIN
VALUE "Comments", "https://rufus.ie"
VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "4.7.2229"
VALUE "FileVersion", "4.7.2230"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2025 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
VALUE "OriginalFilename", "rufus-4.7.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "4.7.2229"
VALUE "ProductVersion", "4.7.2230"
END
END
BLOCK "VarFileInfo"

Loading…
Cancel
Save