mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-11 05:07:13 +00:00
Merge branch '0.7b' of git@github.com:280north/cappuccino into 0.7b
This commit is contained in:
+20
-3
@@ -12,6 +12,7 @@ function gen(/*va_args*/)
|
||||
shouldSymbolicallyLink = false,
|
||||
justFrameworks = false,
|
||||
noConfig = false,
|
||||
force = false,
|
||||
|
||||
template = "Application",
|
||||
destination = "";
|
||||
@@ -37,6 +38,9 @@ function gen(/*va_args*/)
|
||||
case "--noconfig": noConfig = true;
|
||||
break;
|
||||
|
||||
case "--force": force = true;
|
||||
break;
|
||||
|
||||
default: destination = argument;
|
||||
}
|
||||
}
|
||||
@@ -49,7 +53,7 @@ function gen(/*va_args*/)
|
||||
configuration = noConfig ? [Configuration defaultConfiguration] : [Configuration userConfiguration];
|
||||
|
||||
if (justFrameworks)
|
||||
createFrameworksInFile(destinationProject, shouldSymbolicallyLink);
|
||||
createFrameworksInFile(destinationProject, shouldSymbolicallyLink, force);
|
||||
|
||||
else if (!destinationProject.exists())
|
||||
{
|
||||
@@ -89,10 +93,23 @@ function gen(/*va_args*/)
|
||||
}
|
||||
|
||||
|
||||
function createFrameworksInFile(/*File*/ aFile, /*Boolean*/ shouldSymbolicallyLink)
|
||||
function createFrameworksInFile(/*File*/ aFile, /*Boolean*/ shouldSymbolicallyLink, /*Boolean*/ force)
|
||||
{
|
||||
var destinationFrameworks = new java.io.File(aFile.getCanonicalPath()+ "/Frameworks"),
|
||||
destinationDebugFrameworks = new java.io.File(aFile.getCanonicalPath() + "/Frameworks/Debug");
|
||||
|
||||
if (destinationFrameworks.exists()) {
|
||||
if (force) {
|
||||
print("Updating existing Frameworks directory.");
|
||||
exec(["rm", "-rf", destinationFrameworks.getCanonicalPath()], true);
|
||||
}
|
||||
else {
|
||||
print("Frameworks directory already exists. Use --force to overwrite.");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
print("Creating Frameworks directory.");
|
||||
}
|
||||
|
||||
if (!shouldSymbolicallyLink)
|
||||
{
|
||||
@@ -100,7 +117,7 @@ function createFrameworksInFile(/*File*/ aFile, /*Boolean*/ shouldSymbolicallyLi
|
||||
|
||||
exec(["cp", "-R", sourceFrameworks.getCanonicalPath(), destinationFrameworks.getCanonicalPath()], true);
|
||||
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
|
||||
var BUILD = system.env["CAPP_BUILD"] || system.env["STEAM_BUILD"];
|
||||
|
||||
@@ -48,6 +48,7 @@ function printUsage()
|
||||
print(" -l Symlink the Frameworks folder to your $CAPP_BUILD or $STEAM_BUILD directory");
|
||||
print(" -t, --template Specify the template name to use (listed in capp/Resources/Templates)");
|
||||
print(" -f, --frameworks Create only frameworks, not a full application");
|
||||
print(" --force Overwrite Frameworks directory if it already exists");
|
||||
print("");
|
||||
print(ANSITextApplyProperties(" config ", ANSI_BOLD));
|
||||
print(" name value Set a value for a given key");
|
||||
|
||||
Reference in New Issue
Block a user