Difference between revisions of "Arwinss"

From ReactOS Wiki
Jump to: navigation, search
m (CORE-9984 fixed)
 
(93 intermediate revisions by 15 users not shown)
Line 1: Line 1:
 +
{{outdated}}
 
'''Arwinss''' is an alternative implementation of the core Win32 subsystem components. Technical information about implementation details is available at this page: [[Arwinss technical]].
 
'''Arwinss''' is an alternative implementation of the core Win32 subsystem components. Technical information about implementation details is available at this page: [[Arwinss technical]].
  
 
== Usage ==
 
== Usage ==
  
Checkout the arwinss branch ({{Svn-server}}reactos/branches/arwinss/reactos), and compile using following command:
+
Before continuing, I'd recommend a separate build folder for building Arwinss. Otherwise you'll have to revert the Arwinss changes and rebuild ReactOS.
makex comctl32 user32 gdi32 win32k winent win32csr freetype kernel32 explorer winlogon
 
  
This will build all needed modules of a new subsystem, which you need to copy over to the installed ReactOS version (see [[Transfer files from the host OS to the virtual drive]]). A modified KERNEL32.DLL is needed only for a compatible global atoms support.
+
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 updated patch). Afterwards, you can compile using the normal build commands:
 +
ninja
 +
ninja bootcd
 +
ninja livecd
 +
ninja hybridcd
  
If you want to build winex11 module, you need to firstly copy <tt>lib/3rdparty/libX11/libX11.a</tt> file from your working copy to the <tt>obj-i386/lib/3rdparty/libX11</tt> directory (creating it if it does not exist). This will fix the winex11.drv linking issues, and you can just type
+
This will build a copy of trunk with the alternate subsystem enabled.
  makex winex11
+
 
 +
If you want to build the winex11 module, you must first copy the <tt>lib/3rdparty/libX11/libX11.a</tt> file from your working copy to the <tt>obj-i386/lib/3rdparty/libX11</tt> 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.
 
to build this optional module.
  
 
== 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:
 
 
[[Image:arwinss.png]]
 
  
 +
[[File:arwinss.png]]
  
 
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>dll/3rdparty/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>dll/win32/user32</tt> - implements USER API
+
* <tt>arwinss/client/user32</tt> implements USER API
* <tt>dll/win32/gdi32</tt> - implements GDI API
+
* <tt>arwinss/client/gdi32</tt> implements GDI API
* <tt>dll/win32/winent.drv</tt> - implements native graphics and user drivers
+
* <tt>arwinss/client/winent.drv/winent.drv</tt> implements native graphics and user drivers
* <tt>dll/win32/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
* <tt>subsystems/win32/win32k</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>subsystems/win32/csrss/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
  
 
== Hacking ==
 
== Hacking ==
Line 37: Line 42:
 
== 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):
* {{bug|933}} "OO.114 - Installation wizard with blank text"
+
 
* {{bug|1175}} "listbox does not hide scrollbars in listbox"
+
{{REACTOSBUG|1101}}
* {{bug|1239}} "Winamp's Main Window Unclickable"
+
 
* {{bug|1546}} "Two carets on the screen at one with two edit areas opened"
+
{{REACTOSBUG|9612}}
* {{bug|1776}} "Microsoft remote desktop client can't connect, computername can't be entered"
+
 
* {{bug|2393}} "Firefox 1.5 Download, you need move the mouse."
+
<del>{{REACTOSBUG|9984}}</del>
* {{bug|2769}} "Redraw bug using ShowWindow for a child window of a dialog"
 
* {{bug|2788}} "Wrong right click behaviour - unwanted multiple selection"
 
* {{bug|2835}} "Opera 9.64: Unable to locate timer in message queue for W..."
 
* {{bug|3500}} "Charmap redrawing bug"
 
* {{bug|3542}} "background image is clipped in some installers (abiword) in first page"
 
* {{bug|3893}} "Properties for Date/Time: mouse pointer disappears"
 
* {{bug|3966}} "can't hit enter on a selected item to open it"
 
* {{bug|4443}} "Firefox 3 - Can't scroll page with mouse wheel."
 
* {{bug|4501}} "When closing one window, Firefox gets restored if it was minimized"
 
* {{bug|4612}} "tn5250: can't move window"
 
* {{bug|4779}} "K-Meleon popup menus don't work"
 
* {{bug|5069}} "JPEG artifacts in installers"
 
  
 
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 ==
+
== TODO list ==
 +
 
 +
1. <del>Fix redrawing issues {{ARWINSSBUG|19}} and {{ARWINSSBUG|26}}</del>
 +
 
 +
2. <del>Fix crash that prevents booting in VirtualBox</del>
 +
 
 +
3. <del>Fix installer/uninstaller crash {{ARWINSSBUG|75}}</del>
 +
 
 +
