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.
-- v7: msv1_0: Use _NSGetEnviron() instead of environ on macOS. ntdll: Use _NSGetEnviron() instead of environ when spawning the server on macOS. ntdll: Use environ/_NSGetEnviron() directly rather than caching it in main_envp. include: Ensure that x86_64 syscall thunks have a consistent length when built with Clang. include: Forward declare all gdiplus classes. include: Add *_SHIFT macros. include: Add gdiplus effect parameter structs. atl: Only warn in AtlModuleGetClassObject if the class was not found. atl: Correct comment above AtlModuleRegisterTypeLib function. mshtml: Use host object script bindings for style objects. mshtml: Use get_prop_desc for legacy function object implementation. mshtml: Use host object script bindings for HTMLStyleSheetRule. mshtml: Use host object script bindings for HTMLStyleSheetRulesCollection. mshtml: Use host object script bindings for HTMLStyleSheet. mshtml: Use host object script bindings for HTMLStyleSheetsCollection. mshtml: Use host object script bindings for HTMLDOMChildrenCollection. mshtml: Use dispex_index_prop_desc for HTMLElementCollection. comctl32: Handle WM_GETOBJECT in tab control. wined3d: Feed modelview matrices through a push constant buffer. wined3d: Do not use the normal or modelview matrices when drawing pretransformed vertices. wined3d: Feed the projection matrix through a push constant buffer. wined3d: Move get_projection_matrix() to glsl_shader.c. wined3d: Feed the material through a push constant buffer. wined3d: Invalidate push constant flags only for the primary stateblock. include: Added IEventTrigger declaration. include: Add ISessionStateChangeTrigger declaration. include: Add more Task Scheduler Trigger interface definitions. shell32: Fix FO_MOVE when destination has conflicting directory. shell32/tests: Add tests for moving dir(s) to destination(s) with conflicting dir. mshtml: Use host object script bindings for HTMLAttributeCollection. mshtml: Use dispex_index_prop_desc for HTMLFiltersCollection. mshtml: Use host object script bindings for DOMTokenList. mshtml: Use host object script bindings for HTMLRect. mshtml: Use host object script bindings for select elements. mshtml: Use host object script bindings for object elements. mshtml: Store property name in HTMLPluginContainer. mshtml: Use HTMLPluginContainer for DispatchEx functions in object element. sechost: Check both lpServiceName and lpServiceProc for NULL in StartServiceCtrlDispatcher(). d3dx9/effect: Document one remaining header field.
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