diff --git a/Tools/XcodeCapp/Jakefile b/Tools/XcodeCapp/Jakefile index ce7ad7ae8..0f3c6b8de 100644 --- a/Tools/XcodeCapp/Jakefile +++ b/Tools/XcodeCapp/Jakefile @@ -8,21 +8,34 @@ var OS = require("os"), task ("build", function() { + // No building on 10.6 + var p = OS.popen(["sw_vers", "-productVersion"]); + + if (p.wait() === 0) + { + var versions = p.stdout.read().split("."), + majorVersion = parseInt(versions[0], 10), + minorVersion = parseInt(versions[1], 10), + buildVersion = parseInt(versions[2], 10); + + if (majorVersion < 10 || minorVersion < 7) + { + colorPrint("XcodeCapp can only be built on Mac OS X 10.7+. Please go to www.cappuccino-project.org to download the latest XcodeCapp.", "red"); + OS.exit(0); + } + } + if (executableExists("xcodebuild")) { var args = "-sdk macosx -alltargets -configuration Release", - supportPath = FILE.join($BUILD_CJS_CAPPUCCINO, "support", applicationName), installPath = FILE.join("/", "Applications", applicationName); + // Remove an old symlink, the application is built directly into /Applications now. + if (FILE.isLink(installPath)) + FILE.remove(installPath); + if (OS.system("xcodebuild " + args)) OS.exit(1); - - rm_rf(supportPath); - FILE.mkdirs(supportPath); - cp_r(FILE.join("build", "Release", "XcodeCapp.app"), supportPath); - FILE.chmod(FILE.join(supportPath, "Contents", "MacOS", "XcodeCapp"), 0755); - - OS.system(["/bin/ln", "-sfh", supportPath, installPath]); } else { diff --git a/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj b/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj index f94f61257..6f7b7921f 100644 --- a/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj +++ b/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj @@ -391,7 +391,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = E164FDEF1720E7FA00263CE3 /* Debug.xcconfig */; buildSettings = { - DSTROOT = "$(HOME)"; + DSTROOT = /; }; name = Debug; }; @@ -401,7 +401,7 @@ buildSettings = { COPY_PHASE_STRIP = NO; DEPLOYMENT_LOCATION = YES; - DSTROOT = "$(HOME)"; + DSTROOT = /; }; name = Release; };