Created separate dlls for user,gdi,ttydrv,x11drv.
Fixed Winelib argc handling (thanks to Eric Pouech).
This commit is contained in:
parent
9b59da0dd9
commit
1dac57f05f
@ -89,6 +89,7 @@ DLLS = \
|
|||||||
dinput \
|
dinput \
|
||||||
dplayx \
|
dplayx \
|
||||||
dsound \
|
dsound \
|
||||||
|
gdi32 \
|
||||||
icmp \
|
icmp \
|
||||||
imagehlp \
|
imagehlp \
|
||||||
imm32 \
|
imm32 \
|
||||||
@ -120,6 +121,8 @@ DLLS = \
|
|||||||
sound \
|
sound \
|
||||||
stress \
|
stress \
|
||||||
tapi32 \
|
tapi32 \
|
||||||
|
ttydrv \
|
||||||
|
user32 \
|
||||||
version \
|
version \
|
||||||
w32skrnl \
|
w32skrnl \
|
||||||
win87em \
|
win87em \
|
||||||
@ -129,7 +132,8 @@ DLLS = \
|
|||||||
winmm \
|
winmm \
|
||||||
winspool \
|
winspool \
|
||||||
wnaspi32 \
|
wnaspi32 \
|
||||||
wsock32
|
wsock32 \
|
||||||
|
x11drv
|
||||||
|
|
||||||
# Implicit rules
|
# Implicit rules
|
||||||
|
|
||||||
|
10
configure
vendored
10
configure
vendored
@ -6190,6 +6190,7 @@ dlls/dinput/Makefile
|
|||||||
dlls/display/Makefile
|
dlls/display/Makefile
|
||||||
dlls/dplayx/Makefile
|
dlls/dplayx/Makefile
|
||||||
dlls/dsound/Makefile
|
dlls/dsound/Makefile
|
||||||
|
dlls/gdi/Makefile
|
||||||
dlls/icmp/Makefile
|
dlls/icmp/Makefile
|
||||||
dlls/imagehlp/Makefile
|
dlls/imagehlp/Makefile
|
||||||
dlls/imm32/Makefile
|
dlls/imm32/Makefile
|
||||||
@ -6215,6 +6216,8 @@ dlls/shell32/Makefile
|
|||||||
dlls/sound/Makefile
|
dlls/sound/Makefile
|
||||||
dlls/stress/Makefile
|
dlls/stress/Makefile
|
||||||
dlls/tapi32/Makefile
|
dlls/tapi32/Makefile
|
||||||
|
dlls/ttydrv/Makefile
|
||||||
|
dlls/user/Makefile
|
||||||
dlls/version/Makefile
|
dlls/version/Makefile
|
||||||
dlls/win32s/Makefile
|
dlls/win32s/Makefile
|
||||||
dlls/win87em/Makefile
|
dlls/win87em/Makefile
|
||||||
@ -6233,6 +6236,8 @@ dlls/winmm/wavemap/Makefile
|
|||||||
dlls/winmm/wineoss/Makefile
|
dlls/winmm/wineoss/Makefile
|
||||||
dlls/winsock/Makefile
|
dlls/winsock/Makefile
|
||||||
dlls/winspool/Makefile
|
dlls/winspool/Makefile
|
||||||
|
dlls/ttydrv/Makefile
|
||||||
|
dlls/x11drv/Makefile
|
||||||
documentation/Makefile
|
documentation/Makefile
|
||||||
documentation/wine.conf.man
|
documentation/wine.conf.man
|
||||||
documentation/wine.man
|
documentation/wine.man
|
||||||
@ -6408,6 +6413,7 @@ dlls/dinput/Makefile
|
|||||||
dlls/display/Makefile
|
dlls/display/Makefile
|
||||||
dlls/dplayx/Makefile
|
dlls/dplayx/Makefile
|
||||||
dlls/dsound/Makefile
|
dlls/dsound/Makefile
|
||||||
|
dlls/gdi/Makefile
|
||||||
dlls/icmp/Makefile
|
dlls/icmp/Makefile
|
||||||
dlls/imagehlp/Makefile
|
dlls/imagehlp/Makefile
|
||||||
dlls/imm32/Makefile
|
dlls/imm32/Makefile
|
||||||
@ -6433,6 +6439,8 @@ dlls/shell32/Makefile
|
|||||||
dlls/sound/Makefile
|
dlls/sound/Makefile
|
||||||
dlls/stress/Makefile
|
dlls/stress/Makefile
|
||||||
dlls/tapi32/Makefile
|
dlls/tapi32/Makefile
|
||||||
|
dlls/ttydrv/Makefile
|
||||||
|
dlls/user/Makefile
|
||||||
dlls/version/Makefile
|
dlls/version/Makefile
|
||||||
dlls/win32s/Makefile
|
dlls/win32s/Makefile
|
||||||
dlls/win87em/Makefile
|
dlls/win87em/Makefile
|
||||||
@ -6451,6 +6459,8 @@ dlls/winmm/wavemap/Makefile
|
|||||||
dlls/winmm/wineoss/Makefile
|
dlls/winmm/wineoss/Makefile
|
||||||
dlls/winsock/Makefile
|
dlls/winsock/Makefile
|
||||||
dlls/winspool/Makefile
|
dlls/winspool/Makefile
|
||||||
|
dlls/ttydrv/Makefile
|
||||||
|
dlls/x11drv/Makefile
|
||||||
documentation/Makefile
|
documentation/Makefile
|
||||||
documentation/wine.conf.man
|
documentation/wine.conf.man
|
||||||
documentation/wine.man
|
documentation/wine.man
|
||||||
|
@ -952,6 +952,7 @@ dlls/dinput/Makefile
|
|||||||
dlls/display/Makefile
|
dlls/display/Makefile
|
||||||
dlls/dplayx/Makefile
|
dlls/dplayx/Makefile
|
||||||
dlls/dsound/Makefile
|
dlls/dsound/Makefile
|
||||||
|
dlls/gdi/Makefile
|
||||||
dlls/icmp/Makefile
|
dlls/icmp/Makefile
|
||||||
dlls/imagehlp/Makefile
|
dlls/imagehlp/Makefile
|
||||||
dlls/imm32/Makefile
|
dlls/imm32/Makefile
|
||||||
@ -977,6 +978,8 @@ dlls/shell32/Makefile
|
|||||||
dlls/sound/Makefile
|
dlls/sound/Makefile
|
||||||
dlls/stress/Makefile
|
dlls/stress/Makefile
|
||||||
dlls/tapi32/Makefile
|
dlls/tapi32/Makefile
|
||||||
|
dlls/ttydrv/Makefile
|
||||||
|
dlls/user/Makefile
|
||||||
dlls/version/Makefile
|
dlls/version/Makefile
|
||||||
dlls/win32s/Makefile
|
dlls/win32s/Makefile
|
||||||
dlls/win87em/Makefile
|
dlls/win87em/Makefile
|
||||||
@ -995,6 +998,8 @@ dlls/winmm/wavemap/Makefile
|
|||||||
dlls/winmm/wineoss/Makefile
|
dlls/winmm/wineoss/Makefile
|
||||||
dlls/winsock/Makefile
|
dlls/winsock/Makefile
|
||||||
dlls/winspool/Makefile
|
dlls/winspool/Makefile
|
||||||
|
dlls/ttydrv/Makefile
|
||||||
|
dlls/x11drv/Makefile
|
||||||
documentation/Makefile
|
documentation/Makefile
|
||||||
documentation/wine.conf.man
|
documentation/wine.conf.man
|
||||||
documentation/wine.man
|
documentation/wine.man
|
||||||
|
@ -12,6 +12,7 @@ DLLFILES = \
|
|||||||
dinput/libdinput.@LIBEXT@ \
|
dinput/libdinput.@LIBEXT@ \
|
||||||
dplayx/libdplayx.@LIBEXT@ \
|
dplayx/libdplayx.@LIBEXT@ \
|
||||||
dsound/libdsound.@LIBEXT@ \
|
dsound/libdsound.@LIBEXT@ \
|
||||||
|
gdi/libgdi32.@LIBEXT@ \
|
||||||
icmp/libicmp.@LIBEXT@ \
|
icmp/libicmp.@LIBEXT@ \
|
||||||
imagehlp/libimagehlp.@LIBEXT@ \
|
imagehlp/libimagehlp.@LIBEXT@ \
|
||||||
imm32/libimm32.@LIBEXT@ \
|
imm32/libimm32.@LIBEXT@ \
|
||||||
@ -35,6 +36,8 @@ DLLFILES = \
|
|||||||
sound/libsound.@LIBEXT@ \
|
sound/libsound.@LIBEXT@ \
|
||||||
stress/libstress.@LIBEXT@ \
|
stress/libstress.@LIBEXT@ \
|
||||||
tapi32/libtapi32.@LIBEXT@ \
|
tapi32/libtapi32.@LIBEXT@ \
|
||||||
|
ttydrv/libttydrv.@LIBEXT@ \
|
||||||
|
user/libuser32.@LIBEXT@ \
|
||||||
version/libversion.@LIBEXT@ \
|
version/libversion.@LIBEXT@ \
|
||||||
win32s/libw32skrnl.@LIBEXT@ \
|
win32s/libw32skrnl.@LIBEXT@ \
|
||||||
win87em/libwin87em.@LIBEXT@ \
|
win87em/libwin87em.@LIBEXT@ \
|
||||||
@ -52,7 +55,8 @@ DLLFILES = \
|
|||||||
winmm/wavemap/libmsacm.drv.@LIBEXT@ \
|
winmm/wavemap/libmsacm.drv.@LIBEXT@ \
|
||||||
winmm/wineoss/libwineoss.drv.@LIBEXT@ \
|
winmm/wineoss/libwineoss.drv.@LIBEXT@ \
|
||||||
winsock/libwsock32.@LIBEXT@ \
|
winsock/libwsock32.@LIBEXT@ \
|
||||||
winspool/libwinspool.@LIBEXT@
|
winspool/libwinspool.@LIBEXT@ \
|
||||||
|
x11drv/libx11drv.@LIBEXT@
|
||||||
|
|
||||||
# extra names for dlls containing multiple spec files
|
# extra names for dlls containing multiple spec files
|
||||||
EXTRADLLNAMES = \
|
EXTRADLLNAMES = \
|
||||||
@ -60,6 +64,7 @@ EXTRADLLNAMES = \
|
|||||||
commdlg \
|
commdlg \
|
||||||
compobj \
|
compobj \
|
||||||
dplay \
|
dplay \
|
||||||
|
gdi \
|
||||||
lzexpand \
|
lzexpand \
|
||||||
mmsystem \
|
mmsystem \
|
||||||
msvideo \
|
msvideo \
|
||||||
@ -72,6 +77,7 @@ EXTRADLLNAMES = \
|
|||||||
shlwapi \
|
shlwapi \
|
||||||
storage \
|
storage \
|
||||||
typelib \
|
typelib \
|
||||||
|
user \
|
||||||
ver \
|
ver \
|
||||||
w32sys \
|
w32sys \
|
||||||
win32s16 \
|
win32s16 \
|
||||||
@ -108,6 +114,9 @@ libdplayx.@LIBEXT@ libdplay.@LIBEXT@: dplayx/libdplayx.@LIBEXT@
|
|||||||
libdsound.@LIBEXT@: dsound/libdsound.@LIBEXT@
|
libdsound.@LIBEXT@: dsound/libdsound.@LIBEXT@
|
||||||
$(RM) $@ && $(LN_S) dsound/libdsound.@LIBEXT@ $@
|
$(RM) $@ && $(LN_S) dsound/libdsound.@LIBEXT@ $@
|
||||||
|
|
||||||
|
libgdi32.@LIBEXT@ libgdi.@LIBEXT@: gdi/libgdi32.@LIBEXT@
|
||||||
|
$(RM) $@ && $(LN_S) gdi/libgdi32.@LIBEXT@ $@
|
||||||
|
|
||||||
libicmp.@LIBEXT@: icmp/libicmp.@LIBEXT@
|
libicmp.@LIBEXT@: icmp/libicmp.@LIBEXT@
|
||||||
$(RM) $@ && $(LN_S) icmp/libicmp.@LIBEXT@ $@
|
$(RM) $@ && $(LN_S) icmp/libicmp.@LIBEXT@ $@
|
||||||
|
|
||||||
@ -201,6 +210,12 @@ libstress.@LIBEXT@: stress/libstress.@LIBEXT@
|
|||||||
libtapi32.@LIBEXT@: tapi32/libtapi32.@LIBEXT@
|
libtapi32.@LIBEXT@: tapi32/libtapi32.@LIBEXT@
|
||||||
$(RM) $@ && $(LN_S) tapi32/libtapi32.@LIBEXT@ $@
|
$(RM) $@ && $(LN_S) tapi32/libtapi32.@LIBEXT@ $@
|
||||||
|
|
||||||
|
libttydrv.@LIBEXT@: ttydrv/libttydrv.@LIBEXT@
|
||||||
|
$(RM) $@ && $(LN_S) ttydrv/libttydrv.@LIBEXT@ $@
|
||||||
|
|
||||||
|
libuser32.@LIBEXT@ libuser.@LIBEXT@: user/libuser32.@LIBEXT@
|
||||||
|
$(RM) $@ && $(LN_S) user/libuser32.@LIBEXT@ $@
|
||||||
|
|
||||||
libversion.@LIBEXT@ libver.@LIBEXT@: version/libversion.@LIBEXT@
|
libversion.@LIBEXT@ libver.@LIBEXT@: version/libversion.@LIBEXT@
|
||||||
$(RM) $@ && $(LN_S) version/libversion.@LIBEXT@ $@
|
$(RM) $@ && $(LN_S) version/libversion.@LIBEXT@ $@
|
||||||
|
|
||||||
@ -231,6 +246,9 @@ libwnaspi32.@LIBEXT@ libwinaspi.@LIBEXT@: winaspi/libwnaspi32.@LIBEXT@
|
|||||||
libwsock32.@LIBEXT@ libwinsock.@LIBEXT@: winsock/libwsock32.@LIBEXT@
|
libwsock32.@LIBEXT@ libwinsock.@LIBEXT@: winsock/libwsock32.@LIBEXT@
|
||||||
$(RM) $@ && $(LN_S) winsock/libwsock32.@LIBEXT@ $@
|
$(RM) $@ && $(LN_S) winsock/libwsock32.@LIBEXT@ $@
|
||||||
|
|
||||||
|
libx11drv.@LIBEXT@: x11drv/libx11drv.@LIBEXT@
|
||||||
|
$(RM) $@ && $(LN_S) x11drv/libx11drv.@LIBEXT@ $@
|
||||||
|
|
||||||
$(DLLFILES): dummy
|
$(DLLFILES): dummy
|
||||||
@cd `dirname $@` && $(MAKE)
|
@cd `dirname $@` && $(MAKE)
|
||||||
|
|
||||||
|
4
dlls/gdi/.cvsignore
Normal file
4
dlls/gdi/.cvsignore
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
*.spec.c
|
||||||
|
*.spec.glue.s
|
||||||
|
Makefile
|
||||||
|
libgdi32.so.1.0
|
17
dlls/gdi/Makefile.in
Normal file
17
dlls/gdi/Makefile.in
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
TOPSRCDIR = @top_srcdir@
|
||||||
|
TOPOBJDIR = ../..
|
||||||
|
SRCDIR = @srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
MODULE = gdi32
|
||||||
|
SOVERSION = 1.0
|
||||||
|
ALTNAMES = gdi
|
||||||
|
|
||||||
|
SPEC_SRCS = gdi32.spec gdi.spec
|
||||||
|
|
||||||
|
C_SRCS = \
|
||||||
|
gdi_main.c
|
||||||
|
|
||||||
|
@MAKE_DLL_RULES@
|
||||||
|
|
||||||
|
### Dependencies:
|
||||||
|
|
51
dlls/gdi/gdi_main.c
Normal file
51
dlls/gdi/gdi_main.c
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
* GDI initialization code
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "windef.h"
|
||||||
|
#include "wingdi.h"
|
||||||
|
#include "wine/winbase16.h"
|
||||||
|
|
||||||
|
#include "gdi.h"
|
||||||
|
#include "global.h"
|
||||||
|
#include "module.h"
|
||||||
|
#include "psdrv.h"
|
||||||
|
#include "tweak.h"
|
||||||
|
#include "win16drv.h"
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* GDI initialisation routine
|
||||||
|
*/
|
||||||
|
BOOL WINAPI MAIN_GdiInit(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
|
{
|
||||||
|
NE_MODULE *pModule;
|
||||||
|
|
||||||
|
if ( GDI_HeapSel ) return TRUE;
|
||||||
|
|
||||||
|
/* Create GDI heap */
|
||||||
|
pModule = NE_GetPtr( GetModuleHandle16( "GDI" ) );
|
||||||
|
if ( pModule )
|
||||||
|
{
|
||||||
|
GDI_HeapSel = GlobalHandleToSel16( (NE_SEG_TABLE( pModule ) +
|
||||||
|
pModule->dgroup - 1)->hSeg );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GDI_HeapSel = GlobalAlloc16( GMEM_FIXED, GDI_HEAP_SIZE );
|
||||||
|
LocalInit16( GDI_HeapSel, 0, GDI_HEAP_SIZE-1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!TWEAK_Init()) return FALSE;
|
||||||
|
|
||||||
|
/* GDI initialisation */
|
||||||
|
if(!GDI_Init()) return FALSE;
|
||||||
|
|
||||||
|
/* Create the Win16 printer driver */
|
||||||
|
if (!WIN16DRV_Init()) return FALSE;
|
||||||
|
|
||||||
|
/* PSDRV initialization */
|
||||||
|
if(!PSDRV_Init()) return FALSE;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
4
dlls/ttydrv/.cvsignore
Normal file
4
dlls/ttydrv/.cvsignore
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
*.spec.c
|
||||||
|
*.spec.glue.s
|
||||||
|
Makefile
|
||||||
|
libttydrv.so.1.0
|
16
dlls/ttydrv/Makefile.in
Normal file
16
dlls/ttydrv/Makefile.in
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
TOPSRCDIR = @top_srcdir@
|
||||||
|
TOPOBJDIR = ../..
|
||||||
|
SRCDIR = @srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
MODULE = ttydrv
|
||||||
|
SOVERSION = 1.0
|
||||||
|
|
||||||
|
SPEC_SRCS = ttydrv.spec
|
||||||
|
|
||||||
|
C_SRCS = \
|
||||||
|
ttydrv_main.c
|
||||||
|
|
||||||
|
@MAKE_DLL_RULES@
|
||||||
|
|
||||||
|
### Dependencies:
|
||||||
|
|
3
dlls/ttydrv/ttydrv.spec
Normal file
3
dlls/ttydrv/ttydrv.spec
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
name ttydrv
|
||||||
|
type win32
|
||||||
|
init TTYDRV_Init
|
22
dlls/ttydrv/ttydrv_main.c
Normal file
22
dlls/ttydrv/ttydrv_main.c
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* TTYDRV initialization code
|
||||||
|
*/
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "winbase.h"
|
||||||
|
#include "gdi.h"
|
||||||
|
#include "user.h"
|
||||||
|
#include "ttydrv.h"
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* TTYDRV initialisation routine
|
||||||
|
*/
|
||||||
|
BOOL WINAPI TTYDRV_Init( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
||||||
|
{
|
||||||
|
if (reason == DLL_PROCESS_ATTACH)
|
||||||
|
{
|
||||||
|
GDI_Driver = &TTYDRV_GDI_Driver;
|
||||||
|
USER_Driver = &TTYDRV_USER_Driver;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
4
dlls/user/.cvsignore
Normal file
4
dlls/user/.cvsignore
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
*.spec.c
|
||||||
|
*.spec.glue.s
|
||||||
|
Makefile
|
||||||
|
libuser32.so.1.0
|
17
dlls/user/Makefile.in
Normal file
17
dlls/user/Makefile.in
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
TOPSRCDIR = @top_srcdir@
|
||||||
|
TOPOBJDIR = ../..
|
||||||
|
SRCDIR = @srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
MODULE = user32
|
||||||
|
SOVERSION = 1.0
|
||||||
|
ALTNAMES = user
|
||||||
|
|
||||||
|
SPEC_SRCS = user32.spec user.spec
|
||||||
|
|
||||||
|
C_SRCS = \
|
||||||
|
user_main.c
|
||||||
|
|
||||||
|
@MAKE_DLL_RULES@
|
||||||
|
|
||||||
|
### Dependencies:
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
name user32
|
name user32
|
||||||
type win32
|
type win32
|
||||||
init MAIN_UserInit
|
init USER_Init
|
||||||
rsrc user32
|
rsrc user32
|
||||||
|
|
||||||
1 stdcall ActivateKeyboardLayout(long long) ActivateKeyboardLayout
|
1 stdcall ActivateKeyboardLayout(long long) ActivateKeyboardLayout
|
108
dlls/user/user_main.c
Normal file
108
dlls/user/user_main.c
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
/*
|
||||||
|
* USER initialization code
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "windef.h"
|
||||||
|
#include "wingdi.h"
|
||||||
|
#include "winuser.h"
|
||||||
|
#include "wine/winbase16.h"
|
||||||
|
|
||||||
|
#include "cursoricon.h"
|
||||||
|
#include "dce.h"
|
||||||
|
#include "dialog.h"
|
||||||
|
#include "display.h"
|
||||||
|
#include "global.h"
|
||||||
|
#include "input.h"
|
||||||
|
#include "keyboard.h"
|
||||||
|
#include "menu.h"
|
||||||
|
#include "message.h"
|
||||||
|
#include "module.h"
|
||||||
|
#include "mouse.h"
|
||||||
|
#include "queue.h"
|
||||||
|
#include "spy.h"
|
||||||
|
#include "sysmetrics.h"
|
||||||
|
#include "user.h"
|
||||||
|
#include "win.h"
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* USER initialisation routine
|
||||||
|
*/
|
||||||
|
BOOL WINAPI USER_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
|
{
|
||||||
|
NE_MODULE *pModule;
|
||||||
|
int queueSize;
|
||||||
|
|
||||||
|
if ( USER_HeapSel ) return TRUE;
|
||||||
|
|
||||||
|
/* Create USER heap */
|
||||||
|
pModule = NE_GetPtr( GetModuleHandle16( "USER" ) );
|
||||||
|
if ( pModule )
|
||||||
|
{
|
||||||
|
USER_HeapSel = GlobalHandleToSel16( (NE_SEG_TABLE( pModule ) +
|
||||||
|
pModule->dgroup - 1)->hSeg );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
USER_HeapSel = GlobalAlloc16( GMEM_FIXED, 0x10000 );
|
||||||
|
LocalInit16( USER_HeapSel, 0, 0xffff );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Global atom table initialisation */
|
||||||
|
if (!ATOM_Init( USER_HeapSel )) return FALSE;
|
||||||
|
|
||||||
|
/* Initialize window handling (critical section) */
|
||||||
|
WIN_Init();
|
||||||
|
|
||||||
|
/* Initialize system colors and metrics*/
|
||||||
|
SYSMETRICS_Init();
|
||||||
|
SYSCOLOR_Init();
|
||||||
|
|
||||||
|
/* Create the DCEs */
|
||||||
|
DCE_Init();
|
||||||
|
|
||||||
|
/* Initialize timers */
|
||||||
|
if (!TIMER_Init()) return FALSE;
|
||||||
|
|
||||||
|
/* Initialize window procedures */
|
||||||
|
if (!WINPROC_Init()) return FALSE;
|
||||||
|
|
||||||
|
/* Initialize cursor/icons */
|
||||||
|
CURSORICON_Init();
|
||||||
|
|
||||||
|
/* Initialize built-in window classes */
|
||||||
|
if (!WIDGETS_Init()) return FALSE;
|
||||||
|
|
||||||
|
/* Initialize dialog manager */
|
||||||
|
if (!DIALOG_Init()) return FALSE;
|
||||||
|
|
||||||
|
/* Initialize menus */
|
||||||
|
if (!MENU_Init()) return FALSE;
|
||||||
|
|
||||||
|
/* Initialize message spying */
|
||||||
|
if (!SPY_Init()) return FALSE;
|
||||||
|
|
||||||
|
/* Create system message queue */
|
||||||
|
queueSize = GetProfileIntA( "windows", "TypeAhead", 120 );
|
||||||
|
if (!QUEUE_CreateSysMsgQueue( queueSize )) return FALSE;
|
||||||
|
|
||||||
|
/* Set double click time */
|
||||||
|
SetDoubleClickTime( GetProfileIntA("windows","DoubleClickSpeed",452) );
|
||||||
|
|
||||||
|
/* Create message queue of initial thread */
|
||||||
|
InitThreadInput16( 0, 0 );
|
||||||
|
|
||||||
|
/* Create desktop window */
|
||||||
|
if (!WIN_CreateDesktopWindow()) return FALSE;
|
||||||
|
|
||||||
|
/* Initialize keyboard driver */
|
||||||
|
KEYBOARD_Enable( keybd_event, InputKeyStateTable );
|
||||||
|
|
||||||
|
/* Initialize mouse driver */
|
||||||
|
MOUSE_Enable( mouse_event );
|
||||||
|
|
||||||
|
/* Start processing X events */
|
||||||
|
UserRepaintDisable16( FALSE );
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
4
dlls/x11drv/.cvsignore
Normal file
4
dlls/x11drv/.cvsignore
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
*.spec.c
|
||||||
|
*.spec.glue.s
|
||||||
|
Makefile
|
||||||
|
libx11drv.so.1.0
|
16
dlls/x11drv/Makefile.in
Normal file
16
dlls/x11drv/Makefile.in
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
TOPSRCDIR = @top_srcdir@
|
||||||
|
TOPOBJDIR = ../..
|
||||||
|
SRCDIR = @srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
MODULE = x11drv
|
||||||
|
SOVERSION = 1.0
|
||||||
|
|
||||||
|
SPEC_SRCS = x11drv.spec
|
||||||
|
|
||||||
|
C_SRCS = \
|
||||||
|
x11drv_main.c
|
||||||
|
|
||||||
|
@MAKE_DLL_RULES@
|
||||||
|
|
||||||
|
### Dependencies:
|
||||||
|
|
3
dlls/x11drv/x11drv.spec
Normal file
3
dlls/x11drv/x11drv.spec
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
name x11drv
|
||||||
|
type win32
|
||||||
|
init X11DRV_Init
|
22
dlls/x11drv/x11drv_main.c
Normal file
22
dlls/x11drv/x11drv_main.c
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* X11DRV initialization code
|
||||||
|
*/
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "winbase.h"
|
||||||
|
#include "gdi.h"
|
||||||
|
#include "user.h"
|
||||||
|
#include "x11drv.h"
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* X11DRV initialisation routine
|
||||||
|
*/
|
||||||
|
BOOL WINAPI X11DRV_Init( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
||||||
|
{
|
||||||
|
if (reason == DLL_PROCESS_ATTACH)
|
||||||
|
{
|
||||||
|
GDI_Driver = &X11DRV_GDI_Driver;
|
||||||
|
USER_Driver = &X11DRV_USER_Driver;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
@ -3,7 +3,6 @@ call16.s
|
|||||||
comm.spec.c
|
comm.spec.c
|
||||||
ddeml.spec.c
|
ddeml.spec.c
|
||||||
dispdib.spec.c
|
dispdib.spec.c
|
||||||
gdi.spec.c
|
|
||||||
kernel.spec.c
|
kernel.spec.c
|
||||||
keyboard.spec.c
|
keyboard.spec.c
|
||||||
ole2conv.spec.c
|
ole2conv.spec.c
|
||||||
@ -13,7 +12,5 @@ ole2thk.spec.c
|
|||||||
system.spec.c
|
system.spec.c
|
||||||
thunk.glue.c
|
thunk.glue.c
|
||||||
toolhelp.spec.c
|
toolhelp.spec.c
|
||||||
user.spec.c
|
|
||||||
wineps.spec.c
|
wineps.spec.c
|
||||||
winsock.spec.c
|
|
||||||
wprocs.spec.c
|
wprocs.spec.c
|
||||||
|
@ -9,7 +9,6 @@ SPEC_SRCS = \
|
|||||||
comm.spec \
|
comm.spec \
|
||||||
ddeml.spec \
|
ddeml.spec \
|
||||||
dispdib.spec \
|
dispdib.spec \
|
||||||
gdi.spec \
|
|
||||||
kernel.spec \
|
kernel.spec \
|
||||||
keyboard.spec \
|
keyboard.spec \
|
||||||
ole2conv.spec \
|
ole2conv.spec \
|
||||||
@ -18,7 +17,6 @@ SPEC_SRCS = \
|
|||||||
ole2thk.spec \
|
ole2thk.spec \
|
||||||
system.spec \
|
system.spec \
|
||||||
toolhelp.spec \
|
toolhelp.spec \
|
||||||
user.spec \
|
|
||||||
wineps.spec \
|
wineps.spec \
|
||||||
wprocs.spec
|
wprocs.spec
|
||||||
|
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
|
|
||||||
extern BOOL MAIN_MainInit( int *argc, char *argv[], BOOL win32 );
|
extern BOOL MAIN_MainInit( int argc, char *argv[], BOOL win32 );
|
||||||
extern BOOL MAIN_WineInit( int *argc, char *argv[] );
|
extern BOOL MAIN_WineInit( int argc, char *argv[] );
|
||||||
extern HINSTANCE MAIN_WinelibInit( int *argc, char *argv[] );
|
extern HINSTANCE MAIN_WinelibInit( int *argc, char *argv[] );
|
||||||
extern int MAIN_GetLanguageID(char*lang, char*country, char*charset, char*dialect);
|
extern int MAIN_GetLanguageID(char*lang, char*country, char*charset, char*dialect);
|
||||||
extern void MAIN_ParseDebugOptions(const char *options);
|
extern void MAIN_ParseDebugOptions(const char *options);
|
||||||
|
125
loader/main.c
125
loader/main.c
@ -60,7 +60,7 @@ DEFAULT_DEBUG_CHANNEL(server)
|
|||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* Main initialisation routine
|
* Main initialisation routine
|
||||||
*/
|
*/
|
||||||
BOOL MAIN_MainInit( int *argc, char *argv[], BOOL win32 )
|
BOOL MAIN_MainInit( int argc, char *argv[], BOOL win32 )
|
||||||
{
|
{
|
||||||
/* store the program name */
|
/* store the program name */
|
||||||
argv0 = argv[0];
|
argv0 = argv[0];
|
||||||
@ -108,6 +108,8 @@ BOOL MAIN_MainInit( int *argc, char *argv[], BOOL win32 )
|
|||||||
if (!LoadLibrary16( "KRNL386.EXE" )) return FALSE;
|
if (!LoadLibrary16( "KRNL386.EXE" )) return FALSE;
|
||||||
if (!LoadLibraryA( "KERNEL32" )) return FALSE;
|
if (!LoadLibraryA( "KERNEL32" )) return FALSE;
|
||||||
|
|
||||||
|
if (!LoadLibraryA( "x11drv" )) return FALSE;
|
||||||
|
|
||||||
/* Initialize event handling */
|
/* Initialize event handling */
|
||||||
if (!EVENT_Init()) return FALSE;
|
if (!EVENT_Init()) return FALSE;
|
||||||
|
|
||||||
@ -168,124 +170,6 @@ BOOL WINAPI MAIN_KernelInit(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReser
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* GDI initialisation routine
|
|
||||||
*/
|
|
||||||
BOOL WINAPI MAIN_GdiInit(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|
||||||
{
|
|
||||||
NE_MODULE *pModule;
|
|
||||||
|
|
||||||
if ( GDI_HeapSel ) return TRUE;
|
|
||||||
|
|
||||||
/* Create GDI heap */
|
|
||||||
pModule = NE_GetPtr( GetModuleHandle16( "GDI" ) );
|
|
||||||
if ( pModule )
|
|
||||||
{
|
|
||||||
GDI_HeapSel = GlobalHandleToSel16( (NE_SEG_TABLE( pModule ) +
|
|
||||||
pModule->dgroup - 1)->hSeg );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
GDI_HeapSel = GlobalAlloc16( GMEM_FIXED, GDI_HEAP_SIZE );
|
|
||||||
LocalInit16( GDI_HeapSel, 0, GDI_HEAP_SIZE-1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!TWEAK_Init()) return FALSE;
|
|
||||||
|
|
||||||
/* GDI initialisation */
|
|
||||||
if(!GDI_Init()) return FALSE;
|
|
||||||
|
|
||||||
/* Create the Win16 printer driver */
|
|
||||||
if (!WIN16DRV_Init()) return FALSE;
|
|
||||||
|
|
||||||
/* PSDRV initialization */
|
|
||||||
if(!PSDRV_Init()) return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* USER initialisation routine
|
|
||||||
*/
|
|
||||||
BOOL WINAPI MAIN_UserInit(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|
||||||
{
|
|
||||||
NE_MODULE *pModule;
|
|
||||||
int queueSize;
|
|
||||||
|
|
||||||
if ( USER_HeapSel ) return TRUE;
|
|
||||||
|
|
||||||
/* Create USER heap */
|
|
||||||
pModule = NE_GetPtr( GetModuleHandle16( "USER" ) );
|
|
||||||
if ( pModule )
|
|
||||||
{
|
|
||||||
USER_HeapSel = GlobalHandleToSel16( (NE_SEG_TABLE( pModule ) +
|
|
||||||
pModule->dgroup - 1)->hSeg );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
USER_HeapSel = GlobalAlloc16( GMEM_FIXED, 0x10000 );
|
|
||||||
LocalInit16( USER_HeapSel, 0, 0xffff );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Global atom table initialisation */
|
|
||||||
if (!ATOM_Init( USER_HeapSel )) return FALSE;
|
|
||||||
|
|
||||||
/* Initialize window handling (critical section) */
|
|
||||||
WIN_Init();
|
|
||||||
|
|
||||||
/* Initialize system colors and metrics*/
|
|
||||||
SYSMETRICS_Init();
|
|
||||||
SYSCOLOR_Init();
|
|
||||||
|
|
||||||
/* Create the DCEs */
|
|
||||||
DCE_Init();
|
|
||||||
|
|
||||||
/* Initialize timers */
|
|
||||||
if (!TIMER_Init()) return FALSE;
|
|
||||||
|
|
||||||
/* Initialize window procedures */
|
|
||||||
if (!WINPROC_Init()) return FALSE;
|
|
||||||
|
|
||||||
/* Initialize cursor/icons */
|
|
||||||
CURSORICON_Init();
|
|
||||||
|
|
||||||
/* Initialize built-in window classes */
|
|
||||||
if (!WIDGETS_Init()) return FALSE;
|
|
||||||
|
|
||||||
/* Initialize dialog manager */
|
|
||||||
if (!DIALOG_Init()) return FALSE;
|
|
||||||
|
|
||||||
/* Initialize menus */
|
|
||||||
if (!MENU_Init()) return FALSE;
|
|
||||||
|
|
||||||
/* Initialize message spying */
|
|
||||||
if (!SPY_Init()) return FALSE;
|
|
||||||
|
|
||||||
/* Create system message queue */
|
|
||||||
queueSize = GetProfileIntA( "windows", "TypeAhead", 120 );
|
|
||||||
if (!QUEUE_CreateSysMsgQueue( queueSize )) return FALSE;
|
|
||||||
|
|
||||||
/* Set double click time */
|
|
||||||
SetDoubleClickTime( GetProfileIntA("windows","DoubleClickSpeed",452) );
|
|
||||||
|
|
||||||
/* Create message queue of initial thread */
|
|
||||||
InitThreadInput16( 0, 0 );
|
|
||||||
|
|
||||||
/* Create desktop window */
|
|
||||||
if (!WIN_CreateDesktopWindow()) return FALSE;
|
|
||||||
|
|
||||||
/* Initialize keyboard driver */
|
|
||||||
KEYBOARD_Enable( keybd_event, InputKeyStateTable );
|
|
||||||
|
|
||||||
/* Initialize mouse driver */
|
|
||||||
MOUSE_Enable( mouse_event );
|
|
||||||
|
|
||||||
/* Start processing X events */
|
|
||||||
UserRepaintDisable16( FALSE );
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* Winelib initialisation routine
|
* Winelib initialisation routine
|
||||||
@ -296,7 +180,8 @@ HINSTANCE MAIN_WinelibInit( int *argc, char *argv[] )
|
|||||||
HMODULE16 hModule;
|
HMODULE16 hModule;
|
||||||
|
|
||||||
/* Main initialization */
|
/* Main initialization */
|
||||||
if (!MAIN_MainInit( argc, argv, TRUE )) return 0;
|
if (!MAIN_MainInit( *argc, argv, TRUE )) return 0;
|
||||||
|
*argc = Options.argc;
|
||||||
|
|
||||||
/* Load WineLib EXE module */
|
/* Load WineLib EXE module */
|
||||||
if ( (hModule = BUILTIN32_LoadExeModule()) < 32 ) return 0;
|
if ( (hModule = BUILTIN32_LoadExeModule()) < 32 ) return 0;
|
||||||
|
16
misc/main.c
16
misc/main.c
@ -654,8 +654,8 @@ static void called_at_exit(void)
|
|||||||
*
|
*
|
||||||
* Wine initialisation and command-line parsing
|
* Wine initialisation and command-line parsing
|
||||||
*/
|
*/
|
||||||
BOOL MAIN_WineInit( int *argc, char *argv[] )
|
BOOL MAIN_WineInit( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
|
||||||
#ifdef MALLOC_DEBUGGING
|
#ifdef MALLOC_DEBUGGING
|
||||||
@ -680,17 +680,7 @@ BOOL MAIN_WineInit( int *argc, char *argv[] )
|
|||||||
gettimeofday( &tv, NULL);
|
gettimeofday( &tv, NULL);
|
||||||
MSG_WineStartTicks = (tv.tv_sec * 1000) + (tv.tv_usec / 1000);
|
MSG_WineStartTicks = (tv.tv_sec * 1000) + (tv.tv_usec / 1000);
|
||||||
|
|
||||||
OPTIONS_ParseOptions( *argc, argv );
|
OPTIONS_ParseOptions( argc, argv );
|
||||||
|
|
||||||
#ifndef X_DISPLAY_MISSING
|
|
||||||
USER_Driver = &X11DRV_USER_Driver;
|
|
||||||
#else /* !defined(X_DISPLAY_MISSING) */
|
|
||||||
USER_Driver = &TTYDRV_USER_Driver;
|
|
||||||
#endif /* !defined(X_DISPLAY_MISSING) */
|
|
||||||
|
|
||||||
USER_Driver->pInitialize();
|
|
||||||
|
|
||||||
MONITOR_Initialize(&MONITOR_PrimaryMonitor);
|
|
||||||
|
|
||||||
atexit(called_at_exit);
|
atexit(called_at_exit);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -109,7 +109,7 @@ int main( int argc, char *argv[] )
|
|||||||
NE_MODULE *pModule;
|
NE_MODULE *pModule;
|
||||||
|
|
||||||
/* Initialize everything */
|
/* Initialize everything */
|
||||||
if (!MAIN_MainInit( &argc, argv, FALSE )) return 1;
|
if (!MAIN_MainInit( argc, argv, FALSE )) return 1;
|
||||||
|
|
||||||
/* Create initial task */
|
/* Create initial task */
|
||||||
if ( !(pModule = NE_GetPtr( GetModuleHandle16( "KERNEL" ) )) ) return 1;
|
if ( !(pModule = NE_GetPtr( GetModuleHandle16( "KERNEL" ) )) ) return 1;
|
||||||
|
@ -6,12 +6,6 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#ifndef X_DISPLAY_MISSING
|
|
||||||
#include "x11drv.h"
|
|
||||||
#else /* !defined(X_DISPLAY_MISSING) */
|
|
||||||
#include "ttydrv.h"
|
|
||||||
#endif /* !defined(X_DISPLAY_MISSING */
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
@ -346,12 +340,6 @@ BOOL GDI_Init(void)
|
|||||||
|
|
||||||
/* Initialize drivers */
|
/* Initialize drivers */
|
||||||
|
|
||||||
#ifndef X_DISPLAY_MISSING
|
|
||||||
GDI_Driver = &X11DRV_GDI_Driver;
|
|
||||||
#else /* !defined(X_DISPLAY_MISSING) */
|
|
||||||
GDI_Driver = &TTYDRV_GDI_Driver;
|
|
||||||
#endif /* !defined(X_DISPLAY_MISSING */
|
|
||||||
|
|
||||||
GDI_Driver->pInitialize();
|
GDI_Driver->pInitialize();
|
||||||
|
|
||||||
/* Create default palette */
|
/* Create default palette */
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
Makefile
|
Makefile
|
||||||
call32.s
|
call32.s
|
||||||
ddraw.spec.c
|
|
||||||
dinput.spec.c
|
|
||||||
gdi32.spec.c
|
|
||||||
kernel32.spec.c
|
kernel32.spec.c
|
||||||
user32.spec.c
|
|
||||||
wow32.spec.c
|
wow32.spec.c
|
||||||
wsock32.spec.c
|
|
||||||
|
@ -6,9 +6,7 @@ VPATH = @srcdir@
|
|||||||
MODULE = relay32
|
MODULE = relay32
|
||||||
|
|
||||||
SPEC_SRCS = \
|
SPEC_SRCS = \
|
||||||
gdi32.spec \
|
|
||||||
kernel32.spec \
|
kernel32.spec \
|
||||||
user32.spec \
|
|
||||||
wow32.spec
|
wow32.spec
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
|
#include "user.h"
|
||||||
|
#include "x11drv.h"
|
||||||
|
#include "ttydrv.h"
|
||||||
|
#include "monitor.h"
|
||||||
#include "debugtools.h"
|
#include "debugtools.h"
|
||||||
|
|
||||||
DECLARE_DEBUG_CHANNEL(event)
|
DECLARE_DEBUG_CHANNEL(event)
|
||||||
@ -21,6 +25,10 @@ EVENT_DRIVER *EVENT_Driver = NULL;
|
|||||||
*/
|
*/
|
||||||
BOOL EVENT_Init(void)
|
BOOL EVENT_Init(void)
|
||||||
{
|
{
|
||||||
|
USER_Driver->pInitialize();
|
||||||
|
|
||||||
|
MONITOR_Initialize(&MONITOR_PrimaryMonitor);
|
||||||
|
|
||||||
return EVENT_Driver->pInit();
|
return EVENT_Driver->pInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user