Bug 16315 - FindSafari Needs Path-Only Option
Summary: FindSafari Needs Path-Only Option
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 16314
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-05 17:37 PST by Brent Fulgham
Modified: 2007-12-16 17:33 PST (History)
1 user (show)

See Also:


Attachments
Modification to FindSafari.exe to emit environment information only. (1.94 KB, patch)
2007-12-06 14:16 PST, Brent Fulgham
aroben: review-
Details | Formatted Diff | Diff
Updated patch based on initial review. (1.94 KB, patch)
2007-12-13 13:04 PST, Brent Fulgham
no flags Details | Formatted Diff | Diff
Updated based on review. (2.22 KB, patch)
2007-12-13 15:17 PST, Brent Fulgham
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2007-12-05 17:37:40 PST
I wrote a little script (see Bug #16314) to launch Drosera.  Unfortunately, the "FindSafari.exe /printSafariLauncher" command outputs both the environment needed to run as well as the launch command for Safari.

FindSafari would be more useful to something like the Drosera script if it could just output the environment commands (perhaps with a "/printSafariEnvironment" option)

What I currently get from FindSafari is this:
====================================================
$ ./FindSafari.exe  /printSafariLauncher
@echo off
mkdir 2>NUL "%TMP%\WebKitNightly\Safari.resources"
xcopy /y /i /d "C:\Program Files\Safari\Safari.exe" "%TMP%\WebKitNightly"
xcopy /y /i /d /e "C:\Program Files\Safari\Safari.resources" "%TMP%\WebKitNightl
y\Safari.resources"
set PATH="%CD%;C:\Program Files\Safari\;%PATH%"
"%TMP%\WebKitNightly\Safari.exe" /customWebKit
====================================================

What I would *LIKE* is this:
====================================================
$ ./FindSafari.exe  /printSafariLauncher
@echo off
mkdir 2>NUL "%TMP%\WebKitNightly\Safari.resources"
xcopy /y /i /d "C:\Program Files\Safari\Safari.exe" "%TMP%\WebKitNightly"
xcopy /y /i /d /e "C:\Program Files\Safari\Safari.resources" "%TMP%\WebKitNightl
y\Safari.resources"
set PATH="%CD%;C:\Program Files\Safari\;%PATH%"
====================================================
Comment 1 Brent Fulgham 2007-12-06 14:16:56 PST
Created attachment 17759 [details]
Modification to FindSafari.exe to emit environment information only.

The attached patch modifies FindSafari to avoid issuing the command to launch Safari.  This is useful to allow use of Drosera on the Windows platform (see Bug #16314).
Comment 2 Adam Roben (:aroben) 2007-12-12 22:31:18 PST
Comment on attachment 17759 [details]
Modification to FindSafari.exe to emit environment information only.

+    if (!printEnvironment)
+    {

Our code style guidelines say that the brace should be on the same line as the if. See <http://webkit.org/coding/coding-style.html>.

It seems a little strange that if you pass both /printSafariLauncher and /printSafariEnvironment, you only get the environment and don't get a launcher at all. Perhaps /printSafariLauncher should override /printSafariEnvironment?

r- so that the above can be considered.
Comment 3 Brent Fulgham 2007-12-13 13:04:28 PST
Created attachment 17877 [details]
Updated patch based on initial review.

Updated patch based on aroben's review comments.
Comment 4 Adam Roben (:aroben) 2007-12-13 14:50:07 PST
Comment on attachment 17877 [details]
Updated patch based on initial review.

Looks like you uploaded the same patch again by accident.
Comment 5 Brent Fulgham 2007-12-13 15:17:47 PST
Created attachment 17883 [details]
Updated based on review.
Comment 6 Brent Fulgham 2007-12-13 15:19:13 PST
Comment on attachment 17883 [details]
Updated based on review.

This should be the correct patch.
Comment 7 Adam Roben (:aroben) 2007-12-13 15:55:07 PST
Comment on attachment 17883 [details]
Updated based on review.

+        * ChangeLog:

We normally don't list the ChangeLog in the list of changed files.

r=me. Thanks for the patch!
Comment 8 Mark Rowe (bdash) 2007-12-16 17:33:26 PST
Landed in r28788.