Narwhal fixes for capp gen.

Reviewed by me.
This commit is contained in:
Francisco Ryan Tolmasky I committed 2009-10-15 13:27:27 -07:00
1 parent 1123e848bf
commit 238da6b80f
2 files changed
+17 -14

No files matched your search

+14 -10
View File
@@ -83,15 +83,19 @@ function gen(/*va_args*/)
count = files.length,
name = FILE.basename(destinationProject),
orgIdentifier = [configuration valueForKey:@"organization.identifier"] || "";
print("yo!"+files);
[configuration setTemporaryValue:name forKey:@"project.name"];
[configuration setTemporaryValue:orgIdentifier + '.' + toIdentifier(name) forKey:@"project.identifier"];
[configuration setTemporaryValue:toIdentifier(name) forKey:@"project.nameasidentifier"];
for (; index < count; ++index)
{
var path = files[index],
contents = FILE.read(path, { charset : "UTF-8" }),
var path = files[index];
if (FILE.isDirectory(path))
continue;
var contents = FILE.read(path, { charset : "UTF-8" }),
key = nil,
keyEnumerator = [configuration keyEnumerator];
@@ -158,17 +162,17 @@ function createFrameworksInFile(/*String*/ aFile, /*Boolean*/ shouldSymbolically
// Release Frameworks
FILE.mkdirs(destinationFrameworks);
FILE.symlink(FILE.join(BUILD + "Release", "Objective-J"), FILE.join(destinationFrameworks, "Objective-J"));
FILE.symlink(FILE.join(BUILD + "Release", "Foundation"), FILE.join(destinationFrameworks, "Foundation"));
FILE.symlink(FILE.join(BUILD + "Release", "AppKit"), FILE.join(destinationFrameworks, "AppKit"));
FILE.symlink(FILE.join(BUILD, "Release", "Objective-J"), FILE.join(destinationFrameworks, "Objective-J"));
FILE.symlink(FILE.join(BUILD, "Release", "Foundation"), FILE.join(destinationFrameworks, "Foundation"));
FILE.symlink(FILE.join(BUILD, "Release", "AppKit"), FILE.join(destinationFrameworks, "AppKit"));
// Debug Frameworks
FILE.mkdirs(destinationDebugFrameworks);
FILE.symlink(FILE.join(BUILD + "Debug", "Objective-J"), FILE.join(destinationDebugFrameworks, "Objective-J"));
FILE.symlink(FILE.join(BUILD + "Debug", "Foundation"), FILE.join(destinationDebugFrameworks, "Foundation"));
FILE.symlink(FILE.join(BUILD + "Debug", "AppKit"), FILE.join(destinationDebugFrameworks, "AppKit"));
FILE.symlink(FILE.join(BUILD, "Debug", "Objective-J"), FILE.join(destinationDebugFrameworks, "Objective-J"));
FILE.symlink(FILE.join(BUILD, "Debug", "Foundation"), FILE.join(destinationDebugFrameworks, "Foundation"));
FILE.symlink(FILE.join(BUILD, "Debug", "AppKit"), FILE.join(destinationDebugFrameworks, "AppKit"));
}
function toIdentifier(/*String*/ aString)
+3 -4
View File
@@ -4,16 +4,15 @@
@import "Configuration.j"
@import "Generate.j"
print("what?...");
function main()
{print("insdie?...");
{
if (system.args.length < 1)
return printUsage();
var index = 0,
count = system.args.length;
print("p;!");
for (; index < count; ++index)
{
var argument = system.args[index];
@@ -28,7 +27,7 @@ print("p;!");
case "config": return config.apply(this, system.args.slice(index + 1));
case "gen": print("!");return gen.apply(this, system.args.slice(index + 1));
case "gen": return gen.apply(this, system.args.slice(index + 1));
default: print("unknown command " + argument);
}