mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-26 14:55:39 +00:00
Merge remote-tracking branch 'GarageGames/development' into physx3_basic
This commit is contained in:
commit
d58a69e76c
527 changed files with 9928 additions and 5548 deletions
28
Tools/CMake/CMakeLists.txt
Normal file
28
Tools/CMake/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
include(basics.cmake)
|
||||
|
||||
setupVersionNumbers()
|
||||
|
||||
#the libs
|
||||
include(lmng.cmake)
|
||||
include(lpng.cmake)
|
||||
include(lungif.cmake)
|
||||
include(zlib.cmake)
|
||||
include(ljpeg.cmake)
|
||||
include(tinyxml.cmake)
|
||||
include(opcode.cmake)
|
||||
include(squish.cmake)
|
||||
include(collada.cmake)
|
||||
include(pcre.cmake)
|
||||
include(convexDecomp.cmake)
|
||||
if(TORQUE_SFX_VORBIS)
|
||||
include(libvorbis.cmake)
|
||||
include(libogg.cmake)
|
||||
endif()
|
||||
if(TORQUE_THEORA)
|
||||
include(libtheora.cmake)
|
||||
endif()
|
||||
|
||||
# the main engine, should come last
|
||||
include(torque3d.cmake)
|
||||
|
||||
#setupPackaging()
|
||||
15
Tools/CMake/app-debug-win.bat.in
Normal file
15
Tools/CMake/app-debug-win.bat.in
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
:: little debug helper script that helps you starting Torque3D with command line arguments.
|
||||
|
||||
:: possible args:
|
||||
:: -log <Mode: 0,1,2>
|
||||
:: -console
|
||||
:: -level <level.mis>
|
||||
:: -worldeditor
|
||||
:: -guieditor
|
||||
:: -help
|
||||
|
||||
:: as example, we just show the console
|
||||
"@PROJECT_NAME@.exe" -console
|
||||
|
||||
:: or load a level and open the editor:
|
||||
:: "@PROJECT_NAME@.exe" -console -level mylevel.mis -worldeditor
|
||||
323
Tools/CMake/basics.cmake
Normal file
323
Tools/CMake/basics.cmake
Normal file
|
|
@ -0,0 +1,323 @@
|
|||
project("Torque3DEngine")
|
||||
|
||||
set(TORQUE_TEMPLATE "Full" CACHE STRING "the template to use")
|
||||
|
||||
if(NOT projectDir)
|
||||
set(projectDir "${CMAKE_SOURCE_DIR}/My Projects/${TORQUE_APP_NAME}")
|
||||
endif()
|
||||
if(NOT projectOutDir)
|
||||
set(projectOutDir "${projectDir}/game")
|
||||
endif()
|
||||
if(NOT projectSrcDir)
|
||||
set(projectSrcDir "${projectDir}/source")
|
||||
endif()
|
||||
set(libDir "${CMAKE_SOURCE_DIR}/Engine/lib")
|
||||
set(srcDir "${CMAKE_SOURCE_DIR}/Engine/source")
|
||||
set(cmakeDir "${CMAKE_SOURCE_DIR}/Tools/CMake")
|
||||
|
||||
|
||||
# hide some things
|
||||
mark_as_advanced(CMAKE_INSTALL_PREFIX)
|
||||
mark_as_advanced(CMAKE_CONFIGURATION_TYPES)
|
||||
|
||||
# output folders
|
||||
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${projectOutDir}/game)
|
||||
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${projectOutDir}/game)
|
||||
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${projectOutDir}/game)
|
||||
|
||||
# finds and adds sources files in a folder
|
||||
macro(addPath dir)
|
||||
set(tmpa "")
|
||||
file(GLOB tmpa
|
||||
${dir}/*.cpp
|
||||
${dir}/*.c
|
||||
${dir}/*.cc
|
||||
${dir}/*.h)
|
||||
LIST(APPEND ${PROJECT_NAME}_files "${tmpa}")
|
||||
LIST(APPEND ${PROJECT_NAME}_paths "${dir}")
|
||||
#message(STATUS "addPath ${PROJECT_NAME} : ${tmpa}")
|
||||
#set(t "${${t}};${tmpa}")
|
||||
endmacro()
|
||||
|
||||
# adds a file to the sources
|
||||
macro(addFile filename)
|
||||
LIST(APPEND ${PROJECT_NAME}_files "${filename}")
|
||||
#message(STATUS "addFile ${PROJECT_NAME} : ${filename}")
|
||||
endmacro()
|
||||
|
||||
# finds and adds sources files in a folder recursively
|
||||
macro(addPathRec dir)
|
||||
set(tmpa "")
|
||||
file(GLOB_RECURSE tmpa
|
||||
${dir}/*.cpp
|
||||
${dir}/*.c
|
||||
${dir}/*.cc
|
||||
${dir}/*.h)
|
||||
LIST(APPEND ${PROJECT_NAME}_files "${tmpa}")
|
||||
LIST(APPEND ${PROJECT_NAME}_paths "${dir}")
|
||||
#message(STATUS "addPathRec ${PROJECT_NAME} : ${tmpa}")
|
||||
endmacro()
|
||||
|
||||
# adds a definition
|
||||
macro(addDef def)
|
||||
set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY COMPILE_DEFINITIONS "${def}")
|
||||
endmacro()
|
||||
# adds a definition
|
||||
macro(addDebugDef def)
|
||||
set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG "${def}")
|
||||
endmacro()
|
||||
|
||||
# adds a required definition. Are processed on addExecutable or addStaticLib
|
||||
macro(addRequiredDefinition def)
|
||||
#message(STATUS "${PROJECT_NAME} : add def : ${def}")
|
||||
LIST( APPEND ${PROJECT_NAME}_required_definition ${def} )
|
||||
endmacro()
|
||||
# adds a required debug definition. Are processed on addExecutable or addStaticLib
|
||||
macro(addRequiredDebugDefinition def)
|
||||
#message(STATUS "${PROJECT_NAME} : add def : ${def}")
|
||||
LIST( APPEND ${PROJECT_NAME}_required_debug_definition ${def} )
|
||||
endmacro()
|
||||
|
||||
# add definitions to project
|
||||
macro( _processProjectDefinition )
|
||||
foreach( def ${${PROJECT_NAME}_required_definition} )
|
||||
addDef( ${def} )
|
||||
endforeach()
|
||||
|
||||
foreach( def ${${PROJECT_NAME}_required_debug_definition} )
|
||||
addDebugDef( ${def} )
|
||||
endforeach()
|
||||
|
||||
#clear required defs
|
||||
set( ${PROJECT_NAME}_required_definition )
|
||||
set( ${PROJECT_NAME}_required_debug_definition )
|
||||
endmacro()
|
||||
|
||||
# adds an include path
|
||||
macro(addInclude incPath)
|
||||
#message(STATUS "${PROJECT_NAME} : add include path : ${incPath}")
|
||||
set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY INCLUDE_DIRECTORIES "${incPath}")
|
||||
endmacro()
|
||||
|
||||
# adds a library to link against
|
||||
macro(addLib lib)
|
||||
#message(STATUS "${PROJECT_NAME} : add lib : ${lib}")
|
||||
target_link_libraries(${PROJECT_NAME} "${lib}")
|
||||
endmacro()
|
||||
|
||||
# adds a library dependency. Are processed on addExecutable or addStaticLib
|
||||
macro(addRequiredLibrary lib)
|
||||
#message(STATUS "${PROJECT_NAME} : add lib : ${lib}")
|
||||
LIST( APPEND ${PROJECT_NAME}_required_library ${lib} )
|
||||
endmacro()
|
||||
|
||||
# adds a link dependency. Are processed on addExecutable or addStaticLib
|
||||
macro(addRequiredLink lib)
|
||||
#message(STATUS "${PROJECT_NAME} : add lib : ${lib}")
|
||||
LIST( APPEND ${PROJECT_NAME}_required_link ${lib} )
|
||||
endmacro()
|
||||
|
||||
macro( _processProjectLibrary )
|
||||
# Append currect project to PROJECT_STACK
|
||||
LIST( APPEND PROJECT_STACK "${PROJECT_NAME}" )
|
||||
|
||||
foreach( lib ${${PROJECT_NAME}_required_library} )
|
||||
#message( "adding library dependency: ${lib}" )
|
||||
include( ${lib} )
|
||||
endforeach()
|
||||
|
||||
#clear required libraries
|
||||
set( ${PROJECT_NAME}_required_library )
|
||||
|
||||
# pop currect project form PROJECT_STACK
|
||||
LIST(REMOVE_AT PROJECT_STACK -1)
|
||||
|
||||
# get currect project form stack
|
||||
if( PROJECT_STACK )
|
||||
LIST(GET PROJECT_STACK -1 TEMP_PROJECT)
|
||||
project( ${TEMP_PROJECT} )
|
||||
endif()
|
||||
|
||||
|
||||
endmacro()
|
||||
|
||||
macro( _processProjectLinks )
|
||||
#message( "_processProjectLinks: ${PROJECT_NAME}" )
|
||||
foreach( lib ${${PROJECT_NAME}_required_link} )
|
||||
addLib( ${lib} )
|
||||
endforeach()
|
||||
|
||||
#clear required libraries
|
||||
set( ${PROJECT_NAME}_required_link )
|
||||
endmacro()
|
||||
|
||||
|
||||
# adds a path to search for libs
|
||||
macro(addLibPath dir)
|
||||
link_directories(${dir})
|
||||
endmacro()
|
||||
|
||||
# creates a proper filter for VS
|
||||
macro(generateFilters relDir)
|
||||
foreach(f ${${PROJECT_NAME}_files})
|
||||
# Get the path of the file relative to ${DIRECTORY},
|
||||
# then alter it (not compulsory)
|
||||
file(RELATIVE_PATH SRCGR ${relDir} ${f})
|
||||
set(SRCGR "${PROJECT_NAME}/${SRCGR}")
|
||||
# Extract the folder, ie remove the filename part
|
||||
string(REGEX REPLACE "(.*)(/[^/]*)$" "\\1" SRCGR ${SRCGR})
|
||||
# do not have any ../ dirs
|
||||
string(REPLACE "../" "" SRCGR ${SRCGR})
|
||||
# Source_group expects \\ (double antislash), not / (slash)
|
||||
string(REPLACE / \\ SRCGR ${SRCGR})
|
||||
#STRING(REPLACE "//" "/" SRCGR ${SRCGR})
|
||||
#message(STATUS "FILE: ${f} -> ${SRCGR}")
|
||||
source_group("${SRCGR}" FILES ${f})
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
# creates a proper filter for VS
|
||||
macro(generateFiltersSpecial relDir)
|
||||
foreach(f ${${PROJECT_NAME}_files})
|
||||
# Get the path of the file relative to ${DIRECTORY},
|
||||
# then alter it (not compulsory)
|
||||
file(RELATIVE_PATH SRCGR ${relDir} ${f})
|
||||
set(SRCGR "torque3d/${SRCGR}")
|
||||
# Extract the folder, ie remove the filename part
|
||||
string(REGEX REPLACE "(.*)(/[^/]*)$" "\\1" SRCGR ${SRCGR})
|
||||
# do not have any ../ dirs
|
||||
string(REPLACE "../" "" SRCGR ${SRCGR})
|
||||
IF("${SRCGR}" MATCHES "^torque3d/My Projects/.*$")
|
||||
string(REPLACE "torque3d/My Projects/${PROJECT_NAME}/" "" SRCGR ${SRCGR})
|
||||
string(REPLACE "/source" "" SRCGR ${SRCGR})
|
||||
endif()
|
||||
# Source_group expects \\ (double antislash), not / (slash)
|
||||
string(REPLACE / \\ SRCGR ${SRCGR})
|
||||
#STRING(REPLACE "//" "/" SRCGR ${SRCGR})
|
||||
IF(EXISTS "${f}" AND NOT IS_DIRECTORY "${f}")
|
||||
#message(STATUS "FILE: ${f} -> ${SRCGR}")
|
||||
source_group("${SRCGR}" FILES ${f})
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
# macro to add a static library
|
||||
macro(addStaticLib)
|
||||
# more paths?
|
||||
if(${ARGC} GREATER 0)
|
||||
foreach(dir ${ARGV0})
|
||||
addPath("${dir}")
|
||||
endforeach()
|
||||
endif()
|
||||
# now inspect the paths we got
|
||||
set(firstDir "")
|
||||
foreach(dir ${${PROJECT_NAME}_paths})
|
||||
if("${firstDir}" STREQUAL "")
|
||||
set(firstDir "${dir}")
|
||||
endif()
|
||||
endforeach()
|
||||
generateFilters("${firstDir}")
|
||||
if(TORQUE_STATIC)
|
||||
add_library("${PROJECT_NAME}" STATIC ${${PROJECT_NAME}_files})
|
||||
else()
|
||||
add_library("${PROJECT_NAME}" SHARED ${${PROJECT_NAME}_files})
|
||||
endif()
|
||||
# omg - only use the first folder ... otehrwise we get lots of header name collisions
|
||||
#foreach(dir ${${PROJECT_NAME}_paths})
|
||||
addInclude("${firstDir}")
|
||||
#endforeach()
|
||||
|
||||
_processProjectLinks()
|
||||
_processProjectLibrary()
|
||||
_processProjectDefinition()
|
||||
endmacro()
|
||||
|
||||
# macro to add an executable
|
||||
macro(addExecutable)
|
||||
# now inspect the paths we got
|
||||
set(firstDir "")
|
||||
foreach(dir ${${PROJECT_NAME}_paths})
|
||||
if("${firstDir}" STREQUAL "")
|
||||
set(firstDir "${dir}")
|
||||
endif()
|
||||
endforeach()
|
||||
generateFiltersSpecial("${firstDir}")
|
||||
add_executable("${PROJECT_NAME}" WIN32 ${${PROJECT_NAME}_files})
|
||||
# omg - only use the first folder ... otehrwise we get lots of header name collisions
|
||||
addInclude("${firstDir}")
|
||||
|
||||
_processProjectLinks()
|
||||
_processProjectLibrary()
|
||||
_processProjectDefinition()
|
||||
endmacro()
|
||||
|
||||
macro(setupVersionNumbers)
|
||||
set(TORQUE_APP_VERSION_MAJOR 1 CACHE INTEGER "")
|
||||
set(TORQUE_APP_VERSION_MINOR 0 CACHE INTEGER "")
|
||||
set(TORQUE_APP_VERSION_PATCH 0 CACHE INTEGER "")
|
||||
set(TORQUE_APP_VERSION_TWEAK 0 CACHE INTEGER "")
|
||||
mark_as_advanced(TORQUE_APP_VERSION_TWEAK)
|
||||
MATH(EXPR TORQUE_APP_VERSION "${TORQUE_APP_VERSION_MAJOR} * 1000 + ${TORQUE_APP_VERSION_MINOR} * 100 + ${TORQUE_APP_VERSION_PATCH} * 10 + ${TORQUE_APP_VERSION_TWEAK}")
|
||||
set(TORQUE_APP_VERSION_STRING "${TORQUE_APP_VERSION_MAJOR}.${TORQUE_APP_VERSION_MINOR}.${TORQUE_APP_VERSION_PATCH}.${TORQUE_APP_VERSION_TWEAK}")
|
||||
#message(STATUS "version numbers: ${TORQUE_APP_VERSION} / ${TORQUE_APP_VERSION_STRING}")
|
||||
endmacro()
|
||||
|
||||
macro(setupPackaging)
|
||||
INCLUDE(CPack)
|
||||
# only enable zips for now
|
||||
set(CPACK_BINARY_NSIS OFF CACHE INTERNAL "" FORCE)
|
||||
set(CPACK_BINARY_ZIP ON CACHE INTERNAL "" FORCE)
|
||||
set(CPACK_SOURCE_ZIP OFF CACHE INTERNAL "" FORCE)
|
||||
SET(CPACK_GENERATOR "ZIP")
|
||||
SET(CPACK_PACKAGE_VENDOR "${PROJECT_NAME}")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_NAME}")
|
||||
SET(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 1)
|
||||
SET(CPACK_OUTPUT_FILE_PREFIX "${projectDir}/packages/${PROJECT_NAME}")
|
||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "")
|
||||
#SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.txt")
|
||||
#SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR "${TORQUE_APP_VERSION_MAJOR}")
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR "${TORQUE_APP_VERSION_MINOR}")
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH "${TORQUE_APP_VERSION_PATCH}")
|
||||
#SET(CPACK_PACKAGE_EXECUTABLES "${PROJECT_NAME}" "${PROJECT_NAME}")
|
||||
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${TORQUE_APP_VERSION_STRING}")
|
||||
#SET(CPACK_SOURCE_STRIP_FILES "")
|
||||
endmacro()
|
||||
# always static for now
|
||||
set(TORQUE_STATIC ON)
|
||||
#option(TORQUE_STATIC "enables or disable static" OFF)
|
||||
|
||||
if(WIN32)
|
||||
set(TORQUE_CXX_FLAGS "/MP /O2 /Ob2 /Oi /Ot /Oy /GT /Zi /W4 /nologo /GF /EHsc /GS- /Gy- /Qpar- /arch:SSE2 /fp:fast /fp:except- /GR /Zc:wchar_t- /wd4018 /wd4100 /wd4121 /wd4127 /wd4130 /wd4244 /wd4245 /wd4389 /wd4511 /wd4512 /wd4800 /wd4995 /D_CRT_SECURE_NO_WARNINGS " CACHE TYPE STRING)
|
||||
mark_as_advanced(TORQUE_CXX_FLAGS)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORQUE_CXX_FLAGS}")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "/LARGEADDRESSAWARE")
|
||||
#set(STATIC_LIBRARY_FLAGS "/OPT:NOREF")
|
||||
|
||||
# Force static runtime libraries
|
||||
if(TORQUE_STATIC)
|
||||
FOREACH(flag
|
||||
CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_C_FLAGS_DEBUG
|
||||
CMAKE_C_FLAGS_DEBUG_INIT
|
||||
CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_CXX_FLAGS_DEBUG
|
||||
CMAKE_CXX_FLAGS_DEBUG_INIT)
|
||||
STRING(REPLACE "/MD" "/MT" "${flag}" "${${flag}}")
|
||||
SET("${flag}" "${${flag}} /EHsc")
|
||||
ENDFOREACH()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# fix the debug/release subfolders on windows
|
||||
if(MSVC)
|
||||
FOREACH(CONF ${CMAKE_CONFIGURATION_TYPES})
|
||||
# Go uppercase (DEBUG, RELEASE...)
|
||||
STRING(TOUPPER "${CONF}" CONF)
|
||||
#SET("CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONF}" "${projectOutDir}")
|
||||
SET("CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONF}" "${projectOutDir}")
|
||||
ENDFOREACH()
|
||||
endif()
|
||||
47
Tools/CMake/cleanup-win.bat.in
Normal file
47
Tools/CMake/cleanup-win.bat.in
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
@ECHO off
|
||||
|
||||
:: Delete procedural shaders
|
||||
echo shaders
|
||||
del /q /a:-R shaders\procedural\*.*
|
||||
:: Delete dumped shader disassembly files
|
||||
for /R %%a IN (*._dis.txt) do IF EXIST "%%a._dis.txt" del "%%a._dis.txt"
|
||||
|
||||
:: Delete fonts
|
||||
echo fonts
|
||||
del /q /a:-R core\fonts\*.*
|
||||
|
||||
:: CEF cache
|
||||
echo browser cache
|
||||
del /q /a:-R cache
|
||||
|
||||
|
||||
:: the cached meshes and alike
|
||||
echo meshes and alike
|
||||
for /R %%a IN (*.dae) do IF EXIST "%%~pna.cached.dts" del "%%~pna.cached.dts"
|
||||
for /R %%a IN (*.imposter*.dds) do del "%%a"
|
||||
|
||||
:: the torque script compilations
|
||||
echo compiled script
|
||||
for /R %%a IN (*.cs) do IF EXIST "%%a.dso" del "%%a.dso"
|
||||
for /R %%a IN (*.cs) do IF EXIST "%%a.edso" del "%%a.edso"
|
||||
for /R %%a IN (*.gui) do IF EXIST "%%a.dso" del "%%a.dso"
|
||||
for /R %%a IN (*.gui) do IF EXIST "%%a.edso" del "%%a.edso"
|
||||
for /R %%a IN (*.ts) do IF EXIST "%%a.dso" del "%%a.dso"
|
||||
for /R %%a IN (*.ts) do IF EXIST "%%a.edso" del "%%a.edso"
|
||||
|
||||
:: the user settings and alike
|
||||
echo settings
|
||||
IF EXIST "prefs.cs" del /s prefs.cs
|
||||
IF EXIST "core\prefs.cs" del /s core\prefs.cs
|
||||
::IF EXIST "scripts\client\prefs.cs" del /s scripts\client\prefs.cs
|
||||
IF EXIST "scripts\server\banlist.cs" del /s scripts\server\banlist.cs
|
||||
IF EXIST "scripts\server\prefs.cs" del /s scripts\server\prefs.cs
|
||||
IF EXIST "client\config.cs" del /s client\config.cs
|
||||
IF EXIST "config.cs" del /s config.cs
|
||||
IF EXIST "tools\settings.xml" del /s tools\settings.xml
|
||||
IF EXIST "banlist.cs" del /s banlist.cs
|
||||
|
||||
:: logs
|
||||
echo logs
|
||||
IF EXIST "torque3d.log" del /s torque3d.log
|
||||
echo DONE!
|
||||
17
Tools/CMake/collada.cmake
Normal file
17
Tools/CMake/collada.cmake
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
project(collada)
|
||||
|
||||
addPath("${libDir}/collada/src/1.4/dom")
|
||||
addPath("${libDir}/collada/src/dae")
|
||||
addPath("${libDir}/collada/src/modules/LIBXMLPlugin")
|
||||
addPath("${libDir}/collada/src/modules/stdErrPlugin")
|
||||
addPath("${libDir}/collada/src/modules/STLDatabase")
|
||||
|
||||
addStaticLib()
|
||||
|
||||
addDef(DOM_INCLUDE_TINYXML)
|
||||
addDef(PCRE_STATIC)
|
||||
|
||||
addInclude(${libDir}/collada/include)
|
||||
addInclude(${libDir}/collada/include/1.4)
|
||||
addInclude(${libDir}/pcre)
|
||||
addInclude(${libDir}/tinyxml)
|
||||
3
Tools/CMake/convexDecomp.cmake
Normal file
3
Tools/CMake/convexDecomp.cmake
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
project(convexDecomp)
|
||||
|
||||
addStaticLib("${libDir}/convexDecomp")
|
||||
7
Tools/CMake/libogg.cmake
Normal file
7
Tools/CMake/libogg.cmake
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
project(libogg)
|
||||
|
||||
addPathRec("${libDir}/libogg")
|
||||
|
||||
addStaticLib()
|
||||
|
||||
addInclude(${libDir}/libogg/include)
|
||||
18
Tools/CMake/libraries/library_recast.cmake
Normal file
18
Tools/CMake/libraries/library_recast.cmake
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# Recast library
|
||||
project(recast)
|
||||
|
||||
# Source
|
||||
addPathRec( "${libDir}/recast/DebugUtils/Source" )
|
||||
addPathRec( "${libDir}/recast/Recast/Source" )
|
||||
addPathRec( "${libDir}/recast/Detour/Source" )
|
||||
addPathRec( "${libDir}/recast/DetourCrowd/Source" )
|
||||
addPathRec( "${libDir}/recast/DetourTileCache/Source" )
|
||||
|
||||
# Additional includes
|
||||
include_directories( "${libDir}/recast/DebugUtils/Include" )
|
||||
include_directories( "${libDir}/recast/Recast/Include" )
|
||||
include_directories( "${libDir}/recast/Detour/Include" )
|
||||
include_directories( "${libDir}/recast/DetourTileCache/Include" )
|
||||
include_directories( "${libDir}/recast/DetourCrowd/Include" )
|
||||
|
||||
addStaticLib()
|
||||
10
Tools/CMake/libtheora.cmake
Normal file
10
Tools/CMake/libtheora.cmake
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
project(libtheora)
|
||||
|
||||
addPathRec("${libDir}/libtheora")
|
||||
|
||||
addStaticLib()
|
||||
|
||||
addDef(TORQUE_OGGTHEORA)
|
||||
addDef(TORQUE_OGGVORIBS)
|
||||
addInclude(${libDir}/libogg/include)
|
||||
addInclude(${libDir}/libtheora/include)
|
||||
9
Tools/CMake/libvorbis.cmake
Normal file
9
Tools/CMake/libvorbis.cmake
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
project(libvorbis)
|
||||
|
||||
addPathRec("${libDir}/libvorbis")
|
||||
|
||||
addStaticLib()
|
||||
|
||||
addDef(TORQUE_OGGVORBIS)
|
||||
addInclude(${libDir}/libvorbis/include)
|
||||
addInclude(${libDir}/libogg/include)
|
||||
3
Tools/CMake/ljpeg.cmake
Normal file
3
Tools/CMake/ljpeg.cmake
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
project(ljpeg)
|
||||
|
||||
addStaticLib("${libDir}/ljpeg")
|
||||
9
Tools/CMake/lmng.cmake
Normal file
9
Tools/CMake/lmng.cmake
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
project(lmng)
|
||||
|
||||
addStaticLib("${libDir}/${PROJECT_NAME}")
|
||||
|
||||
addDef(MNG_OPTIMIZE_OBJCLEANUP)
|
||||
|
||||
addInclude(${libDir}/lpng)
|
||||
addInclude(${libDir}/zlib)
|
||||
addInclude(${libDir}/ljpeg)
|
||||
7
Tools/CMake/lpng.cmake
Normal file
7
Tools/CMake/lpng.cmake
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
project(lpng)
|
||||
|
||||
addStaticLib("${libDir}/${PROJECT_NAME}")
|
||||
|
||||
# addDef(PNG_NO_ASSEMBLER_CODE)
|
||||
|
||||
addInclude(${libDir}/zlib)
|
||||
5
Tools/CMake/lungif.cmake
Normal file
5
Tools/CMake/lungif.cmake
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
project(lungif)
|
||||
|
||||
addStaticLib("${libDir}/${PROJECT_NAME}")
|
||||
|
||||
addDef(_GBA_NO_FILEIO)
|
||||
19
Tools/CMake/modules/module_hydra.cmake
Normal file
19
Tools/CMake/modules/module_hydra.cmake
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# module OculusVR
|
||||
|
||||
# Source
|
||||
addPathRec( "${srcDir}/platform/input/razerHydra" )
|
||||
|
||||
# Includes
|
||||
include_directories( "${TORQUE_RAZERHYDRA_SDK_PATH}/include" )
|
||||
|
||||
# Install
|
||||
if( WIN32 )
|
||||
# File Copy for Release
|
||||
INSTALL(FILES "${TORQUE_RAZERHYDRA_SDK_PATH}/bin/win32/release_dll/sixense.dll" DESTINATION "${projectOutDir}")
|
||||
|
||||
# File Copy for Debug
|
||||
INSTALL(FILES "${TORQUE_RAZERHYDRA_SDK_PATH}/bin/win32/debug_dll/sixensed.dll" DESTINATION "${projectOutDir}" CONFIGURATIONS "Debug" )
|
||||
# Only needed by the debug sixense library
|
||||
INSTALL(FILES "${TORQUE_RAZERHYDRA_SDK_PATH}/samples/win32/sixense_simple3d/DeviceDLL.dll" DESTINATION "${projectOutDir}" CONFIGURATIONS "Debug" )
|
||||
endif()
|
||||
|
||||
16
Tools/CMake/modules/module_navigation.cmake
Normal file
16
Tools/CMake/modules/module_navigation.cmake
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Navigation module
|
||||
|
||||
addRequiredDefinition( "TORQUE_NAVIGATION_ENABLED" )
|
||||
addRequiredLibrary( "libraries/library_recast.cmake" )
|
||||
addRequiredLink( "recast" )
|
||||
|
||||
# files
|
||||
addPathRec( "${srcDir}/navigation" )
|
||||
|
||||
# include paths
|
||||
include_directories( "${libDir}/recast/DebugUtils/Include" )
|
||||
include_directories( "${libDir}/recast/Recast/Include" )
|
||||
include_directories( "${libDir}/recast/Detour/Include" )
|
||||
include_directories( "${libDir}/recast/DetourTileCache/Include" )
|
||||
include_directories( "${libDir}/recast/DetourCrowd/Include" )
|
||||
|
||||
15
Tools/CMake/modules/module_oculusVR.cmake
Normal file
15
Tools/CMake/modules/module_oculusVR.cmake
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# module OculusVR
|
||||
|
||||
# Source
|
||||
addPathRec( "${srcDir}/platform/input/oculusVR" )
|
||||
|
||||
# Includes
|
||||
include_directories( "${TORQUE_OCULUSVR_SDK_PATH}/LibOVR/Include" )
|
||||
include_directories( "${TORQUE_OCULUSVR_SDK_PATH}/LibOVR/Src" )
|
||||
|
||||
# Libs
|
||||
if( WIN32 )
|
||||
link_directories( "${TORQUE_OCULUSVR_SDK_PATH}/LibOVR/Lib/Win32" )
|
||||
addRequiredLink( "libovr.lib" )
|
||||
addRequiredLink( "libovrd.lib" )
|
||||
endif()
|
||||
9
Tools/CMake/opcode.cmake
Normal file
9
Tools/CMake/opcode.cmake
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
project(opcode)
|
||||
|
||||
addPath("${libDir}/${PROJECT_NAME}")
|
||||
addPath("${libDir}/${PROJECT_NAME}/Ice")
|
||||
|
||||
addStaticLib()
|
||||
|
||||
addDef(TORQUE_OPCODE)
|
||||
addDef(ICE_NO_DLL)
|
||||
8
Tools/CMake/pcre.cmake
Normal file
8
Tools/CMake/pcre.cmake
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
project(pcre)
|
||||
|
||||
addStaticLib("${libDir}/pcre")
|
||||
|
||||
addDef(PCRE_STATIC)
|
||||
addDef(HAVE_CONFIG_H)
|
||||
|
||||
set_property(TARGET pcre PROPERTY COMPILE_FLAGS /TP) #/TP = compile as C++
|
||||
3
Tools/CMake/squish.cmake
Normal file
3
Tools/CMake/squish.cmake
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
project(squish)
|
||||
|
||||
addStaticLib("${libDir}/${PROJECT_NAME}")
|
||||
21
Tools/CMake/template.cmake
Normal file
21
Tools/CMake/template.cmake
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# this is a template file that should help you write a new cmake build script for a new library
|
||||
|
||||
|
||||
# 1st thing: the project name
|
||||
project(pcre)
|
||||
|
||||
# 2nd: add the paths where the source code is
|
||||
|
||||
addPath("${libDir}/pcre")
|
||||
addPathRec("${libDir}/pcre")
|
||||
|
||||
# 3rd: add addStaticLib()
|
||||
addStaticLib()
|
||||
|
||||
# then add definitions
|
||||
addDef(PCRE_STATIC)
|
||||
addDef(HAVE_CONFIG_H)
|
||||
|
||||
# and maybe more include paths
|
||||
addInclude(${libDir}/libvorbis/include)
|
||||
addInclude(${libDir}/libogg/include)
|
||||
39
Tools/CMake/template.torsion.in
Normal file
39
Tools/CMake/template.torsion.in
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<TorsionProject>
|
||||
<Name>@TORQUE_APP_NAME@</Name>
|
||||
<WorkingDir/>
|
||||
<EntryScript>main.cs</EntryScript>
|
||||
<DebugHook>dbgSetParameters( #port#, "#password#", true );</DebugHook>
|
||||
<Mods>
|
||||
<Folder>core</Folder>
|
||||
<Folder>scripts</Folder>
|
||||
<Folder>art</Folder>
|
||||
<Folder>levels</Folder>
|
||||
<Folder>shaders</Folder>
|
||||
<Folder>tools</Folder>
|
||||
</Mods>
|
||||
<ScannerExts>cs; gui</ScannerExts>
|
||||
<Configs>
|
||||
<Config>
|
||||
<Name>Release</Name>
|
||||
<Executable>@TORQUE_APP_NAME@.exe</Executable>
|
||||
<Arguments/>
|
||||
<HasExports>true</HasExports>
|
||||
<Precompile>true</Precompile>
|
||||
<InjectDebugger>true</InjectDebugger>
|
||||
<UseSetModPaths>false</UseSetModPaths>
|
||||
</Config>
|
||||
<Config>
|
||||
<Name>Debug</Name>
|
||||
<Executable>@TORQUE_APP_NAME@.exe</Executable>
|
||||
<Arguments/>
|
||||
<HasExports>true</HasExports>
|
||||
<Precompile>true</Precompile>
|
||||
<InjectDebugger>true</InjectDebugger>
|
||||
<UseSetModPaths>false</UseSetModPaths>
|
||||
</Config>
|
||||
</Configs>
|
||||
<SearchURL/>
|
||||
<SearchProduct>@TORQUE_APP_NAME@</SearchProduct>
|
||||
<SearchVersion>HEAD</SearchVersion>
|
||||
<ExecModifiedScripts>true</ExecModifiedScripts>
|
||||
</TorsionProject>
|
||||
3
Tools/CMake/tinyxml.cmake
Normal file
3
Tools/CMake/tinyxml.cmake
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
project(tinyxml)
|
||||
|
||||
addStaticLib("${libDir}/${PROJECT_NAME}")
|
||||
123
Tools/CMake/torque-win.rc.in
Normal file
123
Tools/CMake/torque-win.rc.in
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#define IDI_ICON1 103
|
||||
#define IDI_ICON2 107
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 108
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "windows.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_ICON1 ICON DISCARDABLE "torque.ico"
|
||||
IDI_ICON2 ICON DISCARDABLE "torque.ico"
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""windows.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION @TORQUE_APP_VERSION_MAJOR@,@TORQUE_APP_VERSION_MINOR@,@TORQUE_APP_VERSION_PATCH@,@TORQUE_APP_VERSION_TWEAK@
|
||||
PRODUCTVERSION @TORQUE_APP_VERSION_MAJOR@,@TORQUE_APP_VERSION_MINOR@,@TORQUE_APP_VERSION_PATCH@,@TORQUE_APP_VERSION_TWEAK@
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "@PROJECT_NAME@"
|
||||
VALUE "FileDescription", "@PROJECT_NAME@"
|
||||
VALUE "FileVersion", "@TORQUE_APP_VERSION_STRING@"
|
||||
VALUE "InternalName", "@PROJECT_NAME@"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2014"
|
||||
VALUE "OriginalFilename", "@PROJECT_NAME@"
|
||||
VALUE "ProductName", "@PROJECT_NAME@"
|
||||
VALUE "ProductVersion", "@TORQUE_APP_VERSION_STRING@"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
BIN
Tools/CMake/torque.ico
Normal file
BIN
Tools/CMake/torque.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
493
Tools/CMake/torque3d.cmake
Normal file
493
Tools/CMake/torque3d.cmake
Normal file
|
|
@ -0,0 +1,493 @@
|
|||
project(${TORQUE_APP_NAME})
|
||||
|
||||
# TODO: fmod support
|
||||
|
||||
###############################################################################
|
||||
# modules
|
||||
###############################################################################
|
||||
option(TORQUE_SFX_VORBIS "Vorbis Sound" ON)
|
||||
mark_as_advanced(TORQUE_SFX_VORBIS)
|
||||
option(TORQUE_ADVANCED_LIGHTING "Advanced Lighting" ON)
|
||||
mark_as_advanced(TORQUE_ADVANCED_LIGHTING)
|
||||
option(TORQUE_BASIC_LIGHTING "Basic Lighting" ON)
|
||||
mark_as_advanced(TORQUE_BASIC_LIGHTING)
|
||||
option(TORQUE_THEORA "Theora Video Support" ON)
|
||||
mark_as_advanced(TORQUE_THEORA)
|
||||
option(TORQUE_SFX_DirectX "DirectX Sound" ON)
|
||||
mark_as_advanced(TORQUE_SFX_DirectX)
|
||||
option(TORQUE_SFX_OPENAL "OpenAL Sound" ON)
|
||||
mark_as_advanced(TORQUE_SFX_OPENAL)
|
||||
option(TORQUE_HIFI "HIFI? support" OFF)
|
||||
mark_as_advanced(TORQUE_HIFI)
|
||||
option(TORQUE_EXTENDED_MOVE "Extended move support" OFF)
|
||||
mark_as_advanced(TORQUE_EXTENDED_MOVE)
|
||||
option(TORQUE_NAVIGATION "Enable Navigation module" OFF)
|
||||
#mark_as_advanced(TORQUE_NAVIGATION)
|
||||
|
||||
#Oculus VR
|
||||
option(TORQUE_OCULUSVR "Enable OCULUSVR module" OFF)
|
||||
mark_as_advanced(TORQUE_OCULUSVR)
|
||||
if(TORQUE_OCULUSVR)
|
||||
set(TORQUE_OCULUSVR_SDK_PATH "" CACHE PATH "OCULUSVR library path" FORCE)
|
||||
else() # hide variable
|
||||
set(TORQUE_OCULUSVR_SDK_PATH "" CACHE INTERNAL "" FORCE)
|
||||
endif()
|
||||
|
||||
#Hydra
|
||||
option(TORQUE_HYDRA "Enable HYDRA module" OFF)
|
||||
mark_as_advanced(TORQUE_HYDRA)
|
||||
if(TORQUE_HYDRA)
|
||||
set(TORQUE_HYDRA_SDK_PATH "" CACHE PATH "HYDRA library path" FORCE)
|
||||
else() # hide variable
|
||||
set(TORQUE_HYDRA_SDK_PATH "" CACHE INTERNAL "" FORCE)
|
||||
endif()
|
||||
|
||||
###############################################################################
|
||||
# options
|
||||
###############################################################################
|
||||
option(TORQUE_MULTITHREAD "Multi Threading" ON)
|
||||
mark_as_advanced(TORQUE_MULTITHREAD)
|
||||
|
||||
option(TORQUE_DISABLE_MEMORY_MANAGER "Disable memory manager" OFF)
|
||||
mark_as_advanced(TORQUE_DISABLE_MEMORY_MANAGER)
|
||||
|
||||
option(TORQUE_DISABLE_VIRTUAL_MOUNT_SYSTEM "Disable virtual mount system" OFF)
|
||||
mark_as_advanced(TORQUE_DISABLE_VIRTUAL_MOUNT_SYSTEM)
|
||||
|
||||
option(TORQUE_PLAYER "Playback only?" OFF)
|
||||
mark_as_advanced(TORQUE_PLAYER)
|
||||
|
||||
option(TORQUE_TOOLS "Enable or disable the tools" ON)
|
||||
mark_as_advanced(TORQUE_TOOLS)
|
||||
|
||||
option(TORQUE_ENABLE_PROFILER "Enable or disable the profiler" OFF)
|
||||
mark_as_advanced(TORQUE_ENABLE_PROFILER)
|
||||
|
||||
option(TORQUE_DEBUG "T3D Debug mode" OFF)
|
||||
mark_as_advanced(TORQUE_DEBUG)
|
||||
|
||||
option(TORQUE_SHIPPING "T3D Shipping build?" OFF)
|
||||
mark_as_advanced(TORQUE_SHIPPING)
|
||||
|
||||
option(TORQUE_DEBUG_NET "debug network" OFF)
|
||||
mark_as_advanced(TORQUE_DEBUG_NET)
|
||||
|
||||
option(TORQUE_DEBUG_NET_MOVES "debug network moves" OFF)
|
||||
mark_as_advanced(TORQUE_DEBUG_NET_MOVES)
|
||||
|
||||
option(TORQUE_ENABLE_ASSERTS "enables or disable asserts" OFF)
|
||||
mark_as_advanced(TORQUE_ENABLE_ASSERTS)
|
||||
|
||||
option(TORQUE_DEBUG_GFX_MODE "triggers graphics debug mode" OFF)
|
||||
mark_as_advanced(TORQUE_DEBUG_GFX_MODE)
|
||||
|
||||
#option(DEBUG_SPEW "more debug" OFF)
|
||||
set(TORQUE_NO_DSO_GENERATION ON)
|
||||
|
||||
if(WIN32)
|
||||
# warning C4800: 'XXX' : forcing value to bool 'true' or 'false' (performance warning)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4800")
|
||||
# warning C4018: '<' : signed/unsigned mismatch
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4018")
|
||||
# warning C4244: 'initializing' : conversion from 'XXX' to 'XXX', possible loss of data
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4244")
|
||||
|
||||
link_directories($ENV{DXSDK_DIR}/Lib/x86)
|
||||
endif()
|
||||
|
||||
###############################################################################
|
||||
# Always enabled paths first
|
||||
###############################################################################
|
||||
addPath("${srcDir}/") # must come first :)
|
||||
addPathRec("${srcDir}/app")
|
||||
addPath("${srcDir}/sfx/media")
|
||||
addPath("${srcDir}/sfx/null")
|
||||
addPath("${srcDir}/sfx")
|
||||
addPath("${srcDir}/component")
|
||||
addPath("${srcDir}/component/interfaces")
|
||||
addPath("${srcDir}/console")
|
||||
addPath("${srcDir}/core")
|
||||
addPath("${srcDir}/core/stream")
|
||||
addPath("${srcDir}/core/strings")
|
||||
addPath("${srcDir}/core/util")
|
||||
addPath("${srcDir}/core/util/test")
|
||||
addPath("${srcDir}/core/util/journal")
|
||||
addPath("${srcDir}/core/util/journal/test")
|
||||
addPath("${srcDir}/core/util/zip")
|
||||
addPath("${srcDir}/core/util/zip/unitTests")
|
||||
addPath("${srcDir}/core/util/zip/compressors")
|
||||
addPath("${srcDir}/i18n")
|
||||
addPath("${srcDir}/sim")
|
||||
#addPath("${srcDir}/unit/tests")
|
||||
addPath("${srcDir}/unit")
|
||||
addPath("${srcDir}/util")
|
||||
addPath("${srcDir}/windowManager")
|
||||
addPath("${srcDir}/windowManager/torque")
|
||||
addPath("${srcDir}/windowManager/test")
|
||||
addPath("${srcDir}/math")
|
||||
addPath("${srcDir}/math/util")
|
||||
addPath("${srcDir}/math/test")
|
||||
addPath("${srcDir}/platform")
|
||||
addPath("${srcDir}/cinterface")
|
||||
addPath("${srcDir}/platform/nativeDialogs")
|
||||
addPath("${srcDir}/platform/menus")
|
||||
addPath("${srcDir}/platform/test")
|
||||
addPath("${srcDir}/platform/threads")
|
||||
addPath("${srcDir}/platform/async")
|
||||
addPath("${srcDir}/platform/input")
|
||||
addPath("${srcDir}/platform/output")
|
||||
addPath("${srcDir}/app")
|
||||
addPath("${srcDir}/app/net")
|
||||
addPath("${srcDir}/util/messaging")
|
||||
addPath("${srcDir}/gfx/Null")
|
||||
addPath("${srcDir}/gfx/test")
|
||||
addPath("${srcDir}/gfx/bitmap")
|
||||
addPath("${srcDir}/gfx/bitmap/loaders")
|
||||
addPath("${srcDir}/gfx/util")
|
||||
addPath("${srcDir}/gfx/video")
|
||||
addPath("${srcDir}/gfx")
|
||||
addPath("${srcDir}/shaderGen")
|
||||
addPath("${srcDir}/gfx/sim")
|
||||
addPath("${srcDir}/gui/buttons")
|
||||
addPath("${srcDir}/gui/containers")
|
||||
addPath("${srcDir}/gui/controls")
|
||||
addPath("${srcDir}/gui/core")
|
||||
addPath("${srcDir}/gui/game")
|
||||
addPath("${srcDir}/gui/shiny")
|
||||
addPath("${srcDir}/gui/utility")
|
||||
addPath("${srcDir}/gui")
|
||||
addPath("${srcDir}/collision")
|
||||
addPath("${srcDir}/materials")
|
||||
addPath("${srcDir}/lighting")
|
||||
addPath("${srcDir}/lighting/common")
|
||||
addPath("${srcDir}/renderInstance")
|
||||
addPath("${srcDir}/scene")
|
||||
addPath("${srcDir}/scene/culling")
|
||||
addPath("${srcDir}/scene/zones")
|
||||
addPath("${srcDir}/scene/mixin")
|
||||
addPath("${srcDir}/shaderGen")
|
||||
addPath("${srcDir}/terrain")
|
||||
addPath("${srcDir}/environment")
|
||||
addPath("${srcDir}/forest")
|
||||
addPath("${srcDir}/forest/ts")
|
||||
addPath("${srcDir}/ts")
|
||||
addPath("${srcDir}/ts/arch")
|
||||
addPath("${srcDir}/physics")
|
||||
addPath("${srcDir}/gui/3d")
|
||||
addPath("${srcDir}/postFx")
|
||||
addPath("${srcDir}/T3D")
|
||||
addPath("${srcDir}/T3D/examples")
|
||||
addPath("${srcDir}/T3D/fps")
|
||||
addPath("${srcDir}/T3D/fx")
|
||||
addPath("${srcDir}/T3D/vehicles")
|
||||
addPath("${srcDir}/T3D/physics")
|
||||
addPath("${srcDir}/T3D/decal")
|
||||
addPath("${srcDir}/T3D/sfx")
|
||||
addPath("${srcDir}/T3D/gameBase")
|
||||
addPath("${srcDir}/T3D/turret")
|
||||
addPath("${srcDir}/main/")
|
||||
addPathRec("${srcDir}/ts/collada")
|
||||
addPathRec("${srcDir}/ts/loader")
|
||||
addPathRec("${projectSrcDir}")
|
||||
|
||||
###############################################################################
|
||||
# modular paths
|
||||
###############################################################################
|
||||
# lighting
|
||||
if(TORQUE_ADVANCED_LIGHTING)
|
||||
addPath("${srcDir}/lighting/advanced")
|
||||
addPathRec("${srcDir}/lighting/shadowMap")
|
||||
addPathRec("${srcDir}/lighting/advanced/hlsl")
|
||||
#addPathRec("${srcDir}/lighting/advanced/glsl")
|
||||
endif()
|
||||
if(TORQUE_BASIC_LIGHTING)
|
||||
addPathRec("${srcDir}/lighting/basic")
|
||||
addPathRec("${srcDir}/lighting/shadowMap")
|
||||
endif()
|
||||
|
||||
# DirectX Sound
|
||||
if(TORQUE_SFX_DirectX)
|
||||
addPathRec("${srcDir}/sfx/dsound")
|
||||
addPathRec("${srcDir}/sfx/xaudio")
|
||||
endif()
|
||||
|
||||
# OpenAL
|
||||
if(TORQUE_SFX_OPENAL)
|
||||
addPath("${srcDir}/sfx/openal")
|
||||
#addPath("${srcDir}/sfx/openal/mac")
|
||||
addPath("${srcDir}/sfx/openal/win32")
|
||||
endif()
|
||||
|
||||
# Theora
|
||||
if(TORQUE_THEORA)
|
||||
addPath("${srcDir}/core/ogg")
|
||||
addPath("${srcDir}/gfx/video")
|
||||
addPath("${srcDir}/gui/theora")
|
||||
endif()
|
||||
|
||||
# Include tools for non-tool builds (or define player if a tool build)
|
||||
if(TORQUE_TOOLS)
|
||||
addPath("${srcDir}/gui/worldEditor")
|
||||
addPath("${srcDir}/environment/editors")
|
||||
addPath("${srcDir}/forest/editor")
|
||||
addPath("${srcDir}/gui/editor")
|
||||
addPath("${srcDir}/gui/editor/inspector")
|
||||
endif()
|
||||
|
||||
if(TORQUE_HIFI)
|
||||
addPath("${srcDir}/T3D/gameBase/hifi")
|
||||
endif()
|
||||
|
||||
if(TORQUE_EXTENDED_MOVE)
|
||||
addPath("${srcDir}/T3D/gameBase/extended")
|
||||
else()
|
||||
addPath("${srcDir}/T3D/gameBase/std")
|
||||
endif()
|
||||
|
||||
if(TORQUE_NAVIGATION)
|
||||
include( "modules/module_navigation.cmake" )
|
||||
endif()
|
||||
|
||||
if(TORQUE_OCULUSVR)
|
||||
include( "modules/module_oculusVR.cmake" )
|
||||
endif()
|
||||
|
||||
if(TORQUE_HYDRA)
|
||||
include( "modules/module_hydra.cmake" )
|
||||
endif()
|
||||
|
||||
###############################################################################
|
||||
# platform specific things
|
||||
###############################################################################
|
||||
if(WIN32)
|
||||
addPath("${srcDir}/platformWin32")
|
||||
addPath("${srcDir}/platformWin32/nativeDialogs")
|
||||
addPath("${srcDir}/platformWin32/menus")
|
||||
addPath("${srcDir}/platformWin32/threads")
|
||||
addPath("${srcDir}/platformWin32/videoInfo")
|
||||
addPath("${srcDir}/platformWin32/minidump")
|
||||
addPath("${srcDir}/windowManager/win32")
|
||||
#addPath("${srcDir}/gfx/D3D8")
|
||||
addPath("${srcDir}/gfx/D3D")
|
||||
addPath("${srcDir}/gfx/D3D9")
|
||||
addPath("${srcDir}/gfx/D3D9/pc")
|
||||
addPath("${srcDir}/shaderGen/HLSL")
|
||||
addPath("${srcDir}/terrain/hlsl")
|
||||
addPath("${srcDir}/forest/hlsl")
|
||||
# add windows rc file for the icon
|
||||
addFile("${projectSrcDir}/torque.rc")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
addPath("${srcDir}/platformMac")
|
||||
addPath("${srcDir}/platformMac/menus")
|
||||
addPath("${srcDir}/platformPOSIX")
|
||||
addPath("${srcDir}/windowManager/mac")
|
||||
addPath("${srcDir}/gfx/gl")
|
||||
addPath("${srcDir}/gfx/gl/ggl")
|
||||
addPath("${srcDir}/gfx/gl/ggl/mac")
|
||||
addPath("${srcDir}/gfx/gl/ggl/generated")
|
||||
addPath("${srcDir}/shaderGen/GLSL")
|
||||
addPath("${srcDir}/terrain/glsl")
|
||||
addPath("${srcDir}/forest/glsl")
|
||||
endif()
|
||||
|
||||
if(XBOX360)
|
||||
addPath("${srcDir}/platformXbox")
|
||||
addPath("${srcDir}/platformXbox/threads")
|
||||
addPath("${srcDir}/windowManager/360")
|
||||
addPath("${srcDir}/gfx/D3D9")
|
||||
addPath("${srcDir}/gfx/D3D9/360")
|
||||
addPath("${srcDir}/shaderGen/HLSL")
|
||||
addPath("${srcDir}/shaderGen/360")
|
||||
addPath("${srcDir}/ts/arch/360")
|
||||
addPath("${srcDir}/terrain/hlsl")
|
||||
addPath("${srcDir}/forest/hlsl")
|
||||
endif()
|
||||
|
||||
if(PS3)
|
||||
addPath("${srcDir}/platformPS3")
|
||||
addPath("${srcDir}/platformPS3/threads")
|
||||
addPath("${srcDir}/windowManager/ps3")
|
||||
addPath("${srcDir}/gfx/gl")
|
||||
addPath("${srcDir}/gfx/gl/ggl")
|
||||
addPath("${srcDir}/gfx/gl/ggl/ps3")
|
||||
addPath("${srcDir}/gfx/gl/ggl/generated")
|
||||
addPath("${srcDir}/shaderGen/GLSL")
|
||||
addPath("${srcDir}/ts/arch/ps3")
|
||||
addPath("${srcDir}/terrain/glsl")
|
||||
addPath("${srcDir}/forest/glsl")
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
# linux_dedicated
|
||||
addPath("${srcDir}/windowManager/dedicated")
|
||||
# linux
|
||||
addPath("${srcDir}/platformX86UNIX")
|
||||
addPath("${srcDir}/platformX86UNIX/threads")
|
||||
addPath("${srcDir}/platformPOSIX")
|
||||
addPath("${srcDir}/gfx/gl")
|
||||
addPath("${srcDir}/gfx/gl/ggl")
|
||||
addPath("${srcDir}/gfx/gl/ggl/x11") # This one is not yet implemented!
|
||||
addPath("${srcDir}/gfx/gl/ggl/generated")
|
||||
addPath("${srcDir}/shaderGen/GLSL")
|
||||
addPath("${srcDir}/terrain/glsl")
|
||||
addPath("${srcDir}/forest/glsl")
|
||||
endif()
|
||||
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
addExecutable()
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
|
||||
# configure the relevant files only once
|
||||
if(NOT EXISTS "${projectSrcDir}/torqueConfig.h")
|
||||
message(STATUS "writing ${projectSrcDir}/torqueConfig.h")
|
||||
CONFIGURE_FILE("${cmakeDir}/torqueConfig.h.in" "${projectSrcDir}/torqueConfig.h")
|
||||
endif()
|
||||
if(NOT EXISTS "${projectSrcDir}/torque.ico")
|
||||
CONFIGURE_FILE("${cmakeDir}/torque.ico" "${projectSrcDir}/torque.ico" COPYONLY)
|
||||
endif()
|
||||
if(NOT EXISTS "${projectOutDir}/${PROJECT_NAME}.torsion")
|
||||
CONFIGURE_FILE("${cmakeDir}/template.torsion.in" "${projectOutDir}/${PROJECT_NAME}.torsion")
|
||||
endif()
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/game/main.cs.in" AND NOT EXISTS "${projectOutDir}/main.cs")
|
||||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/game/main.cs.in" "${projectOutDir}/main.cs")
|
||||
endif()
|
||||
if(WIN32)
|
||||
if(NOT EXISTS "${projectSrcDir}/torque.rc")
|
||||
CONFIGURE_FILE("${cmakeDir}/torque-win.rc.in" "${projectSrcDir}/torque.rc")
|
||||
endif()
|
||||
if(NOT EXISTS "${projectOutDir}/${PROJECT_NAME}-debug.bat")
|
||||
CONFIGURE_FILE("${cmakeDir}/app-debug-win.bat.in" "${projectOutDir}/${PROJECT_NAME}-debug.bat")
|
||||
endif()
|
||||
if(NOT EXISTS "${projectOutDir}/cleanup.bat")
|
||||
CONFIGURE_FILE("${cmakeDir}/cleanup-win.bat.in" "${projectOutDir}/cleanup.bat")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
###############################################################################
|
||||
# Common Libraries
|
||||
###############################################################################
|
||||
addLib(lmng)
|
||||
addLib(lpng)
|
||||
addLib(lungif)
|
||||
addLib(ljpeg)
|
||||
addLib(zlib)
|
||||
addLib(tinyxml)
|
||||
addLib(opcode)
|
||||
addLib(squish)
|
||||
addLib(collada)
|
||||
addLib(pcre)
|
||||
addLib(convexDecomp)
|
||||
|
||||
if(WIN32)
|
||||
# copy pasted from T3D build system, some might not be needed
|
||||
set(TORQUE_EXTERNAL_LIBS "COMCTL32.LIB;COMDLG32.LIB;USER32.LIB;ADVAPI32.LIB;GDI32.LIB;WINMM.LIB;WSOCK32.LIB;vfw32.lib;Imm32.lib;d3d9.lib;d3dx9.lib;DxErr.lib;ole32.lib;shell32.lib;oleaut32.lib;version.lib" CACHE STRING "external libs to link against")
|
||||
mark_as_advanced(TORQUE_EXTERNAL_LIBS)
|
||||
addLib("${TORQUE_EXTERNAL_LIBS}")
|
||||
endif()
|
||||
|
||||
###############################################################################
|
||||
# Always enabled Definitions
|
||||
###############################################################################
|
||||
addDebugDef(TORQUE_DEBUG)
|
||||
addDebugDef(TORQUE_ENABLE_ASSERTS)
|
||||
addDebugDef(TORQUE_DEBUG_GFX_MODE)
|
||||
|
||||
addDef(TORQUE_SHADERGEN)
|
||||
addDef(INITGUID)
|
||||
addDef(NTORQUE_SHARED)
|
||||
addDef(UNICODE)
|
||||
addDef(_UNICODE) # for VS
|
||||
addDef(TORQUE_UNICODE)
|
||||
#addDef(TORQUE_SHARED) # not used anymore as the game is the executable directly
|
||||
addDef(LTC_NO_PROTOTYPES) # for libTomCrypt
|
||||
addDef(BAN_OPCODE_AUTOLINK)
|
||||
addDef(ICE_NO_DLL)
|
||||
addDef(TORQUE_OPCODE)
|
||||
addDef(TORQUE_COLLADA)
|
||||
addDef(DOM_INCLUDE_TINYXML)
|
||||
addDef(PCRE_STATIC)
|
||||
addDef(_CRT_SECURE_NO_WARNINGS)
|
||||
addDef(_CRT_SECURE_NO_DEPRECATE)
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Modules
|
||||
###############################################################################
|
||||
if(TORQUE_SFX_DirectX)
|
||||
addLib(x3daudio.lib)
|
||||
endif()
|
||||
|
||||
if(TORQUE_ADVANCED_LIGHTING)
|
||||
addDef(TORQUE_ADVANCED_LIGHTING)
|
||||
endif()
|
||||
if(TORQUE_BASIC_LIGHTING)
|
||||
addDef(TORQUE_BASIC_LIGHTING)
|
||||
endif()
|
||||
|
||||
if(TORQUE_SFX_OPENAL)
|
||||
addInclude("${libDir}/openal/win32")
|
||||
endif()
|
||||
|
||||
if(TORQUE_SFX_VORBIS)
|
||||
addInclude(${libDir}/libvorbis/include)
|
||||
addDef(TORQUE_OGGVORBIS)
|
||||
addLib(libvorbis)
|
||||
addLib(libogg)
|
||||
endif()
|
||||
|
||||
if(TORQUE_THEORA)
|
||||
addDef(TORQUE_OGGTHEORA)
|
||||
addDef(TORQUE_OGGVORIBS)
|
||||
addInclude(${libDir}/libtheora/include)
|
||||
addLib(libtheora)
|
||||
endif()
|
||||
|
||||
if(TORQUE_HIFI)
|
||||
addDef(TORQUE_HIFI_NET)
|
||||
endif()
|
||||
if(TORQUE_EXTENDED_MOVE)
|
||||
addDef(TORQUE_EXTENDED_MOVE)
|
||||
endif()
|
||||
|
||||
###############################################################################
|
||||
# Include Paths
|
||||
###############################################################################
|
||||
addInclude("${projectSrcDir}")
|
||||
addInclude("${srcDir}/")
|
||||
addInclude("${libDir}/lmpg")
|
||||
addInclude("${libDir}/lpng")
|
||||
addInclude("${libDir}/ljpeg")
|
||||
addInclude("${libDir}/lungif")
|
||||
addInclude("${libDir}/zlib")
|
||||
addInclude("${libDir}/") # for tinyxml
|
||||
addInclude("${libDir}/tinyxml")
|
||||
addInclude("${libDir}/squish")
|
||||
addInclude("${libDir}/convexDecomp")
|
||||
addInclude("${libDir}/libogg/include")
|
||||
addInclude("${libDir}/opcode")
|
||||
addInclude("${libDir}/collada/include")
|
||||
addInclude("${libDir}/collada/include/1.4")
|
||||
|
||||
# external things
|
||||
if(WIN32)
|
||||
set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY INCLUDE_DIRECTORIES $ENV{DXSDK_DIR}/Include)
|
||||
endif()
|
||||
|
||||
###############################################################################
|
||||
# Installation
|
||||
###############################################################################
|
||||
|
||||
if(TORQUE_TEMPLATE)
|
||||
message("Prepare Template(${TORQUE_TEMPLATE}) install...")
|
||||
INSTALL(DIRECTORY "${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/game" DESTINATION "${projectDir}")
|
||||
if(WIN32)
|
||||
INSTALL(FILES "${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/cleanShaders.bat" DESTINATION "${projectDir}")
|
||||
INSTALL(FILES "${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/DeleteCachedDTSs.bat" DESTINATION "${projectDir}")
|
||||
INSTALL(FILES "${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/DeleteDSOs.bat" DESTINATION "${projectDir}")
|
||||
INSTALL(FILES "${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/DeletePrefs.bat" DESTINATION "${projectDir}")
|
||||
endif()
|
||||
endif()
|
||||
208
Tools/CMake/torqueConfig.h.in
Normal file
208
Tools/CMake/torqueConfig.h.in
Normal file
|
|
@ -0,0 +1,208 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//Hi, and welcome to the Torque Config file.
|
||||
//
|
||||
//This file is a central reference for the various configuration flags that
|
||||
//you'll be using when controlling what sort of a Torque build you have. In
|
||||
//general, the information here is global for your entire codebase, applying
|
||||
//not only to your game proper, but also to all of your tools.
|
||||
|
||||
/// What's the name of your application? Used in a variety of places.
|
||||
#define TORQUE_APP_NAME "@TORQUE_APP_NAME@"
|
||||
|
||||
/// What version of the application specific source code is this?
|
||||
///
|
||||
/// Version number is major * 1000 + minor * 100 + revision * 10.
|
||||
#define TORQUE_APP_VERSION @TORQUE_APP_VERSION@
|
||||
|
||||
/// Human readable application version string.
|
||||
#define TORQUE_APP_VERSION_STRING "@TORQUE_APP_VERSION_STRING@"
|
||||
|
||||
/// Define me if you want to enable multithreading support.
|
||||
#cmakedefine TORQUE_MULTITHREAD
|
||||
|
||||
/// Define me if you want to disable Torque memory manager.
|
||||
#cmakedefine TORQUE_DISABLE_MEMORY_MANAGER
|
||||
|
||||
/// Define me if you want to disable the virtual mount system.
|
||||
#cmakedefine TORQUE_DISABLE_VIRTUAL_MOUNT_SYSTEM
|
||||
|
||||
/// Define me if you want to disable looking for the root of a given path
|
||||
/// within a zip file. This means that the zip file name itself must be
|
||||
/// the root of the path. Requires the virtual mount system to be active.
|
||||
#cmakedefine TORQUE_DISABLE_FIND_ROOT_WITHIN_ZIP
|
||||
|
||||
//Uncomment this define if you want to use the alternative zip support where you can
|
||||
//define your directories and files inside the zip just like you would on disk
|
||||
//instead of the default zip support that treats the zip as an extra directory.
|
||||
#cmakedefine TORQUE_ZIP_DISK_LAYOUT
|
||||
|
||||
/// Define me if you don't want Torque to compile dso's
|
||||
#cmakedefine TORQUE_NO_DSO_GENERATION
|
||||
|
||||
// Define me if this build is a tools build
|
||||
#cmakedefine TORQUE_PLAYER
|
||||
#cmakedefine TORQUE_TOOLS
|
||||
|
||||
/// Define me if you want to enable the profiler.
|
||||
/// See also the TORQUE_SHIPPING block below
|
||||
#cmakedefine TORQUE_ENABLE_PROFILER
|
||||
|
||||
/// Define me to enable debug mode; enables a great number of additional
|
||||
/// sanity checks, as well as making AssertFatal and AssertWarn do something.
|
||||
/// This is usually defined by the build target.
|
||||
|
||||
// TORQUE_DEBUG is now set dynamically and not here anymore
|
||||
// #cmakedefine TORQUE_DEBUG
|
||||
|
||||
#cmakedefine DEBUG_SPEW
|
||||
#cmakedefine TORQUE_DEBUG_GFX_MODE
|
||||
|
||||
/// Define me if this is a shipping build; if defined I will instruct Torque
|
||||
/// to batten down some hatches and generally be more "final game" oriented.
|
||||
/// Notably this disables a liberal resource manager file searching, and
|
||||
/// console help strings.
|
||||
#cmakedefine TORQUE_SHIPPING
|
||||
|
||||
/// Define me to enable a variety of network debugging aids.
|
||||
///
|
||||
/// - NetConnection packet logging.
|
||||
/// - DebugChecksum guards to detect mismatched pack/unpacks.
|
||||
/// - Detection of invalid destination ghosts.
|
||||
///
|
||||
#cmakedefine TORQUE_DEBUG_NET
|
||||
|
||||
/// Define me to enable detailed console logging of net moves.
|
||||
#cmakedefine TORQUE_DEBUG_NET_MOVES
|
||||
|
||||
/// Enable this define to change the default Net::MaxPacketDataSize
|
||||
/// Do this at your own risk since it has the potential to cause packets
|
||||
/// to be split up by old routers and Torque does not have a mechanism to
|
||||
/// stitch split packets back together. Using this define can be very useful
|
||||
/// in controlled network hardware environments (like a LAN) or for singleplayer
|
||||
/// games (like BArricade and its large paths)
|
||||
//#define MAXPACKETSIZE 1500
|
||||
|
||||
/// Modify me to enable metric gathering code in the renderers.
|
||||
///
|
||||
/// 0 does nothing; higher numbers enable higher levels of metric gathering.
|
||||
//#define TORQUE_GATHER_METRICS 0
|
||||
|
||||
/// Define me if you want to enable debug guards in the memory manager.
|
||||
///
|
||||
/// Debug guards are known values placed before and after every block of
|
||||
/// allocated memory. They are checked periodically by Memory::validate(),
|
||||
/// and if they are modified (indicating an access to memory the app doesn't
|
||||
/// "own"), an error is flagged (ie, you'll see a crash in the memory
|
||||
/// manager's validate code). Using this and a debugger, you can track down
|
||||
/// memory corruption issues quickly.
|
||||
//#define TORQUE_DEBUG_GUARD
|
||||
|
||||
/// Define me if you want to enable instanced-static behavior
|
||||
//#define TORQUE_ENABLE_THREAD_STATICS
|
||||
|
||||
/// Define me if you want to gather static-usage metrics
|
||||
//#define TORQUE_ENABLE_THREAD_STATIC_METRICS
|
||||
|
||||
/// Define me if you want to enable debug guards on the FrameAllocator.
|
||||
///
|
||||
/// This is similar to the above memory manager guards, but applies only to the
|
||||
/// fast FrameAllocator temporary pool memory allocations. The guards are only
|
||||
/// checked when the FrameAllocator frees memory (when it's water mark changes).
|
||||
/// This is most useful for detecting buffer overruns when using FrameTemp<> .
|
||||
/// A buffer overrun in the FrameAllocator is unlikely to cause a crash, but may
|
||||
/// still result in unexpected behavior, if other FrameTemp's are stomped.
|
||||
//#define FRAMEALLOCATOR_DEBUG_GUARD
|
||||
|
||||
/// This #define is used by the FrameAllocator to set the size of the frame.
|
||||
///
|
||||
/// It was previously set to 3MB but I've increased it to 16MB due to the
|
||||
/// FrameAllocator being used as temporary storage for bitmaps in the D3D9
|
||||
/// texture manager.
|
||||
#define TORQUE_FRAME_SIZE 16 << 20
|
||||
|
||||
// Finally, we define some dependent #defines. This enables some subsidiary
|
||||
// functionality to get automatically turned on in certain configurations.
|
||||
|
||||
#ifdef TORQUE_DEBUG
|
||||
|
||||
#define TORQUE_GATHER_METRICS 0
|
||||
#define TORQUE_ENABLE_PROFILE_PATH
|
||||
#ifndef TORQUE_DEBUG_GUARD
|
||||
#define TORQUE_DEBUG_GUARD
|
||||
#endif
|
||||
#ifndef TORQUE_NET_STATS
|
||||
#define TORQUE_NET_STATS
|
||||
#endif
|
||||
|
||||
// Enables the C++ assert macros AssertFatal, AssertWarn, etc.
|
||||
#ifndef TORQUE_ENABLE_ASSERTS
|
||||
#define TORQUE_ENABLE_ASSERTS
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef TORQUE_RELEASE
|
||||
// If it's not DEBUG, it's a RELEASE build, put appropriate things here.
|
||||
#endif
|
||||
|
||||
#ifdef TORQUE_SHIPPING
|
||||
|
||||
// TORQUE_SHIPPING flags here.
|
||||
|
||||
#else
|
||||
|
||||
// Enable the profiler by default, if we're not doing a shipping build.
|
||||
#define TORQUE_ENABLE_PROFILER
|
||||
|
||||
// Enable the TorqueScript assert() instruction if not shipping.
|
||||
#define TORQUE_ENABLE_SCRIPTASSERTS
|
||||
|
||||
// We also enable GFX debug events for use in Pix and other graphics
|
||||
// debugging tools.
|
||||
#define TORQUE_ENABLE_GFXDEBUGEVENTS
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef TORQUE_TOOLS
|
||||
# define TORQUE_INSTANCE_EXCLUSION "TorqueToolsTest"
|
||||
#else
|
||||
# define TORQUE_INSTANCE_EXCLUSION "TorqueTest"
|
||||
#endif
|
||||
|
||||
// Someday, it might make sense to do some pragma magic here so we error
|
||||
// on inconsistent flags.
|
||||
|
||||
// The Xbox360 has it's own profiling tools, the Torque Profiler should not be used
|
||||
#ifdef TORQUE_OS_XENON
|
||||
# ifdef TORQUE_ENABLE_PROFILER
|
||||
# undef TORQUE_ENABLE_PROFILER
|
||||
# endif
|
||||
#
|
||||
# ifdef TORQUE_ENABLE_PROFILE_PATH
|
||||
# undef TORQUE_ENABLE_PROFILE_PATH
|
||||
#endif
|
||||
#endif
|
||||
3
Tools/CMake/zlib.cmake
Normal file
3
Tools/CMake/zlib.cmake
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
project(zlib)
|
||||
|
||||
addStaticLib("${libDir}/${PROJECT_NAME}")
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
#include "ts/tsShape.h"
|
||||
#include "ts/tsShapeConstruct.h"
|
||||
|
||||
#ifdef TORQUE_OS_WIN32
|
||||
#ifdef TORQUE_OS_WIN
|
||||
#include "platformWin32/platformWin32.h"
|
||||
#include "platformWin32/winConsole.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 ) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ beginModule( 'fmod' );
|
|||
$allgood = true;
|
||||
|
||||
// Additional includes
|
||||
switch( Generator::$platform )
|
||||
switch( T3D_Generator::$platform )
|
||||
{
|
||||
case "win32":
|
||||
case "mac":
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ addLibSrcDir( 'ljpeg' );
|
|||
addLibIncludePath( 'ljpeg' );
|
||||
|
||||
// Defines
|
||||
if ( Generator::$platform == "360" )
|
||||
if ( T3D_Generator::$platform == "360" )
|
||||
addProjectDefines( 'NO_GETENV;' );
|
||||
|
||||
endModule();
|
||||
|
|
|
|||
|
|
@ -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" );
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
|
|
|
|||
|
|
@ -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" );
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -75,10 +75,16 @@ beginModule( 'physX3' );
|
|||
|
||||
// Source
|
||||
addEngineSrcDir( "T3D/physics/physx3" );
|
||||
addEngineSrcDir( "T3D/physics/physx3/Cloth" );
|
||||
addEngineSrcDir( "T3D/physics/physx3/Particles" );
|
||||
|
||||
// Includes
|
||||
addIncludePath( $PHYSX3_SDK_PATH . "/Include" );
|
||||
|
||||
addIncludePath( $PHYSX3_SDK_PATH . "/Include/extensions" );
|
||||
addIncludePath( $PHYSX3_SDK_PATH . "/Include/foundation" );
|
||||
addIncludePath( $PHYSX3_SDK_PATH . "/Include/characterkinematic" );
|
||||
addIncludePath( $PHYSX3_SDK_PATH . "/Include/common" );
|
||||
|
||||
// Libs
|
||||
addProjectLibDir( $PHYSX3_SDK_PATH . "/Lib/win32" );
|
||||
addProjectLibInput( "PhysX3_x86.lib","PhysX3CHECKED_x86.lib" );
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ beginModule( 'lpng' );
|
|||
addLibIncludePath( 'lpng' );
|
||||
|
||||
// Defines
|
||||
if ( Generator::$platform == "360" )
|
||||
if ( T3D_Generator::$platform == "360" )
|
||||
addProjectDefines( 'PNG_NO_ASSEMBLER_CODE' );
|
||||
|
||||
endModule();
|
||||
|
|
|
|||
|
|
@ -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" );
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue