Files
cappuccino/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

66 lines
1.9 KiB
JavaScript

/*
* Objective-J.js
* Objective-J
*
* Created by Francisco Tolmasky.
* Copyright 2008-2010, 280 North, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
var environments = {};
function Environment(aName)
{
this._name = aName;
this._compilerFlags = [];
this._spritesImages = false;
environments[aName] = this;
}
Environment.environmentWithName = function(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(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;