mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[wue] fix TimeZone option not being applied to the right parent
* Closes #2519. * Also update MinGW's base WINVER to Windows 10.
This commit is contained in:
parent
9b3c11122b
commit
78608c35fe
6 changed files with 18 additions and 16 deletions
2
configure
vendored
2
configure
vendored
|
@ -4638,7 +4638,7 @@ esac
|
|||
printf "%s\n" "#define _GNU_SOURCE /**/" >>confdefs.h
|
||||
|
||||
|
||||
AM_CFLAGS="${AM_CFLAGS} -DWINVER=0x601 -D_WIN32_WINNT=0x601 -D_WIN32_IE=0x800"
|
||||
AM_CFLAGS="${AM_CFLAGS} -DWINVER=0x0A00 -D_WIN32_WINNT=0x0A00 -D_WIN32_IE=0x0A00"
|
||||
# "-Wl,--nxcompat" to enable DEP (Data Execution Prevention)
|
||||
# "-Wl,--dynamicbase" to enable ASLR (Address Space Layout Randomization)
|
||||
AM_LDFLAGS="${AM_LDFLAGS} -Wl,-no-undefined -Wl,--nxcompat -Wl,--no-insert-timestamp -Wl,--dynamicbase"
|
||||
|
|
|
@ -18,7 +18,7 @@ AC_CHECK_TOOL(WINDRES, windres, :)
|
|||
AC_C_INLINE
|
||||
AC_DEFINE([_GNU_SOURCE], [], [Use GNU extensions])
|
||||
|
||||
AM_CFLAGS="${AM_CFLAGS} -DWINVER=0x601 -D_WIN32_WINNT=0x601 -D_WIN32_IE=0x800"
|
||||
AM_CFLAGS="${AM_CFLAGS} -DWINVER=0x0A00 -D_WIN32_WINNT=0x0A00 -D_WIN32_IE=0x0A00"
|
||||
# "-Wl,--nxcompat" to enable DEP (Data Execution Prevention)
|
||||
# "-Wl,--dynamicbase" to enable ASLR (Address Space Layout Randomization)
|
||||
AM_LDFLAGS="${AM_LDFLAGS} -Wl,-no-undefined -Wl,--nxcompat -Wl,--no-insert-timestamp -Wl,--dynamicbase"
|
||||
|
|
|
@ -627,7 +627,7 @@ typedef struct {
|
|||
|
||||
#define UNATTEND_WINPE_SETUP_MASK (UNATTEND_SECUREBOOT_TPM_MINRAM)
|
||||
#define UNATTEND_SPECIALIZE_DEPLOYMENT_MASK (UNATTEND_NO_ONLINE_ACCOUNT)
|
||||
#define UNATTEND_OOBE_SHELL_SETUP_MASK (UNATTEND_NO_DATA_COLLECTION | UNATTEND_SET_USER)
|
||||
#define UNATTEND_OOBE_SHELL_SETUP_MASK (UNATTEND_NO_DATA_COLLECTION | UNATTEND_SET_USER | UNATTEND_DUPLICATE_LOCALE)
|
||||
#define UNATTEND_OOBE_INTERNATIONAL_MASK (UNATTEND_DUPLICATE_LOCALE)
|
||||
#define UNATTEND_OOBE_MASK (UNATTEND_OOBE_SHELL_SETUP_MASK | UNATTEND_OOBE_INTERNATIONAL_MASK | UNATTEND_DISABLE_BITLOCKER)
|
||||
#define UNATTEND_OFFLINE_SERVICING_MASK (UNATTEND_OFFLINE_INTERNAL_DRIVES | UNATTEND_FORCE_S_MODE)
|
||||
|
|
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.6.2188"
|
||||
CAPTION "Rufus 4.6.2189"
|
||||
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,6,2188,0
|
||||
PRODUCTVERSION 4,6,2188,0
|
||||
FILEVERSION 4,6,2189,0
|
||||
PRODUCTVERSION 4,6,2189,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.6.2188"
|
||||
VALUE "FileVersion", "4.6.2189"
|
||||
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.6.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "4.6.2188"
|
||||
VALUE "ProductVersion", "4.6.2189"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -60,10 +60,6 @@
|
|||
|
||||
#define MBR_SIZE 512 // Might need to review this once we see bootable 4k systems
|
||||
|
||||
// TODO: Remove this once MinGW has been updated
|
||||
#ifndef VIRTUAL_STORAGE_TYPE_DEVICE_VHDX
|
||||
#define VIRTUAL_STORAGE_TYPE_DEVICE_VHDX 3
|
||||
#endif
|
||||
#define VIRTUAL_STORAGE_TYPE_DEVICE_FFU 99
|
||||
#define CREATE_VIRTUAL_DISK_VERSION_2 2
|
||||
#define CREATE_VIRTUAL_DISK_FLAG_CREATE_BACKING_STORAGE 8
|
||||
|
|
14
src/wue.c
14
src/wue.c
|
@ -64,6 +64,7 @@ char* CreateUnattendXml(int arch, int flags)
|
|||
const static char* xml_arch_names[5] = { "x86", "amd64", "arm", "arm64" };
|
||||
const static char* unallowed_account_names[] = { "Administrator", "Guest", "KRBTGT", "Local" };
|
||||
static char path[MAX_PATH];
|
||||
char* tzstr;
|
||||
FILE* fd;
|
||||
TIME_ZONE_INFORMATION tz_info;
|
||||
int i, order;
|
||||
|
@ -152,6 +153,15 @@ char* CreateUnattendXml(int arch, int flags)
|
|||
fprintf(fd, " <ProtectYourPC>3</ProtectYourPC>\n");
|
||||
fprintf(fd, " </OOBE>\n");
|
||||
}
|
||||
if (flags & UNATTEND_DUPLICATE_LOCALE) {
|
||||
if ((GetTimeZoneInformation(&tz_info) == TIME_ZONE_ID_INVALID) ||
|
||||
((tzstr = wchar_to_utf8(tz_info.StandardName)) == NULL)) {
|
||||
uprintf("WARNING: Could not retrieve current timezone: %s", WindowsErrorString());
|
||||
} else {
|
||||
fprintf(fd, " <TimeZone>%s</TimeZone>\n", tzstr);
|
||||
free(tzstr);
|
||||
}
|
||||
}
|
||||
if (flags & UNATTEND_SET_USER) {
|
||||
for (i = 0; (i < ARRAYSIZE(unallowed_account_names)) && (stricmp(unattend_username, unallowed_account_names[i]) != 0); i++);
|
||||
if (i < ARRAYSIZE(unallowed_account_names)) {
|
||||
|
@ -201,10 +211,6 @@ char* CreateUnattendXml(int arch, int flags)
|
|||
ReadRegistryKeyStr(REGKEY_HKCU, "Keyboard Layout\\Preload\\1"));
|
||||
fprintf(fd, " <SystemLocale>%s</SystemLocale>\n", ToLocaleName(GetSystemDefaultLCID()));
|
||||
fprintf(fd, " <UserLocale>%s</UserLocale>\n", ToLocaleName(GetUserDefaultLCID()));
|
||||
if (GetTimeZoneInformation(&tz_info) == TIME_ZONE_ID_INVALID)
|
||||
uprintf("WARNING: Could not retrieve current timezone: %s", WindowsErrorString());
|
||||
else
|
||||
fprintf(fd, " <TimeZone>%S</TimeZone>\n", tz_info.StandardName);
|
||||
fprintf(fd, " <UILanguage>%s</UILanguage>\n", ToLocaleName(GetUserDefaultUILanguage()));
|
||||
fprintf(fd, " <UILanguageFallback>%s</UILanguageFallback>\n",
|
||||
// NB: Officially, this is a REG_MULTI_SZ string
|
||||
|
|
Loading…
Reference in a new issue