https://discuss.haiku-os.org/t/my-progress-in-porting-wine/11741
Haiku Community
My progress in porting Wine
Software
X512 December 30, 2021, 9:57pm #1
I found that TLS registers are different in 64 bit Windows (GS) and
Haiku (FS).
NtCurrentTeb()
mov %gs:0x30, %r13
static inline void**
get_tls()
{
void** tls;
__asm__ __volatile__ ("movq %%fs:0, %0" : "=r" (tls));
return tls;
}
So I tried to implement setting GS base in kernel and got some
success.
Cmd is already working. No GUI yet.
Microsoft Windows 6.1.7601
Z:\Haiku\data\packages\wine-6.23>
Z:\Haiku\data\packages\wine-6.23>
Z:\Haiku\data\packages\wine-6.23>
Z:\Haiku\data\packages\wine-6.23>dir
00c4:fixme:file:get_default_drive_device auto detection of DOS devices not supported on this platform
Volume in drive Z has no label.
Volume Serial Number is 5a00-0000
Directory of Z:\Haiku\data\packages\wine-6.23
12/31/2021 6:47 AM
.
12/30/2021 11:27 PM ..
12/4/2021 6:17 AM 16,635 aclocal.m4
12/4/2021 6:17 AM 33,128 ANNOUNCE
12/4/2021 6:17 AM 26,847 AUTHORS
12/30/2021 11:32 PM 908,816 config.log
12/30/2021 11:31 PM 71,114 config.status
12/4/2021 6:17 AM 770,828 configure
12/4/2021 6:17 AM 161,964 configure.ac
12/4/2021 6:17 AM 26,434 COPYING.LIB
12/4/2021 6:17 AM dlls
12/4/2021 6:17 AM documentation
12/30/2021 11:52 PM fonts
12/30/2021 11:52 PM include
12/31/2021 6:29 AM install
12/4/2021 6:17 AM libs
12/4/2021 6:17 AM 824 LICENSE
12/4/2021 6:17 AM 1,324 LICENSE.OLD
12/30/2021 11:51 PM loader
12/4/2021 6:17 AM 8,766 MAINTAINERS
12/31/2021 12:16 AM 16,079,205 Makefile
12/30/2021 11:32 PM nls
12/30/2021 11:32 PM po
12/4/2021 6:17 AM programs
12/4/2021 6:17 AM 5,586 README
12/31/2021 12:16 AM server
12/30/2021 11:42 PM tools
12/4/2021 6:17 AM 18 VERSION
12/4/2021 6:17 AM 2,629 wine
12/4/2021 6:17 AM 2,629 wine64
16 files 18,116,747 bytes
14 directories 0 bytes free
Z:\Haiku\data\packages\wine-6.23>
28 Likes
syd December 30, 2021, 10:56pm #2
This is gonna be good...
If Wine gets ported to Haiku, it would be interesting to see how much
of a jump in interest there would be from the computing community.
7 Likes
X512 December 30, 2021, 11:22pm #3
Patches:
* https://review.haiku-os.org/c/haiku/+/4839
* https://gist.github.com/X547/4a0a6a2aec1ee1994ac1855b90e94195
11 Likes
X512 December 31, 2021, 12:44am #4
I can compile and run programs with MinGW in Wine:
/Haiku/data/packages/wine-6.23> wine cmd
GetCurrentTeb(): 0x67fe0000
002c:fixme:file:get_device_info device info not properly supported on this platform
002c:fixme:ntdll:get_firmware_info info_class SYSTEM_FIRMWARE_TABLE_INFORMATION
002c:fixme:ntdll:get_firmware_info info_class SYSTEM_FIRMWARE_TABLE_INFORMATION
002c:fixme:winsock:unix_getaddrinfo getaddrinfo() not found during build time
002c:err:winediag:getaddrinfo Failed to resolve your host name IP
002c:fixme:winsock:unix_getaddrinfo getaddrinfo() not found during build time
0034:fixme:file:get_device_info device info not properly supported on this platform
003c:fixme:file:get_device_info device info not properly supported on this platform
0048:fixme:file:get_device_info device info not properly supported on this platform
0050:fixme:file:get_device_info device info not properly supported on this platform
0070:fixme:file:get_device_info device info not properly supported on this platform
resolve symbol "XESetCreateGC" returned: -2147478780
0050:err:module:open_builtin_so_file failed to load .so lib "/Haiku/data/packages/wine-6.23/dlls/winex11.drv/winex11.drv.so"
0050:err:explorer:initialize_display_settings Failed to query current display settings for L"\\\\.\\DISPLAY1".
0050:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0050:err:winediag:nodrv_CreateWindow Unknown error (127).
0050:err:systray:initialize_systray Could not create tray window
0050:err:ole:start_rpcss Failed to start RpcSs service
0050:err:ole:start_rpcss Failed to start RpcSs service
003c:err:service:process_send_command receiving command result timed out
003c:fixme:service:scmdatabase_autostart_services Auto-start service L"wineusb" failed to start: 1053
003c:err:service:process_send_command receiving command result timed out
003c:fixme:service:scmdatabase_autostart_services Auto-start service L"winebus" failed to start: 1053
0090:fixme:file:get_device_info device info not properly supported on this platform
00ac:fixme:file:get_device_info device info not properly supported on this platform
005c:err:dnsapi:DllMain No libresolv support, expect problems
0024:fixme:file:get_device_info device info not properly supported on this platform
GetCurrentTeb(): 0x67fe0000
00c4:fixme:file:get_device_info device info not properly supported on this platform
GetCurrentTeb(): 0x67fe0000
00cc:fixme:file:get_device_info device info not properly supported on this platform
Microsoft Windows 6.1.7601
Z:\Haiku\data\packages\wine-6.23>00d8:fixme:file:get_device_info device info not properly supported on this platform
resolve symbol "XESetCreateGC" returned: -2147478780
00d8:err:module:open_builtin_so_file failed to load .so lib "/Haiku/data/packages/wine-6.23/dlls/winex11.drv/winex11.drv.so"
00d8:err:explorer:initialize_display_settings Failed to query current display settings for L"\\\\.\\DISPLAY1".
00d8:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
00d8:err:winediag:nodrv_CreateWindow Unknown error (127).
00d8:err:systray:initialize_systray Could not create tray window
00e8:fixme:file:get_device_info device info not properly supported on this platform
Z:\Haiku\data\packages\wine-6.23>/boot/home/received/mingw64/bin/x86_64-w64-mingw32-gcc.exe Test.c -o Test.exe
GetCurrentTeb(): 0x3e0000
0110:fixme:file:get_device_info device info not properly supported on this platform
GetCurrentTeb(): 0x3e0000
0118:fixme:file:get_device_info device info not properly supported on this platform
0118:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
GetCurrentTeb(): 0x67fe0000
0120:fixme:file:get_device_info device info not properly supported on this platform
GetCurrentTeb(): 0x3e0000
0128:fixme:file:get_device_info device info not properly supported on this platform
0130:fixme:file:get_device_info device info not properly supported on this platform
GetCurrentTeb(): 0x3e0000
Z:\Haiku\data\packages\wine-6.23>Test.exe
GetCurrentTeb(): 0x3e0000
0138:fixme:file:get_device_info device info not properly supported on this platform
C program compiled with Wine on Haiku.
Z:\Haiku\data\packages\wine-6.23>
25 Likes
mazbrili December 31, 2021, 3:08am #5
wowww... superrr :+1: :+1: :+1:
2 Likes
andreas_dr December 31, 2021, 4:26am #6
Amaaaaaazing work.
1 Like
SCollins December 31, 2021, 10:40am #7
That's damn cool
2 Likes
X512 December 31, 2021, 6:26pm #8
After fixing dll.so loading problem, GUI is now working:
screenshot89
25 Likes
dcatt December 31, 2021, 6:55pm #9
You are awesome!
1 Like
X512 December 31, 2021, 6:58pm #10
Some applications:
screenshot90
19 Likes
rjzak December 31, 2021, 7:15pm #11
Beautiful!
With @waddlesplash's Xlibe work, there won't need to be a
Freedesktop-dot-org X window then? It's nice seeing things coming
together :slight_smile:
6 Likes
waddlesplash December 31, 2021, 7:27pm #12
Yes, that's the idea. X512 already sent me an initial log of trying
to compile WINE with Xlibe, there are some things that have to be
implemented and probably work to do once it compiles. I will look at
it down the road.
18 Likes
Diver December 31, 2021, 7:57pm #13
And this is with just one day of work! Simply amazing!
7 Likes
X512 December 31, 2021, 8:49pm #14
screenshot91
12 Likes
x68k December 31, 2021, 10:01pm #15
It cannot be overstated what a huge milestone this is for Haiku. I
can't wait to see this port mature. Great job!
1 Like
greekboy December 31, 2021, 10:46pm #16
Awesome work! Please try Inkscape and Gimp.
* Home
* Categories
* FAQ/Guidelines
* Terms of Service
* Privacy Policy
Powered by Discourse, best viewed with JavaScript enabled