mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
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:
parent
9afd794913
commit
eb71ebe306
7 changed files with 102 additions and 66 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue