Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

351 lines
16 KiB

  1. //-----------------------------------------------------------------------------
  2. // SERVER_PORTAL2.VPC
  3. //
  4. // Project Script
  5. //-----------------------------------------------------------------------------
  6. $Macro GAMENAME "portal2"
  7. $Macro GENERATED_PROTO_DIR "$SRCDIR\game\server\portal2\generated_proto"
  8. $Include "server_portal_base.vpc"
  9. $Include "server_econ_base.vpc" [($WIN32 || $OSXALL) && !$NO_STEAM]
  10. $Configuration
  11. {
  12. $Compiler
  13. {
  14. $AdditionalIncludeDirectories "$BASE;$SRCDIR\game\shared\hl2;$SRCDIR\game\shared\episodic;.\hl2;.\episodic;$SRCDIR\game\shared\portal;.\portal;$SRCDIR\game\shared\multiplayer;$SRCDIR\game\shared\portal2;.\portal2;$SRCDIR\public\meshutils;"
  15. $PreprocessorDefinitions "$BASE;USES_SAVERESTORE;PORTAL2;PORTAL"
  16. $PreprocessorDefinitions "$BASE;PORTAL2_PUZZLEMAKER" [ $WIN32 || $OSXALL ]
  17. $PreprocessorDefinitions "$BASE;USE_CEG" [ $WIN32 && !$NO_CEG ]
  18. }
  19. $Linker [$WIN32 && !$NO_CEG]
  20. {
  21. $AdditionalDependencies "$BASE $LIBCOMMON\ceglib.lib"
  22. $FunctionOrder "$(IntDir)\functionorder.txt"
  23. $References "Eliminate Unreferenced Data (/OPT:REF)"
  24. $EnableCOMDATFolding "Remove Redundant COMDATs (/OPT:ICF)"
  25. }
  26. $PreBuildEvent [$WIN32 && !$NO_CEG]
  27. {
  28. $CommandLine "del $(IntDir)\*.temp" "\n" \
  29. "del $(IntDir)\*.substitutions*" "\n" \
  30. "if EXIST $OUTBINDIR\$(TargetFileName) for /f $QUOTEdelims=$QUOTE %%A in ('attrib $QUOTE$OUTBINDIR\$(TargetFileName)$QUOTE') do set valveTmpIsReadOnly=$QUOTE%%A$QUOTE" "\n" \
  31. "set valveTmpIsReadOnlyLetter=%valveTmpIsReadOnly:~6,1%" "\n" \
  32. "if $QUOTE%valveTmpIsReadOnlyLetter%$QUOTE==$QUOTER$QUOTE del /q $QUOTE$(TargetDir)$QUOTE$(TargetFileName)" "\n" \
  33. "$CRCCHECK"
  34. }
  35. $PreLinkEvent [$WIN32 && !$NO_CEG]
  36. {
  37. $CommandLine "$(InputDir)\..\..\devtools\bin\ceg\mingle.exe -subst:$(ProjectDir)\..\..\lib\common\ceglib.lib -mingle:$(ProjectDir)\..\..\lib\common\ceglib.lib $(IntDir)\*.obj -log:$(IntDir)\mingle.log > $(IntDir)\functionorder.txt" "\n"
  38. $Description "Mingle processes .obj files - changing Steamworks_TestSecret and Steamworks_SelfCheck references and generating function order file. Report problems to [email protected]"
  39. }
  40. $PostBuildEvent [$WIN32 && !$NO_CEG]
  41. {
  42. $CommandLine "if exist $OUTCEGDIR goto CegExists" "\n" \
  43. "mkdir $OUTCEGDIR" "\n" \
  44. ":CegExists" "\n" \
  45. "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTCEGDIR\$(TargetFileName).original $SRCDIR" "\n" \
  46. "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTCEGDIR\$(TargetFileName).stripped $SRCDIR" "\n" \
  47. "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTCEGDIR\$(TargetFileName).strips $SRCDIR" "\n" \
  48. "ECHO Generating CEG binaries..." "\n" \
  49. "$(ProjectDir)\..\..\devtools\bin\ceg\drmpe -drm:$(TargetPath) -path:$(ProjectDir)\..\..\devtools\bin\ceg -drmout:$(TargetPath).ceg -output:$OUTCEGDIR -logfile:$(IntDir)\drmpe.log -drmclean" "\n" \
  50. "copy $(TargetPath).ceg $(TargetPath)" "\n" \
  51. "if exist $OUTBINDIR goto ValveStart" "\n" \
  52. "mkdir $OUTBINDIR" "\n" \
  53. ":ValveStart" "\n" \
  54. "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\$(TargetFileName) $SRCDIR" "\n" \
  55. "copy $QUOTE$(TargetDir)$QUOTE$(TargetFileName) $OUTBINDIR\$(TargetFileName)" "\n" \
  56. "if ERRORLEVEL 1 goto BuildEventFailed" "\n" \
  57. "if exist $QUOTE$(TargetDir)$QUOTE$(TargetName).map copy $QUOTE$(TargetDir)$QUOTE$(TargetName).map $OUTBINDIR\$(TargetName).map" "\n" \
  58. "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\$(TargetName).pdb $SRCDIR" "\n" \
  59. "copy $QUOTE$(TargetDir)$QUOTE$(TargetName).pdb $OUTBINDIR\$(TargetName).pdb" "\n" \
  60. "if ERRORLEVEL 1 goto BuildEventFailed" "\n" \
  61. "goto BuildEventOK" "\n" \
  62. ":BuildEventFailed" "\n" \
  63. "echo *** ERROR! PostBuildStep FAILED for $(ProjectName)! EXE or DLL is probably running. ***" "\n" \
  64. "del /q $QUOTE$(TargetDir)$QUOTE$(TargetFileName)" "\n" \
  65. "exit 1" "\n" \
  66. ":BuildEventOK" "\n" [!$UPLOAD_CEG]
  67. $CommandLine "if exist $OUTCEGDIR goto CegExists" "\n" \
  68. "mkdir $OUTCEGDIR" "\n" \
  69. ":CegExists" "\n" \
  70. "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTCEGDIR\$(TargetFileName).original $SRCDIR" "\n" \
  71. "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTCEGDIR\$(TargetFileName).stripped $SRCDIR" "\n" \
  72. "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTCEGDIR\$(TargetFileName).strips $SRCDIR" "\n" \
  73. "ECHO Generating CEG binaries..." "\n" \
  74. "$(ProjectDir)\..\..\devtools\bin\ceg\drmpe -path:$(ProjectDir)\..\..\devtools\bin\ceg -split:$(TargetPath) -logfile:$(IntDir)\drmpe.log" "\n" \
  75. "if exist drmpe.cfg del /f drmpe.cfg" "\n" \
  76. "ECHO Uploading CEG binaries..." "\n" \
  77. "copy drmpe_beta.cfg drmpe.cfg" "\n" \
  78. "$(ProjectDir)\..\..\devtools\bin\ceg\drmpe -path:$(ProjectDir)\..\..\devtools\bin\ceg -upload:620 -logfile:$(IntDir)\drmpe_beta_upload.log" "\n" \
  79. "copy drmpe_public.cfg drmpe.cfg" "\n" \
  80. "$(ProjectDir)\..\..\devtools\bin\ceg\drmpe -path:$(ProjectDir)\..\..\devtools\bin\ceg -upload:620 -logfile:$(IntDir)\drmpe_public_upload.log" "\n" \
  81. "ECHO Moving CEG binaries to output folder..." "\n" \
  82. "copy $(ProjectDir)\submission\$(TargetFileName).original $OUTCEGDIR\$(TargetFileName).original" "\n" \
  83. "copy $(ProjectDir)\submission\$(TargetFileName).stripped $OUTCEGDIR\$(TargetFileName).stripped" "\n" \
  84. "copy $(ProjectDir)\submission\$(TargetFileName).strips $OUTCEGDIR\$(TargetFileName).strips" "\n" \
  85. "copy $OUTCEGDIR\$(TargetFileName).stripped $(TargetPath)" "\n" \
  86. "if exist $OUTBINDIR goto ValveStart" "\n" \
  87. "mkdir $OUTBINDIR" "\n" \
  88. ":ValveStart" "\n" \
  89. "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\$(TargetFileName) $SRCDIR" "\n" \
  90. "copy $QUOTE$(TargetDir)$QUOTE$(TargetFileName) $OUTBINDIR\$(TargetFileName)" "\n" \
  91. "if ERRORLEVEL 1 goto BuildEventFailed" "\n" \
  92. "if exist $QUOTE$(TargetDir)$QUOTE$(TargetName).map copy $QUOTE$(TargetDir)$QUOTE$(TargetName).map $OUTBINDIR\$(TargetName).map" "\n" \
  93. "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\$(TargetName).pdb $SRCDIR" "\n" \
  94. "copy $QUOTE$(TargetDir)$QUOTE$(TargetName).pdb $OUTBINDIR\$(TargetName).pdb" "\n" \
  95. "if ERRORLEVEL 1 goto BuildEventFailed" "\n" \
  96. "goto BuildEventOK" "\n" \
  97. ":BuildEventFailed" "\n" \
  98. "echo *** ERROR! PostBuildStep FAILED for $(ProjectName)! EXE or DLL is probably running. ***" "\n" \
  99. "del /q $QUOTE$(TargetDir)$QUOTE$(TargetFileName)" "\n" \
  100. "exit 1" "\n" \
  101. ":BuildEventOK" "\n" [$UPLOAD_CEG]
  102. $Description "CEG the file, copy resultant files to perforce locations, and upload to Steam if appropriate. Report problems with drmpe.exe to [email protected]"
  103. }
  104. }
  105. $Project "Server (Portal 2)"
  106. {
  107. $Folder "Source Files"
  108. {
  109. $File "$SRCDIR\game\shared\predicted_viewmodel.cpp"
  110. $File "$SRCDIR\game\shared\predicted_viewmodel.h"
  111. $Folder "Workshop"
  112. {
  113. $File "$SRCDIR\game\shared\ugc_request_manager.cpp"
  114. $File "$SRCDIR\game\shared\ugc_request_manager.h"
  115. $File "$SRCDIR\game\shared\ugc_utils.cpp"
  116. $File "$SRCDIR\game\shared\ugc_utils.h"
  117. $File "$SRCDIR\game\shared\ugc_file_info_manager.cpp"
  118. $File "$SRCDIR\game\shared\ugc_file_info_manager.h"
  119. $File "$SRCDIR\game\shared\ugc_workshop_manager.cpp"
  120. $File "$SRCDIR\game\shared\ugc_workshop_manager.h"
  121. }
  122. $Folder "Portal"
  123. {
  124. $File "portal\portal_client.cpp"
  125. $File "$SRCDIR\game\shared\portal\portal_gamerules.cpp"
  126. $File "$SRCDIR\game\shared\portal\portal_gamerules.h"
  127. $File "$SRCDIR\game\shared\portal\portal_mp_gamerules.cpp"
  128. $File "$SRCDIR\game\shared\portal\portal_mp_gamerules.h"
  129. $Folder "Economy" [ ( $WIN32 || $OSXALL) && !$NO_STEAM ]
  130. {
  131. $File "$SRCDIR\game\shared\portal2\portal2_item_inventory.cpp"
  132. $File "$SRCDIR\game\shared\portal2\portal2_item_inventory.h"
  133. $File "$SRCDIR\game\shared\portal2\portal2_item_schema.cpp"
  134. $File "$SRCDIR\game\shared\portal2\portal2_item_schema.h"
  135. $File "$SRCDIR\game\shared\portal2\portal2_item_system.cpp"
  136. $File "$SRCDIR\game\shared\portal2\portal2_item_system.h"
  137. }
  138. $Folder "Portal 2"
  139. {
  140. $File "portal2\baseprojectedentity.cpp"
  141. $File "portal2\baseprojectedentity.h"
  142. $File "portal2\baseprojector.cpp"
  143. $File "portal2\baseprojector.h"
  144. $File "portal2\projected_entity_ambient_sound_proxy.cpp"
  145. $File "portal2\projected_entity_ambient_sound_proxy.h"
  146. $File "portal2\env_portal_laser.cpp"
  147. $File "portal2\env_portal_laser.h"
  148. $File "portal2\func_placement_clip.cpp"
  149. $File "portal2\info_coop_spawn.cpp"
  150. $File "portal2\info_placement_helper.cpp"
  151. $File "portal2\info_placement_helper.h"
  152. $File "portal2\info_player_ping_detector.cpp"
  153. $File "portal2\logic_timescale.cpp"
  154. $File "portal2\logic_timescale.h"
  155. $File "portal2\item_nugget.cpp"
  156. $File "portal2\npc_hover_turret.cpp"
  157. $File "portal2\point_laser_target.cpp"
  158. $File "portal2\point_laser_target.h"
  159. $File "portal2\point_futbol_shooter.cpp"
  160. $File "portal2\portal_playerlocaldata.cpp"
  161. $File "portal2\portal_playerlocaldata.h"
  162. $File "portal2\projectedwallentity.h"
  163. $File "portal2\projectedwallentity.cpp"
  164. $File "portal2\prop_button.cpp"
  165. $File "portal2\prop_floor_button.cpp"
  166. $File "portal2\prop_linked_portal_door.cpp"
  167. $File "portal2\propglassfutbol.cpp"
  168. $File "portal2\propwallprojector.cpp"
  169. $File "portal2\propwallprojector.h"
  170. $File "portal2\prop_rockettripwire.h"
  171. $File "portal2\prop_rockettripwire.cpp"
  172. $File "portal2\prop_weightedcube.cpp"
  173. $File "portal2\prop_weightedcube.h"
  174. $File "portal2\prop_personality_sphere.cpp"
  175. $File "portal2\func_portalled.cpp"
  176. $File "portal2\func_portalled.h"
  177. $File "portal2\npc_personality_core.cpp"
  178. $File "portal2\prop_monster_box.cpp"
  179. $File "portal2\prop_monster_box.h"
  180. $File "portal2\indicator_panel.cpp"
  181. $File "portal2\indicator_panel.h"
  182. $File "portal2\trigger_catapult.cpp"
  183. $File "portal2\trigger_catapult.h"
  184. $File "portal2\trigger_playerteam.cpp"
  185. $File "portal2\trigger_ping_detector.cpp"
  186. $File "portal2\point_changelevel.cpp"
  187. $File "portal2\pointsurvey.cpp"
  188. $File "portal2\pointsurvey.h"
  189. $File "portal2\trigger_tractorbeam.h"
  190. $File "portal2\trigger_tractorbeam.cpp"
  191. $File "portal2\prop_tractorbeam.h"
  192. $File "portal2\prop_tractorbeam.cpp"
  193. $File "portal2\rocketprojectile.cpp"
  194. $File "portal2\rocketprojectile.h"
  195. $File "portal2\level_placard_display.cpp"
  196. $File "portal2\mp_lobby_screen.cpp"
  197. $File "portal2\portal_race_checkpoint.cpp"
  198. $File "portal2\prop_exploding_futbol.cpp"
  199. $File "portal2\prop_exploding_futbol.h"
  200. $File "portal2\portal_pointpush.h"
  201. $File "portal2\portal_pointpush.cpp"
  202. $File "portal2\fizzler_effects.h"
  203. $File "portal2\fizzler_effects.cpp"
  204. $File "portal2\hitbox_damaged_entity.h"
  205. $File "portal2\npc_wheatley_boss.cpp"
  206. $File "portal2\portal_mp_stats.h"
  207. $File "portal2\portal_mp_stats.cpp"
  208. $File "portal2\fizzler_multiorigin_sound_player.h"
  209. $File "portal2\fizzler_multiorigin_sound_player.cpp"
  210. $File "portal2\prop_hot_potato.cpp"
  211. $File "portal2\portal_ui_controller.h"
  212. $File "portal2\portal_ui_controller.cpp"
  213. $File "portal2\portal_procedural_generator.h"
  214. $File "portal2\portal_procedural_generator.cpp"
  215. $File "portal2\challenge_mode_end_node.cpp"
  216. $File "portal2\portal2_research_data_tracker.h"
  217. $File "portal2\portal2_research_data_tracker.cpp"
  218. $File "portal2\info_portal_score.cpp"
  219. $File "$SRCDIR\game\shared\portal2\vs_game_shared.h"
  220. $File "$SRCDIR\game\shared\portal2\hitbox_damaged_entity_shared.h"
  221. $File "$SRCDIR\game\shared\portal2\hitbox_damaged_entity_shared.cpp"
  222. $File "$SRCDIR\game\shared\portal2\portal_grabcontroller_shared.h"
  223. $File "$SRCDIR\game\shared\portal2\portal_grabcontroller_shared.cpp"
  224. $File "$SRCDIR\game\shared\portal2\player_pickup.h"
  225. $File "$SRCDIR\game\shared\portal2\player_pickup.cpp"
  226. $File "$SRCDIR\game\shared\portal2\portal_pointpush_shared.cpp"
  227. $File "$SRCDIR\game\shared\portal2\weapon_item_base_shared.h"
  228. $File "$SRCDIR\game\shared\portal2\weapon_item_base_shared.cpp"
  229. $File "$SRCDIR\game\shared\portal2\weapon_promo_items_shared.h"
  230. $File "$SRCDIR\game\shared\portal2\weapon_promo_items_shared.cpp"
  231. $File "$SRCDIR\game\shared\portal\baseprojectedentity_shared.h"
  232. $File "$SRCDIR\game\shared\portal\baseprojectedentity_shared.cpp"
  233. $File "$SRCDIR\game\shared\portal\projectedwallentity_shared.cpp"
  234. $File "$SRCDIR\game\shared\portal\trigger_tractorbeam_shared.h"
  235. $File "$SRCDIR\game\shared\portal\trigger_tractorbeam_shared.cpp"
  236. $File "$SRCDIR\game\shared\portal2\damage_database.h"
  237. $File "$SRCDIR\game\shared\portal2\damage_database.cpp"
  238. $File "$SRCDIR\game\shared\portal2\trigger_catapult_shared.cpp"
  239. $File "$SRCDIR\game\server\portal2\prop_testchamber_door.cpp"
  240. $File "$SRCDIR\game\server\portal2\prop_testchamber_door.h"
  241. $File "$SRCDIR\game\shared\portal2\material_index_data_ops_proxy.h"
  242. $File "$SRCDIR\game\shared\portal2\material_index_data_ops_proxy.cpp"
  243. }
  244. $Folder "Paint"
  245. {
  246. // shared
  247. $File "$SRCDIR\game\shared\portal\paintable_entity.h"
  248. $File "$SRCDIR\game\shared\portal\prop_paint_power_user.h"
  249. $File "$SRCDIR\game\shared\portal\player_pickup_paint_power_user.h"
  250. $File "$SRCDIR\game\shared\portal\paint_color_manager.h"
  251. $File "$SRCDIR\game\shared\portal\paint_color_manager.cpp"
  252. $File "$SRCDIR\game\shared\portal\paint_power_user_interface.h"
  253. $File "$SRCDIR\game\shared\portal\paint_power_user_interface.cpp"
  254. $File "$SRCDIR\game\shared\portal\paint_power_user.h"
  255. $File "$SRCDIR\game\shared\portal\paint_power_info.h"
  256. $File "$SRCDIR\game\shared\portal\paint_power_info.cpp"
  257. $File "$SRCDIR\game\shared\portal\stick_partner.h"
  258. $File "$SRCDIR\game\shared\portal\stick_partner.cpp"
  259. $File "$SRCDIR\game\shared\portal\paint_blobs_shared.h"
  260. $File "$SRCDIR\game\shared\portal\paint_blobs_shared.cpp"
  261. $File "$SRCDIR\game\shared\portal\paint_stream_manager.h"
  262. $File "$SRCDIR\game\shared\portal\paint_stream_manager.cpp"
  263. $File "$SRCDIR\game\shared\portal\paint_sprayer_shared.h"
  264. $File "$SRCDIR\game\shared\portal\paint_sprayer_shared.cpp"
  265. $File "$SRCDIR\game\shared\portal\paint_cleanser_manager.h"
  266. $File "$SRCDIR\game\shared\portal\paint_cleanser_manager.cpp"
  267. $File "$SRCDIR\game\shared\portal\weapon_paintgun_shared.h"
  268. $File "$SRCDIR\game\shared\portal\weapon_paintgun_shared.cpp"
  269. $File "$SRCDIR\game\shared\portal\paint_stream_shared.h"
  270. $File "$SRCDIR\game\shared\portal\paint_stream_shared.cpp"
  271. $File "$SRCDIR\game\shared\portal2\paint_saverestore.h"
  272. $File "$SRCDIR\game\shared\portal2\paint_saverestore.cpp"
  273. // server
  274. $File "portal2\paint_database.h"
  275. $File "portal2\paint_database.cpp"
  276. $File "portal2\paint_sprayer.h"
  277. $File "portal2\paint_sprayer.cpp"
  278. $File "portal2\trigger_paint_cleanser.h"
  279. $File "portal2\trigger_paint_cleanser.cpp"
  280. $File "portal2\weapon_paintgun.h"
  281. $File "portal2\weapon_paintgun.cpp"
  282. $File "portal2\paint_swap_guns.h"
  283. $File "portal2\paint_swap_guns.cpp"
  284. $File "portal2\item_paint_power_pickup.cpp"
  285. $File "portal2\prop_paint_bomb.h"
  286. $File "portal2\prop_paint_bomb.cpp"
  287. $File "portal2\paint_bot_temp.h"
  288. $File "portal2\paint_bot_temp.cpp"
  289. $File "portal2\prop_physics_paintable.cpp"
  290. $File "portal2\cpaintblob.h"
  291. $File "portal2\cpaintblob.cpp"
  292. $File "portal2\paint_stream.h"
  293. $File "portal2\paint_stream.cpp"
  294. $File "portal2\paint_sphere.h"
  295. $File "portal2\paint_sphere.cpp"
  296. $Folder "Additional Public Header Files"
  297. {
  298. $File "$SRCDIR\public\meshutils\mesh.h"
  299. }
  300. $Folder "Additional Link Libraries"
  301. {
  302. $Lib "$LIBPUBLIC\meshutils"
  303. $Lib "$LIBCOMMON\blobulator" [$WIN32||$POSIX]
  304. $Lib "$LIBCOMMON\fileextd" [$WIN32 && !$NO_CEG]
  305. }
  306. }
  307. }
  308. $Folder "Protobuf Files" [ ( $WIN32 || $OSXALL ) && !$NO_STEAM ]
  309. {
  310. $DynamicFile "$GENERATED_PROTO_DIR\steammessages.pb.cc"
  311. {
  312. $Configuration
  313. {
  314. $Compiler
  315. {
  316. $Create/UsePrecompiledHeader "Not Using Precompiled Headers"
  317. }
  318. }
  319. }
  320. }
  321. }
  322. }