From 77b376f8a0d8d172c51729762f80bb394534aa41 Mon Sep 17 00:00:00 2001 From: Joe Ludwig Date: Thu, 4 Jul 2013 11:20:31 -0700 Subject: * Switched the SDK from checked-in projects to VPC, the Valve Project Creator. See the Getting Started document on the wiki for details. * Pulled in bug fixes from HL2 and HL2MP. --- mp/src/vpc_scripts/default.vgc | 21 + mp/src/vpc_scripts/definitions/win32_2010.def | 1850 ++++++++++++++++++++ mp/src/vpc_scripts/dllbase.txt | 37 + mp/src/vpc_scripts/groups.vgc | 57 + mp/src/vpc_scripts/loadaddress.vpc | 108 ++ mp/src/vpc_scripts/projects.vgc | 116 ++ mp/src/vpc_scripts/protobuf_builder.vpc | 26 + mp/src/vpc_scripts/source_base.vpc | 17 + mp/src/vpc_scripts/source_dll_base.vpc | 20 + mp/src/vpc_scripts/source_dll_linux_base.vpc | 24 + mp/src/vpc_scripts/source_dll_posix_base.vpc | 46 + mp/src/vpc_scripts/source_dll_win32_base.vpc | 163 ++ mp/src/vpc_scripts/source_dll_win32_debug.vpc | 328 ++++ mp/src/vpc_scripts/source_dll_win32_release.vpc | 323 ++++ mp/src/vpc_scripts/source_exe_base.vpc | 13 + mp/src/vpc_scripts/source_exe_con_win32_base.vpc | 24 + mp/src/vpc_scripts/source_exe_linux_base.vpc | 57 + mp/src/vpc_scripts/source_exe_posix_base.vpc | 64 + mp/src/vpc_scripts/source_exe_win_win32_base.vpc | 138 ++ mp/src/vpc_scripts/source_exe_win_win32_debug.vpc | 327 ++++ .../vpc_scripts/source_exe_win_win32_release.vpc | 325 ++++ mp/src/vpc_scripts/source_lib_base.vpc | 20 + mp/src/vpc_scripts/source_lib_linux_base.vpc | 31 + mp/src/vpc_scripts/source_lib_posix_base.vpc | 18 + mp/src/vpc_scripts/source_lib_win32_base.vpc | 93 + mp/src/vpc_scripts/source_lib_win32_debug.vpc | 202 +++ mp/src/vpc_scripts/source_lib_win32_release.vpc | 202 +++ mp/src/vpc_scripts/source_linux_base_project.vpc | 64 + mp/src/vpc_scripts/source_posix_base.vpc | 72 + mp/src/vpc_scripts/source_video_base.vpc | 61 + mp/src/vpc_scripts/source_win32_base.vpc | 71 + mp/src/vpc_scripts/version.vpc | 12 + 32 files changed, 4930 insertions(+) create mode 100644 mp/src/vpc_scripts/default.vgc create mode 100644 mp/src/vpc_scripts/definitions/win32_2010.def create mode 100644 mp/src/vpc_scripts/dllbase.txt create mode 100644 mp/src/vpc_scripts/groups.vgc create mode 100644 mp/src/vpc_scripts/loadaddress.vpc create mode 100644 mp/src/vpc_scripts/projects.vgc create mode 100644 mp/src/vpc_scripts/protobuf_builder.vpc create mode 100644 mp/src/vpc_scripts/source_base.vpc create mode 100644 mp/src/vpc_scripts/source_dll_base.vpc create mode 100644 mp/src/vpc_scripts/source_dll_linux_base.vpc create mode 100644 mp/src/vpc_scripts/source_dll_posix_base.vpc create mode 100644 mp/src/vpc_scripts/source_dll_win32_base.vpc create mode 100644 mp/src/vpc_scripts/source_dll_win32_debug.vpc create mode 100644 mp/src/vpc_scripts/source_dll_win32_release.vpc create mode 100644 mp/src/vpc_scripts/source_exe_base.vpc create mode 100644 mp/src/vpc_scripts/source_exe_con_win32_base.vpc create mode 100644 mp/src/vpc_scripts/source_exe_linux_base.vpc create mode 100644 mp/src/vpc_scripts/source_exe_posix_base.vpc create mode 100644 mp/src/vpc_scripts/source_exe_win_win32_base.vpc create mode 100644 mp/src/vpc_scripts/source_exe_win_win32_debug.vpc create mode 100644 mp/src/vpc_scripts/source_exe_win_win32_release.vpc create mode 100644 mp/src/vpc_scripts/source_lib_base.vpc create mode 100644 mp/src/vpc_scripts/source_lib_linux_base.vpc create mode 100644 mp/src/vpc_scripts/source_lib_posix_base.vpc create mode 100644 mp/src/vpc_scripts/source_lib_win32_base.vpc create mode 100644 mp/src/vpc_scripts/source_lib_win32_debug.vpc create mode 100644 mp/src/vpc_scripts/source_lib_win32_release.vpc create mode 100644 mp/src/vpc_scripts/source_linux_base_project.vpc create mode 100644 mp/src/vpc_scripts/source_posix_base.vpc create mode 100644 mp/src/vpc_scripts/source_video_base.vpc create mode 100644 mp/src/vpc_scripts/source_win32_base.vpc create mode 100644 mp/src/vpc_scripts/version.vpc (limited to 'mp/src/vpc_scripts') diff --git a/mp/src/vpc_scripts/default.vgc b/mp/src/vpc_scripts/default.vgc new file mode 100644 index 00000000..c4c99694 --- /dev/null +++ b/mp/src/vpc_scripts/default.vgc @@ -0,0 +1,21 @@ +//----------------------------------------------------------------------------- +// DEFAULT.VGC +// +// Configurations for all Source(TM) Projects +//----------------------------------------------------------------------------- + +//////////////// +// Game Names // +//////////////// + +$Games +{ + "HL2MP" +} + +// Makes the VPC scripts work in the SDK's context +$Conditional "SOURCESDK" "1" + +$Include "vpc_scripts\projects.vgc" +$Include "vpc_scripts\groups.vgc" + diff --git a/mp/src/vpc_scripts/definitions/win32_2010.def b/mp/src/vpc_scripts/definitions/win32_2010.def new file mode 100644 index 00000000..6d28d562 --- /dev/null +++ b/mp/src/vpc_scripts/definitions/win32_2010.def @@ -0,0 +1,1850 @@ +// +// Win32 2010 Project Generator Definition +// + +"Win32_2010" +{ + "Version" "2010" + + // + // Configuration + // + + "$General" + { + "$AdditionalProjectDependencies" + { + "type" "ignore" + } + + "$AdditionalOutputFiles" + { + "type" "ignore" + } + + "$GameOutputFile" + { + "type" "ignore" + } + + "$InheritedProjectPropertySheets" + { + "type" "ignore" + } + + "$MinimizeCRTUseInATL" + { + "type" "ignore" + } + + "$ExcludedFromBuild" + { + "type" "bool" + } + + "$OutputDirectory" + { + "type" "string" + "output" "OutDir" + "globalproperty" "1" + "AppendSlash" "1" + } + + "$IntermediateDirectory" + { + "type" "string" + "output" "IntDir" + "globalproperty" "1" + "AppendSlash" "1" + } + + "$TargetName" + { + "type" "string" + } + + "$TargetExtension" + { + "type" "string" + "output" "TargetExt" + "globalproperty" "1" + } + + "$ExtensionsToDeleteOnClean" + { + "type" "string" + } + + "$BuildLogFile" + { + "type" "string" + } + + "$PlatformToolset" + { + "type" "string" + } + + "$ExecutableDirectories" + { + "type" "string" + "output" "ExecutablePath" + "globalproperty" "1" + } + + "$ConfigurationType" + { + "ordinals" + { + "Utility" "Utility" + "Application (.exe)" "Application" + "Title (.xex)" "Title" + "Dynamic Library (.dll)" "DynamicLibrary" + "Dynamic Library (.xex)" "DynamicLibrary" + "Static Library (.lib)" "StaticLibrary" + } + } + + "$UseOfMFC" + { + "ordinals" + { + "Use Standard Windows Libraries" "false" + "Use MFC in a Static Library" "Static" + "Use MFC in a Shared DLL" "Dynamic" + } + } + + "$UseOfATL" + { + "ordinals" + { + "Not Using ATL" "false" + "Static Link to ATL" "Static" + "Dynamic Link to ATL" "Dynamic" + } + } + + "$CharacterSet" + { + "ordinals" + { + "Not Set" "NotSet" + "Use Unicode Character Set" "Unicode" + "Use Multi-Byte Character Set" "MultiByte" + } + } + + "$CommonLanguageRuntimeSupport" + { + "type" "ignore" + } + + "$WholeProgramOptimization" + { + "ordinals" + { + "No Whole Program Optimization" "false" + "Use Link Time Code Generation" "true" + "Profile Guided Optimization - Instrument" "PGInstrument" + "Profile Guided Optimization - Optimize" "PGOptimize" + "Profile Guided Optimization - Update" "PGUpdate" + } + } + } + + "$Debugging" + { + "$Command" + { + "type" "string" + } + + "$CommandArguments" + { + "type" "string" + } + + "$WorkingDirectory" + { + "type" "string" + } + + "$Attach" + { + "type" "bool" + } + + "$DebuggerType" + { + "type" "ignore" + } + + "$Environment" + { + "type" "string" + } + + "$MergeEnvironment" + { + "type" "bool" + } + + "$SQLDebugging" + { + "type" "bool" + } + + "$MapDVDDrive" + { + "type" "ignore" + } + } + + "$Compiler" + { + "$SymbolVisibility" + { + "type" "ignore" + } + + "$GCC_ExtraCompilerFlags" + { + "type" "ignore" + } + + "$Detect64bitPortabilityIssues" + { + "type" "ignore" + } + + "$UseUNICODEResponseFiles" + { + "type" "ignore" + } + + "$IgnoreStandardIncludePath" + { + "type" "ignore" + } + + "$GeneratePreprocessedFile" + { + "type" "ignore" + } + + // General + "$AdditionalIncludeDirectories" + { + "type" "string" + "PreferSemicolonNoComma" "1" + } + + "$Resolve#UsingReferences" + { + "type" "string" + "alias" "ResolveUsingReferences" + } + + "$DebugInformationFormat" + { + "ordinals" + { + "C7 Compatible (/Z7)" "OldStyle" + "Program Database (/Zi)" "ProgramDatabase" + "Program Database for Edit & Continue (/ZI)" "EditAndContinue" + } + } + + "$CommonLanguageRunTimeSupport" + { + "output" "CompileAsManaged" + "ordinals" + { + "No Common Language RunTime Support" "false" + "Common Language RunTime Support (/clr)" "true" + "Pure MSIL Common Language RunTime Support (/clr:pure)" "Pure" + "Safe MSIL Common Language RunTime Support (/clr:safe)" "Safe" + "Common Language RunTime Support, Old Syntax (/clr:oldSyntax)" "OldSyntax" + } + } + + "$SuppressStartupBanner" + { + "type" "bool" + } + + "$WarningLevel" + { + "ordinals" + { + "Off: Turn Off All Warnings (/W0)" "TurnOffAllWarnings" + "Level 1 (/W1)" "Level1" + "Level 2 (/W2)" "Level2" + "Level 3 (/W3)" "Level3" + "Level 4 (/W4)" "Level4" + "EnableAllWarnings (/Wall)" "EnableAllWarnings" + } + } + + "$TreatWarningsAsErrors" + { + "type" "bool" + "output" "TreatWarningAsError" + } + + "$MultiProcessorCompilation" + { + "type" "bool" + } + + "$UseUnicodeForAssemblerListing" + { + "type" "bool" + } + + // Optimization + "$Optimization" + { + "ordinals" + { + "Disabled (/Od)" "Disabled" + "Minimize Size (/O1)" "MinSpace" + "Maximize Speed (/O2)" "MaxSpeed" + "Full Optimization (/Ox)" "Full" + } + } + + "$InlineFunctionExpansion" + { + "ordinals" + { + "Default" "Default" + "Disabled (/Ob0)" "Disabled" + "Only __inline (/Ob1)" "OnlyExplicitInline" + "Any Suitable (/Ob2)" "AnySuitable" + } + } + + "$EnableIntrinsicFunctions" + { + "type" "bool" + "output" "IntrinsicFunctions" + } + + "$FavorSizeOrSpeed" + { + "ordinals" + { + "Neither" "Neither" + "Favor Fast Code (/Ot)" "Speed" + "Favor Small Code (/Os)" "Size" + } + } + + "$OmitFramePointers" + { + "type" "bool" + } + + "$EnableFiberSafeOptimizations" + { + "type" "bool" + } + + "$WholeProgramOptimization" + { + "type" "bool" + } + + // Preprocessor + "$PreprocessorDefinitions" + { + "type" "string" + } + + "$UndefinePreprocessorDefinitions" + { + "type" "string" + } + + "$UndefineAllPreprocessorDefinitions" + { + "type" "bool" + } + + "$IgnoreStandardIncludePaths" + { + "type" "bool" + } + + "$PreprocessToAFile" + { + "type" "bool" + } + + "$PreprocessSuppressLineNumbers" + { + "type" "bool" + } + + "$KeepComments" + { + "type" "bool" + } + + // Code Generation + "$EnableStringPooling" + { + "type" "bool" + "output" "StringPooling" + } + + "$EnableMinimalRebuild" + { + "type" "bool" + "output" "MinimalRebuild" + } + + "$EnableC++Exceptions" + { + "alias" "EnableCPPExceptions" + "output" "ExceptionHandling" + "ordinals" + { + "Yes With SEH Exceptions (/EHa)" "Async" + "Yes (/EHsc)" "Sync" + "Yes with Extern C functions (/EHs)" "SyncCThrow" + "No" "false" + } + } + + "$SmallerTypeCheck" + { + "type" "bool" + } + + "$BasicRuntimeChecks" + { + "ordinals" + { + "Stack Frames (/RTCs)" "StackFrameRuntimeCheck" + "Uninitialized Variables (/RTCu)" "UninitializedLocalUsageCheck" + "Both (/RTC1, equiv. to /RTCsu)" "EnableFastChecks" + "Both (/RTC1, equiv. to /RTCsu) (/RTC1)" "EnableFastChecks" + "Default" "Default" + } + } + + "$RuntimeLibrary" + { + "ordinals" + { + "Multi-threaded (/MT)" "MultiThreaded" + "Multi-threaded Debug (/MTd)" "MultiThreadedDebug" + "Multi-threaded DLL (/MD)" "MultiThreadedDLL" + "Multi-threaded Debug DLL (/MDd)" "MultiThreadedDebugDLL" + } + } + + "$StructMemberAlignment" + { + "ordinals" + { + "1 Byte (/Zp1)" "1Byte" + "2 Bytes (/Zp2)" "2Bytes" + "4 Bytes (/Zp4)" "4Bytes" + "8 Bytes (/Zp8)" "8Bytes" + "16 Bytes (/Zp16)" "16Bytes" + "Default" "Default" + } + } + + "$BufferSecurityCheck" + { + "type" "bool" + } + + "$EnableFunctionLevelLinking" + { + "type" "bool" + "output" "FunctionLevelLinking" + } + + "$EnableEnhancedInstructionSet" + { + "ordinals" + { + "Streaming SIMD Extensions (/arch:SSE)" "StreamingSIMDExtensions" + "Streaming SIMD Extensions (/arch:SSE) (/arch:SSE)" "StreamingSIMDExtensions" + "Streaming SIMD Extensions 2 (/arch:SSE2)" "StreamingSIMDExtensions2" + "Streaming SIMD Extensions 2 (/arch:SSE2) (/arch:SSE2)" "StreamingSIMDExtensions2" + "Not Set" "NotSet" + } + } + + "$FloatingPointModel" + { + "ordinals" + { + "Precise (/fp:precise)" "Precise" + "Strict (/fp:strict)" "Strict" + "Fast (/fp:fast)" "Fast" + } + } + + "$EnableFloatingPointExceptions" + { + "type" "bool" + "output" "FloatingPointExceptions" + } + + "$CreateHotpatchableImage" + { + "type" "bool" + } + + // Language + "$DisableLanguageExtensions" + { + "type" "bool" + } + + "$DefaultCharUnsigned" + { + "type" "ignore" + } + + "$TreatWChar_tAsBuiltInType" + { + "type" "bool" + } + + "$ForceConformanceInForLoopScope" + { + "type" "bool" + } + + "$EnableRunTimeTypeInfo" + { + "type" "bool" + "output" "RuntimeTypeInfo" + } + + "$OpenMPSupport" + { + "type" "bool" + } + + // Precompiled Headers + "$Create/UsePrecompiledHeader" + { + "alias" "PrecompiledHeader" + "output" "PrecompiledHeader" + "ordinals" + { + "Not Using Precompiled Headers" "NotUsing" + "Create Precompiled Header (/Yc)" "Create" + "Create (/Yc)" "Create" + "Use Precompiled Header (/Yu)" "Use" + "Use (/Yu)" "Use" + } + } + + "$Create/UsePCHThroughFile" + { + "alias" "PrecompiledHeaderFile" + "output" "PrecompiledHeaderFile" + "type" "string" + "fixslashes" "1" + } + + "$PrecompiledHeaderOutputFile" + { + "type" "string" + "legacy" "$PrecompiledHeaderFile" + } + + // Output Files + "$ExpandAttributedSource" + { + "type" "bool" + } + + "$AssemblerOutput" + { + "ordinals" + { + "No Listing" "NoListing" + "Assembly-Only Listing (/FA)" "AssemblyCode" + "Assembly With Machine Code (/FAc)" "AssemblyAndMachineCode" + "Assembly With Source Code (/FAs)" "AssemblyAndSourceCode" + "Assembly, Machine Code and Source (/FAcs)" "All" + } + } + + "$ASMListLocation" + { + "type" "string" + "output" "AssemblerListingLocation" + } + + "$ObjectFileName" + { + "type" "string" + } + + "$ProgramDatabaseFileName" + { + "type" "string" + "output" "ProgramDataBaseFileName" + } + + "$GenerateXMLDocumentationFiles" + { + "type" "bool" + } + + "$XMLDocumentationFileName" + { + "type" "string" + } + + // Browse Information + "$EnableBrowseInformation" + { + "output" "BrowseInformation" + "type" "bool" + } + + "$BrowseInformationFile" + { + "legacy" "$BrowseFile" + "type" "string" + } + + // Advanced + "$CallingConvention" + { + "ordinals" + { + "__cdecl (/Gd)" "Cdecl" + "__fastcall (/Gr)" "FastCall" + "__stdcall (/Gz)" "StdCall" + } + } + + "$CompileAs" + { + "ordinals" + { + "Default" "Default" + "Compile as C Code (/TC)" "CompileAsC" + "Compile as C++ Code (/TP)" "CompileAsCpp" + } + } + + "$DisableSpecificWarnings" + { + "type" "string" + } + + "$ForcedIncludeFile" + { + "type" "string" + "legacy" "$ForceIncludes" + "output" "ForcedIncludeFiles" + } + + "$Forced#UsingFile" + { + "type" "string" + "legacy" "$Force#Using" + "alias" "ForcedUsingFile" + } + + "$ShowIncludes" + { + "type" "bool" + } + + "$UseFullPaths" + { + "type" "bool" + } + + "$OmitDefaultLibraryName" + { + "type" "bool" + "legacy" "$OmitDefaultLibraryNames" + } + + "$InternalCompilerErrorReporting" + { + "legacy" "$ErrorReporting" + "output" "ErrorReporting" + "ordinals" + { + "Do Not Send Report (/errorReport:none)" "None" + "Prompt Immediately (/errorReport:prompt)" "Prompt" + "Queue For Next Login (/errorReport:queue)" "Queue" + "Send Automatically (/errorReport:send)" "Send" + } + } + + "$TreatSpecificWarningsAsErrors" + { + "type" "string" + } + + // Command Line + "$AdditionalOptions" + { + "type" "string" + } + } + + "$Librarian" + { + "$OutputFile" + { + "type" "string" + } + + "$AdditionalDependencies" + { + "type" "string" + "PreferSemicolonNoComma" "1" + "PreferSemicolonNoSpace" "1" + } + + "$AdditionalLibraryDirectories" + { + "type" "string" + } + + "$TargetMachine" + { + "ordinals" + { + "Not Set" "NotSet" + "MachineARM (/MACHINE:ARM)" "MachineARM" + "MachineEBC (/MACHINE:EBC)" "MachineEBC" + "MachineIA64 (/MACHINE:IA64)" "MachineIA64" + "MachineMIPS (/MACHINE:MIPS)" "MachineIA64" + "MachineMIPS16 (/MACHINE:MIPS16)" "MachineMIPS16" + "MachineMIPSFPU (/MACHINE:MIPSFPU)" "MachineMIPSFPU" + "MachineMIPSFPU16 (/MACHINE:MIPSFPU16)" "MachineMIPSFPU16" + "MachineSH4 (/MACHINE:SH4)" "MachineSH4" + "MachineTHUMB (/MACHINE:THUMB)" "MachineTHUMB" + "MachineX64 (/MACHINE:X64)" "MachineX64" + "MachineX86 (/MACHINE:X86)" "MachineX86" + } + } + + "$SuppressStartupBanner" + { + "type" "bool" + } + + "$ModuleDefinitionFileName" + { + "type" "string" + } + + "$IgnoreAllDefaultLibraries" + { + "type" "bool" + } + + "$IgnoreSpecificLibrary" + { + "type" "string" + "output" "IgnoreDefaultLibraryNames" + "PreferSemicolonNoComma" "1" + "PreferSemicolonNoSpace" "1" + } + + "$ExportNamedFunctions" + { + "type" "string" + } + + "$ForceSymbolReferences" + { + "type" "string" + } + + "$UseUnicodeResponseFiles" + { + "type" "bool" + } + + "$LinkLibraryDependencies" + { + "type" "bool" + } + + "$AdditionalOptions" + { + "type" "string" + } + } + + "$Linker" + { + "$SystemLibraries" + { + "type" "ignore" + } + + "$SystemFrameworks" + { + "type" "ignore" + } + + "$LocalFrameworks" + { + "type" "ignore" + } + + "$GCC_ExtraLinkerFlags" + { + "type" "ignore" + } + + "$UseUNICODEResponseFiles" + { + "type" "ignore" + } + + "$OptimizeForWindows98" + { + "type" "ignore" + } + + // General + "$OutputFile" + { + "type" "string" + "fixslashes" "1" + } + + "$ShowProgress" + { + "ordinals" + { + "Not Set" "NotSet" + "Display All Progress Messages (/VERBOSE)" "LinkVerbose" + "For Libraries Searched (/VERBOSE:Lib)" "LinkVerboseLib" + "About COMDAT folding during optimized linking (/VERBOSE:ICF)" "LinkVerboseICF" + "About data removed during optimized linking (/VERBOSE:REF)" "LinkVerboseREF" + "About Modules incompatible with SEH (/VERBOSE:SAFESEH)" "LinkVerboseSAFESEH" + "About linker activity related to managed code (/VERBOSE:CLR)" "LinkVerboseCLR" + } + } + + "$Version" + { + "type" "string" + } + + "$EnableIncrementalLinking" + { + "output" "LinkIncremental" + "type" "bool" + "globalproperty" "1" + } + + "$SuppressStartupBanner" + { + "type" "bool" + } + + "$IgnoreImportLibrary" + { + "type" "bool" + "globalproperty" "1" + } + + "$RegisterOutput" + { + "type" "bool" + } + + "$PerUserRedirection" + { + "type" "bool" + } + + "$AdditionalLibraryDirectories" + { + "type" "string" + } + + "$LinkLibraryDependencies" + { + "type" "bool" + } + + "$UseLibraryDependencyInputs" + { + "type" "bool" + } + + "$LinkStatus" + { + "type" "bool" + } + + "$PreventDllBinding" + { + "type" "bool" + } + + "$TreatLinkerWarningsAsErrors" + { + "type" "bool" + } + + "$ForceFileOutput" + { + "ordinals" + { + "Enabled (/FORCE)" "Enabled" + "Multiply Defined Symbol Only (/FORCE:MULTIPLE)" "MultiplyDefinedSymbolOnly" + "Undefined Symbol Only (/FORCE:UNRESOLVED)" "UndefinedSymbolOnly" + } + } + + "$CreateHotPatchableImage" + { + "ordinals" + { + "Enabled (/FUNCTIONPADMIN)" "Enabled" + "X86 Image Only (/FUNCTIONPADMIN:5)" "X86Image" + "X64 Image Only (/FUNCTIONPADMIN:6)" "X64Image" + "Itanium Image Only (/FUNCTIONPADMIN:16)" "ItaniumImage" + } + } + + "$SpecifySectionAttributes" + { + "type" "string" + } + + "$AdditionalDependencies" + { + "type" "string" + "PreferSemicolonNoComma" "1" + "PreferSemicolonNoSpace" "1" + } + + "$IgnoreAllDefaultLibraries" + { + "type" "bool" + } + + "$IgnoreSpecificDefaultLibraries" + { + "type" "string" + "legacy" "$IgnoreSpecificLibrary" + "PreferSemicolonNoComma" "1" + "PreferSemicolonNoSpace" "1" + } + + "$ModuleDefinitionFile" + { + "type" "string" + } + + "$AddModuleToAssembly" + { + "type" "string" + } + + "$EmbedManagedResourceFile" + { + "type" "string" + } + + "$ForceSymbolReferences" + { + "type" "string" + } + + "$DelayLoadedDlls" + { + "type" "string" + "legacy" "$DelayLoadedDLL" + "output" "DelayLoadDLLs" + } + + "$AssemblyLinkResource" + { + "type" "string" + } + + "$GenerateManifest" + { + "type" "bool" + "globalproperty" "1" + } + + "$ManifestFile" + { + "type" "string" + } + + "$AdditionalManifestDependencies" + { + "type" "string" + } + + "$AllowIsolation" + { + "type" "bool" + } + + "$EnableUserAccountControl(UAC)" + { + "type" "bool" + "alias" "EnableUserAccountControl" + } + + "$UACExecutionLevel" + { + "ordinals" + { + "asInvoker (/level='asInvoker')" "AsInvoker" + "highestAvailable (/level='highestAvailable')" "HighestAvailable" + "requireAdministrator (/level='requireAdministrator')" "RequireAdministrator" + } + } + + "$UACBypassUIProtection" + { + "type" "bool" + } + + // Debugging + "$GenerateDebugInfo" + { + "type" "bool" + "output" "GenerateDebugInformation" + } + + "$GenerateProgramDatabaseFile" + { + "type" "string" + "output" "ProgramDatabaseFile" + } + + "$StripPrivateSymbols" + { + "type" "string" + } + + "$GenerateMapFile" + { + "type" "bool" + } + + "$MapFileName" + { + "type" "string" + } + + "$MapExports" + { + "type" "bool" + } + + "$DebuggableAssembly" + { + "output" "AssemblyDebug" + "ordinals" + { + "No runtime tracking and enable optimizations (/ASSEMBLYDEBUG:DISABLE)" "false" + "No (/ASSEMBLYDEBUG:DISABLE)" "false" + "Runtime tracking and disable optimizations (/ASSEMBLYDEBUG)" "true" + "Yes (/ASSEMBLYDEBUG)" "true" + } + } + + "$SubSystem" + { + "ordinals" + { + "Not Set" "NotSet" + "Console (/SUBSYSTEM:CONSOLE)" "Console" + "Windows (/SUBSYSTEM:WINDOWS)" "Windows" + "Native (/SUBSYSTEM:NATIVE)" "Native" + "EFI Application (/SUBSYSTEM:EFI_APPLICATION)" "EFI Application" + "EFI Boot Service Driver (/SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER)" "EFI Boot Service Driver" + "EFI ROM (/SUBSYSTEM:EFI_ROM)" "EFI ROM" + "EFI Runtime (/SUBSYSTEM:EFI_RUNTIME_DRIVER)" "EFI Runtime" + "WindowsCE (/SUBSYSTEM:WINDOWSCE)" "WindowsCE" + "POSIX (/SUBSYSTEM:POSIX)" "POSIX" + } + } + + "$MinimumRequiredVersion" + { + "type" "string" + } + + "$HeapReserveSize" + { + "type" "integer" + } + + "$HeapCommitSize" + { + "type" "integer" + } + + // System + "$StackReserveSize" + { + "type" "integer" + } + + "$StackCommitSize" + { + "type" "integer" + } + + "$EnableLargeAddresses" + { + "output" "LargeAddressAware" + "ordinals" + { + "Do Not Support Addresses Larger Than 2 Gigabytes (/LARGEADDRESSAWARE:NO)" "false" + "No (/LARGEADDRESSAWARE:NO)" "false" + "Support Addresses Larger Than 2 Gigabytes (/LARGEADDRESSAWARE)" "true" + "Yes (/LARGEADDRESSAWARE)" "true" + } + } + + "$TerminalServer" + { + "type" "bool" + } + + "$SwapRunFromCD" + { + "type" "bool" + } + + "$SwapRunFromNetwork" + { + "type" "bool" + } + + "$Driver" + { + "ordinals" + { + "Not Set" "NotSet" + "Driver (/DRIVER)" "Driver" + "Up Only (/DRIVER:UPONLY)" "UpOnly" + "WDM (/DRIVER:WDM)" "WDM" + } + } + + // Optimization + "$References" + { + "output" "OptimizeReferences" + "ordinals" + { + "No (/OPT:NOREF)" "false" + "Keep Unreferenced Data (/OPT:NOREF)" "false" + "Yes (/OPT:REF)" "true" + "Eliminate Unreferenced Data (/OPT:REF)" "true" + } + } + + "$EnableCOMDATFolding" + { + "ordinals" + { + "Do Not Remove Redundant COMDATs (/OPT:NOICF)" "false" + "No (/OPT:NOICF)" "false" + "Remove Redundant COMDATs (/OPT:ICF)" "true" + "Yes (/OPT:ICF)" "true" + } + } + + "$FunctionOrder" + { + "type" "string" + } + + "$ProfileGuidedDatabase" + { + "type" "string" + } + + "$LinkTimeCodeGeneration" + { + "ordinals" + { + "Default" "Default" + "Use Link Time Code Generation (/ltcg)" "UseLinkTimeCodeGeneration" + "Profile Guided Optimization - Instrument (/ltcg:pginstrument)" "PGInstrument" + "Profile Guided Optimization - Optimize (/ltcg:pgoptimize)" "PGOptimization" + "Profile Guided Optimization - Update (/ltcg:pgupdate)" "PGUpdate" + } + } + + "$MIDLCommands" + { + "type" "string" + } + + "$IgnoreEmbeddedIDL" + { + "type" "bool" + } + + "$MergeIDLBaseFileName" + { + "type" "string" + } + + "$TypeLibrary" + { + "type" "string" + } + + "$TypeLibResourceID" + { + "type" "integer" + } + + // Advanced + "$EntryPoint" + { + "type" "string" + "output" "EntryPointSymbol" + } + + "$NoEntryPoint" + { + "type" "bool" + "output" "ResourceOnlyDLL" + } + + "$SetChecksum" + { + "type" "bool" + } + + "$BaseAddress" + { + "type" "string" + } + + "$RandomizedBaseAddress" + { + "type" "bool" + } + + "$FixedBaseAddress" + { + "ordinals" + { + "Generate a relocation section (/FIXED:NO)" "false" + "No (/FIXED:NO)" "false" + "Image must be loaded at a fixed address (/FIXED)" "true" + "Yes (/FIXED)" "true" + } + } + + "$DataExecutionPrevention(DEP)" + { + "type" "bool" + "alias" "DataExecutionPrevention" + } + + "$TurnOffAssemblyGeneration" + { + "type" "bool" + } + + "$UnloaddelayloadedDLL" + { + "type" "bool" + } + + "$NobinddelayloadedDLL" + { + "type" "bool" + } + + "$ImportLibrary" + { + "type" "string" + } + + "$MergeSections" + { + "type" "string" + } + + "$TargetMachine" + { + "ordinals" + { + "Not Set" "NotSet" + "MachineARM (/MACHINE:ARM)" "MachineARM" + "MachineEBC (/MACHINE:EBC)" "MachineEBC" + "MachineIA64 (/MACHINE:IA64)" "MachineIA64" + "MachineMIPS (/MACHINE:MIPS)" "MachineIA64" + "MachineMIPS16 (/MACHINE:MIPS16)" "MachineMIPS16" + "MachineMIPSFPU (/MACHINE:MIPSFPU)" "MachineMIPSFPU" + "MachineMIPSFPU16 (/MACHINE:MIPSFPU16)" "MachineMIPSFPU16" + "MachineSH4 (/MACHINE:SH4)" "MachineSH4" + "MachineTHUMB (/MACHINE:THUMB)" "MachineTHUMB" + "MachineX64 (/MACHINE:X64)" "MachineX64" + "MachineX86 (/MACHINE:X86)" "MachineX86" + } + } + + "$Profile" + { + "type" "bool" + } + + "$CLRThreadAttribute" + { + "ordinals" + { + "Default threading attribute (/CLRTHREADATTRIBUTE:NONE)" "DefaultThreadingAttribute" + "MTA threading attribute (/CLRTHREADATTRIBUTE:MTA)" "MTAThreadingAttribute" + "STA threading attribute (/CLRTHREADATTRIBUTE:STA)" "STAThreadingAttribute" + } + } + + "$CLRImageType" + { + "ordinals" + { + "Default image type" "Default" + "Force IJW image (/CLRIMAGETYPE:IJW)" "ForceIJWImage" + "Force pure IL image (/CLRIMAGETYPE:PURE)" "ForcePureILImage" + "Force safe IL image (/CLRIMAGETYPE:SAFE)" "ForceSafeILImage" + } + } + + "$KeyFile" + { + "type" "string" + } + + "$KeyContainer" + { + "type" "string" + } + + "$DelaySign" + { + "type" "bool" + } + + "$CLRUnmanagedCodeCheck" + { + "type" "bool" + } + + "$ErrorReporting" + { + "output" "LinkErrorReporting" + "ordinals" + { + "Prompt Immediately (/ERRORREPORT:PROMPT)" "PromptImmediately" + "Queue For Next Login (/ERRORREPORT:QUEUE)" "QueueForNextLogin" + "Send Error Report (/ERRORREPORT:SEND)" "SendErrorReport" + "No Error Report (/ERRORREPORT:NONE)" "NoErrorReport" + + } + } + + "$SectionAlignment" + { + "type" "string" + } + + "$PreserveLastErrorCodeforPInvokeCalls" + { + "output" "CLRSupportLastError" + "ordinals" + { + "Enabled (/CLRSupportLastError)" "Enabled" + "Disabled (/CLRSupportLastError:NO)" "Disabled" + "System Dlls Only (/CLRSupportLastError:SYSTEMDLL)" "SystemDlls" + } + } + + "$ImageHasSafeExceptionHandlers" + { + "type" "bool" + } + + // Command Line + "$AdditionalOptions" + { + "type" "string" + } + } + + "$ManifestTool" + { + "$UseUNICODEResponseFiles" + { + "type" "ignore" + } + + "$UseFAT32WorkAround" + { + "type" "ignore" + } + + "$DependencyInformationFile" + { + "type" "ignore" + } + + "$SuppressStartupBanner" + { + "type" "bool" + } + + "$VerboseOutput" + { + "type" "bool" + } + + "$AssemblyIdentity" + { + "type" "string" + } + + "$AdditionalManifestFiles" + { + "type" "string" + } + + "$InputResourceManifests" + { + "type" "string" + } + + "$EmbedManifest" + { + "type" "bool" + } + + "$OutputManifestFile" + { + "type" "string" + } + + "$ManifestResourceFile" + { + "type" "string" + } + + "$GenerateCatalogFiles" + { + "type" "bool" + } + + "$GenerateManifestFromManagedAssembly" + { + "type" "string" + } + + "$SuppressDependencyElement" + { + "type" "bool" + } + + "$GenerateCategoryTags" + { + "type" "bool" + } + + "$EnableDPIAwareness" + { + "type" "bool" + } + + "$TypeLibraryFile" + { + "type" "string" + } + + "$RegistrarScriptFile" + { + "type" "string" + } + + "$ComponentFileName" + { + "type" "string" + } + + "$ReplacementsFile" + { + "type" "string" + } + + "$UpdateFileHashes" + { + "type" "bool" + } + + "$UpdateFileHashesSearchPath" + { + "type" "string" + } + + "$AdditionalOptions" + { + "type" "string" + } + } + + "$XMLDocumentGenerator" + { + "$ValidateIntellisense" + { + "type" "ignore" + } + + "$UseUNICODEResponseFiles" + { + "type" "ignore" + } + + "$SuppressStartupBanner" + { + "type" "bool" + } + + "$AdditionalDocumentFiles" + { + "type" "string" + } + + "$OutputDocumentFile" + { + "type" "string" + } + + "$DocumentLibraryDependencies" + { + "type" "bool" + } + + "$AdditionalOptions" + { + "type" "string" + } + } + + "$BrowseInformation" + { + "$SuppressStartupBanner" + { + "type" "bool" + } + + "$OutputFile" + { + "type" "string" + } + + "$PreserveSBRFiles" + { + "type" "bool" + } + + "$AdditionalOptions" + { + "type" "string" + } + } + + "$Resources" + { + "$PreprocessorDefinitions" + { + "type" "string" + } + + "$Culture" + { + "ordinals" + { + "Default" "0" + "Afrikaans (0x436)" "1078" + "Albanian (0x41c)" "1052" + "Arabic (Saudi Arabia) (0x401)" "1025" + "Arabic (Iraq) (0x801)" "2049" + "Arabic (Egypt) (0xc01)" "3073" + "Arabic (Libya) (0x1001)" "4097" + "Arabic (Algeria) (0x1401)" "5121" + "Arabic (Morocco) (0x1801)" "6145" + "Arabic (Tunisia) (0x1c01)" "7169" + "Arabic (Oman) (0x2001)" "8193" + "Arabic (Yemen) (0x2401)" "9217" + "Arabic (Syria) (0x2801)" "10241" + "Arabic (Jordan) (0x2c01)" "11265" + "Arabic (Lebanon) (0x3001)" "12289" + "Arabic (Kuwait) (0x3401)" "13313" + "Arabic (U.A.E.) (0x3801)" "14337" + "Arabic (Bahrain) (0x3c01)" "15361" + "Arabic (Qatar) (0x4001)" "16385" + "Basque (0x42d)" "1069" + "Bulgarian (0x402)" "1026" + "Belarusian (0x423)" "1059" + "Catalan (0x403)" "1027" + "Chinese (Taiwan) (0x404)" "1028" + "Chinese (PRC) (0x804)" "2052" + "Chinese (Hong Kong S.A.R.) (0xc04)" "3076" + "Chinese (Singapore) (0x1004)" "4100" + "Croatian (0x41a)" "1050" + "Czech (0x405)" "1029" + "Danish (0x406)" "1030" + "Dutch (Netherlands) (0x413)" "1043" + "Dutch (Belgium) (0x813)" "2067" + "English (United States) (0x409)" "1033" + "English (United Kingdom) (0x809)" "2057" + "English (Australia) (0xc09)" "3081" + "English (Canada) (0x1009)" "4105" + "English (New Zealand) (0x1409)" "5129" + "English (Ireland) (0x1809)" "6153" + "English (South Africa) (0x1c09)" "7177" + "English (Jamaica) (0x2009)" "8201" + "English (Caribbean) (0x2409)" "9225" + "Estonian (0x425)" "1061" + "Farsi (0x429)" "1065" + "Finnish (0x40b)" "1035" + "French (France) (0x40c)" "1036" + "French (Belgium) (0x80c)" "2060" + "French (Canada) (0xc0c)" "3084" + "French (Switzerland) (0x100c)" "4108" + "French (Luxembourg) (0x140c)" "5132" + "German (Germany) (0x407)" "1031" + "German (Switzerland) (0x807)" "2055" + "German (Austria) (0xc07)" "3079" + "German (Luxembourg) (0x1007)" "4103" + "German (Liechtenstein) (0x1407)" "5127" + "Greek (0x408)" "1032" + "Hebrew (0x40d)" "1037" + "Hungarian (0x40e)" "1038" + "Icelandic (0x40f)" "1039" + "Indonesian (0x421)" "1057" + "Italian (Italy) (0x410)" "1040" + "Italian (Switzerland) (0x810)" "2064" + "Japanese (0x411)" "1041" + "Korean (0x412)" "1042" + "0x812" "2066" + "Latvian (0x426)" "1062" + "Lithuanian (0x427)" "1063" + "Norwegian (Bokmal) (0x414)" "1044" + "Norwegian (Nynorsk) (0x814)" "2068" + "Polish (0x415)" "1045" + "Portuguese (Brazil) (0x416)" "1046" + "Portuguese (Portugal) (0x816)" "2070" + "Romanian (0x418)" "1048" + "Russian (0x419)" "1049" + "Slovak (0x41b)" "1051" + "Spanish (Traditional Sort) (0x40a)" "1034" + "Spanish (Mexico) (0x80a)" "2058" + "Spanish (International Sort) (0xc0a)" "3082" + "Spanish (Guatemala) (0x100a)" "4106" + "Spanish (Costa Rica) (0x140a)" "5130" + "Spanish (Panama) (0x180a)" "6154" + "Spanish (Dominican Republic) (0x1c0a)" "7178" + "Spanish (Venezuela) (0x200a)" "8202" + "Spanish (Colombia) (0x240a)" "9226" + "Spanish (Peru) (0x280a)" "10250" + "Spanish (Argentina) (0x2c0a)" "11274" + "Spanish (Ecuador) (0x300a)" "12298" + "Spanish (Chile) (0x340a)" "13322" + "Spanish (Uruguay) (0x380a)" "14346" + "Spanish (Paraguay) (0x3c0a)" "15370" + "Spanish (Bolivia) (0x400a)" "16394" + "Swedish (0x41d)" "1053" + "Thai (0x41e)" "1054" + "Turkish (0x41f)" "1055" + "Ukrainian (0x422)" "1058" + "Serbian (Latin) (0x81a)" "2074" + "Urdu (0x420)" "1056" + } + } + + "$AdditionalIncludeDirectories" + { + "type" "string" + "PreferSemicolonNoComma" "1" + } + + "$IgnoreStandardIncludePath" + { + "type" "bool" + } + + "$ShowProgress" + { + "type" "bool" + } + + "$ResourceFileName" + { + "type" "string" + } + + "$AdditionalOptions" + { + "type" "string" + } + } + + $PreBuildEvent + { + "$CommandLine" + { + "type" "string" + "output" "Command" + } + + "$Description" + { + "type" "string" + "output" "Message" + } + + "$ExcludedFromBuild" + { + "type" "bool" + "output" "PreBuildEventUseInBuild" + "globalproperty" "1" + "invertoutput" "1" + } + + "$UseInBuild" + { + "type" "bool" + "output" "PreBuildEventUseInBuild" + "globalproperty" "1" + } + } + + $PreLinkEvent + { + "$CommandLine" + { + "type" "string" + "output" "Command" + } + + "$Description" + { + "type" "string" + "output" "Message" + } + + "$ExcludedFromBuild" + { + "type" "bool" + "output" "PreLinkEventUseInBuild" + "globalproperty" "1" + "invertoutput" "1" + } + + "$UseInBuild" + { + "type" "bool" + "output" "PreLinkEventUseInBuild" + "globalproperty" "1" + } + } + + $PostBuildEvent + { + "$CommandLine" + { + "type" "string" + "output" "Command" + } + + "$Description" + { + "type" "string" + "output" "Message" + } + + "$ExcludedFromBuild" + { + "type" "bool" + "output" "PostBuildEventUseInBuild" + "globalproperty" "1" + "invertoutput" "1" + } + + "$UseInBuild" + { + "type" "bool" + "output" "PostBuildEventUseInBuild" + "globalproperty" "1" + } + } + + $CustomBuildStep + { + "$CommandLine" + { + "type" "string" + "output" "Command" + } + + "$Description" + { + "type" "string" + "output" "Message" + } + + "$Outputs" + { + "type" "string" + } + + "$AdditionalDependencies" + { + "type" "string" + "output" "AdditionalInputs" + } + + "$ExecuteAfter" + { + "ordinals" + { + "AddIntermediateAssemblyToReferenceList" "0" + } + } + + "$ExecuteBefore" + { + "ordinals" + { + "AddIntermediateAssemblyToReferenceList" "0" + } + } + } +} \ No newline at end of file diff --git a/mp/src/vpc_scripts/dllbase.txt b/mp/src/vpc_scripts/dllbase.txt new file mode 100644 index 00000000..81743ae7 --- /dev/null +++ b/mp/src/vpc_scripts/dllbase.txt @@ -0,0 +1,37 @@ +engine 0x20000000 +server game 0x22000000 +client game 0x24000000 +vphysics 0x26000000 +materialsystem 0x28000000 +shaderapidx8 0x2a000000 +studiorender 0x2c000000 + +///////////////////////////////////// +XBOX 360 MANDATORY BASE 0x82000000-0x8BFFFFFF, (1MB blocks) +ADD EACH XBOX 360 PORTED DLL HERE +///////////////////////////////////// +engine.360.dll 0x83000000 (16) +gameui.360.dll 0x84100000 (5) +client.360.dll 0x84700000 (?) +server.360.dll 0x86000000 (?) + +tier0.360.dll 0x88000000 (2) +vstdlib.360.dll 0x88200000 (2) +filesystem_stdio.360.dll 0x88400000 (2) +datacache.360.dll 0x88600000 (2) +stdshader_dbg.360.dll 0x88800000 (2) +stdshader_dx9.360.dll 0x88A00000 (3) +vgui2.360.dll 0x88D30000 (2) +inputsystem.360.dll 0x88F00000 (1) +materialsystem.360.dll 0x89000000 (4) +vguimatsurface.360.dll 0x89500000 (3) +vphysics.360.dll 0x89A00000 (5) +studiorender.360.dll 0x89F00000 (7) +launcher.360.dll 0x8A600000 (2) +shaderapidx9.360.dll 0x8A800000 (7) +SoundEmitterSystem.360.dll 0x8AF00000 (2) +SceneFileCache.360.dll 0x8B100000 (1) +bsppack.360.dll 0x8B200000 (3) +stdshader_dx8.360.dll 0x8B500000 (2) +appchooser.360.dll 0x8B700000 (1) +serverbrowser.360.dll 0x8B800000 (?) \ No newline at end of file diff --git a/mp/src/vpc_scripts/groups.vgc b/mp/src/vpc_scripts/groups.vgc new file mode 100644 index 00000000..93f7b2c5 --- /dev/null +++ b/mp/src/vpc_scripts/groups.vgc @@ -0,0 +1,57 @@ +//----------------------------------------------------------------------------- +// GROUPS.VGC +// +// Group Configurations for all Source(TM) Projects +//----------------------------------------------------------------------------- + +/////////////////////// +// Group definitions // +/////////////////////// + +$Group "gamedlls" +{ + "client" + "server" +} + +$Group "game" +{ + "client" + "mathlib" + "server" + "tier1" + "vgui_controls" +} + +$Group "everything" +{ + "captioncompiler" + "client" + "glview" + "height2normal" + "mathlib" + "motionmapper" + "phonemeextractor" + "qc_eyes" + "server" + "serverplugin_empty" + "tgadiff" + "tier1" + "vbsp" + "vgui_controls" + "vice" + "vrad_dll" + "vrad_launcher" + "vtf2tga" + "vtfdiff" + "vvis_dll" + "vvis_launcher" +} + +$Group "dedicated" +{ + "mathlib" + "server" + "tier1" +} + diff --git a/mp/src/vpc_scripts/loadaddress.vpc b/mp/src/vpc_scripts/loadaddress.vpc new file mode 100644 index 00000000..146456f2 --- /dev/null +++ b/mp/src/vpc_scripts/loadaddress.vpc @@ -0,0 +1,108 @@ +//----------------------------------------------------------------------------- +// LOADADDRESS.VPC +// +// Contains the DLL/EXE Load Addresses. Generates the $LOADADDRESS_??? Macro from +// an easily updated table. This feature is primarily to facilitate the mandatory +// fixed address specification of 360 DLLs and thus efficient 360 packing of DLLs +// into memory. +// +// Format: +// $LoadAddressMacro +// { +// +// } +// +// $LoadAddressMacroAuto +// { +// +// } +// +// If "ProjectName" is not found, the "MacroName" will not be updated. +// "ProjectName" is the internal short project name reference and is usually the name of +// the project inside a group definition. +// +// "Length" is either floating point MB or integer bytes, and is used to successively +// to determine the next base address. +//----------------------------------------------------------------------------- + +// Explicitly defined "empty" only for WINDOWS only because they are not required for WINDOWS projects +$Macro LOADADDRESS_DEVELOPMENT " " [$WINDOWS] +$Macro LOADADDRESS_RETAIL " " [$WINDOWS] + +$LoadAddressMacro LOADADDRESS_DEVELOPMENT +{ + launcher_main 0x82000000 [$X360] + simdtest 0x82000000 [$X360] +} + +$LoadAddressMacro LOADADDRESS_RETAIL +{ + launcher_main 0x82000000 [$X360] + simdtest 0x82000000 [$X360] +} + +// Development versions require more memory to accomodate debug builds, release builds have to match debug for hybrid builds +$LoadAddressMacroAuto LOADADDRESS_DEVELOPMENT 0x82200000 [$X360] +{ + // top of chain, due to licensee lack of source restrictions + vphysics 5.5 + + tier0 2.0 + vstdlib 2.0 + filesystem_stdio 2.5 + datacache 2.5 + inputsystem 1.5 + launcher 2.0 + SoundEmitterSystem 2.0 + SceneFileCache 1.5 + vgui_dll 2.5 + gameui 6.0 + + materialsystem 5.0 + vguimatsurface 4.0 + shaderapidx9 11.0 + stdshader_dx9 4.5 + studiorender 7.5 + + engine 17.5 + client 17.5 + server 25.5 + + // transient DLLs + bsppack 3.0 + appchooser 8.5 + vxbdm 0.5 +} + +// Retail versions are expected to be minimally packed +$LoadAddressMacroAuto LOADADDRESS_RETAIL 0x82200000 [$X360] +{ + // top of chain, due to licensee lack of source restrictions + vphysics 2.5 + + tier0 1.0 + vstdlib 1.0 + filesystem_stdio 1.0 + datacache 1.0 + inputsystem 1.0 + launcher 1.0 + SoundEmitterSystem 1.0 + SceneFileCache 1.0 + vgui_dll 1.0 + gameui 2.0 + + materialsystem 1.5 + vguimatsurface 1.5 + shaderapidx9 4.0 + stdshader_dx9 1.5 + studiorender 4.5 + + engine 6.0 + client 10.5 + server 15.5 + + // transient DLLs + bsppack 1.5 + appchooser 1.5 + vxbdm 0.5 +} diff --git a/mp/src/vpc_scripts/projects.vgc b/mp/src/vpc_scripts/projects.vgc new file mode 100644 index 00000000..649cd85b --- /dev/null +++ b/mp/src/vpc_scripts/projects.vgc @@ -0,0 +1,116 @@ +//----------------------------------------------------------------------------- +// PROJECTS.VGC +// +// Project Configurations for all Source(TM) Projects +//----------------------------------------------------------------------------- + +///////////////////////// +// Project definitions // +///////////////////////// + +$Project "captioncompiler" +{ + "utils\captioncompiler\captioncompiler.vpc" [$WIN32] +} + + +$Project "client" +{ + "game\client\client_hl2mp.vpc" [($WIN32||$POSIX) && $HL2MP] +} + +$Project "glview" +{ + "utils\glview\glview.vpc" [$WIN32] +} + +$Project "height2normal" +{ + "utils\height2normal\height2normal.vpc" [$WIN32] +} + +$Project "server" +{ + "game\server\server_hl2mp.vpc" [($WIN32||$POSIX) && $HL2MP] +} + +$Project "mathlib" +{ + "mathlib\mathlib.vpc" [$WINDOWS||$X360||$POSIX] +} + +$Project "motionmapper" +{ + "utils\motionmapper\motionmapper.vpc" [$WIN32] +} + +$Project "phonemeextractor" +{ + "utils\phonemeextractor\phonemeextractor.vpc" [$WIN32] +} + +$Project "qc_eyes" +{ + "utils\qc_eyes\qc_eyes.vpc" [$WIN32] +} + +$Project "serverplugin_empty" +{ + "utils\serverplugin_sample\serverplugin_empty.vpc" [$WIN32||$POSIX] +} + +$Project "tgadiff" +{ + "utils\tgadiff\tgadiff.vpc" [$WIN32] +} + +$Project "tier1" +{ + "tier1\tier1.vpc" [$WINDOWS || $X360||$POSIX] +} + +$Project "vbsp" +{ + "utils\vbsp\vbsp.vpc" [$WIN32] +} + +$Project "vgui_controls" +{ + "vgui2\vgui_controls\vgui_controls.vpc" [$WIN32||$X360||$POSIX] +} + +$Project "vice" +{ + "utils\vice\vice.vpc" [$WIN32] +} + +$Project "vrad_dll" +{ + "utils\vrad\vrad_dll.vpc" [$WIN32] +} + +$Project "vrad_launcher" +{ + "utils\vrad_launcher\vrad_launcher.vpc" [$WIN32] +} + +$Project "vtf2tga" +{ + "utils\vtf2tga\vtf2tga.vpc" [$WIN32] +} + +$Project "vtfdiff" +{ + "utils\vtfdiff\vtfdiff.vpc" [$WIN32] +} + +$Project "vvis_dll" +{ + "utils\vvis\vvis_dll.vpc" [$WIN32] +} + +$Project "vvis_launcher" +{ + "utils\vvis_launcher\vvis_launcher.vpc" [$WIN32] +} + diff --git a/mp/src/vpc_scripts/protobuf_builder.vpc b/mp/src/vpc_scripts/protobuf_builder.vpc new file mode 100644 index 00000000..518aeafb --- /dev/null +++ b/mp/src/vpc_scripts/protobuf_builder.vpc @@ -0,0 +1,26 @@ + +$MacroRequired GENERATED_PROTO_DIR + +$CustomBuildStep "proto" +{ + $Description "Running Protocol Buffer Compiler on $(InputFileName)..." + $CommandLine "if not exist $GENERATED_PROTO_DIR mkdir $GENERATED_PROTO_DIR" "\n" \ + "$SRCDIR\gcsdk\bin\protoc.exe --proto_path=$SRCDIR\thirdparty\protobuf-2.3.0\src --proto_path=$(InputDir) --proto_path=$SRCDIR\gcsdk --cpp_out=$GENERATED_PROTO_DIR $(InputPath)" [$WINDOWS] + $CommandLine "mkdir $GENERATED_PROTO_DIR 2> /dev/null;" \ + "$SRCDIR/devtools/bin/osx32/protoc --proto_path=$SRCDIR\thirdparty\protobuf-2.3.0\src --proto_path=$(InputDir) --proto_path=$SRCDIR\gcsdk --cpp_out=$GENERATED_PROTO_DIR $(InputPath)" [$OSXALL] + $CommandLine "mkdir $GENERATED_PROTO_DIR 2> /dev/null;" \ + "$SRCDIR/gcsdk/bin/linux/protoc --proto_path=$SRCDIR\thirdparty\protobuf-2.3.0\src --proto_path=$(InputDir) --proto_path=$SRCDIR\gcsdk --cpp_out=$GENERATED_PROTO_DIR $(InputPath)" [$LINUX] + $Outputs "$GENERATED_PROTO_DIR\$(InputName).pb.cc;$GENERATED_PROTO_DIR\$(InputName).pb.h" +} + + +$Configuration +{ + $Compiler + { + // General + $AdditionalIncludeDirectories "$BASE;$GENERATED_PROTO_DIR;$SRCDIR\thirdparty\protobuf-2.3.0\src" + } +} + + diff --git a/mp/src/vpc_scripts/source_base.vpc b/mp/src/vpc_scripts/source_base.vpc new file mode 100644 index 00000000..074b850c --- /dev/null +++ b/mp/src/vpc_scripts/source_base.vpc @@ -0,0 +1,17 @@ +//----------------------------------------------------------------------------- +// source_base.VPC +// +// This is the base VPC file that is included by all others, on all platforms. +// +// Project Script +//----------------------------------------------------------------------------- + +// Set which branch we are building out of. +// This is one file we expect to be different between branches and so it must be merged carefully + +// Staging branch: +//$Macro STAGING_ONLY "1" + +// rel/tf_beta branch: +//$Macro TF_BETA "1" + diff --git a/mp/src/vpc_scripts/source_dll_base.vpc b/mp/src/vpc_scripts/source_dll_base.vpc new file mode 100644 index 00000000..b2c07984 --- /dev/null +++ b/mp/src/vpc_scripts/source_dll_base.vpc @@ -0,0 +1,20 @@ +//----------------------------------------------------------------------------- +// source_dll_base.VPC +// +// Project Script +//----------------------------------------------------------------------------- + +$include "$SRCDIR\vpc_scripts\source_base.vpc" + +$Macro PLATSUBDIR "\linux32" [$LINUX32] +$Macro PLATSUBDIR "\osx32" [$OSX32] +$Macro OUTBINDIR "$OUTBINDIR" [$LINUX32] +$Macro LIBPUBLIC "$SRCDIR\lib\public$PLATSUBDIR" [$LINUX32] +$Macro LIBCOMMON "$SRCDIR\lib\common$PLATSUBDIR" [$LINUX32] + +$include "$SRCDIR\vpc_scripts\source_dll_win32_base.vpc" [$WINDOWS] +$include "$SRCDIR\vpc_scripts\source_dll_x360_base.vpc" [$X360] +$include "$SRCDIR\vpc_scripts\source_dll_posix_base.vpc" [$OSXALL] +$Include "$SRCDIR\vpc_scripts\source_dll_linux_base.vpc" [$LINUX] +$Include "$SRCDIR\vpc_scripts\source_video_base.vpc" + diff --git a/mp/src/vpc_scripts/source_dll_linux_base.vpc b/mp/src/vpc_scripts/source_dll_linux_base.vpc new file mode 100644 index 00000000..18fb1f55 --- /dev/null +++ b/mp/src/vpc_scripts/source_dll_linux_base.vpc @@ -0,0 +1,24 @@ + +$Include "$SRCDIR\vpc_scripts\version.vpc" +$Include "$SRCDIR\vpc_scripts\source_linux_base_project.vpc" + + +$MacroRequired "OUTBINNAME" "$PROJECTNAME" + + +// General configuration info. +$Configuration +{ + $General + { + $ConfigurationType "Dynamic Library (.dll)" + $OutputFile "$(OBJ_DIR)/$OUTBINNAME$_DLL_EXT" + $GameOutputFile "$OUTBINDIR/$OUTBINNAME$_DLL_EXT" + } + + $Compiler + { + $PreprocessorDefinitions "$BASE;RAD_TELEMETRY_DISABLED" [$SOURCESDK ] + } +} + diff --git a/mp/src/vpc_scripts/source_dll_posix_base.vpc b/mp/src/vpc_scripts/source_dll_posix_base.vpc new file mode 100644 index 00000000..c7fc3e10 --- /dev/null +++ b/mp/src/vpc_scripts/source_dll_posix_base.vpc @@ -0,0 +1,46 @@ + +$Include "$SRCDIR\vpc_scripts\version.vpc" +$Include "$SRCDIR\vpc_scripts\source_posix_base.vpc" + + +$MacroRequired "OUTBINNAME" "$PROJECTNAME" +$MacroRequired "OUTBINDIR" "$SRCDIR\..\game\bin" + + +// General configuration info. +$Configuration +{ + $General + { + $ConfigurationType "Dynamic Library (.dll)" + $GameOutputFile "$OUTBINDIR/$OUTBINNAME$_DLL_EXT" + } + + $Linker + { + $OutputFile "$(OBJ_DIR)/$OUTBINNAME$_DLL_EXT" + } +} + +// Skeleton Project - All derived projects get this as a starting base +$Project +{ + $Folder "Source Files" + { + $File "$SRCDIR\public\tier0\memoverride.cpp" + { + $Configuration + { + $Compiler + { + $Create/UsePrecompiledHeader "Not Using Precompiled Headers" + } + } + } + } + + $Folder "Resources" + { + $File "$ROOTSCRIPT" + } +} diff --git a/mp/src/vpc_scripts/source_dll_win32_base.vpc b/mp/src/vpc_scripts/source_dll_win32_base.vpc new file mode 100644 index 00000000..77f577e2 --- /dev/null +++ b/mp/src/vpc_scripts/source_dll_win32_base.vpc @@ -0,0 +1,163 @@ +//----------------------------------------------------------------------------- +// SOURCE_DLL_WIN32_BASE.VPC +// +// Base Settings for all Source(TM) Projects +//----------------------------------------------------------------------------- + +$Include "$SRCDIR\vpc_scripts\version.vpc" + +$Macro NOAPPENDPLATSUBDIR "1" [!$WIN64] + +$MacroRequired "PLATSUBDIR" +$MacroRequired "SRCDIR" +$MacroRequired "OUTBINNAME" "$PROJECTNAME" +$MacroRequired "OUTBINDIR" + +// These are convenient for adjusting directory paths based on platform +// but they must be used without absolute consistency to avoid dependency +// problems. It appears that if VPC compares $LIBPUBLIC to $SRCDIR\lib\public +// it will decide that they are not equal, even if the *value* of $LIBPUBLIC +// is $SRCDIR\lib\public. These macros can safely be used in copy commands +// and other areas that VPC doesn't use for dependency tracking. +$Macro LIBPUBLIC "$SRCDIR\lib\public" +$Macro LIBCOMMON "$SRCDIR\lib\common" + +// Fix up directories for targets like win64 +$Macro OUTBINDIR "$OUTBINDIR$PLATSUBDIR" [!$NOAPPENDPLATSUBDIR && !$NOMODIFYOUTBINDIR] +$Macro LIBPUBLIC "$LIBPUBLIC$PLATSUBDIR" [!$NOAPPENDPLATSUBDIR] +$Macro LIBCOMMON "$LIBCOMMON$PLATSUBDIR" [!$NOAPPENDPLATSUBDIR] + +$Include "$SRCDIR\vpc_scripts\loadaddress.vpc" +$Include "$SRCDIR\vpc_scripts\source_dll_win32_debug.vpc" +$Include "$SRCDIR\vpc_scripts\source_dll_win32_release.vpc" +$Include "$SRCDIR\vpc_scripts\source_win32_base.vpc" + +$IgnoreRedundancyWarning "ON" + +$Linux +{ + -$File "$SRCDIR\lib\public\tier0.lib" + $file "$SRCDIR\linux\tier0_i686.so" + + -$File "$SRCDIR\lib\public\vstdlib.lib" [!$WIN64] + -$File "$SRCDIR\lib\public\$PLATFORM\vstdlib.lib" [$WIN64] + $file "$SRCDIR\linux\vstdlib_i686.so" +} + +// Common Configuration +$Configuration +{ + $General [$VS2010] + { + $TargetName "$OUTBINNAME" + } + + $PreBuildEvent + { + $CommandLine "if EXIST $OUTBINDIR\$(TargetFileName) for /f $QUOTEdelims=$QUOTE %%A in ('attrib $QUOTE$OUTBINDIR\$(TargetFileName)$QUOTE') do set valveTmpIsReadOnly=$QUOTE%%A$QUOTE" "\n" \ + "set valveTmpIsReadOnlyLetter=%valveTmpIsReadOnly:~6,1%" "\n" \ + "if $QUOTE%valveTmpIsReadOnlyLetter%$QUOTE==$QUOTER$QUOTE del /q $QUOTE$(TargetDir)$QUOTE$(TargetFileName)" "\n" \ + "$CRCCHECK" [!$SOURCESDK] + } + + $PostBuildEvent [!$ANALYZE] + { + $CommandLine "if not exist $QUOTE$OUTBINDIR$QUOTE mkdir $QUOTE$OUTBINDIR$QUOTE" "\n" + $CommandLine "$BASE" "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $QUOTE$OUTBINDIR\$(TargetFileName)$QUOTE $SRCDIR" "\n" [!$SOURCESDK] + $CommandLine "$BASE" "copy $QUOTE$(TargetDir)$QUOTE$(TargetFileName) $QUOTE$OUTBINDIR\$(TargetFileName)$QUOTE" "\n" \ + "if ERRORLEVEL 1 goto BuildEventFailed" "\n" \ + "if exist $QUOTE$(TargetDir)$QUOTE$(TargetName).map copy $QUOTE$(TargetDir)$QUOTE$(TargetName).map $OUTBINDIR\$(TargetName).map" "\n" + $CommandLine "$BASE" "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\$(TargetName).pdb $SRCDIR" "\n" [!$SOURCESDK] + $CommandLine "$BASE" "copy $QUOTE$(TargetDir)$QUOTE$(TargetName).pdb $OUTBINDIR\$(TargetName).pdb" "\n" \ + "if ERRORLEVEL 1 goto BuildEventFailed" "\n" \ + "goto BuildEventOK" "\n" \ + ":BuildEventFailed" "\n" \ + "echo *** ERROR! PostBuildStep FAILED for $(ProjectName)! EXE or DLL is probably running. ***" "\n" \ + "del /q $QUOTE$(TargetDir)$QUOTE$(TargetFileName)" "\n" \ + "exit 1" "\n" \ + ":BuildEventOK" "\n" + + $CommandLine "$BASE" "\n" \ + "call $SRCDIR\devtools\bin\vsign.bat -sign $OUTBINDIR\$(TargetFileName)" "\n" [$RETAIL && !$SOURCESDK] + + $CommandLine "$BASE" "\n" \ + "call $SRCDIR\devtools\bin\vsign.bat -signvalve $OUTBINDIR\$(TargetFileName)" "\n" [!$RETAIL && !$SOURCESDK] + + $Description "Publishing to $OUTBINDIR" + $ExcludedFromBuild "No" + } + + $Linker + { + // Suppress this warning using the undocumented /ignore linker switch + // schemalib.lib(schemaclassinfo.obj) : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library + $AdditionalOptions "$BASE /ignore:4221" + $AdditionalDependencies "%(AdditionalDependencies)" [$VS2010] + $TargetMachine "MachineX86 (/MACHINE:X86)" [$WIN32] + $TargetMachine "MachineX64 (/MACHINE:X64)" [$WIN64] + + // This option is from the devil. Basically, it causes the link inputs + // to vary depending on what is in the solution. This is anathema + // to the way that we use projects and solutions here at Valve. + // It also exposes a bug in VS2005 causing files to be recompiled/linked + // even if nothing changed. + $LinkLibraryDependencies "false" + } +} + +// Skeleton Project - All derived projects get this as a starting base +$Project +{ + $Folder "Source Files" + { + $File "$SRCDIR\public\tier0\memoverride.cpp" + { + $Configuration + { + $Compiler + { + $Create/UsePrecompiledHeader "Not Using Precompiled Headers" + } + } + } + + // Implement __imp__EncodePointer and __imp__DecodePointer so that we can run on XP SP1 + // when building with VS 2010. + $File "$SRCDIR\public\tier0\pointeroverride.asm" [$WIN32 && $VS2010] + { + $Configuration + { + $CustomBuildStep + { + // General + $CommandLine "$QUOTE$(VCInstallDir)bin\ml.exe$QUOTE /c /Cp /Zi /Fo$QUOTE$(IntDir)\$(InputName).obj$QUOTE $QUOTE$(InputPath)$QUOTE" + $Description "Compiling pointeroverride.asm" + $Outputs "$(IntDir)\$(InputName).obj" + } + } + } + + $File "$SRCDIR\common\debug_dll_check.cpp" [!$SOURCESDK] + { + $Configuration + { + $Compiler + { + $Create/UsePrecompiledHeader "Not Using Precompiled Headers" + } + } + } + } + + $Folder "Link Libraries" + { + $DynamicFile "$SRCDIR\lib\public\tier0.lib" [!$WIN64] + $DynamicFile "$SRCDIR\lib\public\tier1.lib" [!$WIN64] + $DynamicFile "$SRCDIR\lib\public\vstdlib.lib" [!$WIN64] + + $DynamicFile "$SRCDIR\lib\public\$PLATFORM\tier0.lib" [$WIN64] + $DynamicFile "$SRCDIR\lib\public\$PLATFORM\tier1.lib" [$WIN64] + $DynamicFile "$SRCDIR\lib\public\$PLATFORM\vstdlib.lib" [$WIN64] + } +} + diff --git a/mp/src/vpc_scripts/source_dll_win32_debug.vpc b/mp/src/vpc_scripts/source_dll_win32_debug.vpc new file mode 100644 index 00000000..5867cc9c --- /dev/null +++ b/mp/src/vpc_scripts/source_dll_win32_debug.vpc @@ -0,0 +1,328 @@ +//----------------------------------------------------------------------------- +// SOURCE_DLL_WIN32_DEBUG.VPC +// +// Base Settings for all Source(TM) Projects +//----------------------------------------------------------------------------- + +$IgnoreRedundancyWarning "ON" + +$MacroRequired "PLATSUBDIR" +$MacroRequired "SRCDIR" +$MacroRequired "OUTBINNAME" +$MacroRequired "OUTBINDIR" + +$Configuration "Debug" +{ + $General + { + // General + $OutputDirectory ".\Debug$PLATSUBDIR" + $IntermediateDirectory ".\Debug$PLATSUBDIR" + $ExtensionsToDeleteOnClean + $BuildLogFile + $InheritedProjectPropertySheets + + // Project Defaults + $ConfigurationType "Dynamic Library (.dll)" + $UseOfMFC + $UseOfATL + $MinimizeCRTUseInATL + $CharacterSet "Use Multi-Byte Character Set" + $CommonLanguageRuntimeSupport + $WholeProgramOptimization + } + + $Debugging + { + $Command + $CommandArguments + $WorkingDirectory + $Attach + $DebuggerType + $Environment + $MergeEnvironment + $SQLDebugging + } + + $Compiler + { + // General + $AdditionalIncludeDirectories "$SRCDIR\common;$SRCDIR\public;$SRCDIR\public\tier0;$SRCDIR\public\tier1" + $Resolve#UsingReferences + $DebugInformationFormat "Program Database for Edit & Continue (/ZI)" [!$EANDCDISABLED && !$WIN64] + $DebugInformationFormat "Program Database (/Zi)" [$EANDCDISABLED || $WIN64] + $SuppressStartupBanner + $WarningLevel "Level 4 (/W4)" + $Detect64bitPortabilityIssues "Yes (/Wp64)" + $TreatWarningsAsErrors + $UseUNICODEResponseFiles + + // Optimization + $Optimization "Disabled (/Od)" + $InlineFunctionExpansion + $EnableIntrinsicFunctions + $FavorSizeOrSpeed + $OmitFramePointers + $EnableFiberSafeOptimizations + $WholeProgramOptimization + + // Preprocessor + $PreprocessorDefinitions "_HAS_ITERATOR_DEBUGGING=0;WIN32;_WIN32;_DEBUG;DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;DLLNAME=$OUTBINNAME" + $PreprocessorDefinitions "$BASE;RAD_TELEMETRY_DISABLED" [$SOURCESDK] + $IgnoreStandardIncludePath + $GeneratePreprocessedFile + $KeepComments + + // Code Generation + $EnableStringPooling "Yes (/GF)" + // EnableMinimalRebuild is incompatible with /MP (multi-processor builds) + // and it also makes it hard to iterate on warnings because the compiler + // detects that there is no reason to recompile when you request it. + // It should always be off? It should definitely be off for /analyze builds. + //$EnableMinimalRebuild "Yes (/Gm)" [!$ANALYZE] + $EnableC++Exceptions "No" + $SmallerTypeCheck + $BasicRuntimeChecks "Default" + $RuntimeLibrary "Multi-threaded Debug (/MTd)" + $StructMemberAlignment + $BufferSecurityCheck "Yes" + $EnableFunctionLevelLinking + $EnableEnhancedInstructionSet + $EnableEnhancedInstructionSet "Streaming SIMD Extensions (/arch:SSE)" [$WIN32] + $FloatingPointModel "Fast (/fp:fast)" + $EnableFloatingPointExceptions + + // Language + $DisableLanguageExtensions + $DefaultCharUnsigned + $TreatWCHAR_TAsBuiltInType + $ForceConformanceInForLoopScope "Yes (/Zc:forScope)" + $EnableRunTimeTypeInfo "Yes (/GR)" + $OpenMPSupport + + // Precompiled Headers + $Create/UsePrecompiledHeader "Not Using Precompiled Headers" + $Create/UsePCHThroughFile + $PrecompiledHeaderFile + + // Output Files + $ExpandAttributedSource + $AssemblerOutput + $ASMListLocation "$(IntDir)/" + $ObjectFileName "$(IntDir)/" + $ProgramDatabaseFileName "$(IntDir)/" + $GenerateXMLDocumentationFiles "No" + $XMLDocumentationFileName + + // Browse Information + $EnableBrowseInformation "None" + $BrowseFile "$(IntDir)/" + + // Advanced + $CallingConvention + $CompileAs "Compile as C++ Code (/TP)" + $DisableSpecificWarnings + $ForceIncludes + $Force#Using + $ShowIncludes + $UndefinePreprocessorDefinitions + $UndefineAllPreprocessorDefinitions + $UseFullPaths + $OmitDefaultLibraryNames + $ErrorReporting "Prompt Immediately (/errorReport:prompt)" + + // Command Line + $AdditionalOptions "$BASE /MP" + } + + $Linker + { + // General + $OutputFile "$(OutDir)/$OUTBINNAME.dll" + $ShowProgress "Not Set" + $Version + $EnableIncrementalLinking "Yes (/INCREMENTAL)" + $SuppressStartupBanner "Yes (/NOLOGO)" + $IgnoreImportLibrary + $RegisterOutput + $AdditionalLibraryDirectories "$LIBCOMMON;$LIBPUBLIC" + $LinkLibraryDependencies + $UseLibraryDependencyInputs + $UseUNICODEResponseFiles "No" + + // Input + $AdditionalDependencies + $IgnoreAllDefaultLibraries + $IgnoreSpecificLibrary "libc;libcd;libcmt" + $ModuleDefinitionFile + $AddModuleToAssembly + $EmbedManagedResourceFile + $ForceSymbolReferences + $DelayLoadedDLLs + $AssemblyLinkResource + + // Manifest File + $GenerateManifest "No" + $ManifestFile + $AdditionalManifestDependencies + $AllowIsolation + + // Debugging + $GenerateDebugInfo "Yes (/DEBUG)" + $GenerateProgramDatabaseFile "$(IntDir)/$(TargetName).pdb" + $StripPrivateSymbols + $GenerateMapFile "No" + $MapFileName "$(IntDir)/$(TargetName).map" + $MapExports + $DebuggableAssembly + + // System + $SubSystem "Windows (/SUBSYSTEM:WINDOWS)" + $HeapReserveSize + $HeapCommitSize + $StackReserveSize + $StackCommitSize + $EnableLargeAddresses + $TerminalServer + $SwapRunFromCD + $SwapRunFromNetwork + $Driver + + // Optimization + $References + $EnableCOMDATFolding + $OptimizeForWindows98 + $FunctionOrder + $ProfileGuidedDatabase + $LinkTimeCodeGeneration + + // Embedded IDL + $MIDLCommands + $IgnoreEmbeddedIDL + $MergeIDLBaseFileName + $TypeLibrary + $TypeLibResourceID + + // Advanced + $EntryPoint + $NoEntryPoint + $SetChecksum + $BaseAddress "$LOADADDRESS_DEVELOPMENT" + $FixedBaseAddress + $TurnOffAssemblyGeneration + $DelayLoadedDLL + $ImportLibrary + $MergeSections + $Profile + $CLRThreadAttribute + $CLRImageType + $KeyFile + $KeyContainer + $DelaySign + $ErrorReporting "Prompt Immediately (/ERRORREPORT:PROMPT)" + $CLRUnmanagedCodeCheck + + // Command Line + $AdditionalOptions + } + + $Linker [$VS2010] + { + // SAFE_SEH should always be disabled on debug builds. + $ImageHasSafeExceptionHandlers "false" + } + + $ManifestTool + { + // General + $SuppressStartupBanner "Yes (/nologo)" + $VerboseOutput + $AssemblyIdentity + $UseUNICODEResponseFiles + $UseFAT32WorkAround + + // Input And Output + $AdditionalManifestFiles + $InputResourceManifests + $EmbedManifest + $OutputManifestFile + $ManifestResourceFile + $GenerateCatalogFiles + $DependencyInformationFile + + // Isolated COM + $TypeLibraryFile + $RegistrarScriptFile + $ComponentFileName + $ReplacementsFile + + // Advanced + $UpdateFileHashes + $UpdateFileHashesSearchPath + + // Command Line + $AdditionalOptions + } + + $XMLDocumentGenerator + { + // General + $SuppressStartupBanner "Yes (/nologo)" + $ValidateIntelliSense + $AdditionalDocumentFiles + $OutputDocumentFile + $DocumentLibraryDependencies + $UseUNICODEResponseFiles + } + + $BrowseInformation + { + $SuppressStartupBanner "Yes (/nologo)" + $OutputFile "$(OutDir)/$OUTBINNAME.bsc" + $AdditionalOptions + } + + $Resources + { + // General + $PreprocessorDefinitions "_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE" + $Culture "English (United States) (0x409)" + $AdditionalIncludeDirectories + $IgnoreStandardIncludePath + $ShowProgress + $ResourceFileName + + // Command Line + $AdditionalOptions + } + + $PreBuildEvent + { + $CommandLine + $Description + $ExcludedFromBuild "No" + } + + $PreLinkEvent + { + $CommandLine + $Description + $ExcludedFromBuild "No" + } + + $PostBuildEvent + { + $CommandLine + $Description + $ExcludedFromBuild "No" + } + + $CustomBuildStep + { + // General + $CommandLine + $Description + $Outputs + $AdditionalDependencies + } +} diff --git a/mp/src/vpc_scripts/source_dll_win32_release.vpc b/mp/src/vpc_scripts/source_dll_win32_release.vpc new file mode 100644 index 00000000..997d5809 --- /dev/null +++ b/mp/src/vpc_scripts/source_dll_win32_release.vpc @@ -0,0 +1,323 @@ +//----------------------------------------------------------------------------- +// SOURCE_DLL_WIN32_RELEASE.VPC +// +// Base Settings for all Source(TM) Projects +//----------------------------------------------------------------------------- + +$IgnoreRedundancyWarning "ON" + +$MacroRequired "PLATSUBDIR" +$MacroRequired "SRCDIR" +$MacroRequired "OUTBINNAME" +$MacroRequired "OUTBINDIR" + +$Configuration "Release" +{ + $General + { + // General + $OutputDirectory ".\Release$PLATSUBDIR" + $IntermediateDirectory ".\Release$PLATSUBDIR" + $ExtensionsToDeleteOnClean + $BuildLogFile + $InheritedProjectPropertySheets + + // Project Defaults + $ConfigurationType "Dynamic Library (.dll)" + $UseOfMFC + $UseOfATL + $MinimizeCRTUseInATL + $CharacterSet "Use Multi-Byte Character Set" + $CommonLanguageRuntimeSupport + $WholeProgramOptimization + } + + $Debugging + { + $Command + $CommandArguments + $WorkingDirectory + $Attach + $DebuggerType + $Environment + $MergeEnvironment + $SQLDebugging + } + + $Compiler + { + // General + $AdditionalIncludeDirectories "$SRCDIR\common;$SRCDIR\public;$SRCDIR\public\tier0;$SRCDIR\public\tier1" + $Resolve#UsingReferences + $DebugInformationFormat "Program Database (/Zi)" + $SuppressStartupBanner + $WarningLevel "Level 4 (/W4)" + $Detect64bitPortabilityIssues "Yes (/Wp64)" + $TreatWarningsAsErrors + $UseUNICODEResponseFiles + + // Optimization + $Optimization "Maximize Speed (/O2)" + $InlineFunctionExpansion "Any Suitable (/Ob2)" + $EnableIntrinsicFunctions "Yes (/Oi)" + $FavorSizeOrSpeed "Favor Fast Code (/Ot)" + $OmitFramePointers + $EnableFiberSafeOptimizations + $WholeProgramOptimization + + // Preprocessor + $PreprocessorDefinitions "WIN32;_WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;DLLNAME=$OUTBINNAME" + // Enable asserts in release builds if /define:releaseasserts is specified on the VPC command line. + $PreprocessorDefinitions "$BASE;RELEASEASSERTS" [$RELEASEASSERTS] + $PreprocessorDefinitions "$BASE;RAD_TELEMETRY_DISABLED" [$SOURCESDK] + $IgnoreStandardIncludePath + $GeneratePreprocessedFile + $KeepComments + + // Code Generation + $EnableStringPooling "Yes (/GF)" + $EnableMinimalRebuild + $EnableC++Exceptions "No" + $SmallerTypeCheck + $BasicRuntimeChecks + $RuntimeLibrary "Multi-threaded (/MT)" + $StructMemberAlignment + $BufferSecurityCheck "Yes" [$STAGING_ONLY] + $BufferSecurityCheck "No" [!$STAGING_ONLY] + $EnableFunctionLevelLinking "Yes (/Gy)" + $EnableEnhancedInstructionSet + $EnableEnhancedInstructionSet "Streaming SIMD Extensions (/arch:SSE)" [$WIN32] + $FloatingPointModel "Fast (/fp:fast)" + $EnableFloatingPointExceptions + + // Language + $DisableLanguageExtensions + $DefaultCharUnsigned + $TreatWCHAR_TAsBuiltInType + $ForceConformanceInForLoopScope "Yes (/Zc:forScope)" + $EnableRunTimeTypeInfo "Yes (/GR)" + $OpenMPSupport + + // Precompiled Headers + $Create/UsePrecompiledHeader "Not Using Precompiled Headers" + $Create/UsePCHThroughFile + $PrecompiledHeaderFile + + // Output Files + $ExpandAttributedSource + $AssemblerOutput + $ASMListLocation "$(IntDir)/" + $ObjectFileName "$(IntDir)/" + $ProgramDatabaseFileName "$(IntDir)/" + $GenerateXMLDocumentationFiles "No" + $XMLDocumentationFileName + + // Browse Information + $EnableBrowseInformation "None" + $BrowseFile "$(IntDir)/" + + // Advanced + $CallingConvention + $CompileAs "Compile as C++ Code (/TP)" + $DisableSpecificWarnings + $ForceIncludes + $Force#Using + $ShowIncludes + $UndefinePreprocessorDefinitions + $UndefineAllPreprocessorDefinitions + $UseFullPaths + $OmitDefaultLibraryNames + $ErrorReporting "Prompt Immediately (/errorReport:prompt)" + + // Command Line + $AdditionalOptions "$BASE /MP" + // Enable extra debugging information. + $AdditionalOptions "$BASE /d2Zi+" + } + + $Linker + { + // General + $OutputFile "$(OutDir)/$OUTBINNAME.dll" + $ShowProgress "Not Set" + $Version + $EnableIncrementalLinking "No (/INCREMENTAL:NO)" + $SuppressStartupBanner "Yes (/NOLOGO)" + $IgnoreImportLibrary + $RegisterOutput + $AdditionalLibraryDirectories "$LIBCOMMON;$LIBPUBLIC" + $LinkLibraryDependencies + $UseLibraryDependencyInputs + $UseUNICODEResponseFiles "No" + + // Input + $AdditionalDependencies + $IgnoreAllDefaultLibraries + $IgnoreSpecificLibrary "libc;libcd;libcmtd" + $ModuleDefinitionFile + $AddModuleToAssembly + $EmbedManagedResourceFile + $ForceSymbolReferences + $DelayLoadedDLLs + $AssemblyLinkResource + + // Manifest File + $GenerateManifest "No" + $ManifestFile + $AdditionalManifestDependencies + $AllowIsolation + + // Debugging + $GenerateDebugInfo "Yes (/DEBUG)" + $GenerateProgramDatabaseFile "$(IntDir)/$(TargetName).pdb" + $StripPrivateSymbols + $GenerateMapFile "No" + $MapFileName "$(IntDir)/$(TargetName).map" + $MapExports + $DebuggableAssembly + + // System + $SubSystem "Windows (/SUBSYSTEM:WINDOWS)" + $HeapReserveSize + $HeapCommitSize + $StackReserveSize + $StackCommitSize + $EnableLargeAddresses + $TerminalServer + $SwapRunFromCD + $SwapRunFromNetwork + $Driver + + // Optimization + $References "Eliminate Unreferenced Data (/OPT:REF)" + $EnableCOMDATFolding "Remove Redundant COMDATs (/OPT:ICF)" + $OptimizeForWindows98 + $FunctionOrder + $ProfileGuidedDatabase + $LinkTimeCodeGeneration + + // Embedded IDL + $MIDLCommands + $IgnoreEmbeddedIDL + $MergeIDLBaseFileName + $TypeLibrary + $TypeLibResourceID + + // Advanced + $EntryPoint + $NoEntryPoint + $SetChecksum + $BaseAddress "$LOADADDRESS_DEVELOPMENT" + $BaseAddress "$LOADADDRESS_RETAIL" [$RETAIL] + $FixedBaseAddress + $TurnOffAssemblyGeneration + $DelayLoadedDLL + $ImportLibrary + $MergeSections + $Profile + $CLRThreadAttribute + $CLRImageType + $KeyFile + $KeyContainer + $DelaySign + $ErrorReporting "Prompt Immediately (/ERRORREPORT:PROMPT)" + $CLRUnmanagedCodeCheck + + // Command Line + $AdditionalOptions "$BASE /DYNAMICBASE" + } + + $ManifestTool + { + // General + $SuppressStartupBanner "Yes (/nologo)" + $VerboseOutput + $AssemblyIdentity + $UseUNICODEResponseFiles + $UseFAT32WorkAround + + // Input And Output + $AdditionalManifestFiles + $InputResourceManifests + $EmbedManifest + $OutputManifestFile + $ManifestResourceFile + $GenerateCatalogFiles + $DependencyInformationFile + + // Isolated COM + $TypeLibraryFile + $RegistrarScriptFile + $ComponentFileName + $ReplacementsFile + + // Advanced + $UpdateFileHashes + $UpdateFileHashesSearchPath + + // Command Line + $AdditionalOptions + } + + $XMLDocumentGenerator + { + // General + $SuppressStartupBanner "Yes (/nologo)" + $ValidateIntelliSense + $AdditionalDocumentFiles + $OutputDocumentFile + $DocumentLibraryDependencies + $UseUNICODEResponseFiles + } + + $BrowseInformation + { + $SuppressStartupBanner "Yes (/nologo)" + $OutputFile "$(OutDir)/$OUTBINNAME.bsc" + $AdditionalOptions + } + + $Resources + { + // General + $PreprocessorDefinitions "NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE" + $Culture "English (United States) (0x409)" + $AdditionalIncludeDirectories + $IgnoreStandardIncludePath + $ShowProgress + $ResourceFileName + + // Command Line + $AdditionalOptions + } + + $PreBuildEvent + { + $CommandLine + $Description + $ExcludedFromBuild "No" + } + + $PreLinkEvent + { + $CommandLine + $Description + $ExcludedFromBuild "No" + } + + $PostBuildEvent + { + $CommandLine + $Description + $ExcludedFromBuild "No" + } + + $CustomBuildStep + { + // General + $CommandLine + $Description + $Outputs + $AdditionalDependencies + } +} \ No newline at end of file diff --git a/mp/src/vpc_scripts/source_exe_base.vpc b/mp/src/vpc_scripts/source_exe_base.vpc new file mode 100644 index 00000000..7fc9096d --- /dev/null +++ b/mp/src/vpc_scripts/source_exe_base.vpc @@ -0,0 +1,13 @@ +//----------------------------------------------------------------------------- +// source_exe_base.VPC +// +// Project Script +//----------------------------------------------------------------------------- + +$include "$SRCDIR\vpc_scripts\source_base.vpc" + +$include "$SRCDIR\vpc_scripts\source_exe_win_win32_base.vpc" [$WINDOWS] +$Include "$SRCDIR\vpc_scripts\source_exe_linux_base.vpc" [$LINUX] +$include "$SRCDIR\vpc_scripts\source_exe_posix_base.vpc" [$POSIX && !$LINUX] +$include "$SRCDIR\vpc_scripts\source_xex_x360_base.vpc" [$X360] +$Include "$SRCDIR\vpc_scripts\source_video_base.vpc" diff --git a/mp/src/vpc_scripts/source_exe_con_win32_base.vpc b/mp/src/vpc_scripts/source_exe_con_win32_base.vpc new file mode 100644 index 00000000..0b83dfa9 --- /dev/null +++ b/mp/src/vpc_scripts/source_exe_con_win32_base.vpc @@ -0,0 +1,24 @@ +//----------------------------------------------------------------------------- +// SOURCE_EXE_CON_WIN32_BASE.VPC +// +// Base Settings for all Source(TM) Projects +//----------------------------------------------------------------------------- + +$IgnoreRedundancyWarning "ON" +$MacroRequired "SRCDIR" +$MacroRequired "OUTBINDIR" + +$Include "$SRCDIR\vpc_scripts\source_exe_win_win32_base.vpc" + +$Configuration +{ + $General [$VS2010] + { + $TargetName "$OUTBINNAME" + } + + $Linker + { + $SubSystem "Console (/SUBSYSTEM:CONSOLE)" + } +} diff --git a/mp/src/vpc_scripts/source_exe_linux_base.vpc b/mp/src/vpc_scripts/source_exe_linux_base.vpc new file mode 100644 index 00000000..44ffa8e7 --- /dev/null +++ b/mp/src/vpc_scripts/source_exe_linux_base.vpc @@ -0,0 +1,57 @@ +//----------------------------------------------------------------------------- +// SOURCE_EXE_WIN_WIN32.VPC +// +// Base Settings for Source(TM) Projects +//----------------------------------------------------------------------------- + +$Include "$SRCDIR\vpc_scripts\version.vpc" + +$MacroRequired "SRCDIR" +$MacroRequired "OUTBINNAME" "$PROJECTNAME" +$MacroRequired "OUTBINDIR" +$Macro IS_LIB_PROJECT "1" + +$Include "$SRCDIR\vpc_scripts\source_linux_base_project.vpc" + + +$Project +{ + $Folder "Source Files" + { + $File "$SRCDIR\public\tier0\memoverride.cpp" + { + $Configuration + { + $Compiler + { + $Create/UsePrecompiledHeader "Not Using Precompiled Headers" + } + } + } + } + + $Folder "Link Libraries" [$CLANG] + { + $File "$SRCDIR/thirdparty/gperftools-2.0/.libs/libtcmalloc_minimal.so" + } +} + +$Configuration +{ + $General + { + $GameOutputFile "$OUTBINDIR/$OUTBINNAME" + + } + + $Linker + { + $OutputFile "$OUTBINDIR/$OUTBINNAME" + // In order to get the Valve standard allocator memory alignment (16-byte + // alignment for objects that are a multiple of 16 bytes) we use tcmalloc. + // Using -l will ask the linker to use it, but if there are no references to + // malloc/free then it may not actually use it. Wrapping the flag in the + // as-needed controls forces it to be pulled in. + $GCC_ExtraLinkerFlags "-Wl,--no-as-needed -ltcmalloc_minimal -Wl,--as-needed" [$CLANG] + } +} diff --git a/mp/src/vpc_scripts/source_exe_posix_base.vpc b/mp/src/vpc_scripts/source_exe_posix_base.vpc new file mode 100644 index 00000000..d864cc0e --- /dev/null +++ b/mp/src/vpc_scripts/source_exe_posix_base.vpc @@ -0,0 +1,64 @@ +//----------------------------------------------------------------------------- +// SOURCE_EXE_posix.VPC +// +// Base Settings for Source(TM) Projects +//----------------------------------------------------------------------------- + +$Include "$SRCDIR\vpc_scripts\version.vpc" +$Include "$SRCDIR\vpc_scripts\source_posix_base.vpc" + +$MacroRequired "SRCDIR" +$MacroRequired "OUTBINNAME" "$PROJECTNAME" + +$Include "$SRCDIR\vpc_scripts\loadaddress.vpc" + + +$IgnoreRedundancyWarning "ON" + +$Configuration +{ + $General + { + $ConfigurationType "Application (.exe)" + } + + $Linker + { + $OutputFile "$SRCDIR/../game/$OUTBINNAME" + } +} + +$Project +{ + $Folder "Source Files" + { + $File "$SRCDIR\public\tier0\memoverride.cpp" + { + $Configuration + { + $Compiler + { + $Create/UsePrecompiledHeader "Not Using Precompiled Headers" + } + } + } + } + + + $Folder "Resources" + { + $File "$ROOTSCRIPT" + } + + + $Folder "Link Libraries" + { + $ImpLib tier0 [$LINUXALL] + $Lib tier1 [$LINUXALL] + $ImpLib vstdlib [$LINUXALL] + $DynamicFile "$SRCDIR\lib\$PLATFORM\$_IMPLIB_PREFIXtier0$_IMPLIB_EXT" [!$LINUXALL] + $DynamicFile "$SRCDIR\lib\$PLATFORM\tier1$_STATICLIB_EXT" [!$LINUXALL] + $DynamicFile "$SRCDIR\lib\$PLATFORM\$_IMPLIB_PREFIXvstdlib$_IMPLIB_EXT" [!$LINUXALL] + } +} + diff --git a/mp/src/vpc_scripts/source_exe_win_win32_base.vpc b/mp/src/vpc_scripts/source_exe_win_win32_base.vpc new file mode 100644 index 00000000..ff784642 --- /dev/null +++ b/mp/src/vpc_scripts/source_exe_win_win32_base.vpc @@ -0,0 +1,138 @@ +//----------------------------------------------------------------------------- +// SOURCE_EXE_WIN_WIN32.VPC +// +// Base Settings for Source(TM) Projects +//----------------------------------------------------------------------------- + +$Include "$SRCDIR\vpc_scripts\version.vpc" + +$Macro NOAPPENDPLATSUBDIR "1" [!$WIN64] + +$MacroRequired "PLATSUBDIR" +$MacroRequired "SRCDIR" +$MacroRequired "OUTBINNAME" "$PROJECTNAME" +$MacroRequired "OUTBINDIR" + +// These are convenient for adjusting directory paths based on platform +// but they must be used without absolute consistency to avoid dependency +// problems. It appears that if VPC compares $LIBPUBLIC to $SRCDIR\lib\public +// it will decide that they are not equal, even if the *value* of $LIBPUBLIC +// is $SRCDIR\lib\public. These macros can safely be used in copy commands +// and other areas that VPC doesn't use for dependency tracking. +$Macro LIBPUBLIC "$SRCDIR\lib\public" +$Macro LIBCOMMON "$SRCDIR\lib\common" + +$Include "$SRCDIR\vpc_scripts\loadaddress.vpc" +$Include "$SRCDIR\vpc_scripts\source_exe_win_win32_debug.vpc" +$Include "$SRCDIR\vpc_scripts\source_exe_win_win32_release.vpc" +$Include "$SRCDIR\vpc_scripts\source_win32_base.vpc" + +// Fix up directories for targets like win64 +$Macro OUTBINDIR "$OUTBINDIR$PLATSUBDIR" [!$NOAPPENDPLATSUBDIR] +$Macro LIBPUBLIC "$LIBPUBLIC$PLATSUBDIR" [!$NOAPPENDPLATSUBDIR] +$Macro LIBCOMMON "$LIBCOMMON$PLATSUBDIR" [!$NOAPPENDPLATSUBDIR] + +$IgnoreRedundancyWarning "ON" + +// Common Configuration +$Configuration +{ + $General [$VS2010] + { + $TargetName "$OUTBINNAME" + } + + $PreBuildEvent + { + $CommandLine "if EXIST $OUTBINDIR\$(TargetFileName) for /f $QUOTEdelims=$QUOTE %%A in ('attrib $QUOTE$OUTBINDIR\$(TargetFileName)$QUOTE') do set valveTmpIsReadOnly=$QUOTE%%A$QUOTE" "\n" \ + "set valveTmpIsReadOnlyLetter=%valveTmpIsReadOnly:~6,1%" "\n" \ + "if $QUOTE%valveTmpIsReadOnlyLetter%$QUOTE==$QUOTER$QUOTE del /q $QUOTE$(TargetDir)$QUOTE$(TargetFileName)" "\n" \ + "$CRCCHECK" + } + + $PostBuildEvent [!$ANALYZE] + { + $CommandLine "if not exist $QUOTE$OUTBINDIR$QUOTE mkdir $QUOTE$OUTBINDIR$QUOTE" "\n" + $CommandLine "$BASE" "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\$(TargetFileName) $SRCDIR" "\n" [! $SOURCESDK ] + $CommandLine "$BASE" "copy $QUOTE$(TargetDir)$QUOTE$(TargetFileName) $OUTBINDIR\$(TargetFileName)" "\n" \ + "if ERRORLEVEL 1 goto BuildEventFailed" "\n" \ + "if exist $QUOTE$(TargetDir)$QUOTE$(TargetName).map copy $QUOTE$(TargetDir)$QUOTE$(TargetName).map $OUTBINDIR\$(TargetName).map" "\n" + $CommandLine "$BASE" "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\$(TargetName).pdb $SRCDIR" "\n" [ !$SOURCESDK ] + $CommandLine "$BASE" "copy $QUOTE$(TargetDir)$QUOTE$(TargetName).pdb $OUTBINDIR\$(TargetName).pdb" "\n" \ + "if ERRORLEVEL 1 goto BuildEventFailed" "\n" \ + "goto BuildEventOK" "\n" \ + ":BuildEventFailed" "\n" \ + "echo *** ERROR! PostBuildStep FAILED for $(ProjectName)! EXE or DLL is probably running. ***" "\n" \ + "del /q $QUOTE$(TargetDir)$QUOTE$(TargetFileName)" "\n" \ + "exit 1" "\n" \ + ":BuildEventOK" "\n" + + $CommandLine "$BASE" "\n" \ + "call $SRCDIR\devtools\bin\vsign.bat -sign $OUTBINDIR\$(TargetFileName)" "\n" [$RETAIL && !$SOURCESDK ] + + $CommandLine "$BASE" "\n" \ + "call $SRCDIR\devtools\bin\vsign.bat -signvalve $OUTBINDIR\$(TargetFileName)" "\n" [!$RETAIL && !$SOURCESDK ] + + $Description "Publishing to $OUTBINDIR" + $ExcludedFromBuild "No" + } + + $Linker + { + // NXCOMPAT (also known as DEP or Data Access Protection) should be enabled for all + // executables for security and debugging reasons. + $AdditionalOptions "$BASE /NXCOMPAT" + // Suppress this warning using the undocumented /ignore linker switch + // schemalib.lib(schemaclassinfo.obj) : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library + $AdditionalOptions "$BASE /ignore:4221" + $AdditionalDependencies "%(AdditionalDependencies)" [$VS2010] + $TargetMachine "MachineX86 (/MACHINE:X86)" [$WIN32] + $TargetMachine "MachineX64 (/MACHINE:X64)" [$WIN64] + } +} + +// Skeleton Project - All derived projects get this as a starting base +$Project +{ + $Folder "Source Files" + { + $File "$SRCDIR\public\tier0\memoverride.cpp" + { + $Configuration + { + $Compiler + { + $Create/UsePrecompiledHeader "Not Using Precompiled Headers" + } + } + } + + // Implement __imp__EncodePointer and __imp__DecodePointer so that we can run on XP SP1 + // when building with VS 2010. + $File "$SRCDIR\public\tier0\pointeroverride.asm" [$WIN32 && $VS2010] + { + $Configuration + { + $CustomBuildStep + { + // General + $CommandLine "$QUOTE$(VCInstallDir)bin\ml.exe$QUOTE /c /Cp /Zi /Fo$QUOTE$(IntDir)\$(InputName).obj$QUOTE $QUOTE$(InputPath)$QUOTE" + $Description "Compiling pointeroverride.asm" + $Outputs "$(IntDir)\$(InputName).obj" + } + } + } + } + + $Folder "Link Libraries" + { + $DynamicFile "$SRCDIR\lib\public\tier0.lib" [$NOAPPENDPLATSUBDIR] + $DynamicFile "$SRCDIR\lib\public\tier1.lib" [$NOAPPENDPLATSUBDIR] + $DynamicFile "$SRCDIR\lib\public\vstdlib.lib" [$NOAPPENDPLATSUBDIR] + + $DynamicFile "$SRCDIR\lib\public$PLATSUBDIR\tier0.lib" [!$NOAPPENDPLATSUBDIR] + $DynamicFile "$SRCDIR\lib\public$PLATSUBDIR\tier1.lib" [!$NOAPPENDPLATSUBDIR] + $DynamicFile "$SRCDIR\lib\public$PLATSUBDIR\vstdlib.lib" [!$NOAPPENDPLATSUBDIR] + } +} + diff --git a/mp/src/vpc_scripts/source_exe_win_win32_debug.vpc b/mp/src/vpc_scripts/source_exe_win_win32_debug.vpc new file mode 100644 index 00000000..06d2401b --- /dev/null +++ b/mp/src/vpc_scripts/source_exe_win_win32_debug.vpc @@ -0,0 +1,327 @@ +//----------------------------------------------------------------------------- +// SOURCE_EXE_WIN_WIN32_DEBUG.VPC +// +// Base Settings for Source(TM) Projects +//----------------------------------------------------------------------------- + +$IgnoreRedundancyWarning "ON" + +$MacroRequired "PLATSUBDIR" +$MacroRequired "SRCDIR" +$MacroRequired "OUTBINNAME" +$MacroRequired "OUTBINDIR" + +$Configuration "Debug" +{ + $General + { + // General + $OutputDirectory ".\Debug$PLATSUBDIR" + $IntermediateDirectory ".\Debug$PLATSUBDIR" + $ExtensionsToDeleteOnClean + $BuildLogFile + $InheritedProjectPropertySheets + + // Project Defaults + $ConfigurationType "Application (.exe)" + $UseOfMFC + $UseOfATL + $MinimizeCRTUseInATL + $CharacterSet "Use Multi-Byte Character Set" + $CommonLanguageRuntimeSupport + $WholeProgramOptimization + } + + $Debugging + { + // Action + $Command + $CommandArguments + $WorkingDirectory + $Attach + $DebuggerType + $Environment + $MergeEnvironment + $SQLDebugging + } + + $Compiler + { + // General + $AdditionalIncludeDirectories "$SRCDIR\common;$SRCDIR\public;$SRCDIR\public\tier0;$SRCDIR\public\tier1" + $Resolve#UsingReferences + $DebugInformationFormat "Program Database for Edit & Continue (/ZI)" [!$EANDCDISABLED && !$WIN64] + $DebugInformationFormat "Program Database (/Zi)" [$EANDCDISABLED || $WIN64] + $SuppressStartupBanner + $WarningLevel "Level 4 (/W4)" + $Detect64bitPortabilityIssues "Yes (/Wp64)" + $TreatWarningsAsErrors "No" + $UseUNICODEResponseFiles "No" + + // Optimization + $Optimization "Disabled (/Od)" + $InlineFunctionExpansion + $EnableIntrinsicFunctions + $FavorSizeOrSpeed + $OmitFramePointers + $EnableFiberSafeOptimizations + $WholeProgramOptimization + + // Preprocessor + $PreprocessorDefinitions "_HAS_ITERATOR_DEBUGGING=0;WIN32;_WIN32;_DEBUG;DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE" + $PreprocessorDefinitions "$BASE;RAD_TELEMETRY_DISABLED" [$SOURCESDK] + $IgnoreStandardIncludePath + $GeneratePreprocessedFile + $KeepComments + + // Code Generation + $EnableStringPooling "Yes (/GF)" + // EnableMinimalRebuild is incompatible with /MP (multi-processor builds) + // and it also makes it hard to iterate on warnings because the compiler + // detects that there is no reason to recompile when you request it. + // It should always be off? It should definitely be off for /analyze builds. + //$EnableMinimalRebuild "Yes (/Gm)" [!$ANALYZE] + $EnableC++Exceptions "No" + $SmallerTypeCheck + $BasicRuntimeChecks "Default" + $RuntimeLibrary "Multi-threaded Debug (/MTd)" + $StructMemberAlignment + $BufferSecurityCheck "Yes" + $EnableFunctionLevelLinking + $EnableEnhancedInstructionSet + $EnableEnhancedInstructionSet "Streaming SIMD Extensions (/arch:SSE)" [$WIN32] + $FloatingPointModel "Fast (/fp:fast)" + $EnableFloatingPointExceptions + + // Language + $DisableLanguageExtensions + $DefaultCharUnsigned "No" + $TreatWCHAR_TAsBuiltInType "Yes (/Zc:wchar_t)" + $ForceConformanceInForLoopScope "Yes (/Zc:forScope)" + $EnableRunTimeTypeInfo "Yes (/GR)" + $OpenMPSupport "No" + + // Precompiled Headers + $Create/UsePrecompiledHeader "Not Using Precompiled Headers" + $Create/UsePCHThroughFile + $PrecompiledHeaderFile + + // Output Files + $ExpandAttributedSource "No" + $AssemblerOutput "No Listing" + $ASMListLocation "$(IntDir)/" + $ObjectFileName "$(IntDir)/" + $ProgramDatabaseFileName "$(IntDir)/" + $GenerateXMLDocumentationFiles + $XMLDocumentationFileName + + // Browse Information + $EnableBrowseInformation "None" + $BrowseFile "$(IntDir)/" + + // Advanced + $CallingConvention + $CompileAs "Compile as C++ Code (/TP)" + $DisableSpecificWarnings + $ForceIncludes + $Force#Using + $ShowIncludes + $UndefinePreprocessorDefinitions + $UndefineAllPreprocessorDefinitions + $UseFullPaths + $OmitDefaultLibraryNames + $ErrorReporting "Prompt Immediately (/errorReport:prompt)" + + // Command Line + $AdditionalOptions "$BASE /MP" + } + + $Linker + { + // General + $OutputFile "$(OutDir)/$OUTBINNAME.exe" + $ShowProgress "Not Set" + $Version + $EnableIncrementalLinking "Yes (/INCREMENTAL)" + $SuppressStartupBanner "Yes (/NOLOGO)" + $IgnoreImportLibrary + $RegisterOutput + $AdditionalLibraryDirectories + $LinkLibraryDependencies + $UseLibraryDependencyInputs + $UseUNICODEResponseFiles "No" + + // Input + $AdditionalDependencies + $IgnoreAllDefaultLibraries + $IgnoreSpecificLibrary "libc;libcd;libcmt" + $ModuleDefinitionFile + $AddModuleToAssembly + $EmbedManagedResourceFile + $ForceSymbolReferences + $DelayLoadedDLLs + $AssemblyLinkResource + + // Manifest File + $GenerateManifest "No" [!$VS2010] + $GenerateManifest "Yes" [$VS2010] + $ManifestFile + $AdditionalManifestDependencies + $AllowIsolation + + // Debugging + $GenerateDebugInfo "Yes (/DEBUG)" + $GenerateProgramDatabaseFile "$(IntDir)/$(TargetName).pdb" + $StripPrivateSymbols + $GenerateMapFile "No" + $MapFileName "$(IntDir)/$(TargetName).map" + $MapExports + $DebuggableAssembly + + // System + $SubSystem "Windows (/SUBSYSTEM:WINDOWS)" + $HeapReserveSize + $HeapCommitSize + $StackReserveSize + $StackCommitSize + $EnableLargeAddresses + $TerminalServer + $SwapRunFromCD + $SwapRunFromNetwork + $Driver + + // Optimization + $References + $EnableCOMDATFolding + $OptimizeForWindows98 + $FunctionOrder + $ProfileGuidedDatabase + $LinkTimeCodeGeneration + + // Embedded IDL + $MIDLCommands + $IgnoreEmbeddedIDL + $MergeIDLBaseFileName + $TypeLibrary + $TypeLibResourceID + + // Advanced + $EntryPoint + $NoEntryPoint + $SetChecksum + $BaseAddress "$LOADADDRESS_DEVELOPMENT" + $FixedBaseAddress + $TurnOffAssemblyGeneration + $DelayLoadedDLL + $ImportLibrary + $MergeSections + $Profile + $CLRThreadAttribute + $CLRImageType + $KeyFile + $KeyContainer + $DelaySign + $ErrorReporting "Prompt Immediately (/ERRORREPORT:PROMPT)" + $CLRUnmanagedCodeCheck + } + + $Linker [$VS2010] + { + // SAFE_SEH should always be disabled on debug builds. + $ImageHasSafeExceptionHandlers "false" + } + + $ManifestTool + { + // General + $SuppressStartupBanner "Yes (/nologo)" + $VerboseOutput + $AssemblyIdentity + $UseUNICODEResponseFiles + $UseFAT32WorkAround + + // Input And Output + $AdditionalManifestFiles "$SRCDIR\public\windows_default.manifest" [$VS2010 && !$SOURCESDK] + $InputResourceManifests + $EmbedManifest + $OutputManifestFile + $ManifestResourceFile + $GenerateCatalogFiles + $DependencyInformationFile + + // Isolated COM + $TypeLibraryFile + $RegistrarScriptFile + $ComponentFileName + $ReplacementsFile + + // Advanced + $UpdateFileHashes + $UpdateFileHashesSearchPath + + // Command Line + $AdditionalOptions + } + + $XMLDocumentGenerator + { + // General + $SuppressStartupBanner "Yes (/nologo)" + $ValidateIntelliSense + $AdditionalDocumentFiles + $OutputDocumentFile + $DocumentLibraryDependencies + $UseUNICODEResponseFiles + } + + $BrowseInformation + { + $SuppressStartupBanner "Yes (/nologo)" + $OutputFile "$(OutDir)/$OUTBINNAME.bsc" + $AdditionalOptions + } + + $Resources + { + // General + $PreprocessorDefinitions "_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE" + $Culture "English (United States) (0x409)" + $AdditionalIncludeDirectories + $IgnoreStandardIncludePath + $ShowProgress + $ResourceFileName + + // Command Line + $AdditionalOptions + } + + $PreBuildEvent + { + $CommandLine + $Description + $ExcludedFromBuild "No" + } + + $PreLinkEvent + { + $CommandLine + $Description + $ExcludedFromBuild "No" + } + + $PostBuildEvent + { + $CommandLine + $Description + $ExcludedFromBuild "No" + } + + $CustomBuildStep + { + // General + $CommandLine + $Description + $Outputs + $AdditionalDependencies + } +} \ No newline at end of file diff --git a/mp/src/vpc_scripts/source_exe_win_win32_release.vpc b/mp/src/vpc_scripts/source_exe_win_win32_release.vpc new file mode 100644 index 00000000..9948bf15 --- /dev/null +++ b/mp/src/vpc_scripts/source_exe_win_win32_release.vpc @@ -0,0 +1,325 @@ +//----------------------------------------------------------------------------- +// SOURCE_EXE_WIN_WIN32_RELEASE.VPC +// +// Base Settings for Source(TM) Projects +//----------------------------------------------------------------------------- + +$IgnoreRedundancyWarning "ON" + +$MacroRequired "PLATSUBDIR" +$MacroRequired "SRCDIR" +$MacroRequired "OUTBINNAME" +$MacroRequired "OUTBINDIR" + +$Configuration "Release" +{ + $General + { + // General + $OutputDirectory ".\Release$PLATSUBDIR" + $IntermediateDirectory ".\Release$PLATSUBDIR" + $ExtensionsToDeleteOnClean + $BuildLogFile + $InheritedProjectPropertySheets + + // Project Defaults + $ConfigurationType "Application (.exe)" + $UseOfMFC + $UseOfATL + $MinimizeCRTUseInATL + $CharacterSet "Use Multi-Byte Character Set" + $CommonLanguageRuntimeSupport + $WholeProgramOptimization + } + + $Debugging + { + // Action + $Command + $CommandArguments + $WorkingDirectory + $Attach + $DebuggerType + $Environment + $MergeEnvironment + $SQLDebugging + } + + $Compiler + { + // General + $AdditionalIncludeDirectories "$SRCDIR\common;$SRCDIR\public;$SRCDIR\public\tier0;$SRCDIR\public\tier1" + $Resolve#UsingReferences + $DebugInformationFormat "Program Database (/Zi)" + $SuppressStartupBanner + $WarningLevel "Level 4 (/W4)" + $Detect64bitPortabilityIssues "Yes (/Wp64)" + $TreatWarningsAsErrors + $UseUnicodeResponseFiles + + // Optimization + $Optimization "Maximize Speed (/O2)" + $InlineFunctionExpansion "Any Suitable (/Ob2)" + $EnableIntrinsicFunctions "Yes (/Oi)" + $FavorSizeOrSpeed "Favor Fast Code (/Ot)" + $OmitFramePointers + $EnableFiberSafeOptimizations + $WholeProgramOptimization + + // Preprocessor + $PreprocessorDefinitions "WIN32;_WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE" + // Enable asserts in release builds if /define:releaseasserts is specified on the VPC command line. + $PreprocessorDefinitions "$BASE;RELEASEASSERTS" [$RELEASEASSERTS] + $PreprocessorDefinitions "$BASE;RAD_TELEMETRY_DISABLED" [$SOURCESDK] + $IgnoreStandardIncludePath + $GeneratePreprocessedFile + $KeepComments + + // Code Generation + $EnableStringPooling "Yes (/GF)" + $EnableMinimalRebuild + $EnableC++Exceptions "No" + $SmallerTypeCheck + $BasicRuntimeChecks + $RuntimeLibrary "Multi-threaded (/MT)" + $StructMemberAlignment + $BufferSecurityCheck "Yes" [$STAGING_ONLY] + $BufferSecurityCheck "No" [!$STAGING_ONLY] + $EnableFunctionLevelLinking "Yes (/Gy)" + $EnableEnhancedInstructionSet + $EnableEnhancedInstructionSet "Streaming SIMD Extensions (/arch:SSE)" [$WIN32] + $FloatingPointModel "Fast (/fp:fast)" + $EnableFloatingPointExceptions + + // Language + $DisableLanguageExtensions + $DefaultCharUnsigned "No" + $TreatWCHAR_TAsBuiltInType "Yes (/Zc:wchar_t)" + $ForceConformanceInForLoopScope "Yes (/Zc:forScope)" + $EnableRunTimeTypeInfo "Yes (/GR)" + $OpenMPSupport "No" + + // Precompiled Headers + $Create/UsePrecompiledHeader "Not Using Precompiled Headers" + $Create/UsePCHThroughFile + $PrecompiledHeaderFile + + // Output Files + $ExpandAttributedSource "No" + $AssemblerOutput "No Listing" + $ASMListLocation "$(IntDir)/" + $ObjectFileName "$(IntDir)/" + $ProgramDatabaseFileName "$(IntDir)/" + $GenerateXMLDocumentationFiles + $XMLDocumentationFileName + + // Browse Information + $EnableBrowseInformation "None" + $BrowseFile "$(IntDir)/" + + // Advanced + $CallingConvention + $CompileAs "Compile as C++ Code (/TP)" + $DisableSpecificWarnings + $ForceIncludes + $Force#Using + $ShowIncludes + $UndefinePreprocessorDefinitions + $UndefineAllPreprocessorDefinitions + $UseFullPaths + $OmitDefaultLibraryNames + $ErrorReporting "Prompt Immediately (/errorReport:prompt)" + + // Command Line + $AdditionalOptions "$BASE /MP" + // Enable extra debugging information. + $AdditionalOptions "$BASE /d2Zi+" + } + + $Linker + { + // General + $OutputFile "$(OutDir)/$OUTBINNAME.exe" + $ShowProgress "Not Set" + $Version + $EnableIncrementalLinking "No (/INCREMENTAL:NO)" + $SuppressStartupBanner "Yes (/NOLOGO)" + $IgnoreImportLibrary + $RegisterOutput + $AdditionalLibraryDirectories + $LinkLibraryDependencies + $UseLibraryDependencyInputs + $UseUNICODEResponseFiles "No" + + // Input + $AdditionalDependencies + $IgnoreAllDefaultLibraries + $IgnoreSpecificLibrary "libc;libcd;libcmtd" + $ModuleDefinitionFile + $AddModuleToAssembly + $EmbedManagedResourceFile + $ForceSymbolReferences + $DelayLoadedDLLs + $AssemblyLinkResource + + // Manifest File + $GenerateManifest "No" [!$VS2010] + $GenerateManifest "Yes" [$VS2010] + $ManifestFile + $AdditionalManifestDependencies + $AllowIsolation + + // Debugging + $GenerateDebugInfo "Yes (/DEBUG)" + $GenerateProgramDatabaseFile "$(IntDir)/$(TargetName).pdb" + $StripPrivateSymbols + $GenerateMapFile "No" + $MapFileName "$(IntDir)/$(TargetName).map" + $MapExports + $DebuggableAssembly + + // System + $SubSystem "Windows (/SUBSYSTEM:WINDOWS)" + $HeapReserveSize + $HeapCommitSize + $StackReserveSize + $StackCommitSize + $EnableLargeAddresses + $TerminalServer + $SwapRunFromCD + $SwapRunFromNetwork + $Driver + + // Optimization + $References "Eliminate Unreferenced Data (/OPT:REF)" + $EnableCOMDATFolding "Remove Redundant COMDATs (/OPT:ICF)" + $OptimizeForWindows98 + $FunctionOrder + $ProfileGuidedDatabase + $LinkTimeCodeGeneration + + // Embedded IDL + $MIDLCommands + $IgnoreEmbeddedIDL + $MergeIDLBaseFileName + $TypeLibrary + $TypeLibResourceID + + // Advanced + $EntryPoint + $NoEntryPoint + $SetChecksum + $BaseAddress "$LOADADDRESS_DEVELOPMENT" + $BaseAddress "$LOADADDRESS_RETAIL" [$RETAIL] + $FixedBaseAddress + $TurnOffAssemblyGeneration + $DelayLoadedDLL + $ImportLibrary + $MergeSections + $Profile + $CLRThreadAttribute + $CLRImageType + $KeyFile + $KeyContainer + $DelaySign + $ErrorReporting "Prompt Immediately (/ERRORREPORT:PROMPT)" + $CLRUnmanagedCodeCheck + + // Command Line + $AdditionalOptions "$BASE /DYNAMICBASE" + } + + $ManifestTool + { + // General + $SuppressStartupBanner "Yes (/nologo)" + $VerboseOutput + $AssemblyIdentity + $UseUNICODEResponseFiles + $UseFAT32WorkAround + + // Input And Output + $AdditionalManifestFiles "$SRCDIR\public\windows_default.manifest" [$VS2010 && !$SOURCESDK] + $InputResourceManifests + $EmbedManifest + $OutputManifestFile + $ManifestResourceFile + $GenerateCatalogFiles + $DependencyInformationFile + + // Isolated COM + $TypeLibraryFile + $RegistrarScriptFile + $ComponentFileName + $ReplacementsFile + + // Advanced + $UpdateFileHashes + $UpdateFileHashesSearchPath + + // Command Line + $AdditionalOptions + } + + $XMLDocumentGenerator + { + // General + $SuppressStartupBanner "Yes (/nologo)" + $ValidateIntelliSense + $AdditionalDocumentFiles + $OutputDocumentFile + $DocumentLibraryDependencies + $UseUNICODEResponseFiles + } + + $BrowseInformation + { + $SuppressStartupBanner "Yes (/nologo)" + $OutputFile "$(OutDir)/$OUTBINNAME.bsc" + $AdditionalOptions + } + + $Resources + { + // General + $PreprocessorDefinitions "NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE" + $Culture "English (United States) (0x409)" + $AdditionalIncludeDirectories + $IgnoreStandardIncludePath + $ShowProgress + $ResourceFileName + + // Command Line + $AdditionalOptions + } + + $PreBuildEvent + { + $CommandLine + $Description + $ExcludedFromBuild "No" + } + + $PreLinkEvent + { + $CommandLine + $Description + $ExcludedFromBuild "No" + } + + $PostBuildEvent + { + $CommandLine + $Description + $ExcludedFromBuild "No" + } + + $CustomBuildStep + { + // General + $CommandLine + $Description + $Outputs + $AdditionalDependencies + } +} diff --git a/mp/src/vpc_scripts/source_lib_base.vpc b/mp/src/vpc_scripts/source_lib_base.vpc new file mode 100644 index 00000000..eeeb2ba1 --- /dev/null +++ b/mp/src/vpc_scripts/source_lib_base.vpc @@ -0,0 +1,20 @@ +//----------------------------------------------------------------------------- +// source_lib_base.VPC +// +// Project Script +//----------------------------------------------------------------------------- + +$include "$SRCDIR\vpc_scripts\source_base.vpc" + +$Macro PLATSUBDIR "\linux32" [$LINUX32] +$Macro OUTBINDIR "$OUTBINDIR" [$LINUX32] +$Macro LIBPUBLIC "$SRCDIR\lib\public$PLATSUBDIR" [$LINUX32] +$Macro LIBCOMMON "$SRCDIR\lib\common$PLATSUBDIR" [$LINUX32] + +$MacroRequired "OUTLIBDIR" "$SRCDIR\lib\public\$PLATFORM" [$LINUX] +$MacroRequired "OUTLIBCOMMONDIR" "$SRCDIR\lib\common\$PLATFORM" [$LINUX] +$include "$SRCDIR\vpc_scripts\source_lib_linux_base.vpc" [$LINUX] +$include "$SRCDIR\vpc_scripts\source_lib_win32_base.vpc" [$WINDOWS] +$include "$SRCDIR\vpc_scripts\source_lib_posix_base.vpc" [$POSIX && !$LINUX] +$include "$SRCDIR\vpc_scripts\source_lib_x360_base.vpc" [$X360] +$Include "$SRCDIR\vpc_scripts\source_video_base.vpc" diff --git a/mp/src/vpc_scripts/source_lib_linux_base.vpc b/mp/src/vpc_scripts/source_lib_linux_base.vpc new file mode 100644 index 00000000..b078f000 --- /dev/null +++ b/mp/src/vpc_scripts/source_lib_linux_base.vpc @@ -0,0 +1,31 @@ +$Macro IS_LIB_PROJECT "1" +$Include "$SRCDIR\vpc_scripts\source_linux_base_project.vpc" +$MacroRequired "OUTLIBNAME" "$PROJECTNAME" + +$Configuration +{ + $Compiler + { + $PreprocessorDefinitions "$BASE;LIBNAME=$OUTLIBNAME" + $PreprocessorDefinitions "$BASE;RAD_TELEMETRY_DISABLED" [$SOURCESDK] + } + + $General + { + $ConfigurationType "Static Library (.lib)" + } + + $Linker + { + $OutputFile "$OUTLIBDIR/$OUTLIBNAME$_STATICLIB_EXT" + } +} + +$Project +{ + $Folder "Source Files" + { + $File "$SRCDIR\common\debug_lib_check.cpp" [!$SOURCESDK] + } +} + diff --git a/mp/src/vpc_scripts/source_lib_posix_base.vpc b/mp/src/vpc_scripts/source_lib_posix_base.vpc new file mode 100644 index 00000000..5a5e4747 --- /dev/null +++ b/mp/src/vpc_scripts/source_lib_posix_base.vpc @@ -0,0 +1,18 @@ + +$Include "$SRCDIR\vpc_scripts\source_posix_base.vpc" +$include "$SRCDIR\tier0\tier0_exclude.vpc" [$POSIX] +$MacroRequired "OUTLIBNAME" "$PROJECTNAME" + +$Configuration +{ + $General + { + $ConfigurationType "Static Library (.lib)" + $GameOutputFile "$SRCDIR/lib/$PLATFORM/$OUTLIBNAME$_STATICLIB_EXT" + } + + $Linker + { + $OutputFile "$SRCDIR/lib/$PLATFORM/$OUTLIBNAME$_STATICLIB_EXT" + } +} diff --git a/mp/src/vpc_scripts/source_lib_win32_base.vpc b/mp/src/vpc_scripts/source_lib_win32_base.vpc new file mode 100644 index 00000000..e2f6766e --- /dev/null +++ b/mp/src/vpc_scripts/source_lib_win32_base.vpc @@ -0,0 +1,93 @@ +//----------------------------------------------------------------------------- +// SOURCE_LIB_WIN32_BASE.VPC +// +// Base Settings for all Source(TM) Projects +//----------------------------------------------------------------------------- + +$Include "$SRCDIR\vpc_scripts\version.vpc" + +$Macro NOAPPENDPLATSUBDIR "1" [!$WIN64] + +$MacroRequired "PLATSUBDIR" +$MacroRequired "SRCDIR" +$MacroRequired "OUTLIBNAME" "$PROJECTNAME" +$MacroRequired "OUTLIBDIR" + +// Fix up directories for targets like win64 +$Macro OUTLIBDIR "$OUTLIBDIR$PLATSUBDIR" [!$NOAPPENDPLATSUBDIR] + +$Include "$SRCDIR\vpc_scripts\source_lib_win32_debug.vpc" +$Include "$SRCDIR\vpc_scripts\source_lib_win32_release.vpc" +$Include "$SRCDIR\vpc_scripts\source_win32_base.vpc" + +$IgnoreRedundancyWarning "ON" + +// Common Configuration +$Configuration +{ + $General [$VS2010] + { + $TargetName "$OUTLIBNAME" + } + + $General + { + $OutputDirectory "$OUTLIBDIR" + } + + $Compiler + { + $PreprocessorDefinitions "$BASE;LIBNAME=$OUTLIBNAME" + $PreprocessorDefinitions "$BASE;RAD_TELEMETRY_DISABLED" [$SOURCESDK] + } + + $PreBuildEvent + { + $CommandLine "if EXIST $OUTLIBDIR\$(TargetName).lib ( for /f $QUOTEdelims=$QUOTE %%A in ('attrib $QUOTE$OUTLIBDIR\$(TargetName).lib$QUOTE') do set valveTmpIsReadOnly=$QUOTE%%A$QUOTE" "\n" \ + ") else ( mkdir $OUTLIBDIR )" "\n" \ + "set valveTmpIsReadOnlyLetter=%valveTmpIsReadOnly:~6,1%" "\n" \ + "if $QUOTE%valveTmpIsReadOnlyLetter%$QUOTE==$QUOTER$QUOTE (" "\n" \ + " attrib -r $OUTLIBDIR\$(TargetName).lib" "\n" \ + " $SRCDIR\devtools\bin\gnu\touch.exe -d $QUOTE1999-01-01$QUOTE $OUTLIBDIR\$(TargetName).lib" "\n" \ + " attrib +r $OUTLIBDIR\$(TargetName).lib" "\n" \ + ")" "\n" \ + "$CRCCHECK" "\n" [!$SOURCESDK] + } + + $PreLinkEvent + { + $CommandLine "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTLIBDIR\$(TargetName).lib $SRCDIR" [!$SOURCESDK ] + } + + $Librarian + { + // Suppress this warning using the undocumented /ignore linker switch + // schemalib.lib(schemaclassinfo.obj) : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library + $AdditionalOptions "$BASE /ignore:4221" + + // This option is from the devil. Basically, it causes the link inputs + // to vary depending on what is in the solution. This is anathema + // to the way that we use projects and solutions here at Valve. + // It also exposes a bug in VS2005 causing files to be recompiled/linked + // even if nothing changed. + $LinkLibraryDependencies "false" + } +} + +// Skeleton Project - All derived projects get this as a starting base +$Project +{ + $Folder "Source Files" + { + $File "$SRCDIR\common\debug_lib_check.cpp" [!$SOURCESDK] + { + $Configuration + { + $Compiler + { + $Create/UsePrecompiledHeader "Not Using Precompiled Headers" + } + } + } + } +} diff --git a/mp/src/vpc_scripts/source_lib_win32_debug.vpc b/mp/src/vpc_scripts/source_lib_win32_debug.vpc new file mode 100644 index 00000000..a3eba728 --- /dev/null +++ b/mp/src/vpc_scripts/source_lib_win32_debug.vpc @@ -0,0 +1,202 @@ +//----------------------------------------------------------------------------- +// SOURCE_LIB_WIN32_DEBUG.VPC +// +// Base Settings for all Source(TM) Projects +//----------------------------------------------------------------------------- + +$IgnoreRedundancyWarning "ON" + +$MacroRequired "PLATSUBDIR" +$MacroRequired "SRCDIR" +$MacroRequired "OUTLIBNAME" +$MacroRequired "OUTLIBDIR" + +$Configuration "Debug" +{ + $General + { + // General + $IntermediateDirectory ".\Debug$PLATSUBDIR" + $ExtensionsToDeleteOnClean + $BuildLogFile + $InheritedProjectPropertySheets + + // Project Defaults + $ConfigurationType "Static Library (.lib)" + $UseOfMFC + $UseOfATL + $MinimizeCRTUseInATL + $CharacterSet "Use Multi-Byte Character Set" + $CommonLanguageRuntimeSupport + $WholeProgramOptimization + } + + $Debugging + { + $Command + $CommandArguments + $WorkingDirectory + $Attach + $DebuggerType + $Environment + $MergeEnvironment + $SQLDebugging + } + + $Compiler + { + // General + $AdditionalIncludeDirectories "$SRCDIR\common;$SRCDIR\public;$SRCDIR\public\tier0;$SRCDIR\public\tier1" + $Resolve#UsingReferences + $DebugInformationFormat "Program Database for Edit & Continue (/ZI)" [!$EANDCDISABLED && !$WIN64] + $DebugInformationFormat "Program Database (/Zi)" [$EANDCDISABLED || $WIN64] + $SuppressStartupBanner + $WarningLevel "Level 4 (/W4)" + $Detect64bitPortabilityIssues "Yes (/Wp64)" + $TreatWarningsAsErrors + $UseUNICODEResponseFiles "No" + + // Optimization + $Optimization "Disabled (/Od)" + $InlineFunctionExpansion + $EnableIntrinsicFunctions + $FavorSizeOrSpeed + $OmitFramePointers + $EnableFiberSafeOptimizations + $WholeProgramOptimization + + // Preprocessor + $PreprocessorDefinitions "_HAS_ITERATOR_DEBUGGING=0;WIN32;_WIN32;_DEBUG;DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE" + $IgnoreStandardIncludePath + $GeneratePreprocessedFile + $KeepComments + + // Code Generation + $EnableStringPooling "Yes (/GF)" + // EnableMinimalRebuild is incompatible with /MP (multi-processor builds) + // and it also makes it hard to iterate on warnings because the compiler + // detects that there is no reason to recompile when you request it. + // It should always be off? It should definitely be off for /analyze builds. + //$EnableMinimalRebuild "Yes (/Gm)" [!$ANALYZE] + $EnableC++Exceptions "No" + $SmallerTypeCheck + $BasicRuntimeChecks "Default" + $RuntimeLibrary "Multi-threaded Debug (/MTd)" + $StructMemberAlignment + $BufferSecurityCheck "Yes" + $EnableFunctionLevelLinking + $EnableEnhancedInstructionSet + $EnableEnhancedInstructionSet "Streaming SIMD Extensions (/arch:SSE)" [$WIN32] + $FloatingPointModel "Fast (/fp:fast)" + $EnableFloatingPointExceptions + + // Language + $DisableLanguageExtensions + $DefaultCharUnsigned + $TreatWCHAR_TAsBuiltInType "Yes (/Zc:wchar_t)" + $ForceConformanceInForLoopScope "Yes (/Zc:forScope)" + $EnableRunTimeTypeInfo "Yes (/GR)" + $OpenMPSupport "No" + + // Precompiled Headers + $Create/UsePrecompiledHeader "Not Using Precompiled Headers" + $Create/UsePCHThroughFile + $PrecompiledHeaderFile + + // Output Files + $ExpandAttributedSource "No" + $AssemblerOutput "No Listing" + $ASMListLocation "$(IntDir)/" + $ObjectFileName "$(IntDir)/" + $ProgramDatabaseFileName "$(IntDir)/" + $GenerateXMLDocumentationFiles "No" + $XMLDocumentationFileName + + // Browse Information + $EnableBrowseInformation "None" + $BrowseFile "$(IntDir)/" + + // Advanced + $CallingConvention + $CompileAs "Compile as C++ Code (/TP)" + $DisableSpecificWarnings + $ForceIncludes + $Force#Using + $ShowIncludes + $UndefinePreprocessorDefinitions + $UndefineAllPreprocessorDefinitions + $UseFullPaths + $OmitDefaultLibraryNames + $ErrorReporting "Prompt Immediately (/errorReport:prompt)" + + // Command Line + $AdditionalOptions "$BASE /MP" + } + + $Librarian + { + // General + $OutputFile "$OUTLIBDIR\$OUTLIBNAME.lib" + $AdditionalDependencies + $AdditionalLibraryDirectories + $SuppressStartupBanner "Yes (/NOLOGO)" + $ModuleDefinitionFileName + $IgnoreAllDefaultLibraries + $IgnoreSpecificLibrary + $ExportNamedFunctions + $ForceSymbolReferences + $UseUNICODEResponseFiles "No" + $LinkLibraryDependencies + + // Command Line + $AdditionalOptions + } + + $XMLDocumentGenerator + { + // General + $SuppressStartupBanner "Yes (/nologo)" + $ValidateIntelliSense + $AdditionalDocumentFiles + $OutputDocumentFile + $DocumentLibraryDependencies + $UseUNICODEResponseFiles + } + + $BrowseInformation + { + $SuppressStartupBanner "Yes (/nologo)" + $OutputFile "$(OutDir)/$OUTLIBNAME.bsc" + $AdditionalOptions + } + + $PreBuildEvent + { + $CommandLine + $Description + $ExcludedFromBuild "No" + } + + $PreLinkEvent + { + $CommandLine + $Description + $ExcludedFromBuild "No" + } + + $PostBuildEvent + { + $CommandLine + $Description + $ExcludedFromBuild "No" + } + + $CustomBuildStep + { + // General + $CommandLine + $Description + $Outputs + $AdditionalDependencies + } +} \ No newline at end of file diff --git a/mp/src/vpc_scripts/source_lib_win32_release.vpc b/mp/src/vpc_scripts/source_lib_win32_release.vpc new file mode 100644 index 00000000..8f80eefc --- /dev/null +++ b/mp/src/vpc_scripts/source_lib_win32_release.vpc @@ -0,0 +1,202 @@ +//----------------------------------------------------------------------------- +// SOURCE_LIB_WIN32_RELEASE.VPC +// +// Base Settings for all Source(TM) Projects +//----------------------------------------------------------------------------- + +$IgnoreRedundancyWarning "ON" + +$MacroRequired "PLATSUBDIR" +$MacroRequired "SRCDIR" +$MacroRequired "OUTLIBNAME" +$MacroRequired "OUTLIBDIR" + +$Configuration "Release" +{ + $General + { + // General + $IntermediateDirectory ".\Release$PLATSUBDIR" + $ExtensionsToDeleteOnClean + $BuildLogFile + $InheritedProjectPropertySheets + + // Project Defaults + $ConfigurationType "Static Library (.lib)" + $UseOfMFC + $UseOfATL + $MinimizeCRTUseInATL + $CharacterSet "Use Multi-Byte Character Set" + $CommonLanguageRuntimeSupport + $WholeProgramOptimization + } + + $Debugging + { + $Command + $CommandArguments + $WorkingDirectory + $Attach + $DebuggerType + $Environment + $MergeEnvironment + $SQLDebugging + } + + $Compiler + { + // General + $AdditionalIncludeDirectories "$SRCDIR\common;$SRCDIR\public;$SRCDIR\public\tier0;$SRCDIR\public\tier1" + $Resolve#UsingReferences + $DebugInformationFormat "C7 Compatible (/Z7)" + $SuppressStartupBanner + $WarningLevel "Level 4 (/W4)" + $Detect64bitPortabilityIssues "Yes (/Wp64)" + $TreatWarningsAsErrors + $UseUNICODEResponseFiles "No" + + // Optimization + $Optimization "Maximize Speed (/O2)" + $InlineFunctionExpansion "Any Suitable (/Ob2)" + $EnableIntrinsicFunctions "Yes (/Oi)" + $FavorSizeOrSpeed "Favor Fast Code (/Ot)" + $OmitFramePointers + $EnableFiberSafeOptimizations + $WholeProgramOptimization + + // Preprocessor + $PreprocessorDefinitions "WIN32;_WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE" + // Enable asserts in release builds if /define:releaseasserts is specified on the VPC command line. + $PreprocessorDefinitions "$BASE;RELEASEASSERTS" [$RELEASEASSERTS] + $IgnoreStandardIncludePath + $GeneratePreprocessedFile + $KeepComments + + // Code Generation + $EnableStringPooling "Yes (/GF)" + $EnableMinimalRebuild + $EnableC++Exceptions "No" + $SmallerTypeCheck + $BasicRuntimeChecks + $RuntimeLibrary "Multi-threaded (/MT)" + $StructMemberAlignment + $BufferSecurityCheck "Yes" [$STAGING_ONLY] + $BufferSecurityCheck "No" [!$STAGING_ONLY] + $EnableFunctionLevelLinking "Yes (/Gy)" + $EnableEnhancedInstructionSet + $EnableEnhancedInstructionSet "Streaming SIMD Extensions (/arch:SSE)" [$WIN32] + $FloatingPointModel "Fast (/fp:fast)" + $EnableFloatingPointExceptions + + // Language + $DisableLanguageExtensions + $DefaultCharUnsigned + $TreatWCHAR_TAsBuiltInType "Yes (/Zc:wchar_t)" + $ForceConformanceInForLoopScope "Yes (/Zc:forScope)" + $EnableRunTimeTypeInfo "Yes (/GR)" + $OpenMPSupport "No" + + // Precompiled Headers + $Create/UsePrecompiledHeader "Not Using Precompiled Headers" + $Create/UsePCHThroughFile + $PrecompiledHeaderFile + + // Output Files + $ExpandAttributedSource "No" + $AssemblerOutput "No Listing" + $ASMListLocation "$(IntDir)/" + $ObjectFileName "$(IntDir)/" + $ProgramDatabaseFileName "$(IntDir)/" + $GenerateXMLDocumentationFiles "No" + $XMLDocumentationFileName + + // Browse Information + $EnableBrowseInformation "None" + $BrowseFile "$(IntDir)/" + + // Advanced + $CallingConvention + $CompileAs "Compile as C++ Code (/TP)" + $DisableSpecificWarnings + $ForceIncludes + $Force#Using + $ShowIncludes + $UndefinePreprocessorDefinitions + $UndefineAllPreprocessorDefinitions + $UseFullPaths + $OmitDefaultLibraryNames + $ErrorReporting "Prompt Immediately (/errorReport:prompt)" + + // Command Line + $AdditionalOptions "$BASE /MP" + // Enable extra debugging information. + $AdditionalOptions "$BASE /d2Zi+" + } + + $Librarian + { + // General + $OutputFile "$OUTLIBDIR\$OUTLIBNAME.lib" + $AdditionalDependencies + $AdditionalLibraryDirectories + $SuppressStartupBanner "Yes (/NOLOGO)" + $ModuleDefinitionFileName + $IgnoreAllDefaultLibraries + $IgnoreSpecificLibrary + $ExportNamedFunctions + $ForceSymbolReferences + $UseUNICODEResponseFiles "No" + $LinkLibraryDependencies + + // Command Line + $AdditionalOptions + } + + $XMLDocumentGenerator + { + // General + $SuppressStartupBanner "Yes (/nologo)" + $ValidateIntelliSense + $AdditionalDocumentFiles + $OutputDocumentFile + $DocumentLibraryDependencies + $UseUNICODEResponseFiles + } + + $BrowseInformation + { + $SuppressStartupBanner "Yes (/nologo)" + $OutputFile "$(OutDir)/$OUTLIBNAME.bsc" + $AdditionalOptions + } + + $PreBuildEvent + { + $CommandLine + $Description + $ExcludedFromBuild "No" + } + + $PreLinkEvent + { + $CommandLine + $Description + $ExcludedFromBuild "No" + } + + $PostBuildEvent + { + $CommandLine + $Description + $ExcludedFromBuild "No" + } + + $CustomBuildStep + { + // General + $CommandLine + $Description + $Outputs + $AdditionalDependencies + } +} \ No newline at end of file diff --git a/mp/src/vpc_scripts/source_linux_base_project.vpc b/mp/src/vpc_scripts/source_linux_base_project.vpc new file mode 100644 index 00000000..8dd136ba --- /dev/null +++ b/mp/src/vpc_scripts/source_linux_base_project.vpc @@ -0,0 +1,64 @@ + + +$MacroRequired "SRCDIR" + + +$Configuration "Debug" +{ + $Compiler + { + $PreprocessorDefinitions "DEBUG;_DEBUG" + $OptimizerLevel "-gdwarf-2 -g $(OptimizerLevel_CompilerSpecific)" + } +} + +$Configuration "Release" +{ + $Compiler + { + $PreprocessorDefinitions "NDEBUG" + $PreprocessorDefinitions "$BASE;RELEASEASSERTS" [$RELEASEASSERTS] + $OptimizerLevel "-gdwarf-2 -g $(OptimizerLevel_CompilerSpecific)" + } +} + +$Configuration +{ + $General + { + $ConfigurationType "Application (.exe)" + } + + $Compiler + { + $AdditionalIncludeDirectories "$SRCDIR\common;$SRCDIR\public;$SRCDIR\public\tier0;$SRCDIR\public\tier1" + $AdditionalIncludeDirectories "$BASE;/usr/include/malloc" [$OSX] + $PreprocessorDefinitions "$BASE;POSIX;GNUC" + $PreprocessorDefinitions "$BASE;DEDICATED" [$DEDICATED] + $PreprocessorDefinitions "$BASE;LINUX;_LINUX" [$LINUXALL] + $PreprocessorDefinitions "$BASE;_OSX;OSX;_DARWIN_UNLIMITED_SELECT;FD_SETSIZE=10240;" [$OSX32 || $OSX64] + $PreprocessorDefinitions "$BASE;_DEMO" [$DEMO] + $SymbolVisibility "hidden" [$POSIX] + $GCC_ExtraCompilerFlags "$BASE -U_FORTIFY_SOURCE" [$LINUXALL] + $GCC_ExtraCompilerFlags "$BASE -faddress-sanitizer" [$ADDRESSSANITIZER && $LINUXALL] + + // Pass on appropriate branch define to preprocessor + $PreprocessorDefinitions "$BASE;STAGING_ONLY" [$STAGING_ONLY] + $PreprocessorDefinitions "$BASE;TF_BETA" [$TF_BETA] + } + $Linker + { + $GCC_ExtraLinkerFlags "$BASE -faddress-sanitizer" [$ADDRESSSANITIZER && $LINUXALL] + } +} + +$Project +{ + $Folder "Link Libraries" + { + $ImpLib tier0 [!$IS_LIB_PROJECT] + $Lib tier1 [!$IS_LIB_PROJECT] + $ImpLib vstdlib [!$IS_LIB_PROJECT] + $Lib $SRCDIR/thirdparty/clang+llvm-3.1-x86-linux-ubuntu_12.04/lib/clang/3.1/lib/linux/libclang_rt.asan-i386 [$ADDRESSSANITIZER && $LINUXALL] + } +} diff --git a/mp/src/vpc_scripts/source_posix_base.vpc b/mp/src/vpc_scripts/source_posix_base.vpc new file mode 100644 index 00000000..0db13bcb --- /dev/null +++ b/mp/src/vpc_scripts/source_posix_base.vpc @@ -0,0 +1,72 @@ + + +$Macro PLATSUBDIR "\linux32" [$LINUX32] +//$Macro PLATSUBDIR "\linux64" [$LINUX64] +$Macro PLATSUBDIR "\osx32" [$OSX32] +$Macro PLATSUBDIR "\osx64" [$OSX64] + +$Macro LIBPUBLIC "$SRCDIR\lib\public$PLATSUBDIR" [$LINUX] +$Macro LIBCOMMON "$SRCDIR\lib\common$PLATSUBDIR" [$LINUX] + + + +$MacroRequired "SRCDIR" + + +$Configuration "Debug" +{ + $Compiler + { + $PreprocessorDefinitions "DEBUG;_DEBUG" + $OptimizerLevel "-gdwarf-2 -g $(OptimizerLevel_CompilerSpecific)" + } +} + +$Configuration "Release" +{ + $Compiler + { + $PreprocessorDefinitions "NDEBUG" + $OptimizerLevel "-gdwarf-2 -g $(OptimizerLevel_CompilerSpecific)" + } +} + +$Configuration +{ + $General + { + $ConfigurationType "Application (.exe)" + } + + $Compiler + { + $AdditionalIncludeDirectories "$SRCDIR\common;$SRCDIR\public;$SRCDIR\public\tier0;$SRCDIR\public\tier1" + $PreprocessorDefinitions "$BASE;GNUC;POSIX" + $PreprocessorDefinitions "$BASE;DEDICATED" [$DEDICATED] + // the 10240 in the following line is the output of `sysctl -n kern.maxfilesperproc` + $PreprocessorDefinitions "$BASE;_OSX;OSX;_DARWIN_UNLIMITED_SELECT;FD_SETSIZE=10240;" [$OSX32 || $OSX64] + $PreprocessorDefinitions "$BASE;_LINUX;LINUX;" [$LINUX] + $PreprocessorDefinitions "$BASE;_CYGWIN;CYGWIN;" [$CYGWIN] + + // Pass on appropriate branch define to preprocessor + $PreprocessorDefinitions "$BASE;STAGING_ONLY" [$STAGING_ONLY] + $PreprocessorDefinitions "$BASE;TF_BETA" [$TF_BETA] + + $Create/UsePCHThroughFile "stdafx.h" + } +} + +$Project +{ + + $Folder "Link Libraries" + { + $ImpLib tier0 [$LINUXALL] + $Lib tier1 [$LINUXALL] + $ImpLib vstdlib [$LINUXALL] + $DynamicFile "$SRCDIR\lib\$PLATFORM\$_IMPLIB_PREFIXtier0$_IMPLIB_EXT" [!$LINUXALL] + $DynamicFile "$SRCDIR\lib\$PLATFORM\$_IMPLIB_PREFIXvstdlib$_IMPLIB_EXT" [!$LINUXALL] + $DynamicFile "$SRCDIR\lib\$PLATFORM\tier1$_STATICLIB_EXT" [!$LINUXALL] + } +} + diff --git a/mp/src/vpc_scripts/source_video_base.vpc b/mp/src/vpc_scripts/source_video_base.vpc new file mode 100644 index 00000000..b1baa408 --- /dev/null +++ b/mp/src/vpc_scripts/source_video_base.vpc @@ -0,0 +1,61 @@ +//----------------------------------------------------------------------------- +// AVI_BASE.VPC +// +// Controls selection (and compilation) of various video subsystems +// +// Defines to add or remove to the preprocessor definitions: +// +// AVI_VIDEO - controls availability of IAvi interface, playing of AVI Video files in Engine +// BINK_VIDEO - controls availability of IBik interface +// QUICKTIME_VIDEO - controls availability of IQuickTime interface +// WMV_VIDEO - controls availability of playing WMV MPEG video files in Engine +// +// FORCE_QUICKTIME - causes engine to force change ".bik" ".wmv" ".avi" extensions to ".mov" and +// look for Quicktime playback *IF* the same file exists in .mov form +// +//----------------------------------------------------------------------------- + + +// We use Quicktime exclusively (and usually only quicktime) on the Mac +// +// We have two configurations for Win32. +// +// if the QUICKTIME_WIN32 Macro is enabled, QuickTime operation is enabled, along with Bink, AVI, and WMV video +// if the QUICKTIME_WIN32 Macro is not enabled, we only build for Bink, AVI and WMV +// +// On the Mac OSX we enable Quicktime only, and set the FORCE_QUICKTIME define, which causes requests to play +// other media file types to look for a quicktime compatible version of the media file first +// + +//$Macro QUICKTIME_WIN32 1 [$WIN32 && !$X360] + +$Macro GL "1" [!$DEDICATED && !$WIN32 && !$WIN64] +// If we're using OpenGL, we're implicitly using SDL. +$Macro SDL "1" [$GL && !$OSXALL && !$DEDICATED] + +$Configuration +{ + $Compiler + { + // OSX Builds + $PreprocessorDefinitions "$BASE;QUICKTIME_VIDEO;FORCE_QUICKTIME" [$OSXALL] + + // Windows PC, without Quicktime, and with Quicktime + $PreprocessorDefinitions "$BASE;BINK_VIDEO;AVI_VIDEO;WMV_VIDEO" [$WIN32 && !$X360 && !$QUICKTIME_WIN32] + $PreprocessorDefinitions "$BASE;AVI_VIDEO;WMV_VIDEO;QUICKTIME_VIDEO" [$WIN32 && !$X360 && $QUICKTIME_WIN32] + + // Xbox 360 builds + $PreprocessorDefinitions "$BASE;BINK_VIDEO;AVI_VIDEO;WMV_VIDEO" [$X360] + + // Linux + $PreprocessorDefinitions "$BASE;BINK_VIDEO" [$LINUXALL] + + // OpenGL + $PreprocessorDefinitions "$BASE;GL_GLEXT_PROTOTYPES;DX_TO_GL_ABSTRACTION" [$GL] + + // SDL + $PreprocessorDefinitions "$BASE;USE_SDL" [$SDL] + $AdditionalIncludeDirectories "$BASE;$SRCDIR\thirdparty\SDL2" [$SDL || $DEDICATED] + } +} + diff --git a/mp/src/vpc_scripts/source_win32_base.vpc b/mp/src/vpc_scripts/source_win32_base.vpc new file mode 100644 index 00000000..8be3bcf6 --- /dev/null +++ b/mp/src/vpc_scripts/source_win32_base.vpc @@ -0,0 +1,71 @@ +$Configuration +{ + $General [$VS2012] + { + // Request the VS 11 (VS 2012) compiler toolset. + $PlatformToolset "v110" + } + + $General [$VS2010 || $VS2012] + { + $ExecutableDirectories "$(ExecutablePath);$(Path)" + // We need to override mt.exe for Win7 compatibiity. Append paths before $(ExecutablePath) if you need VS to use your tools rather than its own + $ExecutableDirectories "$SRCDIR\devtools\vstools;$BASE" + // VS 2012 compiles fine but does not link. We want to redirect to stub versions of + // the tools (like link.exe and mt.exe) so that the link stage will be NOPed when + // doing /analyze builds. + $ExecutableDirectories "$SRCDIR\devtools\vs_nop_tools;$BASE" [$ANALYZE && $VS2012] + } + + $Compiler + { + // When using /analyze (triggered with /define:ANALYZE on the vpc command line) we want + // to use /MP but not at its most aggressive setting, and we want to forcibly disable lots + // of warnings (also disabled in platform.h but not everybody includes that). + // See platform.h for the list of warnings with explanations. + // warning C6318: Ill-defined __try/__except: use of the constant EXCEPTION_CONTINUE_SEARCH -- bogus + // warning C6322: Empty _except block + // Set the stack size threshold to 100,000 to avoid noisy warnings on functions with modest stack usage + $AdditionalOptions "/MP3 /analyze /analyze:stacksize100000 /wd6308 /wd6255 /wd6387 /wd6309 /wd6011 /wd6211 /wd6031 /wd6326 /wd6239 " \ + "/wd6285 /wd6237 /wd6235 /wd6240 /wd6323 /wd6326 /wd6335 /wd6320 /wd6250 /wd6384 /wd6318 /wd6322" [$ANALYZE] + + // Specify /define:ALLOWSHADOWING to suppress variable shadowing warnings + $AdditionalOptions "$BASE /wd6244 /wd6246" [$ANALYZE && $ALLOWSHADOWING] + + // New warnings in VS 2012 that we want to ignore. + // warning C4005: 'DXGI_STATUS_OCCLUDED' : macro redefinition + // warning C6014: Leaking memory 'pThinkParams'. + // warning C28159: Consider using 'GetTickCount64' instead of 'GetTickCount'. Reason: GetTickCount overflows roughly every 49 days. + // warning C28182: Dereferencing NULL pointer. 'pPropMesh' contains the same NULL value as '(CMesh *)=(pPropMesh)' did. + // warning C28183: 'entropy->ac_count_ptrs[actbl]' could be '0', and is a copy of the value found in 'entropy->dc_count_ptrs[dctbl]': this does not adhere to the specification for the function 'memset'. + // warning C28197: Possibly leaking memory 'pInfo'. + // warning C28198: Possibly leaking memory 'kvFrame1' due to an exception. Is a local catch block needed to clean up memory? + // warning C28204: 'QueryInterface' : Only one of this overload and the one at c:\program files (x86)\windows kits\8.0\include\um\unknwnbase.h(114) are annotated for _Param_(2): both or neither must be annotated. + // warning C28247: Model file annotation for function '_vsnprintf': annotation on _Param_(1)/SAL_post, 'RequiresZeroTermination' duplicates header file annotation 'SAL_nullTerminated'. Remove the duplicated annotations from the model file. (Header: c:\program files (x86)\microsoft visual studio 11.0\vc\include\stdio.h(349).) + // warning C28251: Inconsistent annotation for 'WinMain': this instance has no annotations. See c:\program files (x86)\windows kits\8.0\include\um\winbase.h(2286). + // warning C28301: No annotations for first declaration of 'InitializeCriticalSection'. See d:\clients\tf3\staging\src\public\tier0\threadtools.h(1373). + // warning C28195: The function was declared as acquiring memory in 'return' and exited without doing so. + // warning C6340: Mismatch on sign: 'unsigned short' passed as parameter '6' when some signed type is required in call to 'V_snprintf'. + // warning C6330: 'const char' passed as parameter '1' when 'unsigned char' is required in call to 'isspace'. + $AdditionalOptions "$BASE /wd6014 /wd28159 /wd28182 /wd28183 /wd28197 /wd28198 /wd28204 /wd28247 /wd28251 /wd28301 /wd28195 /wd6340 /wd6330" [$ANALYZE && $VS2012] + + // Having lots of warnings makes it harder to notice new, and possibly + // important warnings, both on buildbot and in the output window. Lots + // of warnings also makes it harder to skip through errors in the output + // window since F8 stops on both warnings and errors. The only way to + // keep the warning count down is to have warnings-as-errors. + // We will not be warning free on 64-bit for a while... + $TreatWarningsAsErrors "Yes (/WX)" [!$ANALYZE && !$WIN64] + + $PreprocessorDefinitions "$BASE;WIN64;_WIN64;COMPILER_MSVC64" [$WIN64] + $PreprocessorDefinitions "$BASE;COMPILER_MSVC32" [$WIN32] + + // The VS 2012 compiler keeps hitting internal compiler errors during /analyze. In order to get these + // fixed we need to report them. + $AdditionalOptions "$BASE /errorReport:send" [$ANALYZE] + + // Pass on appropriate branch define to preprocessor + $PreprocessorDefinitions "$BASE;STAGING_ONLY" [$STAGING_ONLY] + $PreprocessorDefinitions "$BASE;TF_BETA" [$TF_BETA] + } +} diff --git a/mp/src/vpc_scripts/version.vpc b/mp/src/vpc_scripts/version.vpc new file mode 100644 index 00000000..dbefdb83 --- /dev/null +++ b/mp/src/vpc_scripts/version.vpc @@ -0,0 +1,12 @@ +//----------------------------------------------------------------------------- +// VERSION.VPC +// +// Version tag for VPC scripts. All base scripts include this file first. +//----------------------------------------------------------------------------- + +// This version tag serves as a critical safeguard to ensure all vcproj's can +// be forced to rebuild. Changing the version or anything about this +// file will cause the CRC checking to fail, and thus cause a rebuild. + +// DO NOT CHANGE THIS UNLESS YOU !!!REALLY!!! NEED TO FORCE EVERY SINGLE VCPROJ TO REGENERATE +$Macro "InternalVersion" "101" \ No newline at end of file -- cgit v1.2.3