my @xcodeBuildArguments = XcodeOptions();
my $nightlyLauncherTemplatePath = "$FindBin::Bin/../WebKitLauncher";
my $nightlyLauncherStagingPath = productDir() . "/WebKit.app";
+my $droseraProjectPath = "$FindBin::Bin/../Drosera";
+my $droseraStagingPath = productDir() . "/DroseraLauncher.app";
sub buildNightlyLauncher
{
chdir($nightlyLauncherTemplatePath);
- system("xcodebuild", "clean", @xcodeBuildArguments) == 0 or die "Failed cleaning WebKitLauncher project";
- system("xcodebuild", @xcodeBuildArguments) == 0 or die "Failed building WebKitLauncher project";
+ system("xcodebuild", "clean", "-alltargets", @xcodeBuildArguments, @ARGV) == 0 or die "Failed cleaning WebKitLauncher project";
+ system("xcodebuild", @xcodeBuildArguments, @ARGV) == 0 or die "Failed building WebKitLauncher project";
chdirWebKit();
}
{
my $revision = currentSVNRevision();
my $infoPlist = "$nightlyLauncherStagingPath/Contents/Info.plist";
+ my $versionFile = "$nightlyLauncherStagingPath/Contents/Resources/VERSION";
my $data;
open(IN, $infoPlist) or die "Couldn't open Info.plist in built application for reading";
{
$data =~ s/VERSION/$revision/g;
print OUT $data;
close(OUT);
-
+
+ open(OUT, ">$versionFile") or die "Couldn't open VERSION in built application for writing";
+ print OUT "$revision\n";
+ close(OUT);
+
my @frameworks = ("JavaScriptCore", "JavaScriptGlue", "WebCore", "WebKit");
for my $framework (@frameworks) {
system("ditto", productDir() . "/$framework.framework", "$nightlyLauncherStagingPath/Contents/Resources/$framework.framework") == 0 or die "Failed copying $framework.framework into $nightlyLauncherStagingPath";
}
}
+sub buildDroseraLauncher
+{
+ chdir($droseraProjectPath);
+ system("xcodebuild", "clean", "-alltargets", @xcodeBuildArguments, @ARGV) == 0 or die "Failed cleaning Drosera project";
+ # Build native platform only right now, as building universal with the 10.4u SDK cause Xcode to look for WebKit,
+ # WebCore & JavaScriptCore in the SDK under /Developer/SDKs/MacOSX10.4u.sdk/$(BUILT_PRODUCTS_DIR) where they do not exist
+ system("xcodebuild", "-alltargets", @xcodeBuildArguments, @ARGV) == 0 or die "Failed building Drosera project";
+ chdirWebKit();
+}
+
+sub setDroseraLauncherVersion
+{
+ my $revision = currentSVNRevision();
+ my $infoPlist = "$droseraStagingPath/Contents/Info.plist";
+ my $data;
+ open(IN, $infoPlist) or die "Couldn't open Info.plist in built application for reading";
+ {
+ undef $/;
+ $data = <IN>;
+ }
+ close(IN);
+ open(OUT, ">$infoPlist") or die "Couldn't open Info.plist in built application for writing";
+ $data =~ s/VERSION/$revision/g;
+ print OUT $data;
+ close(OUT);
+}
+
chdirWebKit();
buildNightlyLauncher();
copyNightlyLauncher();
+buildDroseraLauncher();
+setDroseraLauncherVersion();