Skip to content

Commit

Permalink
Updated the SDK with the latest code from the TF and HL2 branches.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesartain committed Oct 2, 2014
1 parent 56accfd commit 55ed12f
Show file tree
Hide file tree
Showing 767 changed files with 119,599 additions and 122,161 deletions.
11 changes: 0 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,15 @@ ipch
*.opensdf
*.idb
*.vcxproj
*.vcxproj.filters

This comment has been minimized.

Copy link
@flashro4u

flashro4u Nov 27, 2014

I got an error

*.sln
[Dd]ebug*/
[Rr]elease*/

# OSX/Linux build products
*.DS_Store
*.mak
*.mak.vpc_crc
*.xcodeproj/
obj*/
!devtools/*.mak
!utils/smdlexp/smdlexp.mak
*_osx32*

# Specific Source build products
client.pdb
Expand All @@ -53,12 +48,6 @@ client.dylib.dSYM/
server.dylib
server.dylib.dSYM/

*.vpc.sentinel
*.vpc_crc
**/generated_proto/**
**/src/utils/sapi51/**
**/game/**/bin/**

# files generated by running a mod
config.cfg

Expand Down
13 changes: 5 additions & 8 deletions mp/src/common/userid.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@
#pragma once
#endif

#include "strtools.h"
#include "steam/steamclientpublic.h"
#if !defined( INCLUDED_STEAM_STEAMUSERIDTYPES_H )
#include "SteamCommon.h"
#define INCLUDED_STEAM2_USERID_STRUCTS
#include "SteamCommon.h"
#endif

#define IDTYPE_WON 0
Expand All @@ -23,13 +26,7 @@
typedef struct USERID_s
{
int idtype;

union
{
TSteamGlobalUserID steamid;
} uid;

// unsigned int clientip;
CSteamID steamid;
} USERID_t;

#endif // USERID_H
2 changes: 0 additions & 2 deletions mp/src/createallprojects.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
pushd %~dp0
devtools\bin\vpc.exe /hl2mp +everything /mksln everything.sln
popd
2 changes: 0 additions & 2 deletions mp/src/creategameprojects.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
pushd %~dp0
devtools\bin\vpc.exe /hl2mp +game /mksln games.sln
popd
Binary file modified mp/src/devtools/bin/linux/ccache
Binary file not shown.
Binary file modified mp/src/devtools/bin/vpc.exe
Binary file not shown.
Binary file modified mp/src/devtools/bin/vpc_linux
Binary file not shown.
Binary file modified mp/src/devtools/bin/vpc_osx
Binary file not shown.
135 changes: 42 additions & 93 deletions mp/src/devtools/makefile_base_posix.mak
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,22 @@ HOSTNAME := $(shell hostname)
# To build with clang, set the following in your environment:
# CC = clang
# CXX = clang++
ifneq (,$(findstring clang,$(CXX)))
CLANG_BUILD = 1
endif

ifeq ($(CFG), release)
# With gcc 4.6.3, engine.so went from 7,383,765 to 8,429,109 when building with -O3.
# There also was no speed difference running at 1280x1024. May 2012, mikesart.
# tonyp: The size increase was likely caused by -finline-functions and -fipa-cp-clone getting switched on with -O3.
# -fno-omit-frame-pointer: need this for stack traces with perf.
OptimizerLevel_CompilerSpecific = -O2 -fno-strict-aliasing -ffast-math -fno-omit-frame-pointer -ftree-vectorize -fpredictive-commoning -funswitch-loops
OptimizerLevel_CompilerSpecific = -O2 -fno-strict-aliasing -ffast-math -fno-omit-frame-pointer -ftree-vectorize
ifeq ($(CLANG_BUILD),1)
# These aren't supported wit Clang 3.5. Need to remove when we update that.
OptimizerLevel_CompilerSpecific += -fpredictive-commoning -funswitch-loops
else
OptimizerLevel_CompilerSpecific += -fpredictive-commoning -funswitch-loops
endif
else
OptimizerLevel_CompilerSpecific = -O0
#-O1 -finline-functions
Expand All @@ -41,14 +50,14 @@ CPPFLAGS = $(DEFINES) $(addprefix -I, $(abspath $(INCLUDEDIRS) ))
CFLAGS = $(ARCH_FLAGS) $(CPPFLAGS) $(WARN_FLAGS) -fvisibility=$(SymbolVisibility) $(OptimizerLevel) -pipe $(GCC_ExtraCompilerFlags) -Usprintf -Ustrncpy -UPROTECTED_THINGS_ENABLE
# In -std=gnu++0x mode we get lots of errors about "error: narrowing conversion". -fpermissive
# turns these into warnings in gcc, and -Wno-c++11-narrowing suppresses them entirely in clang 3.1+.
ifeq ($(CXX),clang++)
ifeq ($(CLANG_BUILD),1)
CXXFLAGS = $(CFLAGS) -std=gnu++0x -Wno-c++11-narrowing -Wno-dangling-else
else
CXXFLAGS = $(CFLAGS) -std=gnu++0x -fpermissive
endif
DEFINES += -DVPROF_LEVEL=1 -DGNUC -DNO_HOOK_MALLOC -DNO_MALLOC_OVERRIDE
LDFLAGS = $(CFLAGS) $(GCC_ExtraLinkerFlags) $(OptimizerLevel)
GENDEP_CXXFLAGS = -MD -MP -MF $(@:.o=.P)
GENDEP_CXXFLAGS = -MMD -MP -MF $(@:.o=.P)
MAP_FLAGS =
Srv_GAMEOUTPUTFILE =
COPY_DLL_TO_SRV = 0
Expand All @@ -57,11 +66,30 @@ COPY_DLL_TO_SRV = 0
ifeq ($(STEAM_BRANCH),1)
WARN_FLAGS = -Wall -Wextra -Wshadow -Wno-invalid-offsetof
else
WARN_FLAGS = -Wno-write-strings -Wno-multichar
WARN_FLAGS = -Wall -Wno-invalid-offsetof -Wno-multichar -Wno-overloaded-virtual
WARN_FLAGS += -Wno-write-strings
WARN_FLAGS += -Wno-unused-variable
WARN_FLAGS += -Wno-unused-but-set-variable
WARN_FLAGS += -Wno-unused-function

ifeq ($(CLANG_BUILD),1)
# Clang specific flags
else
# Gcc specific flags. Need this for gcc 4.8.
# WARN_FLAGS += -Wno-unused-local-typedefs
# WARN_FLAGS += -Wno-unused-function
# WARN_FLAGS += -Wno-unused-result
# WARN_FLAGS += -Wno-narrowing
endif
endif

WARN_FLAGS += -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-sign-compare -Wno-reorder -Wno-invalid-offsetof -Wno-float-equal -Werror=return-type -fdiagnostics-show-option -Wformat -Wformat-security
WARN_FLAGS += -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers
WARN_FLAGS += -Wno-sign-compare -Wno-reorder -Wno-invalid-offsetof -Wno-float-equal -Werror=return-type
WARN_FLAGS += -fdiagnostics-show-option -Wformat -Wformat-security

ifeq ($(OS),Darwin)
$(error This file should never be used for Mac - use base.xconfig)
endif

ifeq ($(OS),Linux)
# We should always specify -Wl,--build-id, as documented at:
Expand All @@ -85,20 +113,20 @@ ifeq ($(OS),Linux)
# If the steam-runtime is available, use it. We should just default to using it when
# buildbot and everyone has a bit of time to get it installed.
ifneq "$(wildcard /valve/steam-runtime/bin/)" ""
# The steam-runtime is incompatible with clang at this point, so disable it
# if clang is enabled.
ifneq ($(CXX),clang++)
VALVE_BINDIR = /valve/steam-runtime/bin/
endif
VALVE_BINDIR = /valve/steam-runtime/bin/
endif

GCC_VER =
MARCH_TARGET = pentium4
# On dedicated servers, some plugins depend on global variable symbols in addition to functions.
# So symbols like _Z16ClearMultiDamagev should show up when you do "nm server_srv.so" in TF2.
STRIP_FLAGS = -x
endif

ifeq ($(CXX),clang++)
ifeq ($(CLANG_BUILD),1)
# The steam-runtime is incompatible with clang at this point, so disable it
VALVE_BINDIR =

# Clang does not support -mfpmath=sse because it uses whatever
# instruction set extensions are available by default.
SSE_GEN_FLAGS = -msse2
Expand All @@ -114,19 +142,18 @@ ifeq ($(OS),Linux)
ifeq ($(origin AR), default)
AR = $(VALVE_BINDIR)ar crs
endif
ifeq ($(origin CC),default)
ifeq ($(origin CC), default)
CC = $(CCACHE) $(VALVE_BINDIR)gcc$(GCC_VER)
endif
ifeq ($(origin CXX), default)
CXX = $(CCACHE) $(VALVE_BINDIR)g++$(GCC_VER)
endif

# Support ccache with clang. Add -Qunused-arguments to avoid excessive warnings due to
# a ccache quirk. Could also upgrade ccache.
# http://petereisentraut.blogspot.com/2011/05/ccache-and-clang.html
ifeq ($(CC),clang)
ifeq ($(CLANG_BUILD),1)
CC = $(CCACHE) $(VALVE_BINDIR)clang -Qunused-arguments
endif
ifeq ($(CXX),clang++)
CXX = $(CCACHE) $(VALVE_BINDIR)clang++ -Qunused-arguments
endif
LINK ?= $(CC)
Expand Down Expand Up @@ -180,84 +207,6 @@ ifeq ($(OS),Linux)

endif

ifeq ($(OS),Darwin)
CCACHE := $(SRCROOT)/devtools/bin/osx32/ccache
MAC_SDK_VER ?= 10.6
MAC_SDK := macosx$(MAC_SDK_VER)
SYSROOT := $(shell xcodebuild -sdk $(MAC_SDK) -version Path)

ifneq ($(origin MAC_SDK_VER), file)
$(warning Attempting build with SDK version $(MAC_SDK_VER), only 10.6 is supported and recommended!)
endif

ifeq ($(SYSROOT),)
FIRSTSDK := $(firstword $(sort $(shell xcodebuild -showsdks | grep macosx | sed 's/.*macosx//')))
$(error Could not find SDK version $(MAC_SDK_VER). Install and configure Xcode 4.3, or build with: make MAC_SDK_VER=$(FIRSTSDK))
endif

ifeq ($(origin CC), default)
# Test to see if you have a compiler in the right place, if you
# don't abort with an error
CLANG := $(shell xcrun -sdk $(MAC_SDK) -find clang)
ifeq ($(wildcard $(CLANG)),)
$(error Unable to find C compiler, install and configure Xcode 4.3)
endif

CC := $(CCACHE) $(CLANG) -Qunused-arguments
endif

ifeq ($(origin CXX), default)
CXXLANG := $(shell xcrun -sdk $(MAC_SDK) -find clang++)
ifeq ($(wildcard $(CXXLANG)),)
$(error Unable to find C++ compiler, install and configure Xcode 4.3)
endif

CXX := $(CCACHE) $(CXXLANG) -Qunused-arguments
endif
LINK ?= $(CXX)

ifeq ($(origin AR), default)
AR := $(shell xcrun -sdk $(MAC_SDK) -find libtool) -static -o
endif

ifeq ($(TARGET_PLATFORM),osx64)
ARCH_FLAGS += -arch x86_64 -m64 -march=core2
else ifeq (,$(findstring -arch x86_64,$(GCC_ExtraCompilerFlags)))
ARCH_FLAGS += -arch i386 -m32 -march=prescott -momit-leaf-frame-pointer -mtune=core2
else
# dirty hack to build a universal binary - don't specify the architecture
ARCH_FLAGS += -arch i386 -Xarch_i386 -march=prescott -Xarch_i386 -mtune=core2 -Xarch_i386 -momit-leaf-frame-pointer -Xarch_x86_64 -march=core2
endif

GEN_SYM ?= $(shell xcrun -sdk $(MAC_SDK) -find dsymutil)
ifeq ($(CFG),release)
STRIP ?= strip -S
else
STRIP ?= true
endif
ifeq ($(SOURCE_SDK), 1)
VSIGN ?= true
else
VSIGN ?= $(SRCROOT)/devtools/bin/vsign
endif

CPPFLAGS += -I$(SYSROOT)/usr/include/malloc
CFLAGS += -isysroot $(SYSROOT) -mmacosx-version-min=10.5 -fasm-blocks

LIB_START_EXE = -lm -ldl -lpthread
LIB_END_EXE =

LIB_START_SHLIB =
LIB_END_SHLIB =

SHLIBLDFLAGS = $(LDFLAGS) -bundle -flat_namespace -undefined suppress -Wl,-dead_strip -Wl,-no_dead_strip_inits_and_terms

ifeq (lib,$(findstring lib,$(GAMEOUTPUTFILE)))
SHLIBLDFLAGS = $(LDFLAGS) -dynamiclib -current_version 1.0 -compatibility_version 1.0 -install_name @rpath/$(basename $(notdir $(GAMEOUTPUTFILE))).dylib $(SystemLibraries) -Wl,-dead_strip -Wl,-no_dead_strip_inits_and_terms
endif

endif

#
# Profile-directed optimizations.
# Note: Last time these were tested 3/5/08, it actually slowed down the server benchmark by 5%!
Expand Down
Binary file modified mp/src/dx10sdk/Utilities/dx9_30/dx_proxy.dll
Binary file not shown.
Binary file modified mp/src/dx9sdk/utilities/dx_proxy.dll
Binary file not shown.
Loading

13 comments on commit 55ed12f

@BSVino
Copy link

@BSVino BSVino commented on 55ed12f Oct 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yesterday's update makes all of the mods running current code crash on connection to a game/server.

I'm thinking that possibly some of the interfaces changed in this patch are causing those crashes. In particular I see some changes to filesystem.h and and filesystem_passthru.h that worry me.

@vektorx4
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've managed to isolate the changes from this commit that were responsible for the breakage and created a diff file for it.

https://www.dropbox.com/s/r1dvptuzgduwpyk/quickpatch.diff?dl=0

Note: Since the SDK update has already been rolled back on Steam, do not apply this - it's just for reference.

@smsithlord
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can get it to compile fine, but I get this when trying to run the mod:
errorlink

I made sure to get the most recent Source SDK 2013 Multiplayer to test it with as well.

@vektorx4
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use the code from this commit, Valve have already rolled back the binaries that were intended to be used alongside it. Use commit 56accfd instead.

@dotn3b
Copy link

@dotn3b dotn3b commented on 55ed12f Oct 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or you could use the Source SDK Base 2013 beta that is named "upcoming".

@smsithlord
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great dotn3b, thanks. I've got my mod Anarchy Arcade running on this branch now. My Early Access users like to explore all of the new features each build has to offer, is there a list of changes or improvements for this commit that is in laymen's terms? Maybe in TF2's changelog the past few months perhaps?

@smsithlord
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

g_pFullFileSystem->RemoveSearchPath() does not work to remove VPK search paths, it only works to remove normal folder search paths.

@CliffordH123
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can some one explain how to make it so there is an actual launcher for Source SDK? Im stuck and i cant figure it out

@smsithlord
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some forum threads say the TF2 branch of the Source engine received an update around October/November that enabled lightmapped prop_static entities. Is this feature included with the current Source SDK 2013?

@dotn3b
Copy link

@dotn3b dotn3b commented on 55ed12f Feb 21, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit does indeed include the lightmapped static prop feature, which means it's currently still in beta ("upcoming") as far as Source SDK Base 2013 goes.

@RYell
Copy link

@RYell RYell commented on 55ed12f Feb 24, 2015 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smsithlord
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an issue when using SendMainMenuCommand with "OpenOptionsDialog" that causes the VGUI to display the options menu and then become completely irresponsive until you relaunch the game. The issue does not occur when using "OpenServerBrowser".

Does anybody know of a workaround that I could use? Here is an example of the console commands I'm using for testing:
CreateInterfaceFn gameUIFactory = g_GameUI.GetFactory();
IGameUI* pGameUI = (IGameUI *)gameUIFactory(GAMEUI_INTERFACE_VERSION, NULL);
pGameUI->SendMainMenuCommand("OpenOptionsDialog");

@bmk10
Copy link

@bmk10 bmk10 commented on 55ed12f Apr 7, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m_pButtonOptions = vgui::SETUP_PANEL(new vgui::Button(this, "btnOptions", "options"));
m_pButtonOptions->SetSize(256, 128);
m_pButtonOptions->SetPaintBorderEnabled(false);
m_pButtonOptions->SetPaintEnabled(false);
m_pImgOptions->SetImage("menu_options");
m_pImgOptions->SetSize(256, 128);

m_pButtonOptions->SetCommand("gamemenucommand OpenOptionsDialog");

Please sign in to comment.