mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-24 09:08:53 +00:00
- AppKit/Platform/Platform.h deleted; it defined only the PLATFORM(FEATURE) macro, which no source file uses since the AppKit preprocessor-removal work completed - Foundation/Jakefile: the historical --include of that header into every Foundation compilation is removed - Jake/environment.js and the Objective-J subproject's copy: the -DPLATFORM_COMMONJS/-DPLATFORM_BROWSER/-DPLATFORM_DOM flags are removed; they defined symbols read only by the deleted macro - no functional change; capp-build is unaffected (it consumes neither the header nor the flags)
61 lines
1.1 KiB
JavaScript
61 lines
1.1 KiB
JavaScript
|
|
var environments = { };
|
|
|
|
function Environment(/*String*/ aName)
|
|
{
|
|
this._name = aName;
|
|
this._compilerFlags = [];
|
|
this._spritesImages = false;
|
|
|
|
environments[aName] = this;
|
|
}
|
|
|
|
Environment.environmentWithName = function(/*String*/ aName)
|
|
{
|
|
return environments[aName];
|
|
}
|
|
|
|
Environment.prototype.name = function()
|
|
{
|
|
return this._name;
|
|
}
|
|
|
|
Environment.prototype.toString = function()
|
|
{
|
|
return this._name;
|
|
}
|
|
|
|
Environment.prototype.compilerFlags = function()
|
|
{
|
|
return this._compilerFlags;
|
|
}
|
|
|
|
Environment.prototype.setCompilerFlags = function(flags)
|
|
{
|
|
this._compilerFlags = flags;
|
|
}
|
|
|
|
Environment.prototype.setSpritesImages = function(/*Boolean*/ shouldSpriteImages)
|
|
{
|
|
this._spritesImages = !!shouldSpriteImages;
|
|
}
|
|
|
|
Environment.prototype.spritesImages = function()
|
|
{
|
|
return this._spritesImages;
|
|
}
|
|
|
|
exports.Environment = Environment;
|
|
|
|
exports.ObjJ = new Environment("ObjJ");
|
|
|
|
var CommonJS = new Environment("CommonJS");
|
|
|
|
exports.CommonJS = CommonJS;
|
|
|
|
var Browser = new Environment("Browser");
|
|
|
|
Browser.setSpritesImages(true);
|
|
|
|
exports.Browser = Browser;
|