Setting up Source SDK Base 2013 Multiplayer: Difference between revisions
RaTcHeT302 (talk | contribs) |
RaTcHeT302 (talk | contribs) |
||
Line 31: | Line 31: | ||
# Open '''everything.sln''' for the desired mode (Singleplayer or Multiplayer) and build it. | # Open '''everything.sln''' for the desired mode (Singleplayer or Multiplayer) and build it. | ||
# Select the '''everything''' solution, located under the '''Solution Explorer''' list, then from the middle menu, right next to the '''Auto''' drop down menu, change '''Debug''' to '''Release'''. | # Select the '''everything''' solution, located under the '''Solution Explorer''' list, then from the middle menu, right next to the '''Auto''' drop down menu, change '''Debug''' to '''Release'''. | ||
# Right Click on the '''everything''' solution, then select ''' | # Right Click on the '''everything''' solution, then select '''Build Solution'''. | ||
'''Notes''' | '''Notes''' | ||
<br> | <br> | ||
{{Note|If something fails at the end then simply | {{Note|If something fails at the end then simply rebuild the solution.}} | ||
{{Note|The '''client.dll''' is going to be generated in <code><path-to-git>\sp\src\game\client\Release_mod_hl2</code> and <code><path-to-git>\sp\src\game\client\Release_mod_episodic</code>}} | {{Note|The '''client.dll''' is going to be generated in <code><path-to-git>\sp\src\game\client\Release_mod_hl2</code> and <code><path-to-git>\sp\src\game\client\Release_mod_episodic</code>}} | ||
{{Note|The '''server.dll''' is going to be generated in <code><path-to-git>\sp\src\game\server\Release_mod_hl2</code> and <code><path-to-git>\sp\src\game\server\Release_mod_episodic</code>}} | {{Note|The '''server.dll''' is going to be generated in <code><path-to-git>\sp\src\game\server\Release_mod_hl2</code> and <code><path-to-git>\sp\src\game\server\Release_mod_episodic</code>}} |
Revision as of 06:30, 6 October 2015

Key points

Setting Up
Windows and OS X
- Download GitHub for Windows or OS X depending on the operating system and install it.
- Open the following page, then click the Clone in Desktop button.
- Navigate to
<path-to-git>\sp\game
and copy the mod_hl2 or mod_episodic folder to<Steam-folder>\steamapps\sourcemods
Source SDK 2013 on Windows
Step One
- Download and install Visual Studio 2013.
- Run Visual Studio, then under Tools, select Extensions and Updates.
- From the left list, select Updates, Product Updates, then select Visual Studio 2013 Update 5 and push the Update button.
- Run VS2013.5.exe and agree to the license, push the Install button, then follow the on screen instructions.
- Download and install the Multibyte MFC Library.
Step Two
- Download the following archive and extract the sapi51 folder to
<path-to-git>\sp\src\utils
- Navigate to
<path-to-git>\sp\src\
and run createallprojects.bat and creategameprojects.bat - Navigate to
<path-to-git>\mp\src\
and run createallprojects.bat and creategameprojects.bat
Step Three

- Open everything.sln for the desired mode (Singleplayer or Multiplayer) and build it.
- Select the everything solution, located under the Solution Explorer list, then from the middle menu, right next to the Auto drop down menu, change Debug to Release.
- Right Click on the everything solution, then select Build Solution.
Notes


<path-to-git>\sp\src\game\client\Release_mod_hl2
and <path-to-git>\sp\src\game\client\Release_mod_episodic

<path-to-git>\sp\src\game\server\Release_mod_hl2
and <path-to-git>\sp\src\game\server\Release_mod_episodic
Step Four
See Source SDK 2013: Shader Authoring.
Source SDK 2013 on OS X
Step One
- Navigate to
<path-to-git>\sp\src\
and run createallprojects.bat and creategameprojects.bat - Navigate to
<path-to-git>\mp\src\
and run createallprojects.bat and creategameprojects.bat
Notes

Step Two
- Install Xcode 4.2.
- You will also need to have "Command Line Tools" installed. You can find this at XCode Preferences -> "Downloads" -> "Components".
Step Three
To run the tools, run this command under Terminal.
make -f games.mak
Notes

Source SDK 2013 on Linux
Step One
- Navigate to
<path-to-git>\sp\src\
and run createallprojects.bat and creategameprojects.bat - Navigate to
<path-to-git>\mp\src\
and run createallprojects.bat and creategameprojects.bat
Notes
This will create games.mak and everything.mak.
Step Two
To build the Source SDK 2013 on Linux you should use the Steam Client Runtime to guarantee compatibility with most Linux distributions. It will only work on Debian-/Ubuntu-based systems though.
- Download the following files.
- Run the following commands in order to extract the files.
tar xvf steam-runtime-sdk_2013-09-05.tar.xz cd steam-runtime-sdk_2013-09-05
3. Download and setup the runtime, pick your architecture and debug/release preferences. Then answer Y to everything else.
4. Run the following ./setup.sh
commannd.
5. Run the (chroot) environment ./shell.sh --arch=i386
. This environment should be used to build your the SDK.
Step Three
> make -f games.mak
At this point you should have client.so and server.so files to load with the Source SDK Base 2013 of your choice. More instructions on using the Steam runtime can be found in README.txt in the installed runtime directory.
Other information
Adding new files with the Valve Project Creator
- Add instructions on how to here.
- Open hl2.vpc with a text editor and edit this line or something.
VPC generates project files for all of the platforms that the SDK supports, so if you want to add files to your project in a way that will allow you to easily build on other platforms, consider using VPC. For example, to add a file to a multiplayer game, you could add a line to src/game/client/client_hl2mp.vpc.
Directory structure
* game - Runtime files for the mods themselves. Any mod content will go in here. * src - All the source code for that kind of mod. The root of the src directory contains .sln or root level .mak files for building the source. ** common - A few files used by the server and client DLLs ** devtools - Scripts and utilities that are used to build the source. These are called by the makefiles and projects and you probably won't need to interact with them directly. ** game - All of the source code for the DLLs. *** client - Code used by client.dll (or client.dylib or client.so). There are also game-specific directories under here. *** server - Code used by server.dll. There are also game-specific directories under here. *** shared - Code used by both client.dll and server.dll. ** gcsdk - A couple of tools used to build the DLLs. ** lib - Binary versions of the libraries that the source code depends on. This is also the build target for vgui_controls, tier1, and mathlib. ** mathlib - Math utilities used by the game. ** public - Header files for all of the DLLs and libraries that are used by the game. Also includes a few source files. ** thirdparty - Third party libraries needed to build the source. At the moment this contains only the [https://code.google.com/p/protobuf/ Google Protocol Buffers (protobuf)] library. ** tier1 - Useful utility classes. Builds into tier1.lib ** utils - Various development utilities ** vgui2 - Source code for vgui_controls, which is used by client.dll.
Issues fixed
Unable to find RegKey for .vcproj files in solutions (Windows)
- Install and update Visual Studio 2013. See Source SDK 2013 on Windows (Step One).
MSB8008: Specified platform toolset (v120_xp) or (v120) is not installed or invalid (Windows)
- Select all Project Files
- Right-click on the file, then choose "Properties"
- Choose "Configuration Properties"
- Under "Platform toolset" this -> (v100)
(Project->Properties->Configuration Properties->General->Platform toolset = Visual Studio 2010(v100))