From c2fe08080a7e4e582a3b8ba067d861642def4f50 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Tue, 22 Nov 2022 13:35:50 +0000 Subject: [PATCH] [core] add provision for Windows 7 sunsetting * Update the relevant loc messages. * Also add a -z commandline option to force the Windows version (but without letting this option work as an override, if running on an unsupported platform). * Also fix typos and broken URLs. --- ChangeLog.txt | 4 ++-- res/loc/ChangeLog.txt | 8 ++++---- res/loc/po/!update.cmd | 2 +- res/loc/po/fr-FR.po | 14 +++++++++----- res/loc/rufus.loc | 4 ++-- src/iso.c | 4 ++-- src/rufus.c | 16 +++++++++++++--- src/rufus.rc | 10 +++++----- 8 files changed, 38 insertions(+), 24 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index c1786dd3..a4bf93c6 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,12 +1,12 @@ o Version 3.21 (2022.11.??) - Allow the provision of an arbitrary local account username + Allow the provision of an arbitrary local account username in the Windows User Experience dialog Improve Windows version reporting from ISO/.wim Update UEFI:NTFS' NTFS drivers to v1.4 and exFAT drivers to v1.9 Switch to remote download for nonstandard GRUB (Fedora 37, openSUSE Live, GeckoLinux) Fix UEFI:NTFS partition not being set in MBR mode for ISOs with a >4GB file (UwUntu) Fix GRUB support for Arch and derivatives, when a non FAT compliant label is used Fix incorrect detection of GRUB with nonstandard prefixes - Fix tab order not working on the Windows Use Experience dialog + Fix tab order not working on the Windows User Experience dialog o Version 3.20 (2022.08.03) Enable applicable Windows User Experience options for Windows 10 diff --git a/res/loc/ChangeLog.txt b/res/loc/ChangeLog.txt index 4b3bf941..209b4a07 100644 --- a/res/loc/ChangeLog.txt +++ b/res/loc/ChangeLog.txt @@ -3,11 +3,11 @@ rufus.loc since its original version. To edit a translation, please make sure to follow: https://github.com/pbatard/rufus/wiki/Localization#Editing_an_existing_translation -Or simply download https://rufus-web.akeo.ie/locale/pollock.exe and follow its directions. +Or simply download https://files.akeo.ie/pollock/pollock-1.4.exe and follow its directions. -o v3.20 (2022.??.??) - IMPORTANT: The translation changes below are *NOT* finalized and may evolve further... - Please avoid sending a translation update before I send a request for it, thank you! +o v3.22 (2023.??.??) + // MSG_294 can be tested by launching Rufus from the commandline with option -z61 + - *UPDATED* MSG_294 "This version of Windows is no longer supported by Rufus." -> added "\nThe last version of Rufus compatible with this platform is v%d.%d." - *NEW* MSG_323 "Unable to open or read '%s'" - *NEW* MSG_325 "Applying Windows customization: %s" - *NEW* MSG_326 "Windows User Experience" diff --git a/res/loc/po/!update.cmd b/res/loc/po/!update.cmd index 7f1fdbcd..8c910129 100644 --- a/res/loc/po/!update.cmd +++ b/res/loc/po/!update.cmd @@ -1,5 +1,5 @@ @echo off -if not exist pollock.exe curl https://rufus-web.akeo.ie/locale/pollock.exe --output pollock.exe +if not exist pollock.exe curl https://files.akeo.ie/pollock/pollock-1.4.exe --output pollock.exe cls :menu echo 1 - Import .po into .loc diff --git a/res/loc/po/fr-FR.po b/res/loc/po/fr-FR.po index 85f29720..e4886052 100644 --- a/res/loc/po/fr-FR.po +++ b/res/loc/po/fr-FR.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: 3.14\n" "Report-Msgid-Bugs-To: pete@akeo.ie\n" -"POT-Creation-Date: 2022-07-27 11:43+0100\n" -"PO-Revision-Date: 2022-07-27 11:44+0100\n" +"POT-Creation-Date: 2022-11-22 13:30+0000\n" +"PO-Revision-Date: 2022-11-22 13:32+0000\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.1.1\n" +"X-Generator: Poedit 3.2\n" #. • IDD_DIALOG → IDS_DRIVE_PROPERTIES_TXT msgid "Drive Properties" @@ -1643,8 +1643,12 @@ msgid "Unsupported Windows version" msgstr "Version de Windows non supportée" #. • MSG_294 -msgid "This version of Windows is no longer supported by Rufus." -msgstr "Cette version de Windows n'est plus supportée par Rufus." +msgid "" +"This version of Windows is no longer supported by Rufus.\n" +"The last version of Rufus compatible with this platform is v%d.%d." +msgstr "" +"Cette version de Windows n'est plus prise en charge par Rufus.\n" +"La dernière version de Rufus compatible avec cette plateforme est v%d.%d." #. • MSG_295 msgid "Warning: Unofficial version" diff --git a/res/loc/rufus.loc b/res/loc/rufus.loc index 16950ada..ac7494a0 100644 --- a/res/loc/rufus.loc +++ b/res/loc/rufus.loc @@ -544,7 +544,7 @@ t MSG_290 "File Indexing" t MSG_291 "Version selection" t MSG_292 "Please select the version of Windows you want to install:" t MSG_293 "Unsupported Windows version" -t MSG_294 "This version of Windows is no longer supported by Rufus." +t MSG_294 "This version of Windows is no longer supported by Rufus.\nThe last version of Rufus compatible with this platform is v%d.%d." t MSG_295 "Warning: Unofficial version" t MSG_296 "This version of Rufus was not produced by its official developer(s).\n\nAre you sure you want to run it?" t MSG_297 "Truncated ISO detected" @@ -4276,7 +4276,7 @@ t MSG_290 "Indexation de fichiers" t MSG_291 "Sélection de version" t MSG_292 "Sélectionnez la version de Windows que vous souhaitez installer :" t MSG_293 "Version de Windows non supportée" -t MSG_294 "Cette version de Windows n'est plus supportée par Rufus." +t MSG_294 "Cette version de Windows n'est plus prise en charge par Rufus.\nLa dernière version de Rufus compatible avec cette plateforme est v%d.%d." t MSG_295 "Alerte: Version non-officielle" t MSG_296 "Cette version de Rufus n'a pas produite par ses développeurs officiels.\n\nEtes-vous sur de vouloir la lancer ?" t MSG_297 "ISO tronquée détectée" diff --git a/src/iso.c b/src/iso.c index f1f866c0..bc228020 100644 --- a/src/iso.c +++ b/src/iso.c @@ -894,8 +894,8 @@ void GetGrubVersion(char* buf, size_t buf_size) // to do that, which ends up tripling the file size... // Also, as mentioned above, Fedora have started applying *BREAKING* patches // willy-nilly, without bothering to alter the GRUB version string. - // Soooo, since the universe is conspiring against us and since we have already - // have a facility for it, we'll use it to dowload the relevant 'core.img' by + // Soooo, since the universe is conspiring against us and since we already have + // a facility for it, we'll use it to dowload the relevant 'core.img' by // appending a missing version suffix as needed... if (img_report.grub2_version[0] != 0) { if (has_grub_debug_is_enabled) diff --git a/src/rufus.c b/src/rufus.c index ac9e994b..71eff7c7 100755 --- a/src/rufus.c +++ b/src/rufus.c @@ -3283,7 +3283,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine { const char* rufus_loc = "rufus.loc"; int i, opt, option_index = 0, argc = 0, si = 0, lcid = GetUserDefaultUILanguage(); - int wait_for_mutex = 0; + int wait_for_mutex = 0, forced_windows_version = 0; uint32_t wue_options; FILE* fd; BOOL attached_console = FALSE, external_loc_file = FALSE, lgp_set = FALSE, automount = TRUE; @@ -3441,7 +3441,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine } } - while ((opt = getopt_long(argc, argv, "xghf:i:w:l:", long_options, &option_index)) != EOF) { + while ((opt = getopt_long(argc, argv, "ghxf:i:l:w:z:", long_options, &option_index)) != EOF) { switch (opt) { case 'x': enable_HDDs = TRUE; @@ -3490,6 +3490,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine case 'h': PrintUsage(argv[0]); goto out; + case 'z': + forced_windows_version = (int)strtol(optarg, NULL, 16); + break; // getopt_long returns '?' for any option it doesn't recognize default: list_params = TRUE; @@ -3608,14 +3611,21 @@ skip_args_processing: // Set the Windows version GetWindowsVersion(); + // Force a version if specified as parameter, but without allowing folks running + // a version of Windows we no longer support to use the option as a bypass! + if (nWindowsVersion > WINDOWS_7 && forced_windows_version != 0) + nWindowsVersion = forced_windows_version; // ...and nothing of value was lost + // TODO: Set to <= for 3.22 if (nWindowsVersion < WINDOWS_7) { // Load the translation before we print the error get_loc_data_file(loc_file, selected_locale); right_to_left_mode = ((selected_locale->ctrl_id) & LOC_RIGHT_TO_LEFT); // Set MB_SYSTEMMODAL to prevent Far Manager from stealing focus... - MessageBoxExU(NULL, lmprintf(MSG_294), lmprintf(MSG_293), MB_ICONSTOP | MB_IS_RTL | MB_SYSTEMMODAL, selected_langid); + MessageBoxExU(NULL, + lmprintf(MSG_294, (nWindowsVersion == WINDOWS_7) ? 3 : 2, (nWindowsVersion == WINDOWS_7) ? 21 : 18), + lmprintf(MSG_293), MB_ICONSTOP | MB_IS_RTL | MB_SYSTEMMODAL, selected_langid); goto out; } diff --git a/src/rufus.rc b/src/rufus.rc index b14e9b5b..b7293dc1 100644 --- a/src/rufus.rc +++ b/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 3.21.1947" +CAPTION "Rufus 3.21.1948" FONT 9, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP @@ -396,8 +396,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,21,1947,0 - PRODUCTVERSION 3,21,1947,0 + FILEVERSION 3,21,1948,0 + PRODUCTVERSION 3,21,1948,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -415,13 +415,13 @@ BEGIN VALUE "Comments", "https://rufus.ie" VALUE "CompanyName", "Akeo Consulting" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "3.21.1947" + VALUE "FileVersion", "3.21.1948" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2022 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" VALUE "OriginalFilename", "rufus-3.21.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "3.21.1947" + VALUE "ProductVersion", "3.21.1948" END END BLOCK "VarFileInfo"