Files
cappuccino/Objective-J/CommonJS/lib/objective-j/jake/environment.js
T
David Richardson 20867949ed Build: remove vestigial PLATFORM macro infrastructure
- 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)
2026-10-06 12:07:07 -06:00

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;