diff --git a/patches/kernel32-QT_Environment_Variables/0001-kernel32-Do-not-inherit-QT_-environment-variables-to.patch b/patches/kernel32-QT_Environment_Variables/0001-kernel32-Do-not-inherit-QT_-environment-variables-to.patch new file mode 100644 index 00000000..2f060010 --- /dev/null +++ b/patches/kernel32-QT_Environment_Variables/0001-kernel32-Do-not-inherit-QT_-environment-variables-to.patch @@ -0,0 +1,29 @@ +From c62a9b8f39fcdd2209959e831e3801162b41420c Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +Date: Wed, 27 Jan 2016 06:56:09 +0100 +Subject: kernel32: Do not inherit QT_* environment variables to Windows + environment. + +If necessary, QT environment variables can still be set by adding a WINE +prefix, for example: WINEQT_QPA_PLATFORM=... +--- + dlls/kernel32/process.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c +index 6e7b23e..bb6c2dd 100644 +--- a/dlls/kernel32/process.c ++++ b/dlls/kernel32/process.c +@@ -135,7 +135,8 @@ static inline BOOL is_special_env_var( const char *var ) + !strncmp( var, "PWD=", sizeof("PWD=")-1 ) || + !strncmp( var, "HOME=", sizeof("HOME=")-1 ) || + !strncmp( var, "TEMP=", sizeof("TEMP=")-1 ) || +- !strncmp( var, "TMP=", sizeof("TMP=")-1 )); ++ !strncmp( var, "TMP=", sizeof("TMP=")-1 ) || ++ !strncmp( var, "QT_", sizeof("QT_")-1 )); + } + + +-- +2.6.4 + diff --git a/patches/kernel32-QT_Environment_Variables/definition b/patches/kernel32-QT_Environment_Variables/definition new file mode 100644 index 00000000..f60b9168 --- /dev/null +++ b/patches/kernel32-QT_Environment_Variables/definition @@ -0,0 +1 @@ +Fixes: Do not inherit QT_* environment variables to Windows environment diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 293d4088..e8b5d717 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -162,6 +162,7 @@ patch_enable_all () enable_kernel32_Named_Pipe="$1" enable_kernel32_NeedCurrentDirectoryForExePath="$1" enable_kernel32_Profile="$1" + enable_kernel32_QT_Environment_Variables="$1" enable_kernel32_SetFileCompletionNotificationModes="$1" enable_kernel32_SetFileInformationByHandle="$1" enable_kernel32_TimezoneInformation_Registry="$1" @@ -601,6 +602,9 @@ patch_enable () kernel32-Profile) enable_kernel32_Profile="$2" ;; + kernel32-QT_Environment_Variables) + enable_kernel32_QT_Environment_Variables="$2" + ;; kernel32-SetFileCompletionNotificationModes) enable_kernel32_SetFileCompletionNotificationModes="$2" ;; @@ -3691,6 +3695,18 @@ if test "$enable_kernel32_Profile" -eq 1; then ) >> "$patchlist" fi +# Patchset kernel32-QT_Environment_Variables +# | +# | Modified files: +# | * dlls/kernel32/process.c +# | +if test "$enable_kernel32_QT_Environment_Variables" -eq 1; then + patch_apply kernel32-QT_Environment_Variables/0001-kernel32-Do-not-inherit-QT_-environment-variables-to.patch + ( + echo '+ { "Sebastian Lackner", "kernel32: Do not inherit QT_* environment variables to Windows environment.", 1 },'; + ) >> "$patchlist" +fi + # Patchset kernel32-SetFileCompletionNotificationModes # | # | This patchset fixes the following Wine bugs: