Team Fortress 2 Source Code as on 22/4/2020
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.

110 lines
3.3 KiB

  1. //-----------------------------------------------------------------------------
  2. // LAUNCHER_MAIN.VPC
  3. //
  4. // Project Script
  5. //-----------------------------------------------------------------------------
  6. $MacroRequired "PLATSUBDIR"
  7. $Macro SRCDIR ".."
  8. $Macro OUTBINDIR "$SRCDIR\..\game"
  9. // Must be built explicitly as "default" in order to build a compliant submittable Disc.
  10. // Renames will not work.
  11. $Macro OUTBINNAME "default"
  12. $Macro OUTBINNAME "hl2_osx" [$OSXALL]
  13. $Macro OUTBINNAME "hl2_linux" [$LINUXALL]
  14. $Include "$SRCDIR\vpc_scripts\source_exe_base.vpc"
  15. $Configuration
  16. {
  17. $General
  18. {
  19. $AdditionalProjectDependencies "$BASE;newdat" [$WIN32 && !$ANALYZE]
  20. }
  21. $Compiler
  22. {
  23. $PreprocessorDefinitions "$BASE;fopen=dont_use_fopen"
  24. $ForceIncludes " "
  25. }
  26. $Linker [$WIN32]
  27. {
  28. $EnableLargeAddresses "Support Addresses Larger Than 2 Gigabytes (/LARGEADDRESSAWARE)" [$WIN32]
  29. $FixedBaseAddress "Generate a relocation section (/FIXED:NO)" [$WIN32]
  30. }
  31. $Xbox360ImageConversion [$X360]
  32. {
  33. // General
  34. $AdditionalSections "4541080F=$SRCDIR\common\hl2orange.spa"
  35. }
  36. $PreBuildEvent [$WIN32]
  37. {
  38. $CommandLine "if EXIST $OUTBINDIR\hl2.exe for /f $QUOTEdelims=$QUOTE %%A in ('attrib $QUOTE$OUTBINDIR\hl2.exe$QUOTE') do set valveTmpIsReadOnly=$QUOTE%%A$QUOTE" "\n" \
  39. "set valveTmpIsReadOnlyLetter=%valveTmpIsReadOnly:~6,1%" "\n" \
  40. "if $QUOTE%valveTmpIsReadOnlyLetter%$QUOTE==$QUOTER$QUOTE del /q $QUOTE$(TargetDir)$QUOTE$(TargetFileName)" "\n" \
  41. "$CRCCHECK"
  42. }
  43. $PostBuildEvent [$X360]
  44. {
  45. // inherit and add
  46. $CommandLine "$BASE" \
  47. "call $SRCDIR\vpc_scripts\valve_xbcp_wrapper.cmd $(TargetDir)$(TargetName).xex xE:\Valve\default.xex" "\n"
  48. }
  49. $PostBuildEvent [$WIN32 && !$ANALYZE]
  50. {
  51. // Note that the PDB must be checked in with the name it is linked as or else the debugger
  52. // will not be able to find it. That's why it is checked in as default.pdb.
  53. // override with specific behavior
  54. $CommandLine "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\hl2.exe $SRCDIR" "\n" \
  55. "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\default.pdb $SRCDIR" "\n" \
  56. "copy $(TargetPath) $OUTBINDIR\hl2.exe" "\n" \
  57. "if ERRORLEVEL 1 goto BuildEventFailed" "\n" \
  58. "copy $(TargetDir)\default.pdb $OUTBINDIR\default.pdb" "\n" \
  59. "if ERRORLEVEL 1 goto BuildEventFailed" "\n" \
  60. "if exist $(TargetDir)$(TargetName).map copy $(TargetDir)$(TargetName).map $OUTBINDIR\hl2.map" "\n" \
  61. "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\hl2.dat $SRCDIR" "\n" \
  62. "$OUTBINDIR\bin\newdat $OUTBINDIR\hl2.exe" "\n" \
  63. "goto BuildEventOK" "\n" \
  64. ":BuildEventFailed" "\n" \
  65. "echo *** ERROR! PostBuildStep FAILED for $(ProjectName)! EXE or DLL is probably running. ***" "\n" \
  66. "del /q $(TargetPath)" "\n" \
  67. "exit 1" "\n" \
  68. ":BuildEventOK" "\n"
  69. }
  70. }
  71. $Project
  72. {
  73. $Folder "Source Files"
  74. {
  75. -$File "$SRCDIR\public\tier0\memoverride.cpp"
  76. }
  77. $Folder "Link Libraries"
  78. {
  79. -$Lib tier0 [$WINDOWS]
  80. -$Lib tier1 [$WINDOWS]
  81. -$ImpLib vstdlib [$WINDOWS]
  82. }
  83. }
  84. $Project "launcher_main"
  85. {
  86. $Folder "Source Files"
  87. {
  88. $File "main.cpp"
  89. }
  90. $Folder "Resources" [$WIN32]
  91. {
  92. $File "launcher_main.rc"
  93. $File "$SRCDIR\launcher\res\launcher.ico"
  94. }
  95. }