Skip to content

Commit

Permalink
[ui] fix Windows 11 customization options not appearing with MBR
Browse files Browse the repository at this point in the history
* Fixes #1956
  • Loading branch information
pbatard committed Jun 25, 2022
1 parent 65f05f4 commit d457a0b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 36 deletions.
8 changes: 4 additions & 4 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ o Version 3.19 (2022.07.??)
- Also allows to bypass the mandatory requirement for a Microsoft account on Windows 11 22H2
(NB: Network *MUST* be temporarily disabled for the local account creation to be proposed)
- Also add an option to skip all collection questions (Sets all answers to "Don't allow")
- Also add an option for setting internal drives offline with Windows To Go
Note: These customization options are only be proposed when using a Windows 11 image.
- Also add an option for setting internal drives offline for Windows To Go
Note: These customization options are only proposed when using a Windows 11 image.
Add support for distros using a nonstandard GRUB 2.0 prefix directory (openSUSE Live, GeckoLinux)
Add the ability to ignore USBs (See https://github.com/pbatard/rufus/blob/master/res/rufus.ini)
Change drive listing to always list in increasing order of size
Update exceptions needed by Red Hat and derivatives for latest versions
Update exceptions needed by Red Hat and derivatives for the 9.x releases
Update UEFI:NTFS drivers to latest
Reassign a letter for drives written in DD mode that don't have an ESP (CoreELEC)
Reassign a letter for drives written in DD mode that don't have an ESP (e.g. CoreELEC)
Fix Windows refusing to mount Linux MBR partitions on FIXED drives

o Version 3.18 (2022.03.11)
Expand Down
54 changes: 27 additions & 27 deletions src/rufus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1652,33 +1652,6 @@ static DWORD WINAPI BootCheckThread(LPVOID param)
ShellExecuteA(hMainDialog, "open", SEVENZIP_URL, NULL, NULL, SW_SHOWNORMAL);
goto out;
}
if ((nWindowsVersion >= WINDOWS_8) && IS_WINDOWS_11(img_report)) {
StrArray options;
int arch = _log2(img_report.has_efi >> 1);
uint8_t map[8] = { 0 }, b = 1;
StrArrayCreate(&options, 4);
StrArrayAdd(&options, lmprintf(MSG_328), TRUE);
MAP_BIT(UNATTEND_SECUREBOOT_TPM_MASK);
StrArrayAdd(&options, lmprintf(MSG_329), TRUE);
MAP_BIT(UNATTEND_MINRAM_MINDISK_MASK);
if (img_report.win_version.build >= 22500) {
StrArrayAdd(&options, lmprintf(MSG_330), TRUE);
MAP_BIT(UNATTEND_NO_ONLINE_ACCOUNT_MASK);
}
StrArrayAdd(&options, lmprintf(MSG_331), TRUE);
MAP_BIT(UNATTEND_NO_DATA_COLLECTION_MASK);
i = SelectionDialog(BS_AUTOCHECKBOX, lmprintf(MSG_326), lmprintf(MSG_327),
options.String, options.Index, remap8(unattend_xml_mask, map, FALSE));
StrArrayDestroy(&options);
if (i < 0)
goto out;
i = remap8(i, map, TRUE);
unattend_xml_path = CreateUnattendXml(arch, i);
// Remember the user preferences for the current session.
// TODO: Do we want to save the current mask as a permanent setting?
unattend_xml_mask &= ~(remap8(0xff, map, TRUE));
unattend_xml_mask |= i;
}
} else if ( ((fs_type == FS_NTFS) && !HAS_WINDOWS(img_report) && !HAS_GRUB(img_report) &&
(!HAS_SYSLINUX(img_report) || (SL_MAJOR(img_report.sl_version) <= 5)))
|| ((IS_FAT(fs_type)) && (!HAS_SYSLINUX(img_report)) && (!allow_dual_uefi_bios) && !IS_EFI_BOOTABLE(img_report) &&
Expand All @@ -1697,6 +1670,33 @@ static DWORD WINAPI BootCheckThread(LPVOID param)
MessageBoxExU(hMainDialog, lmprintf(MSG_100), lmprintf(MSG_099), MB_OK | MB_ICONERROR | MB_IS_RTL, selected_langid);
goto out;
}
if ((nWindowsVersion >= WINDOWS_8) && IS_WINDOWS_11(img_report)) {
StrArray options;
int arch = _log2(img_report.has_efi >> 1);
uint8_t map[8] = { 0 }, b = 1;
StrArrayCreate(&options, 4);
StrArrayAdd(&options, lmprintf(MSG_328), TRUE);
MAP_BIT(UNATTEND_SECUREBOOT_TPM_MASK);
StrArrayAdd(&options, lmprintf(MSG_329), TRUE);
MAP_BIT(UNATTEND_MINRAM_MINDISK_MASK);
if (img_report.win_version.build >= 22500) {
StrArrayAdd(&options, lmprintf(MSG_330), TRUE);
MAP_BIT(UNATTEND_NO_ONLINE_ACCOUNT_MASK);
}
StrArrayAdd(&options, lmprintf(MSG_331), TRUE);
MAP_BIT(UNATTEND_NO_DATA_COLLECTION_MASK);
i = SelectionDialog(BS_AUTOCHECKBOX, lmprintf(MSG_326), lmprintf(MSG_327),
options.String, options.Index, remap8(unattend_xml_mask, map, FALSE));
StrArrayDestroy(&options);
if (i < 0)
goto out;
i = remap8(i, map, TRUE);
unattend_xml_path = CreateUnattendXml(arch, i);
// Remember the user preferences for the current session.
// TODO: Do we want to save the current mask as a permanent setting?
unattend_xml_mask &= ~(remap8(0xff, map, TRUE));
unattend_xml_mask |= i;
}

if ((img_report.projected_size < MAX_ISO_TO_ESP_SIZE * MB) && HAS_REGULAR_EFI(img_report) &&
(partition_type == PARTITION_STYLE_GPT) && IS_FAT(fs_type) && !esp_already_asked) {
Expand Down
10 changes: 5 additions & 5 deletions src/rufus.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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.19.1906"
CAPTION "Rufus 3.19.1907"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
Expand Down Expand Up @@ -395,8 +395,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,19,1906,0
PRODUCTVERSION 3,19,1906,0
FILEVERSION 3,19,1907,0
PRODUCTVERSION 3,19,1907,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -414,13 +414,13 @@ BEGIN
VALUE "Comments", "https://rufus.ie"
VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "3.19.1906"
VALUE "FileVersion", "3.19.1907"
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.19.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "3.19.1906"
VALUE "ProductVersion", "3.19.1907"
END
END
BLOCK "VarFileInfo"
Expand Down

0 comments on commit d457a0b

Please sign in to comment.