[Wine] Re: SUSE 9.1 wine 0.9.12 problem
ilija01 at gmail.com
ilija01 at gmail.com
Sun Apr 30 18:00:25 CDT 2006
OK here is the patch "wine-0.9.12.diff" :
diff -ruN -x CVS wine-0.9.12/dlls/gdi/freetype.c
marcus-wine-0.9.12/dlls/gdi/freetype.c
--- wine-0.9.12/dlls/gdi/freetype.c 2006-04-12 18:10:49.000000000 +0200
+++ marcus-wine-0.9.12/dlls/gdi/freetype.c 2006-04-12
18:09:47.000000000 +0200
@@ -699,9 +699,17 @@
int i, bitmap_num, internal_leading;
FONTSIGNATURE fs;
+ /* ethiopian font which says it is regular, but it isn't. */
+ if (strstr(file,"GohaTibebZemen.ttf"))
+ return FALSE;
+ /* koffice-wordprocessing brings esstix* which appear as
symbol/greek fonts */
+ if (strstr(file,"esstix"))
+ return FALSE;
+
do {
char *family_name = fake_family;
+
TRACE("Loading font file %s index %ld\n", debugstr_a(file),
face_index);
if((err = pFT_New_Face(library, file, face_index, &ft_face)) != 0) {
WARN("Unable to load font file %s err = %x\n", debugstr_a(file),
err);
diff -ruN -x CVS wine-0.9.12/dlls/ntdll/exception.c
marcus-wine-0.9.12/dlls/ntdll/exception.c
--- wine-0.9.12/dlls/ntdll/exception.c 2006-04-12 18:10:53.000000000
+0200
+++ marcus-wine-0.9.12/dlls/ntdll/exception.c 2006-04-10
18:07:46.000000000 +0200
@@ -312,6 +312,11 @@
rec->ExceptionCode, rec->ExceptionFlags,
rec->ExceptionAddress );
for (c = 0; c < rec->NumberParameters; c++)
TRACE( " info[%ld]=%08lx\n", c,
rec->ExceptionInformation[c] );
+ if (rec->ExceptionCode == STATUS_ILLEGAL_INSTRUCTION)
+ {
+ unsigned char *x = rec->ExceptionAddress;
+ FIXME("illegal instruction at %p, %02x %02x %02x %02x %02x %02x %02x
%02x\n",x,x[0],x[1],x[2],x[3],x[4],x[5],x[6],x[7]);
+ }
if (rec->ExceptionCode == EXCEPTION_WINE_STUB)
{
if (rec->ExceptionInformation[1] >> 16)
diff -ruN -x CVS wine-0.9.12/dlls/opengl32/wgl.c
marcus-wine-0.9.12/dlls/opengl32/wgl.c
--- wine-0.9.12/dlls/opengl32/wgl.c 2006-03-30 11:47:50.000000000 +0200
+++ marcus-wine-0.9.12/dlls/opengl32/wgl.c 2006-03-31
11:54:59.000000000 +0200
@@ -535,15 +535,29 @@
BOOL ret;
DWORD type = GetObjectType(hdc);
- TRACE("(%p,%p)\n", hdc, hglrc);
+ FIXME("(%p,%p)\n", hdc, hglrc);
ENTER_GL();
if (hglrc == NULL) {
ret = glXMakeCurrent(default_display, None, NULL);
NtCurrentTeb()->glContext = NULL;
} else {
+ POINT pt;
Wine_GLContext *ctx = (Wine_GLContext *) hglrc;
Drawable drawable = get_drawable( hdc );
+ int ret;
+
+ memset( &pt, 0, sizeof(pt));
+ if (GetViewportOrgEx (hdc, &pt)) FIXME("GWOEX failed\n");
+ FIXME("worg is %d.%dn", pt.x, pt.y);
+ if (GetViewportExtEx (hdc, &pt)) FIXME("GWEEX failed\n");
+ FIXME("wext is %d.%dn", pt.x, pt.y);
+
+ if (IsBadReadPtr(ctx,sizeof(*ctx))) {
+ ERR("hglrc is bad (%p)\n", hglrc);
+ return FALSE;
+ }
+
if (ctx->ctx == NULL) {
int draw_vis_id, ctx_vis_id;
VisualID visualid = (VisualID)GetPropA( GetDesktopWindow(),
"__wine_x11_visual_id" );
@@ -569,7 +583,7 @@
}
TRACE(" created a delayed OpenGL context (%p)\n", ctx->ctx);
}
- TRACE(" make current for dis %p, drawable %p, ctx %p\n",
ctx->display, (void*) drawable, ctx->ctx);
+ FIXME(" make current for dis %p, drawable %p, ctx %p\n",
ctx->display, (void*) drawable, ctx->ctx);
ret = glXMakeCurrent(ctx->display, drawable, ctx->ctx);
NtCurrentTeb()->glContext = ctx;
if(ret && type == OBJ_MEMDC)
diff -ruN -x CVS wine-0.9.12/libs/wine/mmap.c
marcus-wine-0.9.12/libs/wine/mmap.c
--- wine-0.9.12/libs/wine/mmap.c 2006-02-15 17:42:21.000000000 +0100
+++ marcus-wine-0.9.12/libs/wine/mmap.c 2006-02-08 16:46:47.000000000
+0100
@@ -301,6 +301,7 @@
}
}
+#if 0
if (stack_ptr >= user_space_limit)
{
char *base = stack_ptr - ((unsigned int)stack_ptr &
granularity_mask) - (granularity_mask + 1);
@@ -314,6 +315,7 @@
reserve_area( base, 0 );
}
else reserve_area( user_space_limit, 0 );
+#endif
#endif /* __i386__ */
/* reserve the DOS area if not already done */
diff -ruN -x CVS wine-0.9.12/loader/preloader.c
marcus-wine-0.9.12/loader/preloader.c
--- wine-0.9.12/loader/preloader.c 2006-04-13 13:36:23.000000000 +0200
+++ marcus-wine-0.9.12/loader/preloader.c 2006-04-13 13:47:28.000000000
+0200
@@ -208,6 +208,14 @@
return SYSCALL_RET(ret);
}
+static inline int wld_personality( int perso )
+{
+ int ret;
+ __asm__ __volatile__( "pushl %%ebx; movl %2,%%ebx; int $0x80; popl
%%ebx"
+ : "=a" (ret) : "0" (SYS_personality), "r"
(perso) );
+ return SYSCALL_RET(ret);
+}
+
static inline ssize_t wld_read( int fd, void *buffer, size_t len )
{
int ret;
@@ -226,6 +234,14 @@
return SYSCALL_RET(ret);
}
+static inline int wld_execve( const char * path, char **argv, char **
envp )
+{
+ int ret;
+ __asm__ __volatile__( "pushl %%ebx; movl %2,%%ebx; int $0x80; popl
%%ebx"
+ : "=a" (ret) : "0" (SYS_execve), "r" (path),
"c" (argv), "d" (envp) );
+ return SYSCALL_RET(ret);
+}
+
static inline int wld_mprotect( const void *addr, size_t len, int prot
)
{
int ret;
@@ -914,6 +930,7 @@
ElfW(auxv_t) new_av[12], delete_av[3], *av;
struct wld_link_map main_binary_map, ld_so_map;
struct wine_preload_info **wine_main_preload_info;
+ unsigned int perso;
pargc = *stack;
argv = (char **)pargc + 1;
@@ -922,6 +939,19 @@
/* skip over the parameters */
p = argv + *pargc + 1;
+ perso = wld_personality(0xffffffff);
+ if (!(perso & 0x200000)) {
+ unsigned int newperso;
+ wld_personality(perso | 0x200000);
+ newperso = wld_personality(0xffffffff);
+ /* only execve() if the personality changed, otherwise we will loop
*/
+ if (newperso != perso) {
+ wld_execve(argv[0],argv,p);
+ fatal_error( "Failed execve %s\n", argv[0] );
+ return NULL;
+ }
+ }
+
/* skip over the environment */
while (*p)
{
diff -ruN -x CVS wine-0.9.12/programs/winecfg/audio.c
marcus-wine-0.9.12/programs/winecfg/audio.c
--- wine-0.9.12/programs/winecfg/audio.c 2006-04-12 18:11:03.000000000
+0200
+++ marcus-wine-0.9.12/programs/winecfg/audio.c 2006-04-12
18:09:59.000000000 +0200
@@ -589,7 +589,7 @@
buf = get_reg_key(config_key, "Drivers", "Audio", NULL);
/* check for first time install and set a default driver
- * select in this order: oss, alsa, first available driver, none
+ * select in this order: alsa, oss, first available driver, none
*/
if (buf == NULL)
{
@@ -598,9 +598,9 @@
/* select oss if available */
for (pAudioDrv = loadedAudioDrv; *pAudioDrv->szName;
pAudioDrv++)
{
- if (strcmp(pAudioDrv->szDriver, "oss") == 0)
+ if (strcmp(pAudioDrv->szDriver, "alsa") == 0)
{
- selectDriver(hDlg, "oss");
+ selectDriver(hDlg, "alsa");
break;
}
}
@@ -610,9 +610,9 @@
/* select alsa if available */
for (pAudioDrv = loadedAudioDrv; *pAudioDrv->szName;
pAudioDrv++)
{
- if (strcmp(pAudioDrv->szDriver, "alsa") == 0)
+ if (strcmp(pAudioDrv->szDriver, "oss") == 0)
{
- selectDriver(hDlg, "alsa");
+ selectDriver(hDlg, "oss");
break;
}
}
diff -ruN -x CVS wine-0.9.12/server/registry.c
marcus-wine-0.9.12/server/registry.c
--- wine-0.9.12/server/registry.c 2006-04-12 18:11:04.000000000 +0200
+++ marcus-wine-0.9.12/server/registry.c 2006-04-07 14:00:07.000000000
+0200
@@ -1623,7 +1623,7 @@
for (;;)
{
sprintf( p, "reg%lx%04x.tmp", (long) getpid(), count++ );
- if ((fd = open( tmp, O_CREAT | O_EXCL | O_WRONLY, 0666 )) !=
-1) break;
+ if ((fd = open( tmp, O_CREAT | O_EXCL | O_WRONLY, 0600 )) !=
-1) break;
if (errno != EEXIST) goto done;
close( fd );
}
diff -ruN -x CVS wine-0.9.12/tools/wineprefixcreate.in
marcus-wine-0.9.12/tools/wineprefixcreate.in
--- wine-0.9.12/tools/wineprefixcreate.in 2006-03-23 11:29:23.000000000
+0100
+++ marcus-wine-0.9.12/tools/wineprefixcreate.in 2006-03-23
11:26:24.000000000 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# Script to create the initial WINEPREFIX directory
#
@@ -145,6 +145,33 @@
[ -d "$WINEPREFIX/drive_c" ] || mkdir "$WINEPREFIX/drive_c"
ln -s "../drive_c" "$WINEPREFIX/dosdevices/c:"
ln -s "/" "$WINEPREFIX/dosdevices/z:"
+ ln -s "/tmp" "$WINEPREFIX/dosdevices/x:"
+ if [ -d "$HOME" ]; then
+ ln -s "$HOME" "$WINEPREFIX/dosdevices/y:"
+ if [ ! -f "$HOME/.windows-label" ]; then
+ echo "HOME" > "$HOME/.windows-label"
+ fi
+ fi
+ # autodetect CD-ROMS on SUSE.
+ drive=D
+ shopt -s nullglob
+ for i in /media/* ; do
+ bn=`basename $i`
+ if [ "$i" = "/media/floppy" ]; then
+ ln -s /media/floppy "$WINEPREFIX/dosdevices/a:"
+ ln -s /dev/fd0 "$WINEPREFIX/dosdevices/a::"
+ fi
+ if echo $bn| grep -E -v "^(sd|usb-storage|floppy)" >/dev/null;
then
+ ln -s /media/$bn "$WINEPREFIX/dosdevices/"`echo $drive|tr "[A-Z]"
"[a-z]"`:
+ ln -s /dev/$bn "$WINEPREFIX/dosdevices/"`echo $drive|tr "[A-Z]"
"[a-z]"`::
+ drive=`echo $drive|tr "D-L" "E-M"`
+ fi
+ done
+ ln -s /dev/ttyS0 "$WINEPREFIX/dosdevices/com1"
+ ln -s /dev/ttyS1 "$WINEPREFIX/dosdevices/com2"
+ ln -s /dev/ttyS2 "$WINEPREFIX/dosdevices/com3"
+ ln -s /dev/ttyS3 "$WINEPREFIX/dosdevices/com4"
+ ln -s /dev/lp0 "$WINEPREFIX/dosdevices/lpt1"
fi
CROOT="$WINEPREFIX/dosdevices/c:"
More information about the wine-users
mailing list