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.

124 lines
4.0 KiB

  1. //-----------------------------------------------------------------------------
  2. // SOURCE_DLL_X360_BASE.VPC
  3. //
  4. // Base Settings for Source(TM) Projects
  5. //-----------------------------------------------------------------------------
  6. $Include "$SRCDIR\vpc_scripts\version.vpc"
  7. $MacroRequired "SRCDIR"
  8. $MacroRequired "OUTBINNAME" "$PROJECTNAME"
  9. $MacroRequired "OUTBINDIR"
  10. $MacroRequired "DEVKITBINDIR" "bin"
  11. // 360 must have a dll load address
  12. $Include "$SRCDIR\vpc_scripts\loadaddress.vpc"
  13. $MacroRequired "LOADADDRESS_DEVELOPMENT"
  14. $MacroRequired "LOADADDRESS_RETAIL"
  15. $MacroRequired "LOADADDRESSNAME"
  16. $Macro DLLDEMOSUFFIX "_demo\" [$DEMO]
  17. $MacroEmptyString DLLDEMOSUFFIX "empty" [!$DEMO]
  18. $Macro PLATSUBDIR "\."
  19. $Macro LIBPUBLIC "$SRCDIR\lib\public"
  20. $Macro LIBCOMMON "$SRCDIR\lib\common"
  21. $Include "$SRCDIR\vpc_scripts\source_dll_x360_debug.vpc"
  22. $Include "$SRCDIR\vpc_scripts\source_dll_x360_release.vpc"
  23. $IgnoreRedundancyWarning "ON"
  24. // Common Configuration
  25. $Configuration
  26. {
  27. $Compiler
  28. {
  29. $PreprocessorDefinitions "$BASE;_MEMTEST" [$MEMTEST]
  30. $PreprocessorDefinitions "$BASE;_LOWVIOLENCE" [$LV]
  31. $PreprocessorDefinitions "$BASE;_X360DEMO" [$X360DEMO]
  32. $PreprocessorDefinitions "$BASE;COMPILER_MSVC;COMPILER_MSVCX360;MEMOVERRIDE_MODULE=$PROJECTNAME;_DLL_EXT=$_DLL_EXT"
  33. }
  34. $Linker
  35. {
  36. // This ignores the linker error "export '<symbol>' specified multiple times; using first specification
  37. $AdditionalOptions "$BASE /IGNORE:4197"
  38. }
  39. $Xbox360ImageConversion
  40. {
  41. // All X360 DLLs must be signed with a special XML containing only version field
  42. // the version of the DLL must match the version of default.xex that is signed
  43. // with another XML including more settings (privileges, ratings, memory, etc.)
  44. // DLLs must NOT be signed with the XML used for XEX
  45. $TitleID "0x5841125A"
  46. $ProjectDefaults "$SRCDIR\common\xlast_$VPCGAME$DLLDEMOSUFFIX\$VPCGAME""_dll.xml"
  47. }
  48. $ConsoleDeployment
  49. {
  50. $ExcludedFromBuild "Yes"
  51. $DeploymentRoot "xe:\$VPCGAME$DLLDEMOSUFFIX"
  52. }
  53. $PreBuildEvent
  54. {
  55. $CommandLine "if EXIST $OUTBINDIR\$(TargetFileName) for /f $QUOTEdelims=$QUOTE %%A in ('attrib $QUOTE$OUTBINDIR\$(TargetFileName)$QUOTE') do set valveTmpIsReadOnly=$QUOTE%%A$QUOTE" "\n" \
  56. "set valveTmpIsReadOnlyLetter=%valveTmpIsReadOnly:~6,1%" "\n" \
  57. "if $QUOTE%valveTmpIsReadOnlyLetter%$QUOTE==$QUOTER$QUOTE del /q $(TargetDir)$(TargetName)_converted.dll" "\n" \
  58. "$CRCCHECK" "\n"
  59. }
  60. $PostBuildEvent
  61. {
  62. $CommandLine "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\$(TargetFileName) $SRCDIR" "\n" \
  63. "copy $(TargetDir)$(TargetName)_converted.dll $OUTBINDIR\$(TargetFileName)" "\n" \
  64. "if exist $(TargetDir)$(TargetName).map copy $(TargetDir)$(TargetName).map $OUTBINDIR\$(TargetName).map" "\n" \
  65. "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\$(TargetName).pdb $SRCDIR" "\n" \
  66. "copy $(TargetDir)$(TargetName).pdb $OUTBINDIR\$(TargetName).pdb" "\n" \
  67. "copy $(TargetDir)$(TargetName).xdb $OUTBINDIR\$(TargetName).xdb" "\n" \
  68. "call $SRCDIR\vpc_scripts\valve_xbcp_wrapper.cmd $(TargetDir)$(TargetName)_converted.dll $(RemoteRoot)\$DEVKITBINDIR\$(TargetFileName)" "\n" \
  69. "call $SRCDIR\..\game\bin\CSSVersionNumber.exe $SRCDIR\..\game\platform\resource\css_code_version_local.txt quiet" "\n"
  70. $CommandLine "$BASE" \
  71. "echo LoadAddressName=$LOADADDRESSNAME > $(TargetDir)$(TargetName).vpcinfo" "\n" \
  72. "call $SRCDIR\vpc_scripts\valve_xbcp_wrapper.cmd $(TargetDir)$(TargetName).vpcinfo $(RemoteRoot)\$DEVKITBINDIR\$(TargetName).vpcinfo" "\n" [$VPCINFO]
  73. $Description "Publishing to $OUTBINDIR"
  74. $ExcludedFromBuild "No"
  75. }
  76. }
  77. // Skeleton Project
  78. $Project
  79. {
  80. $Folder "Source Files"
  81. {
  82. $File "$SRCDIR\public\tier0\memoverride.cpp"
  83. {
  84. $Configuration
  85. {
  86. $Compiler
  87. {
  88. $Create/UsePrecompiledHeader "Not Using Precompiled Headers"
  89. }
  90. }
  91. }
  92. }
  93. $Folder "Xbox"
  94. {
  95. $File "xbox\xbox.def"
  96. }
  97. $Folder "Link Libraries"
  98. {
  99. $ImpLib "$LIBPUBLIC\tier0"
  100. $Lib "$LIBPUBLIC\tier1"
  101. $Implib "$LIBPUBLIC\vstdlib"
  102. $Lib "$LIBPUBLIC\interfaces"
  103. }
  104. }