aboutsummaryrefslogtreecommitdiff
path: root/mp/src/vpc_scripts/source_exe_win_win32_base.vpc
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-07-04 11:20:31 -0700
committerJoe Ludwig <[email protected]>2013-07-04 11:20:31 -0700
commit77b376f8a0d8d172c51729762f80bb394534aa41 (patch)
tree79897a015745704f7202eaa6648c18f2e5312df4 /mp/src/vpc_scripts/source_exe_win_win32_base.vpc
parentAdding a CONTRIBUTING file so the rights that GitHub users grant to Valve wit... (diff)
downloadsource-sdk-2013-77b376f8a0d8d172c51729762f80bb394534aa41.tar.xz
source-sdk-2013-77b376f8a0d8d172c51729762f80bb394534aa41.zip
* 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.
Diffstat (limited to 'mp/src/vpc_scripts/source_exe_win_win32_base.vpc')
-rw-r--r--mp/src/vpc_scripts/source_exe_win_win32_base.vpc138
1 files changed, 138 insertions, 0 deletions
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]
+ }
+}
+