Follow up to !5342. This adds the last missing piece for fixing how `ShellExecute` finds files, and restore the ability of running native unix programs with `ShellExecute`
--
v8: shell32: Restore the ability of running native unix programs with ShellExecute
https://gitlab.winehq.org/wine/wine/-/merge_requests/5400
Won't affect any existing program (all PatchMesh related functions are stubs), but could save a bunch of confusion in the future.
Could also save some confusion for mingw users, their headers copy plenty of stuff from Wine.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5550
Follow up to !5342. This adds the last missing piece for fixing how `ShellExecute` finds files, and restore the ability of running native unix programs with `ShellExecute`
--
v7: shell32: Restore the ability of running native unix programs with ShellExecute
https://gitlab.winehq.org/wine/wine/-/merge_requests/5400
First part of Proton shared memory series. The full branch can be seen at https://gitlab.winehq.org/rbernon/wine/-/commits/mr/shared-memories.
--
v32: win32u: Use the desktop shared data for GetCursorPos.
server: Move the last cursor time to the desktop session object.
server: Move the cursor position to the desktop session object.
win32u: Open desktop shared objects from session mapping.
server: Return the desktop object info in get_thread_desktop.
server: Allocate shared session object for desktops.
win32u: Open the global session shared mapping.
include: Add ReadNoFence64 inline helpers.
server: Create a global session shared mapping.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3103
This makes builds reproducible, and matches the current MIDL behavior (except that MIDL's string representation inexplicably varies with the build machine timezone).
The new info_string used by WIDL: `Created by WIDL version 9.7 at Tue Jan 19 03:14:07 2038`
And the custom data section in a .tlb file created by a recent MIDL:
```
off 0: guid(DE77BA65-517C-11D1-A2DA-0000F8773CE9) value(Created by MIDL version 8.01.0628 at Mon Jan 18 19:14:07 2038)
off c: guid(DE77BA63-517C-11D1-A2DA-0000F8773CE9) value(2147483647)
off 18: guid(DE77BA64-517C-11D1-A2DA-0000F8773CE9) value(134283892)
```
The only detailed info about this change in MIDL (which happened years ago AFAICT) is from Chromium.
They have a script which processes TLB files to compare against previously-built artifacts (or something similar), and mentions the timestamp and timezone: https://chromium.googlesource.com/chromium/src/+/master/build/toolchain/win…
They also have a rough Python 2 script to parse/dump TLB files, which is where the above MIDL output comes from: https://chromium-review.googlesource.com/c/chromium/src/+/693223
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5533
--
v3: mf/session: Handle transform format changes and update downstream media types.
mf/session: Wrap samples in IMFMediaEvent list instead of IMFSample list.
mf/session: Introduce new session_get_topo_node_input helper.
mf/session: Introduce new session_get_topo_node_output helper.
mf/session: Get session topo_node from their IMFTopologyNode directly.
mf/session: Introduce new (allocate|release)_output_samples helpers.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5450
Termios2 is a modern Linux feature thats allows usage of any custom baudrate instead of hardcoded values from the 1970's.
Also, this patch improves compatibility with the win32 api, because windows allow any custom baudrates by design.
Example software for which this patch is needed: http://www.vi-soft.com.ua/index_e.htm
This software for reading/writing/patch fullflash of Siemens mobile phones, where serial speed is important.
V-Klay uses 1600000 baudrate and perfectly works on Linux with termios2 and Prolific PL2303.
--
v6: ntdll/unix: Use termios2 for serial when possible.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5211
based on !5504
--
v2: winestreamer/video_decoder: Use video_decoder to implement wmv decoder.
winegstreamer/video_decoder: Support aggregation.
winegstreamer/video_decoder: Add wg_transform_attrs member.
winegstreamer/video_decoder: Change decoder attributes.
winegstreamer/video_decoder: Set input/output infos in h264_decoder_create.
winegstreamer: Implement mf_media_type_to_wg_format_video_wmv.
winegstreamer: Introduce new wg_transform_create_quartz helper.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5508
Is this stalled because of the importer struct?
It's intended to preserve the behavior of relay/snoop w.r.t. dynamically resolved procedures (GetProcAddress). I'll drop it if the backwards compatibility is unnecessary.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7#note_69007
First part of Proton shared memory series. The full branch can be seen at https://gitlab.winehq.org/rbernon/wine/-/commits/mr/shared-memories.
--
v31: win32u: Use the desktop shared data for GetCursorPos.
server: Move the last cursor time to the desktop session object.
server: Move the cursor position to the desktop session object.
win32u: Open desktop shared objects from session mapping.
server: Return the desktop object info in get_thread_desktop.
server: Allocate shared session object for desktops.
win32u: Open the global session shared mapping.
include: Add ReadNoFence64 inline helpers.
server: Create a global session shared mapping.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3103
ucrtbase._mbsncpy_s is used by Marvel vs Capcom when trying to create multiplayer lobby.
The functions are also present in msvcrt (unlike msvcr70, msvcr71) where I didn't add it because it behaves differently: there is at least one weirdness when it doubles the number of characters to copy ('n' parameter, not buffer size). I suppose we don't need to explore and deal with this specific until something needs those functions from msvcrt.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5547
On Sat Apr 13 23:12:20 2024 +0000, Isaac Marovitz wrote:
> I've tried to add the necessary changes based on what I saw for
> `NtQueueApcThread()`, but the compiler isn't happy. Not sure what I'm missing.
you probably just need to run ./tools/make_specfiles
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5497#note_68972
Here are 5 more patches on top of !4624, mostly along the same lines. I realize it's super late, no need to rush reviewing :slight_smile:
--
v2: d3d9/tests: Test creating a texture on a NULL HWND device.
d3d9/tests: Don't create a vertex shader in test_desktop_window() when unsupported.
wined3d: Conditionally allow sRGB writes with the 'none' shader backend.
wined3d: Conditionally support WINED3D_FRAGMENT_CAP_SRGB_WRITE on the ffp fragment pipe.
d3d9/tests: Skip test_sample_attached_rendertarget() without pixel shaders support.
wined3d: Don't override texture parameters for COND_NP2 on multisample textures.
wined3d: Don't skip FFP projection transform update.
d3d9: Don't do instanced draws in DrawPrimitive() and DrawPrimitiveUP().
wined3d: Rename WINED3DUSAGE_PRIVATE to WINED3DUSAGE_CS.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4652
--
v6: win32u: Introduce a new add_virtual_modes helper.
winex11: Let win32u decide when to force update the display cache.
win32u: Don't force refresh the display cache on thread desktop change.
winex11: Report all sources as detached in virtual desktop mode.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5422
Growtopia shows a popup when this function call fails, faking success gets rid of it. Unreal Editor also prints a warning message that is silenced through this change.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5530
Previously, `SetupDiGetINFClassW()` read INF files
with `GetPrivateProfileString()`, which does not substitute %strkey%
tokens.
This caused device installation to fail for devices which had driver
INF files using %strkey% tokens in Version section.
An example of such device is Vernier LabQuest Mini (08f7:0008) for
which Vernier's LoggerPro application includes a driver.
The INF file in question adds a new device setup class and has
following entries in Version section:
```
Class = %ClassName%
ClassGuid = %DeviceClassGUID%
```
Strings section includes following entries:
```
DeviceClassGUID = "{6B8429BF-10AD-4b66-9FBA-2FE72B891721}"
ClassName = "VST_WinUSB"
```
Previously, when LoggerPro was installed and LabQuest Mini was
hotplugged, device installation failed with the following error:
```
fixme:setupapi:SetupDiGetINFClassW failed to convert "L"%DeviceClassGUID"" into a guid
```
This caused GUID_NULL to be used and Class was not set to the registry
for the device.
With this commit, correct class GUID and names are set to the device
registry entry.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56579
--
v4: setupapi: use INF parser to read class GUID and class name
setupapi/tests: add tests for reading INF class with %strkey% tokens
https://gitlab.winehq.org/wine/wine/-/merge_requests/5519
--
v11: explorer: Restore display settings on process exit.
winex11.drv: Process RRNotify events in xrandr14_get_id.
user32/tests: Test that display settings are restored on process exit.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5060
--
v3: win32u: Move host surface destruction out of the drivers.
win32u: Pass HWND directly to vulkan surface creation driver callback.
win32u: Rename vulkan surface creation/destroy driver callbacks.
winevulkan: Pass win32u surface wrappers for each vkQueuePresent swapchain.
win32u: Introduce a new VkSurfaceKHR wrapping structure.
win32u: Introduce a distinct vulkan interface between win32u and the user drivers.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5491
Windows 10 [received support](https://devblogs.microsoft.com/commandline/af_unix-comes-to-window… for AF_UNIX sockets in Insider Build 17063. This merge request adds basic support for AF_UNIX sockets to ws2_32 and wineserver.
Of particular note is the difficulty in handling `sun_path`. Most of the functions that allow for translating Windows paths to Unix paths are not accessible from ws2_32. I considered the following options:
* Pass the Windows path to wineserver and do the conversion there.
* This is, as far as I can tell, not possible without major rearchitecting. wineserver does not have functions to translate Windows paths to Unix paths, for obvious reasons.
* Obtain the current working directory of the requesting process and temporarily change directories to there.
* This only handles relative paths and fails for absolute paths, UNC paths, etc.
* Conditionally change directories based on whether the path is relative or not.
* This is error-prone and wineserver does not have the requisite functions to do this cleanly.
I ultimately decided to pass the translated Unix path to wineserver, which changes directories to `dirname(path)`. It then provides `bind` and `connect` with `basename(path)`. This is not threadsafe, but wineserver is not (currently) multithreaded.
Abstract sockets are not fully supported by this patch, matching the behavior of Windows.
--
v66: ws2_32/tests: Add test for AF_UNIX sockets.
server: Fix getsockname() and accept() on AF_UNIX sockets.
server: Introduce error when attempting to create a SOCK_DGRAM AF_UNIX socket.
server: Allow for deletion of socket files.
ws2_32: Add support for AF_UNIX sockets.
ws2_32: Add afunix.h header.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2786
--
v2: winex11: Remove now unnecessary surface wrapper struct.
win32u: Move thread detach from winex11.
win32u: Introduce a per-window vulkan surface list.
winewayland: Get rid of the now unnecessary surface wrapper.
win32u: Return the host surface directly from vulkan_surface_create.
win32u: Move host surface destruction out of the drivers.
win32u: Pass HWND directly to vulkan surface creation driver callback.
win32u: Rename vulkan surface creation/destroy driver callbacks.
winevulkan: Pass win32u surface wrappers for each vkQueuePresent swapchain.
win32u: Introduce a new VkSurfaceKHR wrapping structure.
win32u: Introduce a distinct vulkan interface between win32u and the user drivers.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5491
Previously, `SetupDiGetINFClassW()` read INF files
with `GetPrivateProfileString()`, which does not substitute %strkey%
tokens.
This caused device installation to fail for devices which had driver
INF files using %strkey% tokens in Version section.
An example of such device is Vernier LabQuest Mini (08f7:0008) for
which Vernier's LoggerPro application includes a driver.
The INF file in question adds a new device setup class and has
following entries in Version section:
```
Class = %ClassName%
ClassGuid = %DeviceClassGUID%
```
Strings section includes following entries:
```
DeviceClassGUID = "{6B8429BF-10AD-4b66-9FBA-2FE72B891721}"
ClassName = "VST_WinUSB"
```
Previously, when LoggerPro was installed and LabQuest Mini was
hotplugged, device installation failed with the following error:
```
fixme:setupapi:SetupDiGetINFClassW failed to convert "L"%DeviceClassGUID"" into a guid
```
This caused GUID_NULL to be used and Class was not set to the registry
for the device.
With this commit, correct class GUID and names are set to the device
registry entry.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56579
--
v3: setupapi: use INF parser to read class GUID and class name
setupapi/tests: add tests for reading INF class with %strkey% tokens
https://gitlab.winehq.org/wine/wine/-/merge_requests/5519
--
v4: mfreadwrite/reader: Pass the device manager to the stream transforms.
winegstreamer/video_processor: Implement D3D awareness.
mf/tests: Test video processor D3D11 awareness.
mfreadwrite/tests: Add some source reader D3D11 awareness tests.
mfreadwrite/reader: Avoid leaking the stream transform service MFT.
mfreadwrite/tests: Shutdown the test stream event queues on source shutdown.
mfreadwrite/tests: Avoid using MFCreateMediaBufferFromMediaType.
mfreadwrite/tests: Do not accept MFVideoFormat_RGB32 in the test transform.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5459
On Wed Apr 24 15:30:39 2024 +0000, Hans Leidekker wrote:
> The entry itself must skipped. The hash should be the same whether the
> image is signed or not.
right, but this means that you never include in the hash what's after the content of the security directory?
(and another nitpick, not sure it does matter so much for real images, but it should be checked against nth->OptionalHeader.NumberOfRvaAndSizes that security header in present)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5516#note_68711
As an intermediate step on the way to !5388, I wanted to focus on the infrastructure that will allow us to pass pixel format information from the driver to the PE side. This MR introduces the mechanism to perform this information exchange and uses it to implement `wglDescribePixelFormat` on the PE side. In the current RFC state this MR:
1. Introduces `p_get_pixel_format` driver API to allow drivers to provide pixel format information.
2. Implements `wglDescribePixelFormat` on the PE side using the pixel format information. If the driver doesn't implement `p_get_pixel_format` we fall back to the `wglDescribePixelFormat` driver implementation (temporary measure until all drivers are updated).
3. Caches pixel format information in `NtCurrentTeb()->glReserved1[]`.
4. Implements `p_get_pixel_format` API and removes the custom `wglDescribePixelFormat` for winewayland.
At this point would like to get some more feedback about this approach and the technical details. If the direction seems promising, here are the next steps to get to a final MR:
1. Implement `p_get_pixel_format` for winex11, winemac and dibdrv and remove their custom `wglDescribePixelFormat` implementations.
2. Remove the `wglDescribePixelFormat` driver API.
Thanks!
--
v3: winex11.drv: Remove unnecessary parameter from describe_pixel_format.
winex11.drv: Enable wglDescribePixelFormat through p_get_pixel_formats.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5517
This avoids one case of spurious wakeup of WaitOnAddress (which could be triggered by prior race on consequent WakeAddressAll and a thread trying to wake on that, leaving the waking thread in an alerted state). And fixes Resident Evil games randomly crashing due to unhandled spurious SleepConditionVariableCS wakeups.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3929
Valgrind support requires a fork, which I've published to https://gitlab.winehq.org/rbernon/valgrind. The fork implements loading DWARF debug info from PE files, instead of the old and broken upstream PDB support. I've tried to upstream these changes a long time ago but didn't receive any feedback.
I think we could maybe consider keeping a fork, which I'm happy to maintain, as the changes aren't too large. We may want to investigate adding 32-on-64 support, which may require a bit more changes (to VEX specifically, because its amd64 guest doesn't support segment register manipulation).
The changes here are not all related to Valgrind, and I'll create separate MR for those which may make sense independently from Valgrind / GDB.
Also included is a suppression file to silent some annoying false positives, many of which are coming from the cross-stack accesses during syscalls, which are confusing Valgrind's stack heuristics. One can try this out with something like:
`WINELOADERNOEXEC=1 valgrind --suppressions=tools/valgrind.supp wine64/loader/wine64 wine64/programs/winecfg/winecfg.exe`
--
v14: ntdll: Avoid marking freed block header as undefined for valgrind.
ntdll: Force HEAP_TAIL_CHECKING_ENABLED flag with valgrind.
ntdll: Fix valgrind notifications from ntdll.so.
ntdll: Import valgrind headers for PE side ntdll.
DEBUG: ntdll: Don't use preloader when running on valgrind.
tools: Add gdbunwind.py script with a syscall unwinder.
ntdll: Maintain a PE module link map and expose it to GDB.
loader: Expose the standard debugging symbols for GDB.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1074
Follow up to !5342. This adds the last missing piece for fixing how `ShellExecute` finds files, and restore the ability of running native unix programs with `ShellExecute`
--
v6: shell32: Restore the ability of running native unix programs with ShellExecute
https://gitlab.winehq.org/wine/wine/-/merge_requests/5400
As an intermediate step on the way to !5388, I wanted to focus on the infrastructure that will allow us to pass pixel format information from the driver to the PE side. This MR introduces the mechanism to perform this information exchange and uses it to implement `wglDescribePixelFormat` on the PE side. In the current RFC state this MR:
1. Introduces `p_get_pixel_format` driver API to allow drivers to provide pixel format information.
2. Implements `wglDescribePixelFormat` on the PE side using the pixel format information. If the driver doesn't implement `p_get_pixel_format` we fall back to the `wglDescribePixelFormat` driver implementation (temporary measure until all drivers are updated).
3. Caches pixel format information in `NtCurrentTeb()->glReserved1[]`.
4. Implements `p_get_pixel_format` API and removes the custom `wglDescribePixelFormat` for winewayland.
At this point would like to get some more feedback about this approach and the technical details. If the direction seems promising, here are the next steps to get to a final MR:
1. Implement `p_get_pixel_format` for winex11, winemac and dibdrv and remove their custom `wglDescribePixelFormat` implementations.
2. Remove the `wglDescribePixelFormat` driver API.
Thanks!
--
v2: winex11.drv: Remove unnecessary parameter from describe_pixel_format.
winex11.drv: Enable wglDescribePixelFormat through p_get_pixel_formats.
winewayland.drv: Enable wglDescribePixelFormat through p_get_pixel_formats.
opengl32: Cache driver pixel format information.
opengl32: Implement wglDescribePixelFormat using new driver API get_pixel_formats.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5517
In source_reader_create_transform(), store the result of
IMFActivate_ActivateObject() so that in the event of failure, resources
are freed and an appropriate HRESULT is returned.
Previously, if every object's activation failed, the last part of the
function was not aware of this.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5515