- Fixed run-safari and gdb-safari to use the Safari application in the build results
directory, if any, falling back to the one in the Applications directory otherwise.
Does no harm for open source contributors who don't build Safari, and helps out the
Safari team, since we do build Safari.
* Scripts/webkitdirs.pm: Added safariPath function that uses WEBKIT_SAFARI environment
variable, and if that's not present, looks in either the build results directory or
/Applications; factors code that was in both scripts before into a shared function.
Also removed some Xcode 2.0 support which is no longer relevant since our projects are
now in Xcode 2.1 format and incompatible with older versions of Xcode.
* Scripts/gdb-safari: Use safariPath.
* Scripts/run-safari: Use safariPath.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9888
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-07-25 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ - Fixed run-safari and gdb-safari to use the Safari application in the build results
+ directory, if any, falling back to the one in the Applications directory otherwise.
+ Does no harm for open source contributors who don't build Safari, and helps out the
+ Safari team, since we do build Safari.
+
+ * Scripts/webkitdirs.pm: Added safariPath function that uses WEBKIT_SAFARI environment
+ variable, and if that's not present, looks in either the build results directory or
+ /Applications; factors code that was in both scripts before into a shared function.
+ Also removed some Xcode 2.0 support which is no longer relevant since our projects are
+ now in Xcode 2.1 format and incompatible with older versions of Xcode.
+
+ * Scripts/gdb-safari: Use safariPath.
+ * Scripts/run-safari: Use safariPath.
+
2005-07-22 Geoffrey Garen <ggaren@apple.com>
Moved Tools/Scripts/run-mozilla-tests to WebKitTools/Scripts/run-javascriptcore-tests.
2005-07-21 Geoffrey Garen <ggaren@apple.com>
- Reviewed by NOBODY (OOPS!).
-
* DumpRenderTree/DumpRenderTree.xcode/.cvsignore: Removed.
2005-07-21 Geoffrey Garen <ggaren@apple.com>
- Reviewed by NOBODY (OOPS!).
-
* DumpRenderTree/DumpRenderTree.xcode/project.pbxproj: Removed.
2005-07-21 Geoffrey Garen <ggaren@apple.com>
- Reviewed by NOBODY (OOPS!).
-
* DumpRenderTree/DumpRenderTree.xcodeproj/.cvsignore: Added.
2005-07-21 Geoffrey Garen <ggaren@apple.com>
- Reviewed by NOBODY (OOPS!).
-
* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Added.
2005-07-21 Geoffrey Garen <ggaren@apple.com>
- Reviewed by NOBODY (OOPS!).
-
* Scripts/build-webkit:
2005-07-12 Eric Seidel <eseidel@apple.com>
setConfiguration();
my $productDir = productDir();
-
-# Check to see that Safari is in the specified place.
-my $safariBundle = $ENV{WEBKIT_SAFARI} || "/Applications/Safari.app";
-my $safariPath = "$safariBundle/Contents/MacOS/Safari";
-die "Can't find executable at $safariPath.\n" unless -x $safariPath;
+my $safariPath = safariPath();
# Check to see that gdb is in the usual place.
my $gdbPath = "/usr/bin/gdb";
setConfiguration();
my $productDir = productDir();
-
-# Check to see that Safari is in the specified place.
-my $safariBundle = $ENV{WEBKIT_SAFARI} || "/Applications/Safari.app";
-my $safariPath = "$safariBundle/Contents/MacOS/Safari";
-die "Can't find executable at $safariPath.\n" unless -x $safariPath;
+my $safariPath = safariPath();
# Check to see that all the frameworks are built.
checkFrameworks();
our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
$VERSION = 1.00;
@ISA = qw(Exporter);
- @EXPORT = qw(&chdirWebKit &baseProductDir &productDir &XcodeOptions &passedConfiguration &setConfiguration &checkFrameworks);
+ @EXPORT = qw(&chdirWebKit &baseProductDir &productDir &XcodeOptions &passedConfiguration &setConfiguration &safariPath &checkFrameworks);
%EXPORT_TAGS = ( );
@EXPORT_OK = ();
}
my @baseProductDirOption;
my $configuration;
my $configurationProductDir;
-my $XcodeVersion;
my $sourceDir;
sub determineSourceDir
}
}
-sub determineXcodeVersion
-{
- return if defined $XcodeVersion;
- # Could use "xcodebuild -version" instead.
- open VERSION, "defaults read /Developer/Applications/Xcode.app/Contents/Info CFBundleShortVersionString 2> /dev/null |" or die;
- $XcodeVersion = <VERSION>;
- close VERSION;
- chomp $XcodeVersion;
-}
-
sub determineBaseProductDir
{
return if defined $baseProductDir;
}
}
-sub oldXcode
-{
- determineXcodeVersion();
- return $XcodeVersion =~ /^1\./ || $XcodeVersion eq "2.0";
-}
-
sub determineConfigurationProductDir
{
determineBaseProductDir();
determineConfiguration();
- determineXcodeVersion();
- if (oldXcode()) {
- $configurationProductDir = $baseProductDir;
- } else {
- $configurationProductDir = "$baseProductDir/$configuration";
- }
+ $configurationProductDir = "$baseProductDir/$configuration";
}
sub chdirWebKit
{
determineBaseProductDir();
determineConfiguration();
- determineXcodeVersion();
- return (@baseProductDirOption, "-buildstyle", $configuration) if oldXcode();
return (@baseProductDirOption, "-configuration", $configuration);
}
$configuration = $passed if $passed;
}
+# Locate Safari.
+sub safariPath
+{
+ # Use WEBKIT_SAFARI environment variable if present.
+ my $safariBundle = $ENV{WEBKIT_SAFARI};
+ if (!$safariBundle) {
+ determineConfigurationProductDir();
+ # Use Safari.app in product directory if present (good for Safari development team).
+ if (-d "$configurationProductDir/Safari.app") {
+ $safariBundle = "$configurationProductDir/Safari.app";
+ } else {
+ # Otherwise use Safari.app in Applications directory.
+ $safariBundle = "/Applications/Safari.app";
+ }
+ }
+ my $safariPath = "$safariBundle/Contents/MacOS/Safari";
+ die "Can't find executable at $safariPath.\n" unless -x $safariPath;
+ return $safariPath;
+}
+
# Check to see that all the frameworks are built.
sub checkFrameworks
{