Fixed: building on 10.6 failed.

There are features of Objective-C 2.0 used in XcodeCapp that cannot be compiled with Xcode 4.2, which is the maximum version that runs on OS X 10.6. Users on 10.6 would see compile errors.

Now a check for OS X 10.7+ is done, and on any version earlier than that, the user is presented with a message telling them to download XcodeCapp from the web site.
This commit is contained in:
Aparajita Fishman
2013-05-05 16:13:43 -04:00
parent a24aacdb3e
commit 0aad32ba86
2 changed files with 23 additions and 10 deletions
+21 -8
View File
@@ -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
{
@@ -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;
};