Zh/Source SDK 2013

关键点
=设置 Source SDK (所有平台)=
==设置 Source SDK Base==
从 Steam->库->工具 或从下面的链接安装 Source SDK Base 2013 (取决于你的 Mod 类型 安装 Multiplayer 或 Singleplayer) 
* [steam://rungameid/243730 Install Source SDK Base 2013 Singleplayer] (AppID: 243730)
* [steam://rungameid/243750 Install Source SDK Base 2013 Multiplayer] (AppID: 243750)
==获取源代码==
===方法一: 使用 Github 桌面客户端 (Windows/OS X)===
# 下载并且安装 GitHub 桌面 客户端
# 打开 Source SDK git 仓库 并且单击 "Clone to desktop"
===方法二: 使用命令行 (Windows/OS X/Linux)===
# 从 这里 选择你的平台的对应版本后下载并安装 git.
# 打开 终端/命令提示符 并运行以下命令:
git clone https://github.com/ValveSoftware/source-sdk-2013.git
===方法三: 下载 ZIP 压缩档===
从 这里 下载.
=设置 Source SDK (特定平台)=
==Windows上的Source SDK 2013==
===第一步: 安装 Visual Studio===
# 下载并安装 Visual Studio 2013.（此链接只能下到.exe， 完整可安装版本）
# 下载并安装 Multibyte MFC Library.（非必须，用于编译qc_eyes）
===第二步: 安装 Microsoft Speech SDK===
# 下载 Microsoft Speech SDK
# 解压安装文件执行 Microsoft Speech SDK 5.1.msi
# 取决于你的 Mod 类型,复制 C:\Program Files (x86)\Microsoft Speech SDK 5.1 里的东西到 <SDKROOT>\sp\src\utils\sapi51 或者 <SDKROOT>\mp\src\utils\sapi51.
# 打开 sphelper.h 并且修复以下错误:
# 确保你的 \sp\src\utils\sapi51 这个文件夹包含 Bin Docs IDL 等文件/文件夹. 并且不像这样: \sp\src\utils\Microsoft Speech SDK 5.1\sapi51. 如果它像上文一样,编译的时候会报错误 1.
769 行
 const size_t ulLenVendorPreferred = wcslen(pszVendorPreferred); // no size_t
1418 行
 static long CoMemCopyWFEX(const WAVEFORMATEX * pSrc, WAVEFORMATEX ** ppCoMemWFEX) // missing long
2368 行
 const WCHAR * PropertyStringValue() const
 {
 // Search for the first NULL and return pointer to the char past it.
 SPDBG_ASSERT(eEventId == SPEI_PROPERTY_STRING_CHANGE);
 const WCHAR * psz = (const WCHAR *)lParam; // moved this from for init
 for (; *psz; psz++) {}
 return psz + 1;
 }
2560 行
 SPPHONEID* pphoneId = (SPPHONEID*)((WCHAR *)dsPhoneId); // improper casting
2634行
 pphoneId += wcslen((const wchar_t *)pphoneId) + 1; // improper casting
===第三步: 编译你的 Source SDK 并且准备项目文件===
# 打开 <path-to-git>\sp\src\ 并且运行 createallprojects.bat 和 creategameprojects.bat
# 或者打开 <path-to-git>\mp\src\ 并且运行 createallprojects.bat 和 creategameprojects.bat
# 打开 everything.sln,
# 打开 everything 解决方案,打开解决方案浏览器, 然后从中间的菜单菜单右边的自动下拉菜单，将Debug修改为Release。
# 在 everything 解决方案三右键, 然后选择 生成项目.
注意
===第四步===
请查看 .
==macOS 上的 Source SDK 2013==
都用上 Mac 了你还是去看英文版吧
==Linux 上的 Source SDK 2013==
你都是 Linux 大佬了为什么不看英文文档
或者你可能还需要一份详细的 Linux 文档:Arch Linux维基
==在 Steam 上设置mod==
请查看 .
=其他信息=
== 通过添加新文件 ==
# 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.
== 目录结构 ==
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 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.
=问题排除=
===找不到 .vcproj 文件的注册表键值 (Windows)===
* 安装并升级 Visual Studio 2013. 插件 Windows上的Source SDK 2013 (第一步: 安装 Visual Studio).
===MSB8008: 选择的平台工具及 (v120_xp) 或 (v120) 没有安装或安装错误 (Windows)===
# 选择所有项目文件
# 在文件上右键, 选择 "属性"
# 选择 "编辑属性" 
# 在 "平台工具集" 下面选择 (v100)
(项目->属性->编辑属性->基本->平台工具集 = Visual Studio 2010(v100))