Torque3D.conf 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. <?php
  2. //-----------------------------------------------------------------------------
  3. // Copyright (c) 2012 GarageGames, LLC
  4. //
  5. // Permission is hereby granted, free of charge, to any person obtaining a copy
  6. // of this software and associated documentation files (the "Software"), to
  7. // deal in the Software without restriction, including without limitation the
  8. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  9. // sell copies of the Software, and to permit persons to whom the Software is
  10. // furnished to do so, subject to the following conditions:
  11. //
  12. // The above copyright notice and this permission notice shall be included in
  13. // all copies or substantial portions of the Software.
  14. //
  15. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  20. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  21. // IN THE SOFTWARE.
  22. //-----------------------------------------------------------------------------
  23. // Libs
  24. includeLib( 'mng' );
  25. includeLib( 'png' );
  26. includeLib( 'ungif' );
  27. includeLib( 'zlib' );
  28. includeLib( 'jpeg' );
  29. includeLib( 'tinyxml' );
  30. includeLib( 'opcode' );
  31. includeLib( 'squish' );
  32. includeLib( 'collada_dom' );
  33. includeLib( 'pcre' );
  34. includeLib( 'convexDecomp' );
  35. // Use FMOD on consoles
  36. if ( T3D_Generator::$platform != "360" && T3D_Generator::$platform != "ps3" )
  37. {
  38. includeLib( 'libvorbis' );
  39. includeLib( 'libogg' );
  40. includeLib( 'libtheora' );
  41. }
  42. $ext = "DLL";
  43. if ( T3D_Generator::$platform == "mac" )
  44. $ext = "Bundle";
  45. // We need to pick the right physics engine to include.
  46. global $USE_BULLET_PHYSICS;
  47. global $PHYSX_SDK_PATH;
  48. //some platforms will not want a shared config
  49. $useSharedConfig = true;
  50. if ( T3D_Generator::$platform == "360" || T3D_Generator::$platform == "ps3" )
  51. $useSharedConfig = false;
  52. //begin either a shared lib config, or a static app config
  53. if ( $useSharedConfig )
  54. beginSharedLibConfig( getGameProjectName().' '.$ext, '{C0FCDFF9-E125-412E-87BC-2D89DB971CAB}', 'game', getGameProjectName() );
  55. else
  56. beginAppConfig( getGameProjectName(), '{C0FCDFF9-E125-412E-87BC-2D89DB971CAB}', 'game', getGameProjectName() );
  57. /// Prefs
  58. addProjectDefine( 'TORQUE_SHADERGEN' );
  59. addProjectDefine( 'TORQUE_UNICODE' );
  60. if ( $useSharedConfig )
  61. addProjectDefine( 'TORQUE_SHARED' );
  62. /// For OPCODE
  63. addProjectDefine( 'BAN_OPCODE_AUTOLINK' );
  64. addProjectDefine( 'ICE_NO_DLL' );
  65. addProjectDefine( 'TORQUE_OPCODE' );
  66. // For libTomCrypt
  67. addProjectDefine( 'LTC_NO_PROTOTYPES' );
  68. // Additional includes
  69. addIncludePath( "../../game/shaders" );
  70. addLibIncludePath( "lmng" );
  71. addLibIncludePath( "lpng" );
  72. addLibIncludePath( "ljpeg" );
  73. addLibIncludePath( "lungif" );
  74. addLibIncludePath( "zlib" );
  75. addLibIncludePath( "tinyxml" );
  76. addLibIncludePath( "opcode" );
  77. addLibIncludePath( "squish" );
  78. addLibIncludePath( "convexDecomp" );
  79. if ( T3D_Generator::$platform != "360" && T3D_Generator::$platform != "ps3" )
  80. {
  81. addLibIncludePath( "libvorbis/include" );
  82. addLibIncludePath( "libogg/include" );
  83. addLibIncludePath( "libtheora/include" );
  84. }
  85. // Modules
  86. includeModule( 'Torque3D' );
  87. includeModule( 'core' );
  88. includeModule( 'dsound' );
  89. includeModule( 'fmod');
  90. includeModule( 'T3D' );
  91. includeModule( 'advancedLighting' );
  92. includeModule( 'basicLighting' );
  93. includeModule( 'collada' );
  94. if ( T3D_Generator::$platform != "360" && T3D_Generator::$platform != "ps3" )
  95. {
  96. includeModule( 'vorbis' );
  97. includeModule( 'theora' );
  98. }
  99. if(T3D_Generator::$platform == "mac" || T3D_Generator::$platform == "win32")
  100. includeModule( 'openal' );
  101. // Demo functionality
  102. if (getDemoBuild())
  103. includeModule( 'demo' );
  104. if (getWatermarkBuild())
  105. includeModule( 'demoWatermark' );
  106. if (getPurchaseScreenBuild())
  107. includeModule( 'demoPurchaseScreen' );
  108. if (getObjectLimitBuild())
  109. includeModule( 'demoObjectLimit' );
  110. if (getTimeOutBuild())
  111. includeModule( 'demoTimeout' );
  112. // Dependencies
  113. addProjectDependency( 'lmng' );
  114. addProjectDependency( 'lpng' );
  115. addProjectDependency( 'lungif' );
  116. addProjectDependency( 'ljpeg' );
  117. addProjectDependency( 'zlib' );
  118. addProjectDependency( 'tinyxml' );
  119. addProjectDependency( 'opcode' );
  120. addProjectDependency( 'squish' );
  121. addProjectDependency( 'collada_dom' );
  122. addProjectDependency( 'pcre' );
  123. addProjectDependency( 'convexDecomp' );
  124. if ( T3D_Generator::$platform != "360" && T3D_Generator::$platform != "ps3" )
  125. {
  126. addProjectDependency( 'libvorbis' );
  127. addProjectDependency( 'libogg' );
  128. addProjectDependency( 'libtheora' );
  129. }
  130. if ( $USE_BULLET_PHYSICS == true )
  131. {
  132. includeModule( 'bullet' );
  133. addProjectDependency( 'libbullet' );
  134. }
  135. if ( $PHYSX_SDK_PATH != "" )
  136. {
  137. includeModule( 'physx' );
  138. addProjectDependency( 'nxCharacter' );
  139. addProjectDependency( 'nxuStream' );
  140. }
  141. if ( T3D_Generator::$platform == "mac" )
  142. {
  143. addProjectDefine( '__MACOSX__' );
  144. addProjectDefine( 'LTM_DESC' );
  145. }
  146. if (T3D_Generator::$platform == "win32")
  147. {
  148. setProjectModuleDefinitionFile('../../' . getLibSrcDir() . 'Torque3D/msvc/torque3d.def');
  149. addProjectDefine( 'UNICODE' );
  150. addProjectDefine( 'INITGUID' );
  151. addProjectDefine( '_CRT_SECURE_NO_DEPRECATE' );
  152. addProjectLibInput('COMCTL32.LIB');
  153. addProjectLibInput('COMDLG32.LIB');
  154. addProjectLibInput('USER32.LIB');
  155. addProjectLibInput('ADVAPI32.LIB');
  156. addProjectLibInput('GDI32.LIB');
  157. addProjectLibInput('WINMM.LIB');
  158. addProjectLibInput('WS2_32.LIB');
  159. addProjectLibInput('vfw32.lib');
  160. addProjectLibInput('Imm32.lib');
  161. addProjectLibInput('d3d9.lib');
  162. addProjectLibInput('d3dx9.lib');
  163. addProjectLibInput('DxErr.lib');
  164. addProjectLibInput('ole32.lib');
  165. addProjectLibInput('shell32.lib');
  166. addProjectLibInput('oleaut32.lib');
  167. addProjectLibInput('version.lib');
  168. }
  169. // Include project specific sources in the project/buildFiles/config/projectCode.conf
  170. $projectCode = realpath($argv[1])."/buildFiles/config/projectCode.conf";
  171. echo( "\n - Loading project code configuration from ".$projectCode."\n");
  172. include $projectCode;
  173. //end shared/static config
  174. if ( $useSharedConfig )
  175. endSharedLibConfig();
  176. else
  177. endAppConfig();
  178. //add the shared application only if this is a shared config
  179. if ( $useSharedConfig )
  180. {
  181. /////// Application Config
  182. beginSharedAppConfig( getGameProjectName(), '{CDECDFF9-E125-523F-87BC-2D89DB971CAB}' );
  183. addProjectDefine( 'TORQUE_SHARED' );
  184. addEngineSrcDir( 'main' );
  185. if (T3D_Generator::$platform == "win32")
  186. {
  187. addProjectDefine( 'WIN32' );
  188. addProjectDependency( getGameProjectName() . ' DLL' );
  189. }
  190. if (T3D_Generator::$platform == "mac")
  191. {
  192. addProjectDefine( '__MACOSX__' );
  193. addProjectDependency( getGameProjectName() . ' Bundle' );
  194. addProjectDependency( getGameProjectName() . ' Plugin' );
  195. }
  196. endSharedAppConfig();
  197. }
  198. // Add solution references for Visual Studio projects
  199. if (T3D_Generator::$platform == "win32" || T3D_Generator::$platform == "360" || T3D_Generator::$platform == "ps3")
  200. {
  201. if ( !$useSharedConfig )
  202. beginSolutionConfig( getGameProjectName(), '{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}' );
  203. addSolutionProjectRef( getGameProjectName() );
  204. if ( $useSharedConfig )
  205. addSolutionProjectRef( getGameProjectName() . ' DLL' );
  206. addSolutionProjectRef( 'collada_dom' );
  207. addSolutionProjectRef( 'ljpeg' );
  208. addSolutionProjectRef( 'lmng' );
  209. addSolutionProjectRef( 'lpng' );
  210. addSolutionProjectRef( 'lungif' );
  211. addSolutionProjectRef( 'opcode' );
  212. addSolutionProjectRef( 'pcre' );
  213. addSolutionProjectRef( 'squish' );
  214. addSolutionProjectRef( 'tinyxml' );
  215. addSolutionProjectRef( 'zlib' );
  216. addSolutionProjectRef( 'convexDecomp' );
  217. if (T3D_Generator::$platform == "win32")
  218. {
  219. addSolutionProjectRef( 'libogg' );
  220. addSolutionProjectRef( 'libvorbis' );
  221. addSolutionProjectRef( 'libtheora' );
  222. }
  223. if ( $USE_BULLET_PHYSICS == true )
  224. addSolutionProjectRef( 'libbullet' );
  225. if ( $PHYSX_SDK_PATH != "" )
  226. {
  227. // For PhysX support.
  228. addSolutionProjectRef( 'nxCharacter' );
  229. addSolutionProjectRef( 'nxuStream' );
  230. }
  231. if ( !$useSharedConfig )
  232. endSolutionConfig();
  233. }
  234. ?>