Added support for FMOD 4.42.03 Stable

The FMOD include files are now assumed to be located outside of the
Torque 3D directory structure.  See
Tools/projectGenerator/modules/fmod.inc for the various methods to tell
the Project Generator how to find FMOD.  If FMOD is installed in its
default location then nothing special is required.
This commit is contained in:
DavidWyand-GG 2012-09-24 15:47:29 -04:00
parent 9afd794913
commit eb71ebe306
7 changed files with 102 additions and 66 deletions

View file

@ -115,7 +115,7 @@ class Torque3D
// Modules
includeModule( 'core' );
includeModule( 'dsound' );
//includeModule( 'fmod'); // FMOD support removed until made as a 3rd party library
includeModule( 'fmod');
includeModule( 'T3D' );
includeModule( 'advancedLighting' );
includeModule( 'basicLighting' );

View file

@ -23,14 +23,55 @@
beginModule( 'fmod' );
$allgood = true;
// Additional includes
switch( Generator::$platform )
{
case "win32":
case "mac":
addLibIncludePath( 'fmod/inc' );
break;
//addLibIncludePath( 'fmod/inc' );
// Look for the optional global from the project.conf.
global $FMOD_SDK_PATH;
if (!$FMOD_SDK_PATH)
{
// First look for an environment var.
$FMOD_SDK_PATH = getenv( "TORQUE_FMOD_PATH" );
if (strlen($FMOD_SDK_PATH) == 0 || !file_exists($FMOD_SDK_PATH))
{
// Check for another environment variable. There is no standard one for FMOD.
$FMOD_SDK_PATH = getenv( "FMOD_SDK_PATH" );
if (strlen($FMOD_SDK_PATH) == 0 || !file_exists($FMOD_SDK_PATH))
{
// No environment variables present so check the FMOD SDK install location
$FMOD_SDK_PATH = getenv("ProgramFiles") . "/FMOD SoundSystem/FMOD Programmers API Windows";
// Last channce... try the x86 default install path.
if (!file_exists($FMOD_SDK_PATH))
$FMOD_SDK_PATH = getenv("ProgramFiles(x86)") . "/FMOD SoundSystem/FMOD Programmers API Windows";
}
}
// We need forward slashes for paths.
$FMOD_SDK_PATH = str_replace( "\\", "/", $FMOD_SDK_PATH);
// Remove trailing slashes.
$FMOD_SDK_PATH = rtrim($FMOD_SDK_PATH, " /");
}
if (file_exists($FMOD_SDK_PATH))
{
addIncludePath( $FMOD_SDK_PATH . "/api/inc" );
addIncludePath( $FMOD_SDK_PATH . "/fmoddesignerapi/api/inc" );
}
else
{
echo "\n\n*** FMOD PATH NOT VALID \n\n";
$allgood = false;
}
break;
case "360":
// Assume 32-bit system