Add a new nightly launcher script for Windows
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Oct 2007 20:12:42 +0000 (20:12 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Oct 2007 20:12:42 +0000 (20:12 +0000)
         This new script is for versions of Safari that don't delay-load
         WebKit. I had to make FindSafari be able to print out the nightly
         launcher script on stdout because Windows shell scripts can't capture
         the output from a command into an environment variable.

         Reviewed by Steve.

         * FindSafari/FindSafari.cpp:
         (_tmain): Added /printSafariLauncher option.
         * Scripts/run-webkit-nightly.cmd: Added.

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

WebKitTools/ChangeLog
WebKitTools/FindSafari/FindSafari.cpp
WebKitTools/Scripts/run-webkit-nightly.cmd [new file with mode: 0755]

index 26baad47ac7ea9bb47db1bf46935c5f09a54724d..0259c85e06f0d9eb1ad057dc71021b50fcbb836f 100644 (file)
         number of tweaks, including fixing a potential bug where expectedDirectoryForTest
         would take the type of results into account only some of the time.
 
         number of tweaks, including fixing a potential bug where expectedDirectoryForTest
         would take the type of results into account only some of the time.
 
+2007-10-16  Adam Roben  <aroben@apple.com>
+
+        Add a new nightly launcher script for Windows
+
+        This new script is for versions of Safari that don't delay-load
+        WebKit. I had to make FindSafari be able to print out the nightly
+        launcher script on stdout because Windows shell scripts can't capture
+        the output from a command into an environment variable.
+
+        Reviewed by Steve.
+
+        * FindSafari/FindSafari.cpp:
+        (_tmain): Added /printSafariLauncher option.
+        * Scripts/run-webkit-nightly.cmd: Added.
+
 2007-10-16  Adam Roben  <aroben@apple.com>
 
         Replace WebKitInitializer with FindSafari
 2007-10-16  Adam Roben  <aroben@apple.com>
 
         Replace WebKitInitializer with FindSafari
index 8580602ca4e57264ff92023cd9fecedf6d77cf8e..12fa35be8db85ea7a8477ee299f3db15cfa041e0 100644 (file)
@@ -130,7 +130,26 @@ int _tmain(int argc, TCHAR* argv[])
         return 1;
     }
 
         return 1;
     }
 
-    _tprintf(TEXT("%s"), path);
+    if (argc < 2 || _tcscmp(argv[1], TEXT("/printSafariLauncher"))) {
+        _tprintf(TEXT("%s"), path);
+        free(path);
+        return 0;
+    }
+
+    TCHAR* lines[] = {
+        TEXT("@echo off"),
+        TEXT("mkdir 2>NUL \"%%TMP%%\\WebKitNightly\\Safari.resources\""),
+        TEXT("xcopy /y /i /d \"%sSafari.exe\" \"%%TMP%%\\WebKitNightly\""),
+        TEXT("xcopy /y /i /d /e \"%sSafari.resources\" \"%%TMP%%\\WebKitNightly\\Safari.resources\""),
+        TEXT("set PATH=\"%%CD%%;%s;%%PATH%%\""),
+        TEXT("\"%%TMP%%\\WebKitNightly\\Safari.exe\" /customWebKit"),
+    };
+
+    for (int i = 0; i < ARRAYSIZE(lines); ++i) {
+        _tprintf(lines[i], path);
+        _tprintf(TEXT("\n"));
+    }
+
     free(path);
     return 0;
 }
     free(path);
     return 0;
 }
diff --git a/WebKitTools/Scripts/run-webkit-nightly.cmd b/WebKitTools/Scripts/run-webkit-nightly.cmd
new file mode 100755 (executable)
index 0000000..865c966
--- /dev/null
@@ -0,0 +1,4 @@
+@echo off
+set script="%TMP%\run-webkit-nightly2.cmd"
+FindSafari.exe /printSafariLauncher > %script%
+call %script%