From df7aa302674af6d367c9aaa398629d0740e7905a Mon Sep 17 00:00:00 2001 From: Antoine Mercadal Date: Sat, 21 May 2011 00:38:49 +0200 Subject: [PATCH] include xcodecapp-cocoa in the Cappuccino build process. --- Tools/Jakefile | 2 +- Tools/xcodecapp-cocoa/Jakefile | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Tools/Jakefile b/Tools/Jakefile index e5f10f1c4..1f0d986c9 100644 --- a/Tools/Jakefile +++ b/Tools/Jakefile @@ -2,6 +2,6 @@ require("../common.jake"); // nib2cib uses fontinfo and capp uses nib2cib -subtasks(["fontinfo", "nib2cib", "capp", "NativeHost", "xcodecapp"], ["build"/*, "clean", "clobber"*/]); +subtasks(["fontinfo", "nib2cib", "capp", "NativeHost", "xcodecapp", "xcodecapp-cocoa"], ["build"/*, "clean", "clobber"*/]); subtasks(["fontinfo"], ["clean", "clobber"]); diff --git a/Tools/xcodecapp-cocoa/Jakefile b/Tools/xcodecapp-cocoa/Jakefile index b937ac0f5..9c1309249 100644 --- a/Tools/xcodecapp-cocoa/Jakefile +++ b/Tools/xcodecapp-cocoa/Jakefile @@ -10,7 +10,9 @@ task ("build", function() { if (executableExists("xcodebuild")) { - var args = "-alltargets -configuration Release"; + var args = "-alltargets -configuration Release", + supportPath = FILE.join($BUILD_CJS_CAPPUCCINO, "support", applicationName), + installPath = FILE.join("/", "Applications", applicationName); if (xcodebuildHasTenPointFiveSDK()) args = "-sdk macosx10.5 " + args; @@ -21,10 +23,14 @@ task ("build", function() if (OS.system("xcodebuild " + args)) OS.exit(1); - rm_rf(FILE.join($BUILD_CJS_CAPPUCCINO, "support", applicationName)); - FILE.mkdirs(FILE.join($BUILD_CJS_CAPPUCCINO, "support")) - cp_r(FILE.join("build", "Release", "xcodecapp-cocoa.app"), FILE.join($BUILD_CJS_CAPPUCCINO, "support", applicationName)); - FILE.chmod(FILE.join($BUILD_CJS_CAPPUCCINO, "support", applicationName, "Contents", "MacOS", "xcodecapp-cocoa"), 0755); + rm_rf(supportPath); + FILE.mkdirs(supportPath); + cp_r(FILE.join("build", "Release", "xcodecapp-cocoa.app"), supportPath); + FILE.chmod(FILE.join(supportPath, "Contents", "MacOS", "xcodecapp-cocoa"), 0755); + + if (FILE.exists(installPath)) + FILE.remove(installPath); + FILE.symlink(supportPath, installPath); } else { @@ -32,11 +38,6 @@ task ("build", function() } }); -task ("install", ["build"], function() -{ - cp_r(FILE.join($BUILD_CJS_CAPPUCCINO, "support", applicationName), FILE.join("/", "Applications", applicationName)); -}); - task ("clean", function() { if (OS.system("xcodebuild clean"))