diff --git a/src/iso.c b/src/iso.c index 348067e3..c83fe616 100644 --- a/src/iso.c +++ b/src/iso.c @@ -363,20 +363,23 @@ static void fix_config(const char* psz_fullpath, const char* psz_path, const cha // Workaround for config files requiring an ISO label for kernel append that may be // different from our USB label. Oh, and these labels must have spaces converted to \x20. if ((props->is_cfg) || (props->is_conf)) { + // Older versions of GRUB EFI used "linuxefi", newer just use "linux". + // Also, in their great wisdom, the openSUSE maintainers added a 'set linux=linux' + // line to their grub.cfg, which means that their kernel option token is no longer + //'linux' but '$linux'... and we have to add a workaround for that. + // Finally, newer Arch and derivatives added an extra "search --label ..." command + // in GRUB which we need to cater for in supplement to the kernel line. + + static const char* grub_token[] = { "linux", "linuxefi", "$linux", "search" }; iso_label = replace_char(img_report.label, ' ', "\\x20"); usb_label = replace_char(img_report.usb_label, ' ', "\\x20"); if ((iso_label != NULL) && (usb_label != NULL)) { if (props->is_grub_cfg) { - // Older versions of GRUB EFI used "linuxefi", newer just use "linux" - if ((replace_in_token_data(src, "linux", iso_label, usb_label, TRUE) != NULL) || - (replace_in_token_data(src, "linuxefi", iso_label, usb_label, TRUE) != NULL) || - // In their great wisdom, the openSUSE maintainers added a 'set linux=linux' - // line to their grub.cfg, which means that their kernel option token is no - // longer 'linux' but '$linux'... and we have to add a workaround for that. - (replace_in_token_data(src, "$linux", iso_label, usb_label, TRUE) != NULL)) { + for (int i = 0; i < ARRAYSIZE(grub_token); i++) + if (replace_in_token_data(src, grub_token[i], iso_label, usb_label, TRUE) != NULL) + modified = TRUE; + if (modified) uprintf(" Patched %s: '%s' ➔ '%s'\n", src, iso_label, usb_label); - modified = TRUE; - } } else if (replace_in_token_data(src, (props->is_conf) ? "options" : "append", iso_label, usb_label, TRUE) != NULL) { uprintf(" Patched %s: '%s' ➔ '%s'\n", src, iso_label, usb_label); diff --git a/src/rufus.rc b/src/rufus.rc index e83f5d32..4ef70830 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.1943" +CAPTION "Rufus 3.21.1944" 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,1943,0 - PRODUCTVERSION 3,21,1943,0 + FILEVERSION 3,21,1944,0 + PRODUCTVERSION 3,21,1944,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.1943" + VALUE "FileVersion", "3.21.1944" 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.1943" + VALUE "ProductVersion", "3.21.1944" END END BLOCK "VarFileInfo"