Project Generator File Copy

Project Generator may now automatically copy files needed for a module
into the project's directory.  Use the new copyFileToProject() function
in the module .inc file.  The following modules have been set up for
this:

- FMod
- Leap Motion
- PhysX
- Razer Hydra

These modules have been set up to copy both release and debug files as
appropriate.  When releasing your game you'll likely want to not include
any debug files.
This commit is contained in:
DavidWyand-GG 2013-04-21 17:10:50 -04:00
parent 2dcc7f0247
commit 262ddb1a27
7 changed files with 78 additions and 0 deletions

View file

@ -64,6 +64,10 @@ beginModule( 'fmod' );
{
addIncludePath( $FMOD_SDK_PATH . "/api/inc" );
addIncludePath( $FMOD_SDK_PATH . "/fmoddesignerapi/api/inc" );
// File Copy
copyFileToProject( $FMOD_SDK_PATH . "/api/fmodex.dll", "/game/fmodex.dll" );
copyFileToProject( $FMOD_SDK_PATH . "/fmoddesignerapi/api/fmod_event.dll", "/game/fmod_event.dll" );
}
else
{

View file

@ -72,6 +72,12 @@ beginModule( 'leapMotion' );
// Libs
addProjectLibDir( $LEAPMOTION_SDK_PATH . "/lib/x86" );
addProjectLibInput( "Leap.lib", "Leapd.lib" );
// File Copy for Release
copyFileToProject( $LEAPMOTION_SDK_PATH . "/lib/x86/Leap.dll", "/game/Leap.dll" );
// File Copy for Debug
copyFileToProject( $LEAPMOTION_SDK_PATH . "/lib/x86/Leapd.dll", "/game/Leapd.dll" );
}
endModule();

View file

@ -89,6 +89,13 @@ beginModule( 'physX' );
addProjectLibDir( $PHYSX_SDK_PATH . "/SDKs/lib/Win32" );
addProjectLibInput( "PhysXCooking.lib" );
addProjectLibInput( "PhysXLoader.lib" );
// File Copy
copyFileToProject( $PHYSX_SDK_PATH . "/Bin/win32/cudart32_30_9.dll", "/game/cudart32_30_9.dll" );
copyFileToProject( $PHYSX_SDK_PATH . "/Bin/win32/PhysXCooking.dll", "/game/PhysXCooking.dll" );
copyFileToProject( $PHYSX_SDK_PATH . "/Bin/win32/PhysXCore.dll", "/game/PhysXCore.dll" );
copyFileToProject( $PHYSX_SDK_PATH . "/Bin/win32/PhysXDevice.dll", "/game/PhysXDevice.dll" );
copyFileToProject( $PHYSX_SDK_PATH . "/Bin/win32/PhysXLoader.dll", "/game/PhysXLoader.dll" );
// For PhysX support.
includeLib( 'nxCharacter' );

View file

@ -68,6 +68,13 @@ beginModule( 'razerHydra' );
// Includes
addIncludePath( $RAZERHYDRA_SDK_PATH . "/include" );
// File Copy for Release
copyFileToProject( $RAZERHYDRA_SDK_PATH . "/bin/win32/release_dll/sixense.dll", "/game/sixense.dll" );
// File Copy for Debug
copyFileToProject( $RAZERHYDRA_SDK_PATH . "/bin/win32/debug_dll/sixensed.dll", "/game/sixensed.dll" );
copyFileToProject( $RAZERHYDRA_SDK_PATH . "/samples/win32/sixense_simple3d/DeviceDLL.dll", "/game/DeviceDLL.dll" ); // Only needed by the debug sixense library
}
endModule();