mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[wue] don't display WUE when '/sources/$OEM$/$$/Panther/unattend.xml' exists
* Closes #2451. * Also update Coverity workflow to use latest actions/upload-artifact.
This commit is contained in:
parent
f813eb05d8
commit
92ac1c770c
5 changed files with 52 additions and 41 deletions
2
.github/workflows/coverity.yml
vendored
2
.github/workflows/coverity.yml
vendored
|
@ -52,7 +52,7 @@ jobs:
|
|||
cov-build.exe --dir cov-int msbuild ${{ env.SOLUTION_FILE_PATH }} /m /p:Configuration=${{ env.BUILD_CONFIGURATION }},Platform=${{ env.TARGET_PLATFORM }}
|
||||
|
||||
- name: Publish Coverity artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cov-int
|
||||
path: cov-int/
|
||||
|
|
|
@ -324,6 +324,11 @@ static BOOL check_iso_props(const char* psz_dirname, int64_t file_length, const
|
|||
}
|
||||
}
|
||||
|
||||
// Check for "\sources\\$OEM$\\$$\\Panther\\unattend.xml"
|
||||
if ((safe_stricmp(psz_dirname, "/sources/$OEM$/$$/Panther") == 0) &&
|
||||
(safe_stricmp(psz_basename, "unattend.xml") == 0))
|
||||
img_report.has_panther_unattend = TRUE;
|
||||
|
||||
// Check for PE (XP) specific files in "/i386", "/amd64" or "/minint"
|
||||
for (i = 0; i < ARRAYSIZE(pe_dirname); i++)
|
||||
if (safe_stricmp(psz_dirname, pe_dirname[i]) == 0)
|
||||
|
|
75
src/rufus.c
75
src/rufus.c
|
@ -1562,42 +1562,47 @@ static DWORD WINAPI BootCheckThread(LPVOID param)
|
|||
goto out;
|
||||
}
|
||||
if ((WindowsVersion.Version >= WINDOWS_8) && IS_WINDOWS_1X(img_report) && (!is_windows_to_go)) {
|
||||
StrArray options;
|
||||
int arch = _log2(img_report.has_efi >> 1);
|
||||
uint16_t map[16] = { 0 }, b = 1;
|
||||
StrArrayCreate(&options, 10);
|
||||
if (IS_WINDOWS_11(img_report)) {
|
||||
StrArrayAdd(&options, lmprintf(MSG_329), TRUE);
|
||||
MAP_BIT(UNATTEND_SECUREBOOT_TPM_MINRAM);
|
||||
if (img_report.has_panther_unattend) {
|
||||
uprintf("NOTICE: A '/sources/$OEM$/$$/Panther/unattend.xml' was detected on the ISO.");
|
||||
uprintf("As a result, the 'Windows User Experience dialog' will not be displayed.");
|
||||
} else {
|
||||
StrArray options;
|
||||
int arch = _log2(img_report.has_efi >> 1);
|
||||
uint16_t map[16] = { 0 }, b = 1;
|
||||
StrArrayCreate(&options, 10);
|
||||
if (IS_WINDOWS_11(img_report)) {
|
||||
StrArrayAdd(&options, lmprintf(MSG_329), TRUE);
|
||||
MAP_BIT(UNATTEND_SECUREBOOT_TPM_MINRAM);
|
||||
}
|
||||
if (img_report.win_version.build >= 22500) {
|
||||
StrArrayAdd(&options, lmprintf(MSG_330), TRUE);
|
||||
MAP_BIT(UNATTEND_NO_ONLINE_ACCOUNT);
|
||||
}
|
||||
StrArrayAdd(&options, lmprintf(MSG_333), TRUE);
|
||||
username_index = _log2(b);
|
||||
MAP_BIT(UNATTEND_SET_USER);
|
||||
StrArrayAdd(&options, lmprintf(MSG_334), TRUE);
|
||||
MAP_BIT(UNATTEND_DUPLICATE_LOCALE);
|
||||
StrArrayAdd(&options, lmprintf(MSG_331), TRUE);
|
||||
MAP_BIT(UNATTEND_NO_DATA_COLLECTION);
|
||||
StrArrayAdd(&options, lmprintf(MSG_335), TRUE);
|
||||
MAP_BIT(UNATTEND_DISABLE_BITLOCKER);
|
||||
if (expert_mode) {
|
||||
StrArrayAdd(&options, lmprintf(MSG_346), TRUE);
|
||||
MAP_BIT(UNATTEND_FORCE_S_MODE);
|
||||
}
|
||||
i = CustomSelectionDialog(BS_AUTOCHECKBOX, lmprintf(MSG_327), lmprintf(MSG_328),
|
||||
options.String, options.Index, remap16(unattend_xml_mask, map, FALSE), username_index);
|
||||
StrArrayDestroy(&options);
|
||||
if (i < 0)
|
||||
goto out;
|
||||
i = remap16(i, map, TRUE);
|
||||
unattend_xml_path = CreateUnattendXml(arch, i);
|
||||
// Remember the user preferences for the current session.
|
||||
unattend_xml_mask &= ~(remap16(0x1ff, map, TRUE));
|
||||
unattend_xml_mask |= i;
|
||||
WriteSetting32(SETTING_WUE_OPTIONS, (UNATTEND_DEFAULT_MASK << 16) | unattend_xml_mask);
|
||||
}
|
||||
if (img_report.win_version.build >= 22500) {
|
||||
StrArrayAdd(&options, lmprintf(MSG_330), TRUE);
|
||||
MAP_BIT(UNATTEND_NO_ONLINE_ACCOUNT);
|
||||
}
|
||||
StrArrayAdd(&options, lmprintf(MSG_333), TRUE);
|
||||
username_index = _log2(b);
|
||||
MAP_BIT(UNATTEND_SET_USER);
|
||||
StrArrayAdd(&options, lmprintf(MSG_334), TRUE);
|
||||
MAP_BIT(UNATTEND_DUPLICATE_LOCALE);
|
||||
StrArrayAdd(&options, lmprintf(MSG_331), TRUE);
|
||||
MAP_BIT(UNATTEND_NO_DATA_COLLECTION);
|
||||
StrArrayAdd(&options, lmprintf(MSG_335), TRUE);
|
||||
MAP_BIT(UNATTEND_DISABLE_BITLOCKER);
|
||||
if (expert_mode) {
|
||||
StrArrayAdd(&options, lmprintf(MSG_346), TRUE);
|
||||
MAP_BIT(UNATTEND_FORCE_S_MODE);
|
||||
}
|
||||
i = CustomSelectionDialog(BS_AUTOCHECKBOX, lmprintf(MSG_327), lmprintf(MSG_328),
|
||||
options.String, options.Index, remap16(unattend_xml_mask, map, FALSE), username_index);
|
||||
StrArrayDestroy(&options);
|
||||
if (i < 0)
|
||||
goto out;
|
||||
i = remap16(i, map, TRUE);
|
||||
unattend_xml_path = CreateUnattendXml(arch, i);
|
||||
// Remember the user preferences for the current session.
|
||||
unattend_xml_mask &= ~(remap16(0x1ff, map, TRUE));
|
||||
unattend_xml_mask |= i;
|
||||
WriteSetting32(SETTING_WUE_OPTIONS, (UNATTEND_DEFAULT_MASK << 16) | unattend_xml_mask);
|
||||
}
|
||||
|
||||
if ((img_report.projected_size < MAX_ISO_TO_ESP_SIZE * MB) && HAS_REGULAR_EFI(img_report) &&
|
||||
|
|
|
@ -410,6 +410,7 @@ typedef struct {
|
|||
BOOLEAN has_grub4dos;
|
||||
uint8_t has_grub2;
|
||||
BOOLEAN has_compatresources_dll;
|
||||
BOOLEAN has_panther_unattend;
|
||||
BOOLEAN has_kolibrios;
|
||||
BOOLEAN needs_syslinux_overwrite;
|
||||
BOOLEAN needs_ntfs;
|
||||
|
|
10
src/rufus.rc
10
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 4.5.2128"
|
||||
CAPTION "Rufus 4.5.2129"
|
||||
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
|
||||
|
@ -397,8 +397,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 4,5,2128,0
|
||||
PRODUCTVERSION 4,5,2128,0
|
||||
FILEVERSION 4,5,2129,0
|
||||
PRODUCTVERSION 4,5,2129,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -416,13 +416,13 @@ BEGIN
|
|||
VALUE "Comments", "https://rufus.ie"
|
||||
VALUE "CompanyName", "Akeo Consulting"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "4.5.2128"
|
||||
VALUE "FileVersion", "4.5.2129"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "<22> 2011-2024 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
|
||||
VALUE "OriginalFilename", "rufus-4.5.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "4.5.2128"
|
||||
VALUE "ProductVersion", "4.5.2129"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
Loading…
Reference in a new issue