Merge pull request #580 from tdev/php_generator_fixes

fixes problems for newer php version
This commit is contained in:
Thomas Fischer 2014-03-15 10:47:47 +01:00
commit 65227abd82
26 changed files with 160 additions and 160 deletions

View file

@ -60,14 +60,14 @@
addProjectDependency( 'libbullet' );
}
if ( Generator::$platform == "mac" )
if ( T3D_Generator::$platform == "mac" )
{
addProjectDefine( '__MACOSX__' );
addProjectDefine( 'LTM_DESC' );
}
if (Generator::$platform == "win32")
if (T3D_Generator::$platform == "win32")
{
setProjectModuleDefinitionFile('../../' . getLibSrcDir() . 'Torque3D/msvc/torque3d.def');

View file

@ -60,14 +60,14 @@
addProjectDependency( 'libbullet' );
}
if ( Generator::$platform == "mac" )
if ( T3D_Generator::$platform == "mac" )
{
addProjectDefine( '__MACOSX__' );
addProjectDefine( 'LTM_DESC' );
}
if (Generator::$platform == "win32")
if (T3D_Generator::$platform == "win32")
{
setProjectModuleDefinitionFile('../../' . getLibSrcDir() . 'Torque3D/msvc/torque3d.def');

View file

@ -184,7 +184,7 @@ $c->setDontCompilePatterns( "*\.h*", "*win32*", "*\.win\.*", "/D3D.*/", "#/gl/#"
///////////////////////////// Build /////////////////////////////
// 'buildManifest_'.$name.'_'.Generator::$platform.'.txt',
// 'buildManifest_'.$name.'_'.T3D_Generator::$platform.'.txt',
$c = BuildTarget::add( 'build', // Name
'buildFiles', // Solution output directory

View file

@ -37,7 +37,7 @@ require_once( "NPWebPlugin.php");
require_once( "SafariWebPlugin.php");
class Generator
class T3D_Generator
{
public static $app_name;
public static $paths = array();
@ -275,14 +275,14 @@ class Generator
array_push( self::$libGuard, $lib );
// if currently in a project, delay the include
if (Generator::inProjectConfig())
if (T3D_Generator::inProjectConfig())
{
array_push( self::$project_cur->lib_includes, $lib );
return;
}
// otherwise include it immediately
require( Generator::getGeneratorLibsPath() . $lib . '.conf' );
require( T3D_Generator::getGeneratorLibsPath() . $lib . '.conf' );
}
static function addProjectDependency( $pd )
@ -335,7 +335,7 @@ class Generator
if( !self::$module_cur )
self::$module_cur = $name;
else
echo( "Generator::beginModule() - already in module!" );
echo( "T3D_Generator::beginModule() - already in module!" );
}
static function endModule()
@ -343,7 +343,7 @@ class Generator
if( self::$module_cur )
self::$module_cur = null;
else
trigger_error( "Generator::endModule() - no active module!", E_USER_ERROR );
trigger_error( "T3D_Generator::endModule() - no active module!", E_USER_ERROR );
}
static function inProjectConfig()
@ -367,7 +367,7 @@ class Generator
self::$config_projects[ $name ] = self::$project_cur;
}
else
trigger_error( "Generator::beginProjectConfig() - a project is already open!", E_USER_ERROR );
trigger_error( "T3D_Generator::beginProjectConfig() - a project is already open!", E_USER_ERROR );
}
static function endProjectConfig( $type )
@ -424,14 +424,14 @@ class Generator
// Now include any libraries included in the modules
foreach( $p->lib_includes as $libName )
require( Generator::getGeneratorLibsPath() . $libName . '.conf' );
require( T3D_Generator::getGeneratorLibsPath() . $libName . '.conf' );
}
else
trigger_error( "Generator::endProjectConfig() - closing type mismatch!", E_USER_ERROR );
trigger_error( "T3D_Generator::endProjectConfig() - closing type mismatch!", E_USER_ERROR );
}
else
trigger_error( "Generator::endProjectConfig() - no currently open project!", E_USER_ERROR );
trigger_error( "T3D_Generator::endProjectConfig() - no currently open project!", E_USER_ERROR );
}
static function beginActiveXConfig( $lib_name, $guid = '', $game_dir = 'game', $output_name = '' )
@ -571,7 +571,7 @@ class Generator
self::$solutions[ $name ] = self::$solution_cur;
}
else
trigger_error( "Generator::beginSolution() - tried to start $name but already in the ".self::$solution_cur->name." solution!", E_USER_ERROR );
trigger_error( "T3D_Generator::beginSolution() - tried to start $name but already in the ".self::$solution_cur->name." solution!", E_USER_ERROR );
}
static function addSolutionProjectRef( $pname )
@ -579,7 +579,7 @@ class Generator
if( isset( self::$solution_cur ) )
self::$solution_cur->addProjectRef( $pname );
else
trigger_error( "Generator::addSolutionProjectRef(): no such project - " . $pname . "\n", E_USER_ERROR );
trigger_error( "T3D_Generator::addSolutionProjectRef(): no such project - " . $pname . "\n", E_USER_ERROR );
}
static function addSolutionProjectRefExt( $pname, $ppath, $pguid )
@ -587,7 +587,7 @@ class Generator
if( isset( self::$solution_cur ) )
self::$solution_cur->addSolutionProjectRefExt( $pname, $ppath, $pguid );
else
trigger_error( "Generator::addSolutionProjectRefExt(): no such project - " . $pname . "\n", E_USER_ERROR );
trigger_error( "T3D_Generator::addSolutionProjectRefExt(): no such project - " . $pname . "\n", E_USER_ERROR );
}
static function endSolution()
@ -599,7 +599,7 @@ class Generator
self::$solution_cur = null;
}
else
trigger_error( "Generator::endSolution(): no active solution!\n", E_USER_ERROR );
trigger_error( "T3D_Generator::endSolution(): no active solution!\n", E_USER_ERROR );
}
static function generateSolutions( $tpl )

