Because WINENV is limited (32767 bytes), and HOSTENV can be much larger, a whitelisting approach is used to keep WINENV as small as possible. Currently, only the following envvars are propagated from the host env to WINENV WINEPATH, WINEPWD, WINEHOME, WINETEMP, WINETMP, WINEQT_, WINEVK_, WINEXDG_SESSION_TYPE
Moreover, the NIXENV (env for running wine processes - not applications) on the host system is not produced from WINENV anymore, but the global ENV is propagated to all wine processes and threads.
This might be an alternative approach to MR!5231, MR!6140, bug #56941 and should provide a more deterministic behaviour of wine, because unrelated envvars do have no influence on the env for running windows applications.
Initial tests (winemine, notepad, cmd, etc) seem to run fine, but some envvars might need additional consideration. XVDK_* was mentioned, WINE*, MESA_*, VK_*, QT_*, LIBGL_* are other suspects.
Moreover, this is my first merge request, so your feedback is highly appreciated.
-- v17: explorer: Support large tooltip icons. comctl32/tooltip: Support large standard title icons. wined3d: Invalidate the VS from wined3d_device_apply_stateblock() when WINED3D_RS_NORMALIZENORMALS changes. wined3d: Invalidate the PS from wined3d_device_apply_stateblock() when the texture changes. wined3d: Invalidate the PS from wined3d_device_apply_stateblock() when WINED3D_RS_COLORKEYENABLE changes. wined3d: Invalidate the PS from wined3d_device_apply_stateblock() when texture states change. wined3d: Invalidate STATE_SHADER instead of STATE_POINT_ENABLE. explorer: Make the driver error message more neutral. rsaenh: Return an error on zero length only when decrypting the final block. odbccp32: Correctly handle config_mode in SQLWrite/RemoveDSNFromIniW. odbccp32: Check for valid DSN before delete in SQLRemoveDSNFromIniW. odbccp32: Return false on empty string in SQLValidDSNW. win32u: Implement DPI scaled window surface. win32u: Move window_surface creation helper to dce.c. win32u: Map window rects DPI before calling into the drivers. win32u: Map window region DPI before calling into the drivers. opengl32: Test the unix call function table sizes. winedump: Remove unused variable. widl: Remove unused variable. d3dx9/tests: Add a test for matrix majority class. d3dx9/tests: Remove unused fields from effect values test data. d3dx9/tests: Use explicit numeric values as expected test results. gdiplus: Check if graphics is occupied in GdipDrawString. win32u: Use unsigned bitfields. nsiproxy: Add linux guards for the IPv6 forward info. ntoskrnl/tests: Add test for getting and setting device properties. ntoskrnl: Implement IoGetDevicePropertyData(). cmd: Skip directories when looking for an openable file. cmd: Run files with ShellExecute() if CreateProcess() fails. cmd: Separate a run_full_path() helper. cmd: Do not try to handle ERROR_FILE_NOT_FOUND from CreateProcessW(). cmd/tests: Save and restore the drive when performing drive change tests. msxml3: Allow encoding name "ISO8859-1". mfplat: Fix pointer dereference when caching buffer data. mfmediaengine: Remove duplicate classes IDL. arm64: Detect new processor features. include: Add new PF_* constants. ntdll: Improve ARM feature checking from /proc/cpuinfo. user32: Remove NtUserDriverCallback* kernel callbacks. winemac: Route kernel callbacks through user32. winex11: Route kernel callbacks through user32. winex11: Use a UINT64 for the foreign_window_proc parameter. winex11: Wrap x11drv_dnd_post_drop params in a struct. winex11: Wrap x11drv_dnd_enter_event params in a struct. winex11: Wrap x11drv_dnd_drop_event params in a struct. opengl32: Remove unnecessary function addresses. opengl32: Add missing WOW64 process_attach unixlib entry. win32u: Add missing thunk lock parameters callback. win32u: Only allow a custom visible rect for toplevel windows. Release 9.16. netapi32: Move some implementations to netutils. shell32/tests: Delete a left-over file. ntdll: Read the Chpev2ProcessInfo pointer before accessing the data. wscript: Implement Sleep. kernel32: Return a valid handle in PowerCreateRequest. wineandroid: Route kernel callbacks through user32. opengl32: Route kernel callbacks through user32. winevulkan: Route kernel callbacks through user32. user16: Use NtUserDispatchCallback instead of User16ThunkLock. user32: Introduce a generic KeUserDispatchCallback kernel callback. user32: Pass a thunk_lock_params struct to User16ThunkLock. user32: Pass a free_icon_params struct to User16CallFreeIcon. vcruntime140_1: Store exception record in ExceptionInformation[6] during unwinding. vcruntime140_1: Handle empty catchblock type_info in validate_cxx_function_descr4. server: Support IPV4 UDP broadcast on connected socket without SO_BROADCAST. ws2_32/tests: Test UDP broadcast without SO_BROADCAST. jscript: Restrict the allowed escape characters of JSON.parse in html mode. jscript: Don't use call frame for indirect eval calls for storing variables. reg/tests: Wait for process termination. ntdll/tests: Add tests for Process/ThreadManageWritesToExecutableMemory. ntdll: Implement NtSetInformationVirtualMemory(VmPageDirtyStateInformation). ntdll: Implement Process/ThreadManageWritesToExecutableMemory. ntdll: Pass the full exception record to virtual_handle_fault(). ucrtbase: Export powf on i386. mfplat: Implement MFCreateLegacyMediaBufferOnMFMediaBuffer. mfplat/tests: Test MFCreateLegacyMediaBufferOnMFMediaBuffer. mfplat: Add MFCreateLegacyMediaBufferOnMFMediaBuffer stub. win32u: Move the "Decorated" driver registry option out of the drivers. win32u: Move visible rect computation out of the drivers. winemac: Return a macdrv_window_features from get_cocoa_window_features. winex11: Use the driver rects to convert from host visible to window rect. winex11: Keep a window_rects struct in the driver window data. win32u: Keep SetIMECompositionWindowPos with other IME entries. winevulkan: Fix pointer arithmetic in debug utils callback marshalling. comctl32/listview: Do not return items count on getting next item for last one. comctl32/tests: Add LVM_GETNEXTITEM test. kernelbase: Delete now-inaccurate 'FS volume label not available' message. mountmgr.sys: Read and use disk label from dbus. winedump: Get rid of GCC warning. userenv: Avoid crash in GetUserProfileDirectoryW. winewayland: Fix off-by-one error in format check. winewayland: Advertise pbuffer capable formats. winewayland: Support WGL_ARB_render_texture. winewayland: Support WGL_ARB_pbuffer. msi: Fix row index calculation when stringtable contains empty slots. msi: Fix msi_add_string signature. winevulkan: Add video interfaces. winevulkan: Strip the name tail when parsing members. shell32: Support sink notifications for file MoveItem operation. shell32: Implement directory merge for MoveItem. shell32: Partially implement MoveItem file operation execution. shell32: Store operation requested in file_operation_MoveItem(). shell32: Implement file_operation_[Un]Advise(). shell32/tests: Add tests for IFileOperation_MoveItem notifications. shell32/tests: Add tests for IFileOperation_MoveItem. include: Add some shell copy engine related constants. shell32: Register ShellItem coclass. setupapi/tests: Add Driver Store tests. setupapi: Add stub spec entries for DriverStoreEnumDriverPackage(). setupapi: Install to the driver store in SetupCopyOEMInf(). setupapi: Uninstall from the driver store in SetupUninstallOEMInf(). setupapi: Implement DriverStoreFindDriverPackage(). setupapi: Implement DriverStoreDeleteDriverPackage(). setupapi: Implement DriverStoreAddDriverPackage(). setupapi: Add an any_version_is_compatible() helper. setupapi: Separate a copy_inf() helper. setupapi: Move INF installation functions to devinst.c. kernelbase/tests: Add more tests for some file manipulation functions. kernelbase: Remimplement PathRemoveFileSpecA/W(). kernelbase: Reimplement PathStripToRootA/W() on top of PathCchStripToRoot(). kernelbase: Reimplement PathIsRootA/W() on top of PathCchIsRoot(). kernelbase: Better match Windows behaviour in PathCchIsRoot(). kernelbase: Better match Windows behaviour in PathCchRemoveFileSpec(). kernelbase: Better match Windows behaviour in PathCchStripToRoot(). user32: Implement MSAA events for LB_SETCURSEL. gdiplus/metafile: Fix FillEllipse record size if compressed. gdiplus/metafile: Fix DrawEllipse record size if compressed. kernel32: EnumCalendarInfo() should ignore CAL_RETURN_NUMBER flag. kernel32/tests: Fix compilation with a PSDK compiler. comctl32/tests: Add rebar chevron visibility test. odbccp32: Fall back to ConfigDSN when ConfigDSNW cannot be found. comctl32/treeview: Allow treeview parent to deny treeview expansion. comctl32/tests: Add test to check if treeview expansion can be denied. ntdll: Allocate the x64 context on the asm side of KiUserExceptionDispatcher. ntdll: Allocate the ARM64EC code map in high memory. odbc32: Map SQLGetDiagRec() to SQLError(). odbc32: Map SQLColAttributes() to SQLColAttribute(). odbc32: Set initial login timeout to 15 seconds. winemac: Use the window rects to convert window to host visible rect. winemac: Use the window rects to convert host visible to window rect. winemac: Keep a window_rects struct in the driver window data. winemac: Remove unnecessary window data rects update. wineandroid: Keep a window_rects struct in the driver window data. winewayland: Store all window rects in wayland_win_data. win32u: Set host IME composition window position in NtUserShowCaret(). win32u: Set host IME composition window position in set_caret_pos(). win32u: Support setting host IME composition window position for ImmSetCompositionWindow(). mshtml/tests: Accept rare return value from ReportResult on native. mshtml: Implement EmulateIE* modes for X-UA-Compatible. mshtml: Don't return default ports from location.host in IE10+ modes. mshtml: Avoid calling remove_target_tasks needlessly. dssenh: Swap the endianness of the signature. dssenh/tests: Add test for VerifySignatureA. dssenh/tests: Separate the public key export from the signhash test. dssenh/tests: Remove redundant signature verification. dssenh/tests: Set 0xdeadbeef last error before function execution. dssenh/tests: Fix signLen usage. dssenh: Finish hash in the SignHash function. dssenh/tests: Remove redundant hash test. dssenh/tests: Move test loop out of sub function. dssenh/tests: Remove unnecessary verify test cases. dssenh/tests: Remove skipping sign tests. kernel32: Fake success in PowerClearRequest. kernel32: Fake success in PowerSetRequest. kernel32: Fake success in PowerCreateRequest. win32u: Initialize parent_rect variables in window.c. odbccp32: Correctly hanndle ODBC_BOTH_DSN in SQLWritePrivateProfileStringW. odbc32: Handle missing SQLSetConnect/EnvAttr(). user32: Implement EVENT_OBJECT_DESTROY for listboxes. user32: Implement EVENT_OBJECT_CREATE for listboxes. win32u: Allocate and initialize window surface in window_surface_create. ntdll: Accept UNC paths in LdrAddDllDirectory. ntdll: Accept UNC paths in LdrGetDllPath. msvcr120: Implement feholdexcept. msvcr120: Add feholdexcept stub. include: Clean up formatting of long asm statements. include: Unify the syscall thunk on x86-64. wow64: Only update necessary registers when raising exceptions. wow64: Fetch the initial thread context from the CPU backend. secur32/tests: Make NTLM encryption tests work on newer Windows versions. secur32/tests: Separate NTLM signature and encryption tests. secur32/tests: Fix a typo. secur32/tests: Don't use fake user/domain/password in NTLM tests. secur32/tests: Avoid assigning a 4-byte status to an 1-byte variable. secur32/tests: Don't load secur32.dll dynamically. msv1_0: Make buffer large enough to hold NTLM_MAX_BUF bytes of base64 encoded data. winex11: Remove now unnecessary window surface pointer. winemac: Remove now unnecessary window surface pointer. wineandroid: Remove now unnecessary window surface pointer. win32u: Introduce a new NtUserExposeWindowSurface call. winex11: Fix the exposed window surface region combination. winemac: Remove unnecessary window surface invalidation. winemac: Remove unused unminimized window surface. winex11: Remove now unnecessary window surface flushes. win32u: Flush window surface after UpdateLayeredWindow. winex11: Discard previous surface when window is directly drawn to. win32u: Get visible and client rects in parent-relative coordinates. odbccp32: Support driver config in SQLGet/WritePrivateProfileStringW. win32u: Use a full size bitmap for display device contexts. user32/tests: Add more display DC bitmap tests. mf/tests: Load MFCreateMediaBufferFromMediaType dynamically. mfplat/tests: Add missing todo_wine for MFCreateMediaBufferFromMediaType. oleaut32: Initialize reserved members before saving. oleaut32: Convert 32-bit or 16-bit color bitmaps to 24-bit color DIBs when saving. oleaut32/tests: Add OLE Picture object tests using DIB section. odbccp32: Handle NULL DSN in SQLValidDSN(). odbccp32/tests: Get rid of a workaround for XP. odbccp32: Use wide character string literals. odbccp32: Respect config mode in SQLGet/WritePrivateProfileString(). mshtml: Add support for document fragment prototype objects. mshtml: Add support for attribute prototype objects. mshtml: Add support for comment prototype objects. mshtml: Add support for unknown element prototype objects. mshtml: Increase buffer size in dispex_to_string. wineoss: Store the OSS device in midi_dest. rpcrt4/tests: Allocate stub buffers with NdrOleAllocate. rpcrt4/tests: Test whether Ndr(Get|Free)Buffer calls StubMsg.pfn(Allocate|Free). rpcrt4/tests: Correct a comment in test_pointer_marshal. configure: Don't use CPPFLAGS for PE cross targets. mlang: Use larger destination buffer with WideCharToMultiByte(). odbc32: Support {}'s in Driver connection string. odbc32: Connection string keywords are case insensitive. gdiplus: Add a couple of missing gdi_dc_release(). riched20: Release IME input context when done using it. winebus.sys: Read vendor/product/serial strings from the usb subsystem. winebus.sys: Always parse uevent PRODUCT= line on input subsystem. winebus.sys: Add devtype parameter to get_device_subsystem_info(). win32u: Keep a window_rects struct in the WND structure. win32u: Pass a window_rects struct to calc_ncsize helper. win32u: Pass a window_rects struct from get_window_rects helper. win32u: Introduce new get_(client|window)_rect_rel helpers. win32u: Pass a window_rects struct to MoveWindowBits driver entry. win32u: Pass a window_rects struct to WindowPosChanging driver entry. win32u: Pass a window_rects struct to WindowPosChanged driver entry. win32u: Pass window_rects structs to create_window_surface. win32u: Use window_rects structs in apply_window_pos. win32u: Split driver side window bits move to a separate entry. winex11: Don't call X11DRV_SET_DRAWABLE with invalid drawable. winex11: Avoid moving embedded windows in the systray dock. win32u: Fix CreateWindowSurface call when updating layered surfaces. winex11: Check whether the window surface needs to be re-created. user32: Implement EVENT_SYSTEM_DIALOGEND. winemac.drv: Better detect whether to unminimize a window when the app becomes active. winebus.sys: Pass each input report regardless of report ID to the pending read IRQ. odbc32: Implicit descriptors can be retrieved but not set. odbc32: Set win32_funcs on the descriptors returned from SQLGetStmtAttr(). odbc32: Parse incoming connection string in SQLBrowse/DriverConnct(). mshtml: Add support for selection prototype objects. mshtml: Add support for range prototype objects. mshtml: Add support for text range prototype objects. mshtml: Add support for node list prototype objects. mshtml: Add support for element collection prototype objects. mshtml: Add support for named node map prototype objects. mshtml: Add support for DOM token list prototype objects. mshtml: Add support for client rect list prototype objects. wined3d: Fix return for WINED3D_SHADER_RESOURCE_TEXTURE_2DMSARRAY. windowscodecs/tests: Add some more tests for the IWICStreamProvider methods. windowscodecs/metadata: Reset the handler on LoadEx(NULL). mshtml: Add support for media query list prototype objects. mshtml: Add support for console prototype objects. mshtml: Add support for namespace collection prototype objects. mshtml: Add support for performance prototype objects. mshtml: Add support for performance navigation prototype objects. mshtml: Add support for performance timing prototype objects. mshtml: Add support for MIME types collection prototype objects. mshtml: Add support for plugins collection prototype objects. mshtml: Add support for history prototype objects. mshtml: Add support for screen prototype objects. ntdll: Add a test for BeginSimulation(). ntdll: Support STATUS_EMULATION_SYSCALL exception on ARM64EC. ntdll: Avoid nested ARM64EC notifications. ntdll: Call the exception preparation callback on ARM64EC. ntdll: Initialize dll search paths before WOW64 init. win32u: Pass a window_rects struct to calc_winpos helper. win32u: Use window_rects struct in NtUserCreateWindowEx. win32u: Use window_rects struct in update_window_state. win32u: Use window_rects struct in set_window_pos. win32u: Introduce a new window rects structure. odbc32: Add support for descriptor handles in SQLGet/SetStmtAttr(). mf/tests: Test 2D buffers can override stride. mf/tests: Test 1D/2D output on 2D buffers. mf/tests: Test video processor with 2D buffers. mf/tests: Cleanup the video processor test list. mfplat: Implement MFCreateMediaBufferFromMediaType for video formats. mfplat/tests: Add more tests for MFCreateMediaBufferFromMediaType. comctl32/progress: Add states for progress bar. comctl32/tests: Add tests for progress bar states. windowscodecs/metadata: Add a stub for IWICStreamProvider. windowscodecs/tests: Add some tests for IWICStreamProvider interface availability. windowscodecs/tests: Remove noisy traces from the test stubs. windowscodecs/tests: Add a helper to check for supported interfaces. include: Add IWICStreamProvider definition. httpapi: Implement HttpSendResponseEntityBody. httpapi: Handle HTTP_SEND_RESPONSE_FLAG_MORE_DATA flag. http.sys: Skip clean up if HTTP_SEND_RESPONSE_FLAG_MORE_DATA is set. httpapi: Add tests for HttpResponseSendEntityBody. include: Move arm64ec_shared_info to winternl and point to it in the PEB. win32u: Avoid crashing with nulldrv when creating offscreen surface. mshtml: Add support for storage event prototype objects. mshtml: Add support for progress event prototype objects. mshtml: Add support for message event prototype objects. mshtml: Add support for custom event prototype objects. mshtml: Add support for page transition event prototype objects. mshtml: Add support for keyboard event prototype objects. mshtml: Add support for mouse event prototype objects. mshtml: Add support for UIEvent prototype objects. mshtml: Add support for Event prototype objects. mshtml: Add support for MSEventObj prototype objects. odbc32: Call the driver function in SQLBindCol(). odbc32: Fail freeing an object while child objects are alive. odbc32: Try the DRIVER attribute if the DSN attribute is missing. odbc32: Remove unused Unix calls. odbc32: Add locking around driver calls. win32u: Don't request a host window surface for child windows. widl: Propagate attrs to inner pointer types. widl: Ignore strings in is_embedded_complex(). widl: Get rid of the write_embedded_types() helper. widl: Explicitly check for top-level parameters before adding FC_ALLOCED_ON_STACK. win32u: Do not embolden heavy weighted fonts. win32u: Always set weight from OS/2 header in freetype_set_outline_text_metrics(). gdi32/tests: Add test for Regular TTF with heavy weight. qcap: Delay setting v4l device format until stream start. quartz: Propagate graph start error in MediaControl_Run(). qcap/tests: Add a test for simultaneous video capture usage. qcap/tests: Fix test failure in testsink_Receive() on some hardware. user32: Implement EVENT_OBJECT_STATECHANGE for BM_SETSTYLE. printdlg: Allow button id psh1 for "Properties" button. win32u: Include Tahoma and its linked fonts in child font list. win32u: Include Microsoft Sans Serif as a child font. win32u: Don't check ansi_cp when adding fallback child font. Release 9.15. gdi32: Bounds check EMF handle tables. user32: Implement EVENT_OBJECT_STATECHANGE for BM_SETCHECK. winegstreamer/quartz_parser: Handle 0 size in read_thread. comctl32: Add handling for PSN_QUERYINITIALFOCUS in prop.c. comctl32/tests: Add test for PSN_QUERYINITIALFOCUS for the propsheet. dinput: Implement DIPROP_SCANCODE. dinput/tests: Update tests for DIPROP_SCANCODE. winex11: Remove now unnecessary WindowPosChanging checks. winewayland: Remove now unnecessary WindowPosChanging checks. winemac: Remove now unnecessary WindowPosChanging checks. wineandroid: Remove now unnecessary WindowPosChanging checks. win32u: Remove unnecessary UpdateLayeredWindow driver entry args. odbc32: Forward SQLTables() to the Unicode version if needed. odbc32: Forward SQLTablePrivileges() to the Unicode version if needed. odbc32: Forward SQLStatistics() to the Unicode version if needed. odbc32: Forward SQLSpecialColumns() to the Unicode version if needed. odbc32: Forward SQLSetStmtAttr() to the Unicode version if needed. odbc32: Forward SQLSetDescField() to the Unicode version if needed. odbc32: Forward SQLSetCursorName() to the Unicode version if needed. odbc32: Forward SQLSetConnectOption() to the Unicode version if needed. odbc32: Forward SQLSetConnectAttr() to the Unicode version if needed. odbc32: Return an error when a required driver entry point is missing. odbc32: Make the driver loader thread-safe. mshtml: Make mutation_observer_ctor_dispex_vtbl const. mshtml: Add support for rect prototype objects. mshtml: Add support for CSS rule prototype objects. mshtml: Add support for CSS rule list prototype objects. mshtml: Add support for style sheet list prototype objects. mshtml: Add support for style sheet prototype objects. mshtml: Add support for current style prototype objects. mshtml: Add support for style prototype objects. mshtml: Add support for computed style prototype objects. mshtml: Get object name from its ID when possible. include: Add more video encoder codec api guids. include: Add video encoder source defines. include: Add video encoder inverse telecine guids. include: Add video encoder max guids. include: Add video encode guids.
This merge request has too many patches to be relayed via email. Please visit the URL below to see the contents of the merge request. https://gitlab.winehq.org/wine/wine/-/merge_requests/6166