Bug 17952 - Add "--cairo" flag to 'build-webkit' command
Summary: Add "--cairo" flag to 'build-webkit' command
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-19 11:41 PDT by Brent Fulgham
Modified: 2008-06-20 15:24 PDT (History)
0 users

See Also:


Attachments
Extend build-webkit with new "--cairo" build option (2.62 KB, patch)
2008-03-19 11:50 PDT, Brent Fulgham
darin: review-
Details | Formatted Diff | Diff
Support cairo via command-line flag (2.37 KB, patch)
2008-04-09 16:26 PDT, Brent Fulgham
aroben: review-
Details | Formatted Diff | Diff
Extend build-webkit with new "--cairo-win32" build option (2.61 KB, patch)
2008-06-11 16:48 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff
Minor update to merge against TOT (2.61 KB, patch)
2008-06-11 16:54 PDT, Brent Fulgham
darin: 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 2008-03-19 11:41:07 PDT
The build-webkit Script needs to be extended to allow a user to indicate that they wish to build the Cairo-based webkit.  When the "--cairo" flag is added to the build-webkit command line, the "Debug" and "Release" targets are changed to "Debug_Cairo" and "Release_Cairo".

This option is only honored for the Visual Studio build.  It is ignored for all other build environments (Mac, Qt, GTK, etc.)
Comment 1 Brent Fulgham 2008-03-19 11:50:45 PDT
Created attachment 19887 [details]
Extend build-webkit with new "--cairo" build option

* Add "--cairo" to help screen for build-webkit script.
* Add "isCairo" test and when present for the Visual Studio build switch to the Cairo debug/release targets.
Comment 2 Eric Seidel (no email) 2008-03-31 12:45:59 PDT
I'm confused as to why this is necessary?  (Why do the executables need a _cairo suffix?)
Comment 3 Brent Fulgham 2008-03-31 15:18:47 PDT
(In reply to comment #2)
> I'm confused as to why this is necessary?  (Why do the executables need a
> _cairo suffix?)

The executables don't need a _cairo suffix.  However, the naming of the Cairo-based build targets in Visual Studio are constructed with "_cairo" suffixes.

This patch causes the build script to build using the "Release_cairo" and "Debug_cairo" build targets.  Any executable output names are generated outside the scope of this patch.

Comment 4 Darin Adler 2008-04-02 02:43:54 PDT
Comment on attachment 19887 [details]
Extend build-webkit with new "--cairo" build option

+    if (checkArgv("--cairo")) {
+        $isCairo = 1;
+    } else {
+        $isWx = 0;
+    }

Seems wrong to set $isWx here.

But also, I think you'd want this setting to be a persistent one. It seems really inconvenient to have to pass --cairo every single time. It should work more like configuration where you can set it once and then it's persistent until you reset it.

review- because of the $isWx mistake, but please consider my suggestion.
Comment 5 Brent Fulgham 2008-04-09 16:26:17 PDT
Created attachment 20445 [details]
Support cairo via command-line flag

Script modified per Darin's comments:
* --cairo flag handled more like the --debug/--release flags, such that they persist in the Configuration file if the "set-webkit-configuration" script is used.
* No longer incorrectly set the "isWx" value.
Comment 6 Adam Roben (:aroben) 2008-04-14 08:27:43 PDT
Comment on attachment 20445 [details]
Support cairo via command-line flag

+    my $isCairo = grep(/^--cairo$/i, @ARGV);
+
     for my $i (0 .. $#ARGV) {
         my $opt = $ARGV[$i];
         if ($opt =~ /^--debug$/i || $opt =~ /^--devel/i) {
             splice(@ARGV, $i, 1);
             $passedConfiguration = "Debug";
+            $passedConfiguration .= "_Cairo" if $isCairo;
             return;
         }
         if ($opt =~ /^--release$/i || $opt =~ /^--deploy/i) {
             splice(@ARGV, $i, 1);
             $passedConfiguration = "Release";
+            $passedConfiguration .= "_Cairo" if $isCairo;
             return;
         }

This seems very Windows-specific, since only the Windows .vcproj files have these _Cairo configurations. Perhaps the flag should only have an effect on Windows? Perhaps it should be named something more specific, like --cairo-win32?
Comment 7 Brent Fulgham 2008-06-11 16:48:15 PDT
Created attachment 21650 [details]
Extend build-webkit with new "--cairo-win32" build option

Updated based on Adam's comments:
* Changed --cairo flag to --cairo-win32
* --cairo-win32 is only honored if "isCygwin()" is true
Comment 8 Brent Fulgham 2008-06-11 16:54:19 PDT
Created attachment 21651 [details]
Minor update to merge against TOT

Same as above, with minor update to build against TOT.
Comment 9 Darin Adler 2008-06-12 07:06:57 PDT
Comment on attachment 21651 [details]
Minor update to merge against TOT

r=me
Comment 10 Matt Lilek 2008-06-20 15:24:21 PDT
Committed revision 34706.