nlataill wrote:
Adding verbosity to actctx.c, it seems that this game is requesting version 8.0.50608.0, which does match major.minor,
but not the whole version number (/major.minor.build.revision)/.

...
According to MSDN, it seems only major.minor is considered for version matching: - http://msdn2.microsoft.com/en-us/library/aa374234.aspx : A version number that changes only in the /build/ or /revision/ parts indicates that the assembly is backward compatible with prior versions. - http://msdn2.microsoft.com/en-us/library/aa375365.aspx: [...] are manifests used to redirect the version of a side-by-side assembly to another compatible version. The version that the assembly is being redirected to should have the same major.minor values as the original version.

I am proposing the following one-liner to ntdll/actctx.c:

[EMAIL PROTECTED]:~/downloads/tmp$ diff -u wine-0.9.49/dlls/ntdll/actctx.c /home/isa/downloads/wine-0.9.49/dlls/ntdll/actctx.c --- wine-0.9.49/dlls/ntdll/actctx.c 2007-11-09 17:56: 12.000000000 +0100 +++ /home/isa/downloads/wine-0.9.49/dlls/ntdll/actctx.c 2007-11-19 21:07:35.000000000 +0100
@@ -1390,8 +1390,8 @@
         if (expected_ai)
         {
             /* FIXME: more tests */
-            if (assembly->type == ASSEMBLY_MANIFEST &&
- memcmp(&assembly->id.version, &expected_ai->version, sizeof(assembly->id.version)))
+            if (assembly->type == ASSEMBLY_MANIFEST &&
+ ((assembly->id.version.major != expected_ai->version.major) || (assembly->id.version.minor != expected_ai->version.minor)) )
             {
                 FIXME("wrong version\n");
                 return FALSE;

With this patch, the manifest (and related DLL) is loading correctly.
This does not prevent my game die shortly after, in D3D code this time. Still work to do ;-)

I think the attached patch is more complete and implements what MSDN states.

--
Rob Shearman

>From fcc34c8653c4f5aab962d26fcd1e029a2869d69f Mon Sep 17 00:00:00 2001
From: Robert Shearman <[EMAIL PROTECTED]>
Date: Tue, 6 Nov 2007 16:15:50 +0000
Subject: [PATCH] ntdll: Make the version checks in parse_assembly_elem consistent with those in lookup_manifest_file.
To: wine-patches <[EMAIL PROTECTED]>

---
 dlls/ntdll/actctx.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c
index 15f87e7..b4b5197 100644
--- a/dlls/ntdll/actctx.c
+++ b/dlls/ntdll/actctx.c
@@ -1391,7 +1391,11 @@ static BOOL parse_assembly_elem(xmlbuf_t* xmlbuf, struct actctx_loader* acl,
         {
             /* FIXME: more tests */
             if (assembly->type == ASSEMBLY_MANIFEST &&
-                memcmp(&assembly->id.version, &expected_ai->version, sizeof(assembly->id.version)))
+                (assembly->id.version.major != expected_ai->version.major ||
+                 assembly->id.version.minor != expected_ai->version.minor ||
+                 assembly->id.version.build < expected_ai->version.build ||
+                 (assembly->id.version.build == expected_ai->version.build &&
+                  assembly->id.version.revision < expected_ai->version.revision)))
             {
                 FIXME("wrong version\n");
                 return FALSE;
-- 
1.5.0



Reply via email to