From 723b6c98a240ef7bf6b5d116bccfba21d55dc563 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Thu, 29 Jul 2021 18:37:59 +0100 Subject: [PATCH] [grub] add workaround for openSUSE Live ISOs * 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. --- ChangeLog.txt | 1 + res/appstore/Package.appxmanifest | 2 +- src/iso.c | 6 +++++- src/rufus.rc | 10 +++++----- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index ff3eb6d3..69eb82af 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,6 +1,7 @@ o Version 3.15 (2021.08.??) Update GRUB to version 2.06 Add support for .vtsi files (Ventoy Sparse Image, courtesy of longpanda/ventoy) + Add workaround for openSUSE Live ISOs Move default app directory to %LocalAppData%\Rufus\ and always save a log there on exit Fix AppStore version of Rufus not being able to store downloaded files Fix failure to open Syslinux/GRUB files when Rufus is located at the root of a drive diff --git a/res/appstore/Package.appxmanifest b/res/appstore/Package.appxmanifest index 63bf2b90..189193b8 100644 --- a/res/appstore/Package.appxmanifest +++ b/res/appstore/Package.appxmanifest @@ -11,7 +11,7 @@ + Version="3.15.1809.0" /> Rufus diff --git a/src/iso.c b/src/iso.c index 82b923b2..8d0fed1e 100644 --- a/src/iso.c +++ b/src/iso.c @@ -353,7 +353,11 @@ static void fix_config(const char* psz_fullpath, const char* psz_path, const cha 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)) { + (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)) { uprintf(" Patched %s: '%s' ➔ '%s'\n", src, iso_label, usb_label); modified = TRUE; } diff --git a/src/rufus.rc b/src/rufus.rc index bb797fcb..aa8938a6 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.15.1808" +CAPTION "Rufus 3.15.1809" FONT 9, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP @@ -395,8 +395,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,15,1808,0 - PRODUCTVERSION 3,15,1808,0 + FILEVERSION 3,15,1809,0 + PRODUCTVERSION 3,15,1809,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -414,13 +414,13 @@ BEGIN VALUE "Comments", "https://rufus.ie" VALUE "CompanyName", "Akeo Consulting" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "3.15.1808" + VALUE "FileVersion", "3.15.1809" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2021 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" VALUE "OriginalFilename", "rufus-3.15.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "3.15.1808" + VALUE "ProductVersion", "3.15.1809" END END BLOCK "VarFileInfo"