[pkg-wine-party] [SCM] Debian Wine packaging branch, wheezy, updated. wine-1.4-7-302-gb61b690

Alexandre Julliard julliard at winehq.org
Sun Jun 17 20:03:02 UTC 2012


The following commit has been merged in the wheezy branch:
commit acdd865147211aa3a8b167aaae4e82092a461003
Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Mon Mar 12 16:15:31 2012 +1100

    mscoree: Better support RUNTIME_INFO_UPGRADE_VERSION in GetRequestedRuntimeInfo.
    (cherry picked from commit f67d34f7afd405811e25ecc8f46468aa64eb9767)

diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c
index 49fb0ee..e15a638 100644
--- a/dlls/mscoree/metahost.c
+++ b/dlls/mscoree/metahost.c
@@ -1310,11 +1310,21 @@ HRESULT get_runtime_info(LPCWSTR exefile, LPCWSTR version, LPCWSTR config_file,
 
     if (version)
     {
-        return CLRMetaHost_GetRuntime(0, version, &IID_ICLRRuntimeInfo, (void**)result);
+        hr = CLRMetaHost_GetRuntime(0, version, &IID_ICLRRuntimeInfo, (void**)result);
+        if(SUCCEEDED(hr))
+            return hr;
     }
 
     if (runtimeinfo_flags & RUNTIME_INFO_UPGRADE_VERSION)
     {
+        DWORD major, minor, build;
+
+        if (version && !parse_runtime_version(version, &major, &minor, &build))
+        {
+            ERR("Cannot parse %s\n", debugstr_w(version));
+            return CLR_E_SHIM_RUNTIME;
+        }
+
         find_runtimes();
 
         if (legacy)
@@ -1325,8 +1335,16 @@ HRESULT get_runtime_info(LPCWSTR exefile, LPCWSTR version, LPCWSTR config_file,
         while (i--)
         {
             if (runtimes[i].mono_abi_version)
-                return ICLRRuntimeInfo_QueryInterface(&runtimes[i].ICLRRuntimeInfo_iface,
-                        &IID_ICLRRuntimeInfo, (void **)result);
+            {
+                /* Must be greater or equal to the version passed in. */
+                if (!version || ((runtimes[i].major >= major && runtimes[i].minor >= minor && runtimes[i].build >= build) ||
+                     (runtimes[i].major >= major && runtimes[i].minor > minor) ||
+                     (runtimes[i].major > major)))
+                {
+                    return ICLRRuntimeInfo_QueryInterface(&runtimes[i].ICLRRuntimeInfo_iface,
+                            &IID_ICLRRuntimeInfo, (void **)result);
+                }
+            }
         }
 
         if (legacy)

-- 
Debian Wine packaging



More information about the pkg-wine-party mailing list