From bbfdd23316521d558193a0a368f824651e1fc778 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Thu, 29 Mar 2018 22:29:44 +0100 Subject: [PATCH] [iso] make support for EFI .img files more generic * This improves support for void Linux as per https://www.reddit.com/r/linuxmasterrace/comments/7hqfpj/void_linux_iso_flagged_as_nonuefi_by_rufus/dqu09sk/ --- src/iso.c | 7 ++++--- src/rufus.rc | 10 +++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/iso.c b/src/iso.c index 27a6612d..3c277e23 100644 --- a/src/iso.c +++ b/src/iso.c @@ -75,7 +75,6 @@ static const char* grldr_name = "grldr"; static const char* ldlinux_name = "ldlinux.sys"; static const char* ldlinux_c32 = "ldlinux.c32"; static const char* efi_dirname = "/efi/boot"; -static const char* efi_img_name = "efi.img"; // Used by Debian Live ISOHybrids static const char* efi_bootname[] = { "bootia32.efi", "bootia64.efi", "bootx64.efi", "bootarm.efi", "bootaa64.efi", "bootebc.efi" }; static const char* install_wim_path = "/sources"; static const char* install_wim_name[] = { "install.wim", "install.swm" }; @@ -203,8 +202,10 @@ static BOOL check_iso_props(const char* psz_dirname, int64_t i_file_length, cons if ((img_report.reactos_path[0] == 0) && (safe_stricmp(psz_basename, reactos_name) == 0)) static_strcpy(img_report.reactos_path, psz_fullpath); - // Check for the first 'efi.img' we can find (that hopefully contains EFI boot files) - if (!HAS_EFI_IMG(img_report) && (safe_stricmp(psz_basename, efi_img_name) == 0)) + // Check for the first 'efi*.img' we can find (that hopefully contains EFI boot files) + if (!HAS_EFI_IMG(img_report) && (safe_strlen(psz_basename) >= 7) && + (safe_strnicmp(psz_basename, "efi", 3) == 0) && + (safe_stricmp(&psz_basename[strlen(psz_basename) - 4], ".img") == 0)) static_strcpy(img_report.efi_img_path, psz_fullpath); // Check for the EFI boot entries diff --git a/src/rufus.rc b/src/rufus.rc index e1974c4a..e555cac3 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.0.1236" +CAPTION "Rufus 3.0.1237" FONT 9, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP @@ -371,8 +371,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,18,1236,0 - PRODUCTVERSION 2,18,1236,0 + FILEVERSION 2,18,1237,0 + PRODUCTVERSION 2,18,1237,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -389,13 +389,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.18.1236" + VALUE "FileVersion", "2.18.1237" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.18.1236" + VALUE "ProductVersion", "2.18.1237" END END BLOCK "VarFileInfo"