Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 35309 Details for
Bug 44654
nwwine: providing a working environment?
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
/usr/portage/games-emulation/nwwine/files/nwwine-patch-against-20040615.diff-dwh
nwwine-patch-against-20040615.diff-dwh (text/plain), 19.30 KB, created by
crusaderky
on 2004-07-13 05:36:43 UTC
(
hide
)
Description:
/usr/portage/games-emulation/nwwine/files/nwwine-patch-against-20040615.diff-dwh
Filename:
MIME Type:
Creator:
crusaderky
Created:
2004-07-13 05:36:43 UTC
Size:
19.30 KB
patch
obsolete
>diff -X exclude.lst -cr wine-20040615/configure wine-20040615-nwwine/configure >*** wine-20040615/configure 2004-03-09 22:37:58.000000000 -0500 >--- wine-20040615-nwwine/configure 2004-03-19 21:39:18.000000000 -0500 >*************** >*** 267,276 **** > : ${ac_max_here_lines=38} > > # Identity of this package. >! PACKAGE_NAME='Wine' >! PACKAGE_TARNAME='wine' > PACKAGE_VERSION='20040615' >! PACKAGE_STRING='Wine 20040615' > PACKAGE_BUGREPORT='wine-devel@winehq.org' > > ac_unique_file="server/atom.c" >--- 267,276 ---- > : ${ac_max_here_lines=38} > > # Identity of this package. >! PACKAGE_NAME='NWWine' >! PACKAGE_TARNAME='nwwine' > PACKAGE_VERSION='20040615' >! PACKAGE_STRING='NWWine based on Wine 20040615' > PACKAGE_BUGREPORT='wine-devel@winehq.org' > > ac_unique_file="server/atom.c" >*************** >*** 21750,21755 **** >--- 21750,21808 ---- > echo "*** enable Wine to use TrueType fonts." > fi > >+ echo -n "checking if Makefile can be patched safely... " >+ if >+ cat patch-Makefile | patch -p0 --dry-run Makefile >/dev/null 2>/dev/null >+ then >+ echo "yes" >+ cat patch-Makefile | patch -p0 Makefile >+ cat append-Makefile >> Makefile >+ else >+ echo "no" >+ echo >+ echo "Patch to Makefile to make it install script to run NWwine with" >+ echo "toolset hacks for some reason could not be applied. Looks like" >+ echo "you'll have to do it yourself. The following two commands should" >+ echo "take care of it:" >+ echo "cp ./nwwine.sh /usr/local/bin/nwwine" >+ echo "chmod a+x /usr/local/bin/nwwine" >+ fi >+ echo >+ echo >+ echo "This is NWWine - version of Wine designed to run BioWare's" >+ echo "Neverwinter Nights Toolset." >+ echo >+ echo "IMPORTANT NOTE: since nwwine-based-on-20030318 NWWine is" >+ echo "Wine-compatible. For end user this means two things:" >+ echo "1. To enable toolset hacks you *must* use " >+ echo "\"nwwine nwtoolset.exe\" instead of the usual \"wine nwtoolset.exe\"" >+ echo "2. You no longer have to keep regular Wine for other applications" >+ echo "and NWWine for the toolset - NWWine when run with the standard" >+ echo "\"wine app.exe\" behaves just like regular Wine on which it is based." >+ echo "ONLY running \"nwwine app.exe\" enables the hacks used to get the " >+ echo "toolset to work." >+ echo >+ echo "NWWine based on Wine 20030618 introduces another version of fix" >+ echo "which makes the OpenGL window draw correctly, submitted by a community" >+ echo "member Yann. This fix has been submitted to Winehq.org team as well," >+ echo "for inclusion in official Wine tree. However the folks at Winehq.org" >+ echo "apparently weren't sure if it doesn't break other things, as it" >+ echo "didn't yet make it to the official Wine tree. It still needs testing," >+ echo "in which YOU shall participate ;). In order to test the fix, please" >+ echo "run ALL your normal Wine applications using:" >+ echo "\"nwwine-gltest application.exe\" " >+ echo "instead of the normal:" >+ echo "\"wine application.exe\"" >+ echo "and look for any breakage." >+ echo "The toolset should still be run with" >+ echo "\"nwwine nwtoolset.exe\"" >+ echo "as it needs also other hacks to work" >+ echo "\"wine application.exe\" should work like the one from official Wine" >+ echo "tree." >+ echo "Please submit reports of success or failure to BioWare NWN Linux" >+ echo "forum, to NWWine thread" >+ echo "For further details, see nwwine and nwwine-gltest wrapper scripts." >+ > echo > echo "Configure finished. Do 'make depend && make' to compile Wine." > echo >diff -X exclude.lst -cr wine-20040615/controls/menu.c wine-20040615-nwwine/controls/menu.c >*** wine-20040615/controls/menu.c 2004-02-17 15:29:05.000000000 -0500 >--- wine-20040615-nwwine/controls/menu.c 2004-03-19 21:40:09.000000000 -0500 >*************** >*** 3648,3653 **** >--- 3648,3661 ---- > HMENU WINAPI GetMenu( HWND hWnd ) > { > HMENU retvalue = (HMENU)GetWindowLongW( hWnd, GWL_ID ); >+ >+ if (getenv("WINE_NWTOOLSET_HACK_ENABLE") != NULL || getenv("WINE_NWTOOLSET_HACK_ENABLE_M") != NULL) >+ { >+ POPUPMENU* pmenu = MENU_GetMenu( retvalue ); >+ if(pmenu && !pmenu->hWnd) >+ pmenu->hWnd = hWnd; >+ }; >+ > TRACE("for %p returning %p\n", hWnd, retvalue); > return retvalue; > } >diff -X exclude.lst -cr wine-20040615/dlls/ntdll/signal_i386.c wine-20040615-nwwine/dlls/ntdll/signal_i386.c >*** wine-20040615/dlls/ntdll/signal_i386.c 2004-02-23 20:21:56.000000000 -0500 >--- wine-20040615-nwwine/dlls/ntdll/signal_i386.c 2004-03-19 21:42:05.000000000 -0500 >*************** >*** 1043,1051 **** > */ > static HANDLER_DEF(fpe_handler) > { >! EXCEPTION_RECORD *rec = setup_exception( HANDLER_CONTEXT, raise_fpu_exception ); > CONTEXT *context; > > context = get_exception_context( rec ); > save_fpu( context, HANDLER_CONTEXT ); > >--- 1043,1055 ---- > */ > static HANDLER_DEF(fpe_handler) > { >! EXCEPTION_RECORD *rec; > CONTEXT *context; > >+ if (getenv("WINE_NWTOOLSET_HACK_ENABLE") == NULL && getenv("WINE_NWTOOLSET_HACK_ENABLE_EH") == NULL) >+ { >+ rec = setup_exception( HANDLER_CONTEXT, raise_fpu_exception ); >+ > context = get_exception_context( rec ); > save_fpu( context, HANDLER_CONTEXT ); > >*************** >*** 1066,1071 **** >--- 1070,1076 ---- > rec->ExceptionCode = EXCEPTION_FLT_INVALID_OPERATION; > break; > } >+ } > } > > >diff -X exclude.lst -cr wine-20040615/dlls/opengl32/wgl.c wine-20040615-nwwine/dlls/opengl32/wgl.c >*** wine-20040615/dlls/opengl32/wgl.c 2004-02-24 20:25:49.000000000 -0500 >--- wine-20040615-nwwine/dlls/opengl32/wgl.c 2004-03-19 21:44:37.000000000 -0500 >*************** >*** 44,49 **** >--- 44,50 ---- > X11DRV_GET_DISPLAY, /* get X11 display for a DC */ > X11DRV_GET_DRAWABLE, /* get current drawable for a DC */ > X11DRV_GET_FONT, /* get current X font for a DC */ >+ X11DRV_GET_GLDRAWABLE,/* get current GL drawable for a DC */ > }; > > void (*wine_tsx11_lock_ptr)(void) = NULL; >*************** >*** 125,130 **** >--- 126,141 ---- > return drawable; > } > >+ /* retrieve the X drawable to use on a given DC (nwwine version) */ >+ inline static Drawable get_gldrawable( HDC hdc ) >+ { >+ Drawable drawable; >+ enum x11drv_escape_codes escape = X11DRV_GET_GLDRAWABLE; >+ >+ if (!ExtEscape( hdc, X11DRV_ESCAPE, sizeof(escape), (LPCSTR)&escape, >+ sizeof(drawable), (LPSTR)&drawable )) drawable = 0; >+ return drawable; >+ } > > /* retrieve the X drawable to use on a given DC */ > inline static Font get_font( HDC hdc ) >*************** >*** 425,431 **** > ret = glXMakeCurrent(default_display, None, NULL); > } else { > Wine_GLContext *ctx = (Wine_GLContext *) hglrc; >! Drawable drawable = get_drawable( hdc ); > > if (ctx->ctx == NULL) { > ctx->ctx = glXCreateContext(ctx->display, ctx->vis, NULL, True); >--- 436,451 ---- > ret = glXMakeCurrent(default_display, None, NULL); > } else { > Wine_GLContext *ctx = (Wine_GLContext *) hglrc; >! Drawable drawable; >! >! if (getenv("WINE_NWTOOLSET_HACK_ENABLE_WINv2") != NULL || getenv("WINE_NWTOOLSET_HACK_ENABLE") != NULL) >! { >! drawable = get_gldrawable( hdc ); >! } >! else >! { >! drawable = get_drawable( hdc ); >! } > > if (ctx->ctx == NULL) { > ctx->ctx = glXCreateContext(ctx->display, ctx->vis, NULL, True); >diff -X exclude.lst -cr wine-20040615/dlls/user/hook.c wine-20040615-nwwine/dlls/user/hook.c >*** wine-20040615/dlls/user/hook.c 2003-11-26 17:29:31.000000000 -0500 >--- wine-20040615-nwwine/dlls/user/hook.c 2004-03-19 21:45:17.000000000 -0500 >*************** >*** 601,607 **** > */ > void WINAPI NotifyWinEvent(DWORD dwEvent, HWND hWnd, LONG nId, LONG nChildId) > { >! FIXME("(%ld,%p,%ld,%ld)-stub!\n", dwEvent, hWnd, nId, nChildId); > } > > >--- 601,607 ---- > */ > void WINAPI NotifyWinEvent(DWORD dwEvent, HWND hWnd, LONG nId, LONG nChildId) > { >! /* FIXME("(%ld,%p,%ld,%ld)-stub!\n", dwEvent, hWnd, nId, nChildId); */ > } > > >diff -X exclude.lst -cr wine-20040615/dlls/x11drv/init.c wine-20040615-nwwine/dlls/x11drv/init.c >*** wine-20040615/dlls/x11drv/init.c 2004-03-04 01:26:11.000000000 -0500 >--- wine-20040615-nwwine/dlls/x11drv/init.c 2004-03-19 22:19:20.000000000 -0500 >*************** >*** 282,287 **** >--- 282,294 ---- > return TRUE; > } > break; >+ case X11DRV_GET_GLDRAWABLE: >+ if (out_count >= sizeof(Drawable)) >+ { >+ *(Drawable *)out_data = physDev->gldrawable; >+ return TRUE; >+ } >+ break; > case X11DRV_SET_DRAWABLE: > if (in_count >= sizeof(struct x11drv_escape_set_drawable)) > { >*************** >*** 296,301 **** >--- 303,323 ---- > return TRUE; > } > break; >+ case X11DRV_SET_DRAWABLE_NWN: >+ if (in_count >= sizeof(struct x11drv_escape_set_drawable)) >+ { >+ struct x11drv_escape_set_drawable *data = (struct x11drv_escape_set_drawable *)in_data; >+ if(physDev->xrender) X11DRV_XRender_UpdateDrawable( physDev ); >+ physDev->org = data->org; >+ physDev->drawable = data->drawable; >+ physDev->gldrawable = data->gldrawable; >+ physDev->drawable_org = data->drawable_org; >+ wine_tsx11_lock(); >+ XSetSubwindowMode( gdi_display, physDev->gc, data->mode ); >+ wine_tsx11_unlock(); >+ return TRUE; >+ } >+ break; > case X11DRV_START_EXPOSURES: > wine_tsx11_lock(); > XSetGraphicsExposures( gdi_display, physDev->gc, True ); >diff -X exclude.lst -cr wine-20040615/dlls/x11drv/opengl.c wine-20040615-nwwine/dlls/x11drv/opengl.c >*** wine-20040615/dlls/x11drv/opengl.c 2004-01-20 17:48:57.000000000 -0500 >--- wine-20040615-nwwine/dlls/x11drv/opengl.c 2004-03-19 22:10:04.000000000 -0500 >*************** >*** 400,406 **** > TRACE("(%p)\n", physDev); > > wine_tsx11_lock(); >! pglXSwapBuffers(gdi_display, physDev->drawable); > wine_tsx11_unlock(); > > return TRUE; >--- 400,413 ---- > TRACE("(%p)\n", physDev); > > wine_tsx11_lock(); >! if (getenv("WINE_NWTOOLSET_HACK_ENABLE_WINv2") == NULL && getenv("WINE_NWTOOLSET_HACK_ENABLE") == NULL) >! { >! pglXSwapBuffers(gdi_display, physDev->drawable); >! } >! else >! { >! pglXSwapBuffers(gdi_display, physDev->gldrawable); >! } > wine_tsx11_unlock(); > > return TRUE; >diff -X exclude.lst -cr wine-20040615/dlls/x11drv/winpos.c wine-20040615-nwwine/dlls/x11drv/winpos.c >*** wine-20040615/dlls/x11drv/winpos.c 2004-02-12 22:58:21.000000000 -0500 >--- wine-20040615-nwwine/dlls/x11drv/winpos.c 2004-03-19 22:21:05.000000000 -0500 >*************** >*** 426,431 **** >--- 426,432 ---- > HWND top = 0; > X11DRV_WND_DATA *data = win->pDriverData; > struct x11drv_escape_set_drawable escape; >+ Drawable gldrawable; > BOOL visible; > > escape.mode = IncludeInferiors; >*************** >*** 459,465 **** > > if (top) > { >! HWND parent = GetAncestor( top, GA_PARENT ); > escape.org.x = escape.org.y = 0; > if (flags & DCX_WINDOW) > { >--- 460,480 ---- > > if (top) > { >! HWND parent; >! if (getenv("WINE_NWTOOLSET_HACK_ENABLE_WINv2") == NULL && getenv("WINE_NWTOOLSET_HACK_ENABLE") == NULL && getenv("WINE_NWTOOLSET_HACK_ENABLE_WIN") != NULL) >! { >! parent = top; >! } >! if (getenv("WINE_NWTOOLSET_HACK_ENABLE_WINv2") != NULL || getenv("WINE_NWTOOLSET_HACK_ENABLE") != NULL) >! { >! gldrawable=X11DRV_get_client_window(top); >! parent = GetAncestor( top, GA_PARENT ); >! } >! if (getenv("WINE_NWTOOLSET_HACK_ENABLE_WIN") == NULL && getenv("WINE_NWTOOLSET_HACK_ENABLE_WINv2") == NULL && getenv("WINE_NWTOOLSET_HACK_ENABLE") == NULL) >! { >! parent = GetAncestor( top, GA_PARENT ); >! } >! > escape.org.x = escape.org.y = 0; > if (flags & DCX_WINDOW) > { >*************** >*** 498,507 **** > escape.drawable_org = escape.org; > if (flags & DCX_CLIPCHILDREN) escape.mode = ClipByChildren; /* can use X11 clipping */ > } > MapWindowPoints( hwnd, 0, &escape.drawable_org, 1 ); > } > >! escape.code = X11DRV_SET_DRAWABLE; > ExtEscape( hdc, X11DRV_ESCAPE, sizeof(escape), (LPSTR)&escape, 0, NULL ); > > if (flags & (DCX_EXCLUDERGN | DCX_INTERSECTRGN) || >--- 513,537 ---- > escape.drawable_org = escape.org; > if (flags & DCX_CLIPCHILDREN) escape.mode = ClipByChildren; /* can use X11 clipping */ > } >+ if (getenv("WINE_NWTOOLSET_HACK_ENABLE_WINv2") != NULL || getenv("WINE_NWTOOLSET_HACK_ENABLE") != NULL) >+ { >+ gldrawable=escape.drawable; >+ } > MapWindowPoints( hwnd, 0, &escape.drawable_org, 1 ); > } > >! if (getenv("WINE_NWTOOLSET_HACK_ENABLE_WINv2") != NULL || getenv("WINE_NWTOOLSET_HACK_ENABLE") != NULL) >! { >! // X11DRV_SetDrawable_NWN( hdc, drawable, mode, &org, &drawable_org, gldrawable ); >! escape.gldrawable = gldrawable; >! escape.code = X11DRV_SET_DRAWABLE_NWN; >! } >! else >! { >! // X11DRV_SetDrawable( hdc, drawable, mode, &org, &drawable_org ); >! escape.code = X11DRV_SET_DRAWABLE; >! } >! > ExtEscape( hdc, X11DRV_ESCAPE, sizeof(escape), (LPSTR)&escape, 0, NULL ); > > if (flags & (DCX_EXCLUDERGN | DCX_INTERSECTRGN) || >*************** >*** 536,542 **** > { > struct x11drv_escape_set_drawable escape; > >! escape.code = X11DRV_SET_DRAWABLE; > escape.drawable = root_window; > escape.mode = IncludeInferiors; > escape.org.x = escape.org.y = 0; >--- 566,582 ---- > { > struct x11drv_escape_set_drawable escape; > >! if (getenv("WINE_NWTOOLSET_HACK_ENABLE_WINv2") != NULL || getenv("WINE_NWTOOLSET_HACK_ENABLE") != NULL) >! { >! escape.code = X11DRV_SET_DRAWABLE_NWN; >! escape.gldrawable = root_window; >! } >! else >! { >! escape.code = X11DRV_SET_DRAWABLE; >! } >! >! > escape.drawable = root_window; > escape.mode = IncludeInferiors; > escape.org.x = escape.org.y = 0; >diff -X exclude.lst -cr wine-20040615/dlls/x11drv/x11drv.h wine-20040615-nwwine/dlls/x11drv/x11drv.h >*** wine-20040615/dlls/x11drv/x11drv.h 2004-03-04 01:13:21.000000000 -0500 >--- wine-20040615-nwwine/dlls/x11drv/x11drv.h 2004-03-19 22:20:01.000000000 -0500 >*************** >*** 88,93 **** >--- 88,94 ---- > HDC hdc; > GC gc; /* X Window GC */ > Drawable drawable; >+ Drawable gldrawable; > POINT org; /* DC origin relative to drawable */ > POINT drawable_org; /* Origin of drawable relative to screen */ > HRGN region; /* Device region (visible region & clip region) */ >*************** >*** 339,345 **** >--- 340,348 ---- > X11DRV_GET_DISPLAY, /* get X11 display for a DC */ > X11DRV_GET_DRAWABLE, /* get current drawable for a DC */ > X11DRV_GET_FONT, /* get current X font for a DC */ >+ X11DRV_GET_GLDRAWABLE, /* get current GL drawable for a DC */ > X11DRV_SET_DRAWABLE, /* set current drawable for a DC */ >+ X11DRV_SET_DRAWABLE_NWN, /* set current drawable for a DC */ > X11DRV_START_EXPOSURES, /* start graphics exposures */ > X11DRV_END_EXPOSURES, /* end graphics exposures */ > }; >*************** >*** 348,353 **** >--- 351,357 ---- > { > enum x11drv_escape_codes code; /* escape code (X11DRV_SET_DRAWABLE) */ > Drawable drawable; /* X drawable */ >+ Drawable gldrawable; /* X drawable */ > int mode; /* ClipByChildren or IncludeInferiors */ > POINT org; /* origin of DC relative to drawable */ > POINT drawable_org; /* origin of drawable relative to screen */ >diff -X exclude.lst -cr wine-20040615/libs/wine/config.c wine-20040615-nwwine/libs/wine/config.c >*** wine-20040615/libs/wine/config.c 2003-11-11 17:21:29.000000000 -0500 >--- wine-20040615-nwwine/libs/wine/config.c 2004-03-19 22:10:41.000000000 -0500 >*************** >*** 35,42 **** > #endif > #include "wine/library.h" > >! static const char server_config_dir[] = "/.wine"; /* config dir relative to $HOME */ >! static const char server_root_prefix[] = "/tmp/.wine-"; /* prefix for server root dir */ > static const char server_dir_prefix[] = "/server-"; /* prefix for server dir */ > > static char *config_dir; >--- 35,42 ---- > #endif > #include "wine/library.h" > >! static const char server_config_dir[] = "/.wine"; /* config dir relative to $HOME */ >! static const char server_root_prefix[] = "/tmp/.wine-"; /* prefix for server root dir */ > static const char server_dir_prefix[] = "/server-"; /* prefix for server dir */ > > static char *config_dir; >*** /dev/null 2003-09-23 13:59:22.000000000 -0400 >--- wine-20040615-nwwine/append-Makefile 2004-03-19 22:11:17.000000000 -0500 >*************** >*** 0 **** >--- 1,8 ---- >+ >+ >+ >+ install-nwwinescript: >+ cp nwwine.sh $(bindir)/nwwine >+ chmod a+rx $(bindir)/nwwine >+ cp nwwine-gltest.sh $(bindir)/nwwine-gltest >+ chmod a+rx $(bindir)/nwwine-gltest >*** /dev/null 2003-09-23 13:59:22.000000000 -0400 >--- wine-20040615-nwwine/nwwine-gltest.sh 2004-03-19 22:11:25.000000000 -0500 >*************** >*** 0 **** >--- 1,9 ---- >+ #!/bin/bash >+ export WINE_NWTOOLSET_HACK_ENABLE_WINv2="yes" >+ # This enables the hack that we hope is actually no longer a hack, but a fix ;) >+ # All other things are left untouched. >+ # For testing purposes only. >+ # NWN Toolset will NOT run properly with this - the menus will be unresponsive. >+ # You can still run "wine application.exe" if you need exactly the behavior of Wine. >+ wine $@ >+ >*** /dev/null 2003-09-23 13:59:22.000000000 -0400 >--- wine-20040615-nwwine/nwwine.sh 2004-03-19 22:11:33.000000000 -0500 >*************** >*** 0 **** >--- 1,25 ---- >+ #!/bin/sh >+ export WINE_NWTOOLSET_HACK_ENABLE_M="yes" >+ >+ #export WINE_NWTOOLSET_HACK_ENABLE_WIN="yes" >+ # The above version is oboslete, though still should work; newer hack (v2) should be used instead: >+ # If both this and v2 environment variables are set, then v2 hack will be used. >+ >+ export WINE_NWTOOLSET_HACK_ENABLE_WINv2="yes" >+ # Note: The above modification is done in a way that (as I understand it) >+ # should NOT break compatibility with other applications. However this still >+ # needs testing before inclusion in official Wine tree, so please consider >+ # running ALL of your applications with this environment variable set, and >+ # not just the toolset, and report successes or failures. >+ >+ export WINE_NWTOOLSET_HACK_ENABLE_EH="yes" >+ >+ >+ >+ >+ # The above environment variables control which NWWine hacks are to be used. >+ # Note: the program checks just if the variables are set, not if they are set to "yes" >+ # This means that setting them to "yes", "blahblahblah", "yEs", or "no" will have the same effect >+ # If WINE_NWTOOLSET_HACK_ENABLE variable is set, then it will make NWWine enable all its hacks >+ # regardless of other variables. >+ wine $@ >*** /dev/null 2003-09-23 13:59:22.000000000 -0400 >--- wine-20040615-nwwine/patch-Makefile 2004-03-19 22:12:00.000000000 -0500 >*************** >*** 0 **** >--- 1,4 ---- >+ 360c360 >+ < install:: install-lib install-dev install-aclocal >+ --- >+ > install:: install-lib install-dev install-aclocal install-nwwinescript
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 44654
:
35308
| 35309 |
35310
|
35311
|
45513