Difference between revisions of "Arwinss"

From ReactOS Wiki
Jump to: navigation, search
m (TODO list)
 
(6 intermediate revisions by 3 users not shown)
Line 6: Line 6:
 
Before continuing, I'd recommend a separate build folder for building Arwinss. Otherwise you'll have to revert the Arwinss changes and rebuild ReactOS.
 
Before continuing, I'd recommend a separate build folder for building Arwinss. Otherwise you'll have to revert the Arwinss changes and rebuild ReactOS.
  
Checkout the arwinss branch (svn://svn.reactos.org/reactos/branches/arwinss), into a folder that can really be anywhere. Copy the arwinss folder and trunk.diff into your dedicated build folder. Apply trunk.diff and hope that it applies with no problem (if it doesn't, watch this page for an uppdated patch). Then you are free to  compile using your favorite ReactOS build commands ;):
+
Checkout the arwinss branch ([https://git.reactos.org/?p=reactos.git;a=shortlog;h=refs/heads/arwinss cgit]/[https://github.com/reactos/reactos/tree/arwinss github]; <code>git clone https://github.com/reactos/reactos -b arwinss</code>), into a folder that can really be anywhere. Copy the arwinss (and win32csr?) folder and trunk.diff into your dedicated build folder containing the "normal" ReactOS code. Apply trunk.diff and hope that it applies with no problem. Afterwards, you can compile using the normal build commands:
 
  ninja
 
  ninja
 
  ninja bootcd
 
  ninja bootcd
Line 17: Line 17:
 
  ninja winex11
 
  ninja winex11
 
to build this optional module.
 
to build this optional module.
 +
 +
If the patch fail to apply, watch this page for updates. You may also have some luck with applying it to its contemporary (~2015) ReactOS code and rebasing the newer changes in, in light of some changes to how the code is organized. (Most notably with win32csr being refactored and moved around.) Remember to post your updates here if you got it to work.
  
 
== Architecture ==
 
== Architecture ==
  
Arwinss uses parts of the Wine architecture and parts of Windows NT architecture in appropriate places and in a good way. The overall call flow / architecture of [[Arwinss]] looks like this:
+
Arwinss uses parts of the [[Wine]] architecture and parts of Windows NT architecture in appropriate places and in a good way. The overall call flow / architecture of [[Arwinss]] looks like this:
  
 
[[File:arwinss.png]]
 
[[File:arwinss.png]]
Line 26: Line 28:
 
It consists of the following modules, one of them being optional (winex11.drv):
 
It consists of the following modules, one of them being optional (winex11.drv):
 
* <tt>arwinss/freetype</tt> – implements usermode font rendering (FreeType library, with small ReactOS glue), used by GDI32.DLL
 
* <tt>arwinss/freetype</tt> – implements usermode font rendering (FreeType library, with small ReactOS glue), used by GDI32.DLL
* <tt>arwinss/client/user32</tt> – implements USER API
+
* <tt>arwinss/client/user32</tt> – implements USER API, maps to wine <tt>dlls/user32</tt>
* <tt>arwinss/client/gdi32</tt> – implements GDI API
+
* <tt>arwinss/client/gdi32</tt> – implements GDI API,maps to wine <tt>dlls/gdi32</tt>
* <tt>arwinss/client/winent.drv/winent.drv</tt> – implements native graphics and user drivers
+
* <tt>arwinss/client/winent.drv/winent.drv</tt> – implements native graphics and user drivers, ReactOS implemented
* <tt>arwinss/client/winex11.drv/</tt> – implements X11 X-windows graphics and user drivers
+
* <tt>arwinss/client/winex11.drv/</tt> – implements X11 X-windows graphics and user drivers, maps to wine <tt>dlls/winex11.drv</tt>
 
* <tt>win32ss</tt> – implements kernel mode counter part of the native graphics driver, a Simple Window Manager (SWM) and a kernel mode USER server.
 
* <tt>win32ss</tt> – implements kernel mode counter part of the native graphics driver, a Simple Window Manager (SWM) and a kernel mode USER server.
 
* <tt>win32csr</tt> – implements needed parts of the CSR subsystem along with handling user input
 
* <tt>win32csr</tt> – implements needed parts of the CSR subsystem along with handling user input
Line 39: Line 41:
 
Convention for marking changes. C++ code comments (//) mean that the place has some special mark up for debugging. A typical use is for a
 
Convention for marking changes. C++ code comments (//) mean that the place has some special mark up for debugging. A typical use is for a
 
  // FIXME: Something
 
  // FIXME: Something
 +
 +
One of the things you may want to mess around with the old code may be swapping out the old wine for a new one, given how many new things they have implemented. For those who are interested, the current code is based on wine 1.3.13 and 1.1.36 depending on which parts you are looking at. The arrangement of dll directories mostly stays the same, but winex11.drv has gone over some rearrangements that might make your job harder. (Some of the REAL cool things, such as newer DX support for games, are outside of the scope of arwinss and should be tried directly on the master branch.)
  
 
== Potential Benefits ==
 
== Potential Benefits ==
 
These bugs would be fixed if Arwinss was ready (just a short list):
 
These bugs would be fixed if Arwinss was ready (just a short list):
  
{{REACTOSBUG|1101}}
+
* {{REACTOSBUG|1101}}
 
+
* {{REACTOSBUG|9612}}
{{REACTOSBUG|9612}}
+
* <del>{{REACTOSBUG|9984}}</del>
 
 
{{REACTOSBUG|9984}}
 
  
 
As one can see from these bug titles it mainly boils down to drastically improved user32 and gdi32 support.
 
As one can see from these bug titles it mainly boils down to drastically improved user32 and gdi32 support.
  
 
== TODO list ==
 
== TODO list ==
 
+
See full list of bugs at https://jira.reactos.org/projects/ARWINSS.
1. <del>Fix redrawing issues {{ARWINSSBUG|19}} and {{ARWINSSBUG|26}}</del>
+
# <del>Fix redrawing issues {{ARWINSSBUG|19}} and {{ARWINSSBUG|26}}</del>
 
+
# <del>Fix crash that prevents booting in VirtualBox</del>
2. <del>Fix crash that prevents booting in VirtualBox</del>
+
# <del>Fix installer/uninstaller crash {{ARWINSSBUG|75}}</del>
 
+
# Fix garbage on desktop after closing some apps {{ARWINSSBUG|63}}
3. <del>Fix installer/uninstaller crash {{ARWINSSBUG|75}}</del>
+
# <del>Fix zoom and tabs in Firefox {{ARWINSSBUG|76}}</del>
 
+
# Fix "Window titles are shown as inactive (gray) while being active" {{ARWINSSBUG|7}}
4. Fix garbage on desktop after closing some apps {{ARWINSSBUG|63}}
+
# <del>Fix arwinss related program crashes {{ARWINSSBUG|73}})</del>
 
+
# Fix interaction of windows in apps with few windows {{ARWINSSBUG|32}}
5. <del>Fix zoom and tabs in Firefox {{ARWINSSBUG|76}}</del>
+
# Fix low level input hooks (used for example in DosBox)
 
 
6. Fix "Window titles are shown as inactive (gray) while being active" {{ARWINSSBUG|7}}
 
 
 
7. <del>Fix arwinss related program crashes {{ARWINSSBUG|73}})</del>
 
 
 
8. <del>Fix font mapping {{ARWINSSBUG|57}})</del>
 
 
 
9. Fix interaction of windows in apps with few windows {{ARWINSSBUG|32}}
 
 
 
10. Fix low level input hooks (used for example in DosBox)
 
  
 
== Unimplemented/Fixme that appear during work ==
 
== Unimplemented/Fixme that appear during work ==
  
1. fixme:(dll\win32\arwinss\winent.drv\userdrv.c:665) RosDrv_SetWindowStyle is UNIMPLEMENTED!
+
# fixme:(dll\win32\arwinss\winent.drv\userdrv.c:665) RosDrv_SetWindowStyle is UNIMPLEMENTED!
 
+
# fixme:(dll\win32\arwinss\winent.drv\userdrv.c:642) RosDrv_SetWindowIcon is UNIMPLEMENTED!
2. fixme:(dll\win32\arwinss\winent.drv\userdrv.c:642) RosDrv_SetWindowIcon is UNIMPLEMENTED!
+
# (subsystems\win32\win32k_arwinss\wine\queue.c:814) TODO: Check if anyone is waiting on queue is missing!
 
+
# (subsystems\win32\win32k_arwinss\eng\device.c:927) FIXME: DeviceName is NULL, trying display nr. 1 (TuxRacer)
3. (subsystems\win32\win32k_arwinss\wine\queue.c:814) TODO: Check if anyone is waiting on queue is missing!
+
# fixme:(dll\win32\arwinss\winent.drv\userdrv.c:636) RosDrv_SetWindowRgn is UNIMPLEMENTED! (Reget)
 
+
# fixme:(dll\win32\arwinss\winent.drv\userdrv.c:626) RosDrv_SetLayeredWindowAttributes is UNIMPLEMENTED! (Qutim)
4. (subsystems\win32\win32k_arwinss\eng\device.c:927) FIXME: DeviceName is NULL, trying display nr. 1 (TuxRacer)
+
# err:(dll\win32\arwinss\winent.drv\gdidrv.c:353) ExtEscape for escape 8 is unimplemented! (SuperTux 0.3.3; ROS text screensaver)
 
+
# fixme:(dll\win32\arwinss\winent.drv\clipboard.c:2440) NTDRV_CLIPBOARD_IsSelectionOwner is UNIMPLEMENTED! (AbiWord. Notepad++)
5. fixme:(dll\win32\arwinss\winent.drv\userdrv.c:636) RosDrv_SetWindowRgn is UNIMPLEMENTED! (Reget)
+
# fixme:(dll\win32\arwinss\winent.drv\gdidrv.c:451) RosDrv_GetTextExtentExPoint is UNIMPLEMENTED!
 
+
# fixme:(dll\win32\arwinss\winent.drv\gdidrv.c:609) RosDrv_RealizePalette is UNIMPLEMENTED!
6. fixme:(dll\win32\arwinss\winent.drv\userdrv.c:626) RosDrv_SetLayeredWindowAttributes is UNIMPLEMENTED! (Qutim)
+
# fixme:(dll\win32\arwinss\winent.drv\gdidrv.c:959) RosDrv_UnrealizePalette is UNIMPLEMENTED!
 
+
# fixme:(dll\win32\arwinss\winent.drv\gdidrv.c:433) RosDrv_GetNearestColor is UNIMPLEMENTED!
7. err:(dll\win32\arwinss\winent.drv\gdidrv.c:353) ExtEscape for escape 8 is unimplemented! (SuperTux 0.3.3; ROS text screensaver)
 
 
 
8. fixme:(dll\win32\arwinss\winent.drv\clipboard.c:2440) NTDRV_CLIPBOARD_IsSelectionOwner is UNIMPLEMENTED! (AbiWord. Notepad++)
 
 
 
9. fixme:(dll\win32\arwinss\winent.drv\gdidrv.c:451) RosDrv_GetTextExtentExPoint is UNIMPLEMENTED!
 
 
 
10. fixme:(dll\win32\arwinss\winent.drv\gdidrv.c:609) RosDrv_RealizePalette is UNIMPLEMENTED!
 
 
 
11. fixme:(dll\win32\arwinss\winent.drv\gdidrv.c:959) RosDrv_UnrealizePalette is UNIMPLEMENTED!
 
 
 
12. fixme:(dll\win32\arwinss\winent.drv\gdidrv.c:433) RosDrv_GetNearestColor is UNIMPLEMENTED!
 
  
 
== Testing ==
 
== Testing ==

Latest revision as of 05:08, 4 November 2019

This page is probably outdated

The information on this page might not be valid for the current state of ReactOS.
A Wiki Administrator should look at this page and decide or discuss what to do with it.


Arwinss is an alternative implementation of the core Win32 subsystem components. Technical information about implementation details is available at this page: Arwinss technical.

Usage

Before continuing, I'd recommend a separate build folder for building Arwinss. Otherwise you'll have to revert the Arwinss changes and rebuild ReactOS.

Checkout the arwinss branch (cgit/github; git clone https://github.com/reactos/reactos -b arwinss), into a folder that can really be anywhere. Copy the arwinss (and win32csr?) folder and trunk.diff into your dedicated build folder containing the "normal" ReactOS code. Apply trunk.diff and hope that it applies with no problem. Afterwards, you can compile using the normal build commands:

ninja
ninja bootcd
ninja livecd
ninja hybridcd

This will build a copy of trunk with the alternate subsystem enabled.

If you want to build the winex11 module, you must first copy the lib/3rdparty/libX11/libX11.a file from your working copy to the obj-i386/lib/3rdparty/libX11 directory (creating it if it does not exist). This will fix the winex11.drv linking issues, and you can just type

ninja winex11

to build this optional module.

If the patch fail to apply, watch this page for updates. You may also have some luck with applying it to its contemporary (~2015) ReactOS code and rebasing the newer changes in, in light of some changes to how the code is organized. (Most notably with win32csr being refactored and moved around.) Remember to post your updates here if you got it to work.

Architecture

Arwinss uses parts of the Wine architecture and parts of Windows NT architecture in appropriate places and in a good way. The overall call flow / architecture of Arwinss looks like this:

Arwinss.png

It consists of the following modules, one of them being optional (winex11.drv):

  • arwinss/freetype – implements usermode font rendering (FreeType library, with small ReactOS glue), used by GDI32.DLL
  • arwinss/client/user32 – implements USER API, maps to wine dlls/user32
  • arwinss/client/gdi32 – implements GDI API,maps to wine dlls/gdi32
  • arwinss/client/winent.drv/winent.drv – implements native graphics and user drivers, ReactOS implemented
  • arwinss/client/winex11.drv/ – implements X11 X-windows graphics and user drivers, maps to wine dlls/winex11.drv
  • win32ss – implements kernel mode counter part of the native graphics driver, a Simple Window Manager (SWM) and a kernel mode USER server.
  • win32csr – implements needed parts of the CSR subsystem along with handling user input

Hacking

Most of the hacking happens in WINENT.DRV and WIN32K.SYS, with very rare fixes to the user32/gdi32 (mainly, because it's a tested Wine's code with only minor changes).

Convention for marking changes. C++ code comments (//) mean that the place has some special mark up for debugging. A typical use is for a

// FIXME: Something

One of the things you may want to mess around with the old code may be swapping out the old wine for a new one, given how many new things they have implemented. For those who are interested, the current code is based on wine 1.3.13 and 1.1.36 depending on which parts you are looking at. The arrangement of dll directories mostly stays the same, but winex11.drv has gone over some rearrangements that might make your job harder. (Some of the REAL cool things, such as newer DX support for games, are outside of the scope of arwinss and should be tried directly on the master branch.)

Potential Benefits

These bugs would be fixed if Arwinss was ready (just a short list):

As one can see from these bug titles it mainly boils down to drastically improved user32 and gdi32 support.

TODO list

See full list of bugs at https://jira.reactos.org/projects/ARWINSS.

  1. Fix redrawing issues (see bug #19) and (see bug #26)
  2. Fix crash that prevents booting in VirtualBox
  3. Fix installer/uninstaller crash (see bug #75)
  4. Fix garbage on desktop after closing some apps (see bug #63)
  5. Fix zoom and tabs in Firefox (see bug #76)
  6. Fix "Window titles are shown as inactive (gray) while being active" (see bug #7)
  7. Fix arwinss related program crashes (see bug #73))
  8. Fix interaction of windows in apps with few windows (see bug #32)
  9. Fix low level input hooks (used for example in DosBox)

Unimplemented/Fixme that appear during work

  1. fixme:(dll\win32\arwinss\winent.drv\userdrv.c:665) RosDrv_SetWindowStyle is UNIMPLEMENTED!
  2. fixme:(dll\win32\arwinss\winent.drv\userdrv.c:642) RosDrv_SetWindowIcon is UNIMPLEMENTED!
  3. (subsystems\win32\win32k_arwinss\wine\queue.c:814) TODO: Check if anyone is waiting on queue is missing!
  4. (subsystems\win32\win32k_arwinss\eng\device.c:927) FIXME: DeviceName is NULL, trying display nr. 1 (TuxRacer)
  5. fixme:(dll\win32\arwinss\winent.drv\userdrv.c:636) RosDrv_SetWindowRgn is UNIMPLEMENTED! (Reget)
  6. fixme:(dll\win32\arwinss\winent.drv\userdrv.c:626) RosDrv_SetLayeredWindowAttributes is UNIMPLEMENTED! (Qutim)
  7. err:(dll\win32\arwinss\winent.drv\gdidrv.c:353) ExtEscape for escape 8 is unimplemented! (SuperTux 0.3.3; ROS text screensaver)
  8. fixme:(dll\win32\arwinss\winent.drv\clipboard.c:2440) NTDRV_CLIPBOARD_IsSelectionOwner is UNIMPLEMENTED! (AbiWord. Notepad++)
  9. fixme:(dll\win32\arwinss\winent.drv\gdidrv.c:451) RosDrv_GetTextExtentExPoint is UNIMPLEMENTED!
  10. fixme:(dll\win32\arwinss\winent.drv\gdidrv.c:609) RosDrv_RealizePalette is UNIMPLEMENTED!
  11. fixme:(dll\win32\arwinss\winent.drv\gdidrv.c:959) RosDrv_UnrealizePalette is UNIMPLEMENTED!
  12. fixme:(dll\win32\arwinss\winent.drv\gdidrv.c:433) RosDrv_GetNearestColor is UNIMPLEMENTED!

Testing

You can get the latest ARWINSS ISO here.

See Also