[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

jhoneycutt at apple.com jhoneycutt at apple.com
Wed Dec 22 11:49:30 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit f0dff71165d12016cc947f2a1eb22dce10bfee6c
Author: jhoneycutt at apple.com <jhoneycutt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Aug 8 08:32:18 2010 +0000

    WebKitTestRunner should add the QuickTime dir to the PATH environment
    variable
    https://bugs.webkit.org/show_bug.cgi?id=43686
    
    Reviewed by Dan Bernstein.
    
    * WebKitTestRunner/win/TestControllerWin.cpp:
    (WTR::addQTDirToPATH):
    Copied from DRT.
    (WTR::TestController::platformInitialize):
    Call addQTDirToPath().
    * WebKitTestRunner/win/WebKitTestRunner.vcproj:
    Link to shlwapi.lib for SHGetValue.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64948 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index ff94390..2380e7e 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,19 @@
+2010-08-08  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        WebKitTestRunner should add the QuickTime dir to the PATH environment
+        variable
+        https://bugs.webkit.org/show_bug.cgi?id=43686
+
+        Reviewed by Dan Bernstein.
+
+        * WebKitTestRunner/win/TestControllerWin.cpp:
+        (WTR::addQTDirToPATH):
+        Copied from DRT.
+        (WTR::TestController::platformInitialize):
+        Call addQTDirToPath().
+        * WebKitTestRunner/win/WebKitTestRunner.vcproj:
+        Link to shlwapi.lib for SHGetValue.
+
 2010-08-07  Sam Weinig  <sam at webkit.org>
 
         Reviewed by Maciej Stachowiak.
diff --git a/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp b/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp
index 176ddb4..f650d7f 100644
--- a/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp
+++ b/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp
@@ -27,8 +27,13 @@
 
 #include <fcntl.h>
 #include <io.h>
+#include <shlwapi.h>
+#include <string>
 #include <WebKit2/WKStringCF.h>
 #include <wtf/RetainPtr.h>
+#include <wtf/Vector.h>
+
+using namespace std;
 
 namespace WTR {
 
@@ -38,10 +43,51 @@ const LPWSTR testPluginDirectoryName = L"TestNetscapePlugin_Debug";
 const LPWSTR testPluginDirectoryName = L"TestNetscapePlugin";
 #endif
 
+static void addQTDirToPATH()
+{
+    static LPCWSTR pathEnvironmentVariable = L"PATH";
+    static LPCWSTR quickTimeKeyName = L"Software\\Apple Computer, Inc.\\QuickTime";
+    static LPCWSTR quickTimeSysDir = L"QTSysDir";
+    static bool initialized;
+
+    if (initialized)
+        return;
+    initialized = true;
+
+    // Get the QuickTime dll directory from the registry. The key can be in either HKLM or HKCU.
+    WCHAR qtPath[MAX_PATH];
+    DWORD qtPathBufferLen = sizeof(qtPath);
+    DWORD keyType;
+    HRESULT result = ::SHGetValueW(HKEY_LOCAL_MACHINE, quickTimeKeyName, quickTimeSysDir, &keyType, (LPVOID)qtPath, &qtPathBufferLen);
+    if (result != ERROR_SUCCESS || !qtPathBufferLen || keyType != REG_SZ) {
+        qtPathBufferLen = sizeof(qtPath);
+        result = ::SHGetValueW(HKEY_CURRENT_USER, quickTimeKeyName, quickTimeSysDir, &keyType, (LPVOID)qtPath, &qtPathBufferLen);
+        if (result != ERROR_SUCCESS || !qtPathBufferLen || keyType != REG_SZ)
+            return;
+    }
+
+    // Read the current PATH.
+    DWORD pathSize = ::GetEnvironmentVariableW(pathEnvironmentVariable, 0, 0);
+    Vector<WCHAR> oldPath(pathSize);
+    if (!::GetEnvironmentVariableW(pathEnvironmentVariable, oldPath.data(), oldPath.size()))
+        return;
+
+    // And add the QuickTime dll.
+    wstring newPath;
+    newPath.append(qtPath);
+    newPath.append(L";");
+    newPath.append(oldPath.data(), oldPath.size());
+    ::SetEnvironmentVariableW(pathEnvironmentVariable, newPath.data());
+}
+
 void TestController::platformInitialize()
 {
     _setmode(1, _O_BINARY);
     _setmode(2, _O_BINARY);
+
+    // Add the QuickTime dll directory to PATH or QT 7.6 will fail to initialize on systems
+    // linked with older versions of qtmlclientlib.dll.
+    addQTDirToPATH();
 }
 
 void TestController::initializeInjectedBundlePath()
diff --git a/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj b/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj
index 4802c3a..7375bd4 100644
--- a/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj
+++ b/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj
@@ -56,7 +56,7 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalOptions="/NXCOMPAT"
-				AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
+				AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib shlwapi.lib"
 				SubSystem="1"
 				TargetMachine="1"
 			/>
@@ -128,7 +128,7 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalOptions="/NXCOMPAT"
-				AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
+				AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib shlwapi.lib"
 				SubSystem="1"
 				TargetMachine="1"
 			/>
@@ -199,7 +199,7 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalOptions="/NXCOMPAT"
-				AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
+				AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib shlwapi.lib"
 				SubSystem="1"
 			/>
 			<Tool
@@ -269,7 +269,7 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalOptions="/NXCOMPAT"
-				AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
+				AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib shlwapi.lib"
 				SubSystem="1"
 			/>
 			<Tool

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list