Added support for new FileList.

Reviewed by me.
This commit is contained in:
Francisco Ryan Tolmasky I
2009-09-27 21:13:50 -07:00
parent b94c82f4aa
commit e9092007ee
5 changed files with 13 additions and 14 deletions
+6 -8
View File
@@ -9,9 +9,7 @@ $ENVIRONMENT_PRODUCT = FILE.join($ENVIRONMENT_FRAMEWORKS_DIR, 'AppKit');
$THEME_PRODUCT = FILE.join($BUILD_PATH, 'Resources', 'Aristo.blend');
$ENVIRONMENT_THEME_PRODUCT = FILE.join($ENVIRONMENT_PRODUCT, 'Resources', 'Aristo.blend');
//AppKitFiles = FileList['**/*.j'].exclude('CoreGraphics/CGContextCanvas.j', 'CoreGraphics/CGContextVML.j', 'Themes/**', 'Tools/**')
AppKitFiles = FILE.glob("*.j").concat(FILE.glob("Cib/*.j")).concat(FILE.glob("CoreAnimation/*.j")).concat(FILE.glob("CPWindow/*.j")).concat(FILE.glob("Platform/**/*.j")).concat(FILE.glob("Platform/*.j")).concat(FILE.glob("CoreGraphics/*.j"));
AppKitFiles = new FileList("**/*.j").exclude('CoreGraphics/CGContextCanvas.j', 'CoreGraphics/CGContextVML.j', 'Themes/**/*', 'Tools/**/*');
appKitTask = framework ("AppKit", function(appKitTask)
{
@@ -24,7 +22,7 @@ appKitTask = framework ("AppKit", function(appKitTask)
appKitTask.setIdentifier("com.280n.AppKit");
appKitTask.setLicense(BundleTask.License.LGPL_v2_1);
appKitTask.setSources(AppKitFiles);//terrible!
appKitTask.setResources(FILE.glob("Resources/*"));
appKitTask.setResources(new FileList("Resources/**/*"));
appKitTask.setPlatforms([BundleTask.Platform.Browser, BundleTask.Platform.CommonJS]);
appKitTask.setFlattensSources(true);
@@ -53,17 +51,17 @@ filedir ($COMMONJS_PRODUCT_APPKIT, ["AppKit"], function()
// cp_r(File.join($THEME_PRODUCT, '.'), $ENVIRONMENT_THEME_PRODUCT)
//end
subtasks (["Tools"], ["build"/*, "clean", "clobber"*/]);
$THEME_PRODUCT = FILE.join(appKitTask.buildProductPath(), "Resources", "Aristo.blend");
ThemeFiles = FILE.glob("Themes/Aristo/*");//FileList['Themes/Aristo/*']
ThemeFiles = new FileList("Themes/Aristo/*");
filedir ($THEME_PRODUCT, ThemeFiles, function()
{
OS.system("PATH=$PATH:" + OS.enquote(FILE.join($BUILD_DIR, $CONFIGURATION, "CommonJS", "objective-j", "bin")) + " blend -d Themes/Aristo/ThemeDescriptors.j -o " + $THEME_PRODUCT + " -R Themes/Aristo/Resources");
OS.system("PATH=" + OS.enquote(FILE.join($BUILD_DIR, $CONFIGURATION, "CommonJS", "objective-j", "bin")) + ":$PATH blend -d Themes/Aristo/ThemeDescriptors.j -o " + $THEME_PRODUCT + " -R Themes/Aristo/Resources");
// rake abort if ($? != 0)
});
task ("build", ["AppKit", $COMMONJS_PRODUCT_APPKIT, $THEME_PRODUCT]);
subtasks (["Tools"], ["build"/*, "clean", "clobber"*/]);
//CLOBBER.include($ENVIRONMENT_PRODUCT)
+2 -2
View File
@@ -13,8 +13,8 @@ app ("blend", function(blendTask)
blendTask.setSummary("blend classes for Cappuccino");
blendTask.setIdentifier("blend");
blendTask.setVersion("0.7.1");
blendTask.setSources(FILE.glob("*.j"));// = FileList['**/*.j']
blendTask.setResources(FILE.glob("Resources/*"));// t.resources = FileList['Resources/*']
blendTask.setSources(new FileList("**/*.j"));
blendTask.setResources(new FileList("Resources/**/*"));
blendTask.setLicense(BundleTask.License.LGPL_v2_1);
blendTask.setFlattensSources(true);
+2 -2
View File
@@ -13,8 +13,8 @@ foundationTask = framework ("Foundation", function(foundationTask)
foundationTask.setSummary("Foundation classes for Cappuccino");
foundationTask.setIdentifier("com.280n.Foundation");
foundationTask.setLicense(BundleTask.License.LGPL_v2_1);
foundationTask.setSources(FILE.glob("**/*.j"));//terrible!
foundationTask.setResources(FILE.glob("Resources/*"));
foundationTask.setSources(new FileList("**/*.j"));//terrible!
foundationTask.setResources(new FileList("Resources/**/*"));
foundationTask.setFlattensSources(true);
if ($CONFIGURATION === "Release")
@@ -477,7 +477,7 @@ BundleTask.prototype.defineSourceTasks = function()
staticPath = this.buildProductStaticPathForPlatform(aPlatform),
flags = BundleTask.PLATFORM_DEFAULT_FLAGS[aPlatform].join(" ");
if (!Array.isArray(platformSources))
if (!Array.isArray(platformSources) && platformSources.constructor !== Jake.FileList)
platformSources = platformSources[aPlatform];
var replacedFiles = [];
+2 -1
View File
@@ -10,6 +10,7 @@ global.task = Jake.task;
global.directory = Jake.directory;
//global.file = Jake.file;
global.filedir = Jake.filedir;
global.FileList = Jake.FileList;
// Read in and set up development environment variables.
if (!ENV["BUILD_PATH"])
@@ -77,7 +78,7 @@ if(!global.COMMON_DO_ONCE)
// FIXME: is there a better way to do this???
OS.system = function(aCommand)
{
system("PATH=$PATH:" + OS.enquote(objectiveJBin) + " " + aCommand)
system("PATH=" + OS.enquote(objectiveJBin) + ":$PATH " + aCommand)
}
}
}