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.

179 lines
6.2 KiB

  1. //-----------------------------------------------------------------------------
  2. // LAUNCHER_MAIN.VPC
  3. //
  4. // Project Script
  5. //-----------------------------------------------------------------------------
  6. $Macro SRCDIR ".."
  7. $Macro OUTBINDIR "$SRCDIR\..\game"
  8. // Must be built explicitly as "default" in order to build a compliant submittable Disc.
  9. // Renames will not work.
  10. $Macro OUTBINNAME "default"
  11. $Macro OUTBINNAME "csgo" [$WIN32]
  12. $Macro OUTBINNAME "csgo_win64" [$WIN64]
  13. $Macro OUTBINNAME "csgo_osx" [$OSX32]
  14. $Macro OUTBINNAME "csgo_osx64" [$OSX64]
  15. $Macro OUTBINNAME "csgo_linux" [$LINUX32]
  16. $Macro OUTBINNAME "csgo_linux64" [$LINUX64]
  17. $Include "$SRCDIR\vpc_scripts\source_exe_base.vpc"
  18. $Macro DEMOSUFFIX "_demo\" [$DEMO]
  19. $MacroEmptyString DEMOSUFFIX "empty" [!$DEMO]
  20. $Macro "PS3MEMOVERRIDE" "--wrap=abort --wrap=malloc --wrap=calloc --wrap=memalign --wrap=realloc --wrap=reallocalign --wrap=malloc_usable_size --wrap=malloc_stats --wrap=free"
  21. $CustomBuildStep "fp"
  22. {
  23. $CommandLine "$(SCE_PS3_ROOT)\host-win32\Cg\bin\sce-cgc -quiet -profile sce_fp_rsx -o "$(InputName).fpo" "$(InputPath)"
$(SCE_PS3_ROOT)\host-win32\ppu\bin\ppu-lv2-objcopy -I binary -O elf64-powerpc-celloslv2 -B powerpc "$(InputName).fpo" "$(IntDir)\$(InputName).fp.ppu.o""
  24. $Description "Fragment Program $(InputFileName) produces $(InputName).fpo produces $(InputName).fp.ppu.o"
  25. $Outputs "$(InputName).fpo;$(IntDir)\$(InputName).fp.ppu.o"
  26. }
  27. $CustomBuildStep "vp"
  28. {
  29. $CommandLine "$(SCE_PS3_ROOT)\host-win32\Cg\bin\sce-cgc -quiet -profile sce_vp_rsx -o "$(InputName).vpo" "$(InputPath)"
$(SCE_PS3_ROOT)\host-win32\ppu\bin\ppu-lv2-objcopy -I binary -O elf64-powerpc-celloslv2 -B powerpc "$(InputName).vpo" "$(IntDir)\$(InputName).vp.ppu.o""
  30. $Description "Vertex Program $(InputFileName) produces $(InputName).vpo produces $(InputName).vp.ppu.o"
  31. $Outputs "$(InputName).vpo;$(IntDir)\$(InputName).vp.ppu.o"
  32. }
  33. $Configuration
  34. {
  35. $Compiler
  36. {
  37. $ForceIncludes " "
  38. $PreprocessorDefinitions "$BASE;RATINGSBUILD" [$RATINGSBUILD]
  39. }
  40. $Compiler [$PS3 && !$CERT]
  41. {
  42. $ForcedUsingFiles "?DbgSaveProj
?DbgElfArgs=-dev -game csgo
?FileServDir=$(SolutionDir)..
?HomeDir=$(SolutionDir).."
  43. $AdditionalIncludeDirectories "$BASE;"$(SN_PS3_PATH)/ppu/include""
  44. }
  45. $Linker [$WIN32]
  46. {
  47. $EnableLargeAddresses "Support Addresses Larger Than 2 Gigabytes (/LARGEADDRESSAWARE)"
  48. $FixedBaseAddress "Generate a relocation section (/FIXED:NO)"
  49. }
  50. $SNCLinker [$PS3]
  51. {
  52. // General
  53. $AdditionalDependencies "$BASE libsysutil_game_stub.a libsysutil_stub.a"
  54. // Command Line
  55. $AdditionalOptions "$BASE $PS3MEMOVERRIDE"
  56. }
  57. $Compiler [$PS3]
  58. {
  59. $PreprocessorDefinitions "$BASE;PS3MEMOVERRIDEWRAP;PS3MAINELF"
  60. $AdditionalIncludeDirectories "$BASE;$SRCDIR\common;$SRCDIR\public"
  61. }
  62. $Xbox360ImageConversion [$X360]
  63. {
  64. // General
  65. $AdditionalSections "5841125A=$SRCDIR\common\xlast_$VPCGAME\$VPCGAME.spa"
  66. $ProjectDefaults "$SRCDIR\common\xlast_$VPCGAME$DEMOSUFFIX\$VPCGAME.xml"
  67. }
  68. $ConsoleDeployment [$X360]
  69. {
  70. $DeploymentRoot "xe:\$VPCGAME$DEMOSUFFIX"
  71. }
  72. $PreBuildEvent [$WINDOWS]
  73. {
  74. $CommandLine "if EXIST $OUTBINDIR\$OUTBINNAME.exe for /f $QUOTEdelims=$QUOTE %%A in ('attrib $QUOTE$OUTBINDIR\$OUTBINNAME.exe$QUOTE') do set valveTmpIsReadOnly=$QUOTE%%A$QUOTE" "\n" \
  75. "set valveTmpIsReadOnlyLetter=%valveTmpIsReadOnly:~6,1%" "\n" \
  76. "if $QUOTE%valveTmpIsReadOnlyLetter%$QUOTE==$QUOTER$QUOTE del /q $QUOTE$(TargetDir)$QUOTE$(TargetFileName)" "\n"
  77. }
  78. $PreLinkEvent [$PS3]
  79. {
  80. $CommandLine "call .\$(IntDir)\errorshader.vp.bat" "\n" \
  81. "call .\$(IntDir)\errorshader.fp.bat" "\n"
  82. }
  83. $PostBuildEvent [$X360]
  84. {
  85. // inherit and add
  86. $CommandLine "$BASE" \
  87. "call $SRCDIR\vpc_scripts\valve_xbcp_wrapper.cmd $(TargetDir)$(TargetName).xex xE:\$VPCGAME$DEMOSUFFIX\default.xex" "\n"
  88. }
  89. $PostBuildEvent [$WINDOWS]
  90. {
  91. // override with specific behavior
  92. $CommandLine "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\$OUTBINNAME.exe $SRCDIR" "\n" \
  93. "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\$OUTBINNAME.pdb $SRCDIR" "\n" \
  94. "copy $(TargetPath) $OUTBINDIR\$OUTBINNAME.exe" "\n" \
  95. "if ERRORLEVEL 1 goto BuildEventFailed" "\n" \
  96. "if exist $(TargetDir)$(TargetName).map copy $(TargetDir)$(TargetName).map $OUTBINDIR\$OUTBINNAME.map" "\n" \
  97. "if exist $(TargetDir)$(TargetName).pdb copy $(TargetDir)$(TargetName).pdb $OUTBINDIR\$OUTBINNAME.pdb" "\n" \
  98. "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\$OUTBINNAME.dat $SRCDIR" "\n" \
  99. "$OUTBINDIR\bin\newdat $OUTBINDIR\$OUTBINNAME.exe" "\n" \
  100. "goto BuildEventOK" "\n" \
  101. ":BuildEventFailed" "\n" \
  102. "echo *** ERROR! PostBuildStep FAILED for $(ProjectName)! EXE or DLL is probably running. ***" "\n" \
  103. "del /q $(TargetPath)" "\n" \
  104. "exit 1" "\n" \
  105. ":BuildEventOK" "\n"
  106. $Description "Publishing to $OUTBINDIR"
  107. $ExcludedFromBuild "No"
  108. }
  109. $Linker [$PS3]
  110. {
  111. $AdditionalDependencies "$BASE "$(SN_PS3_PATH)/ppu/lib/sn/libsn.a" "$(SN_PS3_PATH)/ppu/lib/sn/libsntuner.a""
  112. }
  113. }
  114. $Project
  115. {
  116. $Folder "Source Files"
  117. {
  118. -$File "$SRCDIR\public\tier0\memoverride.cpp" [!$PS3]
  119. }
  120. $Folder "Link Libraries"
  121. {
  122. -$File "$LIBPUBLIC\tier0.lib" [$WINDOWS||$LINUX]
  123. -$File "$LIBPUBLIC\tier1.lib" [$WINDOWS||$LINUX]
  124. -$File "$LIBPUBLIC\vstdlib.lib" [$WINDOWS||$LINUX]
  125. -$File "$LIBPUBLIC\$_IMPLIB_PREFIXtier0$_IMPLIB_EXT" [$POSIX]
  126. -$File "$LIBPUBLIC\$_IMPLIB_PREFIXvstdlib$_IMPLIB_EXT" [$POSIX]
  127. -$File "$LIBPUBLIC\tier1$_IMPLIB_EXT" [$POSIX]
  128. -$File "$LIBPUBLIC\tier0_360.lib" [$X360]
  129. -$File "$LIBPUBLIC\tier1_360.lib" [$X360]
  130. -$File "$LIBPUBLIC\vstdlib_360.lib" [$X360]
  131. }
  132. }
  133. $Project "launcher_main"
  134. {
  135. $Folder "Source Files"
  136. {
  137. $File "$SRCDIR\public\ps3_pathinfo.h"
  138. $File "main.cpp"
  139. $File "errorrenderloop.cpp" [$PS3]
  140. $File "errorrenderloop.h" [$PS3]
  141. $File "errorshader.vp" [$PS3]
  142. $File "errorshader.fp" [$PS3]
  143. $File "ps3_pathinfo.cpp" [$PS3]
  144. }
  145. $Folder "Resources" [$WINDOWS]
  146. {
  147. $File "launcher_main.rc"
  148. $File "$SRCDIR\launcher\res\launcher.ico"
  149. }
  150. }