Remove all uses of FindSafari
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Sep 2011 17:47:40 +0000 (17:47 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Sep 2011 17:47:40 +0000 (17:47 +0000)
It isn't really needed anymore.

Fixes <http://webkit.org/b/68626>.

Reviewed by Darin Adler.

* Scripts/old-run-webkit-tests: Moved read/writeRegistryString from here to webkitdirs.pm.

* Scripts/run-webkit-nightly.cmd: Removed. This used to be used to launch nightly builds of
WebKit, but now we use WebKit.exe for that.

* Scripts/webkitdirs.pm:
(installedSafariPath): Changed to use readRegistryString instead of invoking FindSafari to
do the same thing.

(readRegistryString):
(writeRegistryString):
Moved here from old-run-webkit-tests.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95733 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/old-run-webkit-tests
Tools/Scripts/run-webkit-nightly.cmd [deleted file]
Tools/Scripts/webkitdirs.pm

index 7f76c77..3bc63a5 100644 (file)
@@ -1,5 +1,28 @@
 2011-09-22  Adam Roben  <aroben@apple.com>
 
+        Remove all uses of FindSafari
+
+        It isn't really needed anymore.
+
+        Fixes <http://webkit.org/b/68626>.
+
+        Reviewed by Darin Adler.
+
+        * Scripts/old-run-webkit-tests: Moved read/writeRegistryString from here to webkitdirs.pm.
+
+        * Scripts/run-webkit-nightly.cmd: Removed. This used to be used to launch nightly builds of
+        WebKit, but now we use WebKit.exe for that.
+
+        * Scripts/webkitdirs.pm:
+        (installedSafariPath): Changed to use readRegistryString instead of invoking FindSafari to
+        do the same thing.
+
+        (readRegistryString):
+        (writeRegistryString):
+        Moved here from old-run-webkit-tests.
+
+2011-09-22  Adam Roben  <aroben@apple.com>
+
         Use the "direct object" form of system() to run WebKit.exe
 
         This prevents the shell from parsing (and possibly splitting, if it contains spaces) the
index d46cca8..ed5d852 100755 (executable)
@@ -2712,25 +2712,6 @@ sub createDebuggerCommandFile()
     return $commandFile;
 }
 
-sub readRegistryString($)
-{
-    my ($valueName) = @_;
-    chomp(my $string = `regtool --wow32 get "$valueName"`);
-    return $string;
-}
-
-sub writeRegistryString($$)
-{
-    my ($valueName, $string) = @_;
-
-    my $error = system "regtool", "--wow32", "set", "-s", $valueName, $string;
-
-    # On Windows Vista/7 with UAC enabled, regtool will fail to modify the registry, but will still
-    # return a successful exit code. So we double-check here that the value we tried to write to the
-    # registry was really written.
-    return !$error && readRegistryString($valueName) eq $string;
-}
-
 sub setUpWindowsCrashLogSaving()
 {
     return unless isCygwin();
diff --git a/Tools/Scripts/run-webkit-nightly.cmd b/Tools/Scripts/run-webkit-nightly.cmd
deleted file mode 100755 (executable)
index 924178a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-@echo off
-set script=%TMP%\run-webkit-nightly2.cmd
-set vsvars=%VS80COMNTOOLS%\vsvars32.bat
-if exist "%vsvars%" (
-    copy "%vsvars%" "%script%"
-) else (
-    del "%script%"
-)
-FindSafari.exe %1 /printSafariLauncher >> "%script%"
-call "%script%"
index 13133b6..42cc509 100644 (file)
@@ -565,7 +565,7 @@ sub installedSafariPath
     if (isAppleMacWebKit()) {
         $safariBundle = "/Applications/Safari.app";
     } elsif (isAppleWinWebKit()) {
-        $safariBundle = `"$configurationProductDir/FindSafari.exe"`;
+        $safariBundle = readRegistryString("/HKLM/SOFTWARE/Apple Computer, Inc./Safari/InstallDir");
         $safariBundle =~ s/[\r\n]+$//;
         $safariBundle = `cygpath -u '$safariBundle'` if isCygwin();
         $safariBundle =~ s/[\r\n]+$//;
@@ -2141,4 +2141,23 @@ sub runTestWebKitAPI
     return 1;
 }
 
+sub readRegistryString
+{
+    my ($valueName) = @_;
+    chomp(my $string = `regtool --wow32 get "$valueName"`);
+    return $string;
+}
+
+sub writeRegistryString
+{
+    my ($valueName, $string) = @_;
+
+    my $error = system "regtool", "--wow32", "set", "-s", $valueName, $string;
+
+    # On Windows Vista/7 with UAC enabled, regtool will fail to modify the registry, but will still
+    # return a successful exit code. So we double-check here that the value we tried to write to the
+    # registry was really written.
+    return !$error && readRegistryString($valueName) eq $string;
+}
+
 1;