4. Fix garbage on desktop after closing some apps {{ARWINSSBUG|63}}
 +
 
 +
5. <del>Fix zoom and tabs in Firefox {{ARWINSSBUG|76}}</del>
 +
 
 +
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 ==
 +
 
 +
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 [https://sourceforge.net/projects/reactos/files/Arwinss/ here].
 +
 
 +
<gallery>
 +
File:Roslogon2.jpg|Arwinss running in Windows 2003 and connecting to X Windows server on the host Windows 7.
 +
</gallery>
  
'''This list is legacy and will be removed soon! A new place for this is ReactOS Bugzilla (component  "Arwinss") http://www.reactos.org/bugzilla'''
+
== See Also ==
 +
*[https://reactos.org/wiki/images/8/80/Arwinss.pdf Arwinss PDF]
  
# <s>[Fixed] Check situation with desktop and top windows - need to ensure there is no auto "one desktop per application" creation happens!</s>
+
[[Category:Branches]]
# <s>[Fixed] Check all places which use PsLookupThreadByThreadId and fix reference counting</s>
 
# <s>[Fixed] No desktop background (hacked away in win32csr)</s>
 
# <s>[Fixed] Fix absence of a background color in windows, and general lacking of windows painting</s>
 
# <s>[Fixed] Fix a "err:(dll\win32\gdi32\freetype.c:3068) FT_New_Face rets 85" problem, resulting in a hack in RosDrv_GetTextMetrics</s>
 
# <s>[Fixed] Fix RosGdiSelectBitmap with an incorrect user bitmap handle (probably a stock bitmap?)</s>
 
# <s>[Fixed] Make user/kernel handles mapping multithread aware. NOTE: It already was.</s>
 
# <s>[Fixed] Add some real locking to GDI_ObjGetPtr / GDI_ObjRelease. NOTE: Just added multithread safety to GDI_ObjGetPtr, but pointers to objects are not locked in any way, so release is a noop.</s>
 
# <s>[Fixed] Implement surface bits locking for concurrent accesses</s>
 
# <s>[Fixed] Implement mouse cursor support in win32k</s>
 
# <s>[Fixed] Implement user input in win32k and winent.drv</s>
 
# <s>[Fixed] Implement a locking mechanism for GDI kernel mode objects</s>
 
# <s>[Fixed] Add commented out CombinedClipping region back into all graphics operations</s>
 
# <s>[Fixed] Make /CONSOLE booting from working perfectly</s>
 
# <s>[Fixed] Purge user->kernel handles mapping when a process is destroyed</s>
 
# <s>[Fixed] Get rid of hardcoded 800x600 (and 640x480 in monitor functions) display size</s>
 
# <s>[Fixed] Fix black icons problem</s>
 
# <s>[Fixed] Fix mouse cursor being black problem</s>
 
# <s>[Fixed] Implement moving of windows</s>
 
# <s>[Fixed] [Assembla #5]Implement scrolling support</s>
 
# <s>[Fixed]Hang in 2nd stage with "CMP_WaitNoPendingInstallEvents() failed! Rebooting now!"</s>
 
# Enable commented out places in the font output code (ET_OPAQUE, etc)
 
# <s>[Assembla #2]Make win32k/wine/queue.c (timer callback and timeout callback) multithread aware. Right now it doesn't lock its lists</s>
 
# <s>[Fixed] arwinss takes ages to boot on 1st stage and 2nd stage showing: WARNING:  IoReportResourceUsage at ntoskrnl\io\iomgr\iorsrce.c:700 is UNIMPLEMENTED!</s>
 
# Explorer taskbar does not appear automatically
 
# <s>[Fixed] Text displaying issues in cmd</s>
 
# <s>[Fixed]Shutdown isn't working</s>
 
# <s>[Fixed]Some images are flipped horizontally and vertically</s>
 
# Moving windows produces graphical glitches
 
# <s>[Fixed]Minimize, restore and close icons are wrong</s>
 
# <s>[Fixed]Scroll bar arrows and the bar itself aren't displayed correctly</s>
 
# When the taskbar is visible no window is displayed
 
# Implement support for multiple desktops
 
# Implement hotkeys support
 
# can't click on buttons inside groupboxes
 

Latest revision as of 11:27, 12 July 2018

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 (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 updated patch). 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.

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
  • arwinss/client/gdi32 – implements GDI API
  • arwinss/client/winent.drv/winent.drv – implements native graphics and user drivers
  • arwinss/client/winex11.drv/ – implements X11 X-windows graphics and user drivers
  • 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

Potential Benefits

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

CORE-1101

CORE-9612

CORE-9984

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

TODO list

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 font mapping (see bug #57))

9. Fix interaction of windows in apps with few windows (see bug #32)

10. 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