mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
74 lines
2.9 KiB
JavaScript
74 lines
2.9 KiB
JavaScript
#!/usr/bin/env narwhal
|
|
|
|
require("../common.jake");
|
|
|
|
|
|
$BUILD_PATH = FILE.join($BUILD_DIR, $CONFIGURATION, 'AppKit');
|
|
$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("CoreGraphics/*.j"));
|
|
|
|
appKitTask = framework ("AppKit", function(appKitTask)
|
|
{
|
|
appKitTask.setBuildIntermediatesPath(FILE.join($BUILD_DIR, "AppKit.build", $CONFIGURATION))
|
|
appKitTask.setBuildPath(FILE.join($BUILD_DIR, $CONFIGURATION));
|
|
|
|
appKitTask.setAuthor("280 North, Inc.");
|
|
appKitTask.setEmail("feedback @nospam@ 280north.com");
|
|
appKitTask.setSummary("AppKit classes for Cappuccino");
|
|
appKitTask.setIdentifier("com.280n.AppKit");
|
|
appKitTask.setLicense(BundleTask.License.LGPL_v2_1);
|
|
appKitTask.setSources(AppKitFiles);//terrible!
|
|
appKitTask.setResources(FILE.glob("Resources/*"));
|
|
appKitTask.setPlatforms([BundleTask.Platform.Browser, BundleTask.Platform.CommonJS]);
|
|
appKitTask.setFlattensSources(true);
|
|
|
|
if ($CONFIGURATION === "Release")
|
|
appKitTask.setCompilerFlags("-O");
|
|
else
|
|
appKitTask.setCompilerFlags("-DDEBUG -g");
|
|
});
|
|
|
|
$COMMONJS_PRODUCT_APPKIT = FILE.join($COMMONJS_PRODUCT_FRAMEWORKS, "AppKit");
|
|
|
|
filedir ($COMMONJS_PRODUCT_APPKIT, ["AppKit"], function()
|
|
{
|
|
cp_r(appKitTask.buildProductPath(), $COMMONJS_PRODUCT_APPKIT);
|
|
});
|
|
|
|
//# It would be nice to just have ENVIRONMENT_PRODUCT depend on THEME_PRODUCT,
|
|
//# but this would be a circular dependency because THEME_PRODUCT needs
|
|
//# ENVIRONMENT_PRODUCT up-to-date since it runs an objj application that uses
|
|
//# AppKit.
|
|
//file_d $ENVIRONMENT_PRODUCT => [:AppKit] do
|
|
// cp_r(File.join($BUILD_PATH, '.'), $ENVIRONMENT_PRODUCT)
|
|
//end
|
|
|
|
//file_d $ENVIRONMENT_THEME_PRODUCT => $THEME_PRODUCT do
|
|
// cp_r(File.join($THEME_PRODUCT, '.'), $ENVIRONMENT_THEME_PRODUCT)
|
|
//end
|
|
|
|
$THEME_PRODUCT = FILE.join(appKitTask.buildProductPath(), "Resources", "Aristo.blend");
|
|
ThemeFiles = FILE.glob("Themes/Aristo/*");//FileList['Themes/Aristo/*']
|
|
|
|
filedir ($THEME_PRODUCT, ThemeFiles, function()
|
|
{print("IN HERE");
|
|
var blend = OS.popen("blend -d Themes/Aristo/ThemeDescriptors.j -o " + $THEME_PRODUCT + " -R Themes/Aristo/Resources"),
|
|
output = "";
|
|
|
|
while (output = blend.stdout.read())
|
|
print(output);
|
|
// rake abort if ($? != 0)
|
|
});
|
|
|
|
task ("build", ["AppKit", $COMMONJS_PRODUCT_APPKIT, $THEME_PRODUCT]);
|
|
|
|
subtasks (["Tools"], ["build"/*, "clean", "clobber"*/]);
|
|
|
|
//CLOBBER.include($ENVIRONMENT_PRODUCT)
|