General:
* Fixed a variety of server browser issues with mods based on this SDK * Fixed many warnings on various platforms * Added source code for fgdlib and raytrace * Updated many source files with the latest shared source from TF2. OSX: * Added support for Xcode 4.6 * Switched OSX builds to use Xcode instead of makefiles * Moved libs from src/lib/osx32 to src/lib/public/osx32 or src/lib/common/osx32 to match windows better. Linux: * Moved libs from src/lib/linux32 to src/lib/public/linux32 or src/lib/common/linux32 to match windows better.
This commit is contained in:
@@ -6,26 +6,13 @@
|
||||
|
||||
$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]
|
||||
|
||||
$Macro OUTBINDIR "$OUTBINDIR$PLATSUBDIR"
|
||||
$Macro LIBPUBLIC "$SRCDIR\lib\public$PLATSUBDIR"
|
||||
$Macro LIBCOMMON "$SRCDIR\lib\common$PLATSUBDIR"
|
||||
|
||||
$Include "$SRCDIR\vpc_scripts\loadaddress.vpc"
|
||||
$Include "$SRCDIR\vpc_scripts\source_dll_win32_debug.vpc"
|
||||
@@ -34,75 +21,71 @@ $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]
|
||||
$General [$VS2010]
|
||||
{
|
||||
$TargetName "$OUTBINNAME"
|
||||
$TargetName "$OUTBINNAME"
|
||||
}
|
||||
|
||||
$Compiler
|
||||
{
|
||||
$PreprocessorDefinitions "$BASE;PLATFORM_64BITS;WIN64;_WIN64;COMPILER_MSVC64" [$WIN64]
|
||||
$PreprocessorDefinitions "$BASE;COMPILER_MSVC32" [$WIN32]
|
||||
$PreprocessorDefinitions "$BASE;COMPILER_MSVC;_DLL_EXT=$_DLL_EXT"
|
||||
$PreprocessorDefinitions "$BASE;DLLNAME=$OUTBINNAME"
|
||||
}
|
||||
|
||||
$Compiler [$WIN32]
|
||||
{
|
||||
$EnableEnhancedInstructionSet "Streaming SIMD Extensions 2 (/arch:SSE2)"
|
||||
}
|
||||
|
||||
$Linker
|
||||
{
|
||||
$AdditionalDependencies "$BASE shell32.lib user32.lib advapi32.lib gdi32.lib comdlg32.lib ole32.lib" [$WIN32||$WIN64]
|
||||
$TargetMachine "MachineX86 (/MACHINE:X86)" [$WIN32]
|
||||
$TargetMachine "MachineX64 (/MACHINE:X64)" [$WIN64]
|
||||
// Suppress this pointless 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"
|
||||
}
|
||||
|
||||
$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]
|
||||
"$CRCCHECK" "\n"
|
||||
}
|
||||
|
||||
$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" \
|
||||
$CommandLine "$BASE" "copy $QUOTE$(TargetDir)$(TargetFileName)$QUOTE $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 exist $QUOTE$(TargetDir)$(TargetName).map$QUOTE copy $QUOTE$(TargetDir)$(TargetName).map$QUOTE $OUTBINDIR\$(TargetName).map" "\n"
|
||||
$CommandLine "$BASE" "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $QUOTE$OUTBINDIR\$(TargetName).pdb$QUOTE $SRCDIR" "\n" [!$SOURCESDK]
|
||||
$CommandLine "$BASE" "copy $QUOTE$(TargetDir)$(TargetName).pdb$QUOTE $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" \
|
||||
"del /q $QUOTE$(TargetDir)$(TargetFileName)$QUOTE" "\n" \
|
||||
"exit 1" "\n" \
|
||||
":BuildEventOK" "\n"
|
||||
":BuildEventOK" "\n"
|
||||
|
||||
$CommandLine "$BASE" "\n" \
|
||||
"call $SRCDIR\devtools\bin\vsign.bat -sign $OUTBINDIR\$(TargetFileName)" "\n" [$RETAIL && !$SOURCESDK]
|
||||
"call $SRCDIR\devtools\bin\vsign.bat -sign $OUTBINDIR\$(TargetFileName)" "\n" [$RETAIL && $PUBLISH]
|
||||
|
||||
$CommandLine "$BASE" "\n" \
|
||||
"call $SRCDIR\devtools\bin\vsign.bat -signvalve $OUTBINDIR\$(TargetFileName)" "\n" [!$RETAIL && !$SOURCESDK]
|
||||
"call $SRCDIR\devtools\bin\vsign.bat -signvalve $OUTBINDIR\$(TargetFileName)" "\n" [!$RETAIL && !$PUBLISH && !$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
|
||||
@@ -120,23 +103,6 @@ $Project
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 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 /safeseh /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
|
||||
@@ -146,18 +112,14 @@ $Project
|
||||
$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]
|
||||
$Implib "$LIBPUBLIC\tier0"
|
||||
$Lib "$LIBPUBLIC\tier1"
|
||||
$Implib "$LIBPUBLIC\vstdlib"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user