View file

@ -165,7 +165,7 @@ class Project
foreach( $this->dependencies as $pname )
{
$p = Generator::lookupProjectByName( $pname );
$p = T3D_Generator::lookupProjectByName( $pname );
if( $p )
array_push( $pguids, $p->guid );
@ -200,10 +200,10 @@ class Project
{
// This could be consolidated into a single OR statement but it is easier to
// read as two separate if's
if ( !Generator::$absPath )
if ( !T3D_Generator::$absPath )
$newEntry->path = $output->project_rel_path . $newEntry->path;
if ( Generator::$absPath && !stristr($newEntry->path, Generator::$absPath) )
if ( T3D_Generator::$absPath && !stristr($newEntry->path, T3D_Generator::$absPath) )
$newEntry->path = $output->project_rel_path . $newEntry->path;
}
@ -230,10 +230,10 @@ class Project
$curPath = FileUtil::collapsePath( $output->base_dir . $dir );
$pathWalk = &$projectFiles[ $projName ];
if ( Generator::$absPath )
if ( T3D_Generator::$absPath )
{
if ( stristr($curPath, getEngineSrcDir()) || stristr($curPath, getLibSrcDir()) )
$curPath = Generator::$absPath . "/". str_replace("../", "", $curPath);
$curPath = T3D_Generator::$absPath . "/". str_replace("../", "", $curPath);
}
// Check if its a file or a directory.
@ -344,7 +344,7 @@ class Project
$tpl->assign_by_ref( 'projModuleDefinitionFile', $this->moduleDefinitionFile );
$tpl->assign_by_ref( 'projSubSystem', $this->projSubSystem );
if (Generator::$useDLLRuntime)
if (T3D_Generator::$useDLLRuntime)
{
// /MD and /MDd
$tpl->assign( 'projRuntimeRelease', 2 );
@ -381,7 +381,7 @@ class Project
foreach ($this->dependencies as $pname)
{
$p = Generator::lookupProjectByName( $pname );
$p = T3D_Generator::lookupProjectByName( $pname );
$projectDepends[$pname] = $p;
if ( $p )
@ -394,18 +394,18 @@ class Project
// Assign some handy paths for the template to reference
$tpl->assign( 'projectOffset', $output->project_rel_path );
if ( Generator::$absPath )
$tpl->assign( 'srcDir', Generator::$absPath . "/". str_replace("../", "", getAppEngineSrcDir()) );
if ( T3D_Generator::$absPath )
$tpl->assign( 'srcDir', T3D_Generator::$absPath . "/". str_replace("../", "", getAppEngineSrcDir()) );
else
$tpl->assign( 'srcDir', $output->project_rel_path . getAppEngineSrcDir() );
if ( Generator::$absPath )
$tpl->assign( 'libDir', Generator::$absPath . "/". str_replace("../", "", getAppLibSrcDir()) );
if ( T3D_Generator::$absPath )
$tpl->assign( 'libDir', T3D_Generator::$absPath . "/". str_replace("../", "", getAppLibSrcDir()) );
else
$tpl->assign( 'libDir', $output->project_rel_path . getAppLibSrcDir() );
if ( Generator::$absPath )
$tpl->assign( 'binDir', Generator::$absPath . "/". str_replace("../", "", getAppEngineBinDir()) );
if ( T3D_Generator::$absPath )
$tpl->assign( 'binDir', T3D_Generator::$absPath . "/". str_replace("../", "", getAppEngineBinDir()) );
else
$tpl->assign( 'binDir', $output->project_rel_path . getAppEngineBinDir() );
@ -427,18 +427,18 @@ class Project
$libDirs = $output->project_rel_path . $libDirs;
}
if ( Generator::$absPath )
if ( T3D_Generator::$absPath )
{
foreach ($this->includes as &$include)
{
if ( stristr($include, getEngineSrcDir()) || stristr($include, getLibSrcDir()) )
$include = Generator::$absPath . "/". str_replace("../", "", $include);
$include = T3D_Generator::$absPath . "/". str_replace("../", "", $include);
}
foreach ($this->lib_dirs as &$libDirs)
{
if ( stristr($libDirs, getEngineSrcDir()) || stristr($libDirs, getLibSrcDir()) )
$libDirs = Generator::$absPath . "/". str_replace("../", "", $libDirs);
$libDirs = T3D_Generator::$absPath . "/". str_replace("../", "", $libDirs);
}
}
}

View file

@ -85,7 +85,7 @@ class Solution
// Look up each project ref and add its info to the list
foreach( $refs as $pname )
{
$project = Generator::lookupProjectByName( $pname );
$project = T3D_Generator::lookupProjectByName( $pname );
if( isset( $project ) )
{

View file

@ -45,7 +45,7 @@ class Torque3D
includeLib( 'convexDecomp' );
// Use FMOD on consoles
if ( Generator::$platform != "360" && Generator::$platform != "ps3" )
if ( T3D_Generator::$platform != "360" && T3D_Generator::$platform != "ps3" )
{
includeLib( 'libvorbis' );
includeLib( 'libogg' );
@ -63,12 +63,12 @@ class Torque3D
self::includeDefaultLibs();
$ext = "DLL";
if ( Generator::$platform == "mac" )
if ( T3D_Generator::$platform == "mac" )
$ext = "Bundle";
//some platforms will not want a shared config
if ( Generator::$platform == "360" || Generator::$platform == "ps3" )
if ( T3D_Generator::$platform == "360" || T3D_Generator::$platform == "ps3" )
self::$sharedConfig = false;
//begin either a shared lib config, or a static app config
@ -105,7 +105,7 @@ class Torque3D
addLibIncludePath( "squish" );
addLibIncludePath( 'convexDecomp' );
if ( Generator::$platform != "360" && Generator::$platform != "ps3" )
if ( T3D_Generator::$platform != "360" && T3D_Generator::$platform != "ps3" )
{
addLibIncludePath( "libvorbis/include" );
addLibIncludePath( "libogg/include" );
@ -121,13 +121,13 @@ class Torque3D
includeModule( 'basicLighting' );
includeModule( 'collada' );
if ( Generator::$platform != "360" && Generator::$platform != "ps3" )
if ( T3D_Generator::$platform != "360" && T3D_Generator::$platform != "ps3" )
{
includeModule( 'vorbis' );
includeModule( 'theora' );
}
if(Generator::$platform == "mac" || Generator::$platform == "win32")
if(T3D_Generator::$platform == "mac" || T3D_Generator::$platform == "win32")
includeModule( 'openal' );
@ -145,20 +145,20 @@ class Torque3D
addProjectDependency( 'pcre' );
addProjectDependency( 'convexDecomp' );
if ( Generator::$platform != "360" && Generator::$platform != "ps3" )
if ( T3D_Generator::$platform != "360" && T3D_Generator::$platform != "ps3" )
{
addProjectDependency( 'libvorbis' );
addProjectDependency( 'libogg' );
addProjectDependency( 'libtheora' );
}
if ( Generator::$platform == "mac" )
if ( T3D_Generator::$platform == "mac" )
{
addProjectDefine( '__MACOSX__' );
addProjectDefine( 'LTM_DESC' );
}
if (Generator::$platform == "win32")
if (T3D_Generator::$platform == "win32")
{
setProjectModuleDefinitionFile('../../' . getLibSrcDir() . 'Torque3D/msvc/torque3d.def');
@ -209,13 +209,13 @@ class Torque3D
addEngineSrcDir( 'main' );
if (Generator::$platform == "win32")
if (T3D_Generator::$platform == "win32")
{
addProjectDefine( 'WIN32' );
addProjectDependency( getGameProjectName() . ' DLL' );
}
if (Generator::$platform == "mac")
if (T3D_Generator::$platform == "mac")
{
addProjectDefine( '__MACOSX__' );
addProjectDependency( getGameProjectName() . ' Bundle' );
@ -226,7 +226,7 @@ class Torque3D
}
// Add solution references for Visual Studio projects
if (Generator::$platform == "win32" || Generator::$platform == "360" || Generator::$platform == "ps3")
if (T3D_Generator::$platform == "win32" || T3D_Generator::$platform == "360" || T3D_Generator::$platform == "ps3")
{
if ( !self::$sharedConfig )
beginSolutionConfig( getGameProjectName(), '{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}' );
@ -247,7 +247,7 @@ class Torque3D
addSolutionProjectRef( 'zlib' );
addSolutionProjectRef( 'convexDecomp' );
if (Generator::$platform == "win32")
if (T3D_Generator::$platform == "win32")
{
addSolutionProjectRef( 'libogg' );
addSolutionProjectRef( 'libvorbis' );

View file

@ -35,7 +35,7 @@ includeLib( 'pcre' );
includeLib( 'convexDecomp' );
// Use FMOD on consoles
if ( Generator::$platform != "360" && Generator::$platform != "ps3" )
if ( T3D_Generator::$platform != "360" && T3D_Generator::$platform != "ps3" )
{
includeLib( 'libvorbis' );
includeLib( 'libogg' );
@ -43,7 +43,7 @@ if ( Generator::$platform != "360" && Generator::$platform != "ps3" )
}
$ext = "DLL";
if ( Generator::$platform == "mac" )
if ( T3D_Generator::$platform == "mac" )
$ext = "Bundle";
// We need to pick the right physics engine to include.
@ -52,7 +52,7 @@ global $PHYSX_SDK_PATH;
//some platforms will not want a shared config
$useSharedConfig = true;
if ( Generator::$platform == "360" || Generator::$platform == "ps3" )
if ( T3D_Generator::$platform == "360" || T3D_Generator::$platform == "ps3" )
$useSharedConfig = false;
//begin either a shared lib config, or a static app config
@ -89,7 +89,7 @@ else
addLibIncludePath( "squish" );
addLibIncludePath( "convexDecomp" );
if ( Generator::$platform != "360" && Generator::$platform != "ps3" )
if ( T3D_Generator::$platform != "360" && T3D_Generator::$platform != "ps3" )
{
addLibIncludePath( "libvorbis/include" );
addLibIncludePath( "libogg/include" );
@ -107,13 +107,13 @@ else
includeModule( 'basicLighting' );
includeModule( 'collada' );
if ( Generator::$platform != "360" && Generator::$platform != "ps3" )
if ( T3D_Generator::$platform != "360" && T3D_Generator::$platform != "ps3" )
{
includeModule( 'vorbis' );
includeModule( 'theora' );
}
if(Generator::$platform == "mac" || Generator::$platform == "win32")
if(T3D_Generator::$platform == "mac" || T3D_Generator::$platform == "win32")
includeModule( 'openal' );
// Demo functionality
@ -142,7 +142,7 @@ else
addProjectDependency( 'pcre' );
addProjectDependency( 'convexDecomp' );
if ( Generator::$platform != "360" && Generator::$platform != "ps3" )
if ( T3D_Generator::$platform != "360" && T3D_Generator::$platform != "ps3" )
{
addProjectDependency( 'libvorbis' );
addProjectDependency( 'libogg' );
@ -162,13 +162,13 @@ else
addProjectDependency( 'nxuStream' );
}
if ( Generator::$platform == "mac" )
if ( T3D_Generator::$platform == "mac" )
{
addProjectDefine( '__MACOSX__' );
addProjectDefine( 'LTM_DESC' );
}
if (Generator::$platform == "win32")
if (T3D_Generator::$platform == "win32")
{
setProjectModuleDefinitionFile('../../' . getLibSrcDir() . 'Torque3D/msvc/torque3d.def');
@ -216,13 +216,13 @@ beginSharedAppConfig( getGameProjectName(), '{CDECDFF9-E125-523F-87BC-2D89DB971C
addEngineSrcDir( 'main' );
if (Generator::$platform == "win32")
if (T3D_Generator::$platform == "win32")
{
addProjectDefine( 'WIN32' );
addProjectDependency( getGameProjectName() . ' DLL' );
}
if (Generator::$platform == "mac")
if (T3D_Generator::$platform == "mac")
{
addProjectDefine( '__MACOSX__' );
addProjectDependency( getGameProjectName() . ' Bundle' );
@ -233,7 +233,7 @@ endSharedAppConfig();
}
// Add solution references for Visual Studio projects
if (Generator::$platform == "win32" || Generator::$platform == "360" || Generator::$platform == "ps3")
if (T3D_Generator::$platform == "win32" || T3D_Generator::$platform == "360" || T3D_Generator::$platform == "ps3")
{
if ( !$useSharedConfig )
beginSolutionConfig( getGameProjectName(), '{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}' );
@ -253,7 +253,7 @@ if ( !$useSharedConfig )
addSolutionProjectRef( 'zlib' );
addSolutionProjectRef( 'convexDecomp' );
if (Generator::$platform == "win32")
if (T3D_Generator::$platform == "win32")
{
addSolutionProjectRef( 'libogg' );
addSolutionProjectRef( 'libvorbis' );

View file

@ -21,7 +21,7 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
if (Generator::$platform == "win32")
if (T3D_Generator::$platform == "win32")
{
// Include the web deployment settings
$webDeployConf = realpath($argv[1])."/buildFiles/config/webDeploy.conf";
@ -55,7 +55,7 @@ if (Generator::$platform == "win32")
}
if (Generator::$platform == "mac")
if (T3D_Generator::$platform == "mac")
{
// Include the web deployment settings
$webDeployConf = realpath($argv[1])."/buildFiles/config/webDeploy.mac.conf";

View file

@ -29,13 +29,13 @@ beginLibConfig( 'convexDecomp', '{4EF87A4E-16ED-4E64-BF04-841B2675AEE0}' );
// Additional includes
addLibIncludePath( 'convexDecomp' );
if ( Generator::$platform == "360" )
if ( T3D_Generator::$platform == "360" )
addProjectDefine( '_XBOX' );
else if ( Generator::$platform == "ps3" )
else if ( T3D_Generator::$platform == "ps3" )
addProjectDefine( '__CELLOS_LV2__' );
else if ( Generator::$platform == "mac" )
else if ( T3D_Generator::$platform == "mac" )
addProjectDefine( '__APPLE__' );
else if ( Generator::$platform == "win32" )
else if ( T3D_Generator::$platform == "win32" )
addProjectDefine( 'WIN32' );
endLibConfig();

View file

@ -39,8 +39,8 @@ beginLibConfig( 'libbullet', '{4368B65C-F5EF-4D28-B533-B02A04EBE921}' );
addLibSrcDir( 'bullet/src/LinearMath' );
// TODO: Can we do multicore on OSX?
if ( Generator::$platform == "win32" ||
Generator::$platform == "360" )
if ( T3D_Generator::$platform == "win32" ||
T3D_Generator::$platform == "360" )
{
addProjectDefine( 'WIN32' );

View file

@ -24,11 +24,11 @@
beginLibConfig( 'librecast', '{F2C0209B-1B90-4F73-816A-A0920FF8B107}' );
// Source
addSrcDir( Generator::getLibSrcDir() . 'recast/DebugUtils/Source', true );
addSrcDir( Generator::getLibSrcDir() . 'recast/Recast/Source', true );
addSrcDir( Generator::getLibSrcDir() . 'recast/Detour/Source', true );
addSrcDir( Generator::getLibSrcDir() . 'recast/DetourCrowd/Source', true );
addSrcDir( Generator::getLibSrcDir() . 'recast/DetourTileCache/Source', true );
addSrcDir( T3D_Generator::getLibSrcDir() . 'recast/DebugUtils/Source', true );
addSrcDir( T3D_Generator::getLibSrcDir() . 'recast/Recast/Source', true );
addSrcDir( T3D_Generator::getLibSrcDir() . 'recast/Detour/Source', true );
addSrcDir( T3D_Generator::getLibSrcDir() . 'recast/DetourCrowd/Source', true );
addSrcDir( T3D_Generator::getLibSrcDir() . 'recast/DetourTileCache/Source', true );
// Additional includes
addLibIncludePath( 'recast/DebugUtils/Include' );

View file

@ -74,7 +74,7 @@ else
addEngineSrcDir('T3D/gameBase/std');
// Plstform specific stuff.
switch( Generator::$platform )
switch( T3D_Generator::$platform )
{
case "360":
addEngineSrcDir('ts/arch/360');

View file

@ -28,7 +28,7 @@ beginModule( 'advancedLighting' );
addEngineSrcDir( 'lighting/advanced' );
addEngineSrcDir( 'lighting/shadowMap' );
switch( Generator::$platform )
switch( T3D_Generator::$platform )
{
case "win32":
addEngineSrcDir( 'lighting/advanced/hlsl' );

View file

@ -31,7 +31,7 @@ addEngineSrcDir('component');
addEngineSrcDir('component/interfaces');
// Core
if (Generator::isApp())
if (T3D_Generator::isApp())
addSrcDir( '../source' );
addEngineSrcDir('console');
@ -59,7 +59,7 @@ addEngineSrcDir('math/test');
addEngineSrcDir('platform');
addEngineSrcDir('cinterface');
switch( Generator::$platform )
switch( T3D_Generator::$platform )
{
case "win32":
case "mac":
@ -80,7 +80,7 @@ addEngineSrcDir('app/net');
// Moved this here temporarily because PopupMenu uses on it and is currently in core
addEngineSrcDir('util/messaging');
switch( Generator::$platform )
switch( T3D_Generator::$platform )
{
case "win32":
addEngineSrcDir('platformWin32');
@ -132,7 +132,7 @@ addEngineSrcDir( 'gfx/video' );
addEngineSrcDir( 'gfx' );
addEngineSrcDir( 'shaderGen' );
switch( Generator::$platform )
switch( T3D_Generator::$platform )
{
case "win32":
//addEngineSrcDir( 'gfx/D3D8' );
@ -199,7 +199,7 @@ addIncludePath( '../../source' ); // product source (relative to solution ou
addIncludePath( getAppEngineSrcDir() ); // main engine source dir relative to app project file
addIncludePath( getAppLibSrcDir() ); // main lib source dir relative to app project file
if ( Generator::$platform == "win32" )
if ( T3D_Generator::$platform == "win32" )
{
addIncludePath( getAppLibSrcDir() . 'directx8' );
addIncludePath( getAppLibSrcDir() . 'openal/win32' );

View file

@ -23,13 +23,13 @@
beginModule( 'dsound' );
if ( Generator::$platform == "win32" )
if ( T3D_Generator::$platform == "win32" )
{
addEngineSrcDir('sfx/dsound');
addEngineSrcDir('sfx/xaudio');
addProjectLibInput('x3daudio.lib');
}
else if ( Generator::$platform == "360" )
else if ( T3D_Generator::$platform == "360" )
addEngineSrcDir('sfx/xaudio');
endModule();

View file

@ -25,7 +25,7 @@ beginModule( 'fmod' );
$allgood = true;
// Additional includes
switch( Generator::$platform )
switch( T3D_Generator::$platform )
{
case "win32":
case "mac":

View file

@ -30,7 +30,7 @@ addLibSrcDir( 'ljpeg' );
addLibIncludePath( 'ljpeg' );
// Defines
if ( Generator::$platform == "360" )
if ( T3D_Generator::$platform == "360" )
addProjectDefines( 'NO_GETENV;' );
endModule();

View file

@ -61,7 +61,7 @@ beginModule( 'leapMotion' );
}
// Only Windows is supported at this time
if ( Generator::$platform == "win32" )
if ( T3D_Generator::$platform == "win32" )
{
// Source
addEngineSrcDir( "platform/input/leapMotion" );

View file

@ -27,7 +27,7 @@ addLibSrcDir( 'libtheora/include/theora' );
addLibSrcDir( 'libtheora/lib' );
addLibSrcDir( 'libtheora/lib/dec' );
switch( Generator::$platform )
switch( T3D_Generator::$platform )
{
case "win32":
addLibSrcDir( 'libtheora/lib/dec/x86_vc' );
@ -41,7 +41,7 @@ switch( Generator::$platform )
// As we don't use the encoder, disable this for now.
addLibSrcDir( 'libtheora/lib/enc' );
switch( Generator::$platform )
switch( T3D_Generator::$platform )
{
case "win32":
addLibSrcDir( 'libtheora/lib/enc/x86_32_vs' );

View file

@ -61,7 +61,7 @@ beginModule( 'oculusVR' );
}
// Only Windows is supported at this time
if ( Generator::$platform == "win32" )
if ( T3D_Generator::$platform == "win32" )
{
// Source
addEngineSrcDir( "platform/input/oculusVR" );

View file

@ -26,7 +26,7 @@ addEngineSrcDir('sfx/openal');
addEngineSrcDir('sfx/openal/mac');
addEngineSrcDir('sfx/openal/win32');
if ( Generator::$platform == "win32" )
if ( T3D_Generator::$platform == "win32" )
addIncludePath( getAppLibSrcDir() . 'openal/win32' );
?>

View file

@ -30,7 +30,7 @@ beginModule( 'lpng' );
addLibIncludePath( 'lpng' );
// Defines
if ( Generator::$platform == "360" )
if ( T3D_Generator::$platform == "360" )
addProjectDefines( 'PNG_NO_ASSEMBLER_CODE' );
endModule();

View file

@ -61,7 +61,7 @@ beginModule( 'razerHydra' );
}
// Only Windows is supported at this time
if ( Generator::$platform == "win32" )
if ( T3D_Generator::$platform == "win32" )
{
// Source
addEngineSrcDir( "platform/input/razerHydra" );

View file

@ -32,7 +32,7 @@ function beginProject($name, $sharedConfig)
// Set the game project name, this is what your game's exe/dll will be called
setGameProjectName($name);
if (Generator::$platform == "win32" && $sharedConfig)
if (T3D_Generator::$platform == "win32" && $sharedConfig)
beginSolutionConfig( $name, '{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}' );
@ -40,18 +40,18 @@ function beginProject($name, $sharedConfig)
function endProject($sharedConfig)
{
if (Generator::$platform == "win32" && $sharedConfig)
if (T3D_Generator::$platform == "win32" && $sharedConfig)
endSolutionConfig();
}
function beginSolutionConfig( $name, $guid = '' )
{
Generator::beginSolution( $name, $guid );
T3D_Generator::beginSolution( $name, $guid );
}
function addSolutionProjectRef( $pname )
{
Generator::addSolutionProjectRef( $pname );
T3D_Generator::addSolutionProjectRef( $pname );
}
// Add a reference to an external project, this is used for WPF projects currently
@ -59,114 +59,114 @@ function addSolutionProjectRef( $pname )
// However, it is nice to not have to add the project to the solution whenever you run the project generator
function addSolutionProjectRefExt( $pname, $ppath, $pguid )
{
Generator::addSolutionProjectRefExt( $pname, $ppath, $pguid );
T3D_Generator::addSolutionProjectRefExt( $pname, $ppath, $pguid );
}
function endSolutionConfig()
{
Generator::endSolution();
T3D_Generator::endSolution();
}
function setPlatform( $platform )
{
echo(' - Setting platform to: ' . $platform . "\n");
Generator::$platform = $platform;
T3D_Generator::$platform = $platform;
}
function includeLib( $libName )
{
//echo( "GLP: " . Generator::getGeneratorLibsPath() . $libName . "\n" );
//echo( "GLP: " . T3D_Generator::getGeneratorLibsPath() . $libName . "\n" );
Generator::includeLib( $libName );
T3D_Generator::includeLib( $libName );
}
function includeModule( $modName )
{
require( Generator::getGeneratorModulesPath() . $modName . '.inc' );
require( T3D_Generator::getGeneratorModulesPath() . $modName . '.inc' );
}
function beginActiveXConfig( $lib_name, $guid = '', $gameDir = 'game', $output_name = '' )
{
Generator::beginActiveXConfig( $lib_name, $guid, $gameDir, $output_name );
T3D_Generator::beginActiveXConfig( $lib_name, $guid, $gameDir, $output_name );
}
function endActiveXConfig()
{
Generator::endActiveXConfig();
T3D_Generator::endActiveXConfig();
}
function beginSafariConfig( $lib_name, $guid = '', $gameDir = 'game', $output_name = '' )
{
Generator::beginSafariConfig( $lib_name, $guid, $gameDir, $output_name );
T3D_Generator::beginSafariConfig( $lib_name, $guid, $gameDir, $output_name );
}
function endSafariConfig()
{
Generator::endSafariConfig();
T3D_Generator::endSafariConfig();
}
function beginSharedLibConfig( $lib_name, $guid = '', $gameDir = 'game', $output_name = '' )
{
Generator::beginSharedLibConfig( $lib_name, $guid, $gameDir, $output_name );
T3D_Generator::beginSharedLibConfig( $lib_name, $guid, $gameDir, $output_name );
}
function endSharedLibConfig()
{
Generator::endSharedLibConfig();
T3D_Generator::endSharedLibConfig();
}
function beginNPPluginConfig( $lib_name, $guid = '', $gameDir = 'game', $output_name = '' )
{
Generator::beginNPPluginConfig( $lib_name, $guid, $gameDir, $output_name );
T3D_Generator::beginNPPluginConfig( $lib_name, $guid, $gameDir, $output_name );
}
function endNPPluginConfig()
{
Generator::endNPPluginConfig();
T3D_Generator::endNPPluginConfig();
}
function beginLibConfig( $lib_name, $guid = '', $gameDir = 'game', $output_name = '' )
{
Generator::beginLibConfig( $lib_name, $guid, $gameDir, $output_name );
T3D_Generator::beginLibConfig( $lib_name, $guid, $gameDir, $output_name );
}
function endLibConfig()
{
Generator::endLibConfig();
T3D_Generator::endLibConfig();
}
function beginAppConfig( $app_name, $guid = '', $game_dir = 'game', $output_name = '' )
{
Generator::beginAppConfig( $app_name, $guid, $game_dir, $output_name );
T3D_Generator::beginAppConfig( $app_name, $guid, $game_dir, $output_name );
}
function endAppConfig()
{
Generator::endAppConfig();
T3D_Generator::endAppConfig();
}
function beginSharedAppConfig( $app_name, $guid = '', $game_dir = 'game', $output_name = '' )
{
Generator::beginSharedAppConfig( $app_name, $guid, $game_dir, $output_name );
T3D_Generator::beginSharedAppConfig( $app_name, $guid, $game_dir, $output_name );
}
function endSharedAppConfig()
{
Generator::endSharedAppConfig();
T3D_Generator::endSharedAppConfig();
}
function beginCSProjectConfig( $app_name, $guid = '', $game_dir = 'game', $output_name = '' )
{
Generator::beginCSProjectConfig( $app_name, $guid, $game_dir, $output_name );
T3D_Generator::beginCSProjectConfig( $app_name, $guid, $game_dir, $output_name );
}
function endCSProjectConfig()
{
Generator::endCSProjectConfig();
T3D_Generator::endCSProjectConfig();
}
@ -175,26 +175,26 @@ function endCSProjectConfig()
function beginModule( $name )
{
Generator::beginModule( $name );
T3D_Generator::beginModule( $name );
}
function endModule()
{
Generator::endModule();
T3D_Generator::endModule();
}
function addSrcDir( $dir, $recurse = false )
{
//echo( "ADD SRC DIR: " . $dir . "\n" );
Generator::addSrcDir( $dir, $recurse );
T3D_Generator::addSrcDir( $dir, $recurse );
}
function addSrcFile( $file )
{
//echo( "ADD SRC FILE: " . $file . "\n" );
Generator::addSrcFile( $file );
T3D_Generator::addSrcFile( $file );
}
function addEngineSrcDir( $dir )
@ -213,12 +213,12 @@ function addEngineSrcFile( $file )
function addLibSrcDir( $dir )
{
addSrcDir( Generator::getLibSrcDir() . $dir );
addSrcDir( T3D_Generator::getLibSrcDir() . $dir );
}
function addLibSrcFile( $file )
{
addSrcDir( Generator::getLibSrcDir() . $file );
addSrcDir( T3D_Generator::getLibSrcDir() . $file );
}
function addLibIncludePath( $path )
@ -253,29 +253,29 @@ function getAppEngineBinDir()
function getEngineSrcDir()
{
return Generator::getEngineSrcDir();
return T3D_Generator::getEngineSrcDir();
}
function getLibSrcDir()
{
return Generator::getLibSrcDir();
return T3D_Generator::getLibSrcDir();
}
function getEngineBinDir()
{
return Generator::getEngineBinDir();
return T3D_Generator::getEngineBinDir();
}
function addIncludePath( $path )
{
//echo( "ADD INCLUDE: " . $path . "\n" );
Generator::addIncludePath( $path );
T3D_Generator::addIncludePath( $path );
}
/// Add a preprocessor directive/define
function addProjectDefine( $d, $v = null )
{
Generator::addProjectDefine( $d, $v );
T3D_Generator::addProjectDefine( $d, $v );
}
/// Add a list of defines in one call
function addProjectDefines()
@ -284,143 +284,143 @@ function addProjectDefines()
$count = func_num_args();
if( $count > 0 )
Generator::addProjectDefines( $args );
T3D_Generator::addProjectDefines( $args );
else
echo( "addProjectDefines() - no arguments passed!" );
}
function setProjectGUID( $guid )
{
Generator::setProjectGUID( $guid );
T3D_Generator::setProjectGUID( $guid );
}
function setProjectModuleDefinitionFile( $mdef )
{
Generator::setProjectModuleDefinitionFile( $mdef );
T3D_Generator::setProjectModuleDefinitionFile( $mdef );
}
function addProjectLibDir( $dir )
{
Generator::addProjectLibDir( $dir );
T3D_Generator::addProjectLibDir( $dir );
}
function addProjectLibInput( $lib_name, $libDebug = null )
{
Generator::addProjectLibInput( $lib_name, $libDebug );
T3D_Generator::addProjectLibInput( $lib_name, $libDebug );
}
function addProjectIgnoreDefaultLib( $lib )
{
Generator::addProjectIgnoreDefaultLib( $lib );
T3D_Generator::addProjectIgnoreDefaultLib( $lib );
}
function copyFileToProject( $sourcePath, $projPath )
{
Generator::copyFileToProject( $sourcePath, $projPath );
T3D_Generator::copyFileToProject( $sourcePath, $projPath );
}
function addProjectDependency( $pd )
{
Generator::addProjectDependency( $pd );
T3D_Generator::addProjectDependency( $pd );
}
function removeProjectDependency( $pd )
{
Generator::removeProjectDependency( $pd );
T3D_Generator::removeProjectDependency( $pd );
}
function addProjectReference( $refName, $version = "" )
{
Generator::addProjectReference( $refName, $version );
T3D_Generator::addProjectReference( $refName, $version );
}
// disable a specific project compiler warning
function disableProjectWarning( $warning )
{
Generator::disableProjectWarning( $warning );
T3D_Generator::disableProjectWarning( $warning );
}
function setGameProjectName($name)
{
Generator::setGameProjectName($name);
T3D_Generator::setGameProjectName($name);
}
function getGameProjectName()
{
return Generator::getGameProjectName();
return T3D_Generator::getGameProjectName();
}
function setToolBuild($tb)
{
Generator::setToolBuild($tb);
T3D_Generator::setToolBuild($tb);
}
function getToolBuild()
{
return Generator::getToolBuild();
return T3D_Generator::getToolBuild();
}
function setWatermarkBuild($wb)
{
Generator::setWatermarkBuild($wb);
T3D_Generator::setWatermarkBuild($wb);
}
function getWatermarkBuild()
{
return Generator::getWatermarkBuild();
return T3D_Generator::getWatermarkBuild();
}
function setPurchaseScreenBuild($psb)
{
Generator::setPurchaseScreenBuild($psb);
T3D_Generator::setPurchaseScreenBuild($psb);
}
function getPurchaseScreenBuild()
{
return Generator::getPurchaseScreenBuild();
return T3D_Generator::getPurchaseScreenBuild();
}
function setDemoBuild($db)
{
Generator::setDemoBuild($db);
T3D_Generator::setDemoBuild($db);
}
function getDemoBuild()
{
return Generator::getDemoBuild();
return T3D_Generator::getDemoBuild();
}
function setObjectLimitBuild($olb)
{
Generator::setObjectLimitBuild($olb);
T3D_Generator::setObjectLimitBuild($olb);
}
function getObjectLimitBuild()
{
return Generator::getObjectLimitBuild();
return T3D_Generator::getObjectLimitBuild();
}
function setTimeOutBuild($tob)
{
Generator::setTimeOutBuild($tob);
T3D_Generator::setTimeOutBuild($tob);
}
function getTimeOutBuild()
{
return Generator::getTimeOutBuild();
return T3D_Generator::getTimeOutBuild();
}
function inProjectConfig()
{
return Generator::inProjectConfig();
return T3D_Generator::inProjectConfig();
}
// On Windows, 1 - Console, 2 - Windows
function setProjectSubSystem( $subSystem )
{
Generator::setProjectSubSystem( $subSystem );
T3D_Generator::setProjectSubSystem( $subSystem );
}
// Sets whether to use /MT or /MD code generation/runtime on Windows
@ -429,7 +429,7 @@ function setProjectSubSystem( $subSystem )
// You must include or install via the redistributable package the appropriate VS runtime for end users.
function setDLLRuntime ($val)
{
Generator::setDLLRuntime( $val );
T3D_Generator::setDLLRuntime( $val );
}
//-------------------------------------------------------------------------------- UTIL

View file

@ -70,7 +70,7 @@ if ( $argc >= 3 )
$torqueRoot = str_replace( "\\", "/", $argv[2] );
// Kick off the generator
Generator::init( $torqueRoot );
T3D_Generator::init( $torqueRoot );
// Ready to read our config file.
echo( " - Loading config file " . realpath($argv[1])."\n" );
@ -78,12 +78,12 @@ echo( " - Loading config file " . realpath($argv[1])."\n" );
require( $argv[ 1 ] );
// Generate all projects
Generator::generateProjects( $tpl );
T3D_Generator::generateProjects( $tpl );
// Now the solutions (if any)
$tpl->clear_all_cache();
Generator::generateSolutions( $tpl );
T3D_Generator::generateSolutions( $tpl );
// finally write out the sample.html for web deployment (if any)
WebPlugin::writeSampleHtml();