<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alliedmods.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Galeksandrp</id>
	<title>AlliedModders Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alliedmods.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Galeksandrp"/>
	<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/Special:Contributions/Galeksandrp"/>
	<updated>2026-06-03T22:32:50Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.6</generator>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Compiling_libprotobuf&amp;diff=10146</id>
		<title>Compiling libprotobuf</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Compiling_libprotobuf&amp;diff=10146"/>
		<updated>2016-04-15T22:50:49Z</updated>

		<summary type="html">&lt;p&gt;Galeksandrp: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Examples for compiling a 32-bit libprotobuf and other protobuf libraries using the protobuf-2.5.0 source.&lt;br /&gt;
&lt;br /&gt;
''For Dota 2, replace version 2.5.0 with 2.6.1.''&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
The following was tested on Windows 8.1 with Visual Studio 2013. Not all projects built after conversion, but only libprotobuf and dependencies were necessary.&lt;br /&gt;
&lt;br /&gt;
* Download protobuf-2.5.0.zip from https://github.com/google/protobuf/releases&lt;br /&gt;
* Extract and navigate to protobuf-2.5.0/vsprojects/&lt;br /&gt;
* Open protobuf.sln in the version of Visual Studio corresponding with the VC abi version that you wish to compile for.&lt;br /&gt;
* Walk through project conversion steps if necessary.&lt;br /&gt;
* Right-click the libprotobuf project and choose properties.&lt;br /&gt;
* In Configuration Properties &amp;gt; C/C++ -&amp;gt; Code Generation, set Runtime Library to /MT for Release or /MTd for Debug.&lt;br /&gt;
* If building the Debug configuration, also add _ITERATOR_DEBUG_LEVEL=0 in Configuration Properties &amp;gt; C/C++ &amp;gt; Preprocessor &amp;gt; Preprocessor Defintions&lt;br /&gt;
* Right-click the libprotobuf project and choose Build.&lt;br /&gt;
&lt;br /&gt;
libprotobuf.lib will be in Release/ or Debug/, depending on build configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Linux (32-bit host)==&lt;br /&gt;
The following was tested on Debian 6 (Lenny) 32-bit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz&lt;br /&gt;
tar -xvzf protobuf-2.5.0.tar.gz&lt;br /&gt;
cd protobuf-2.5.0&lt;br /&gt;
./configure&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a debug build, replace &amp;lt;tt&amp;gt;./configure&amp;lt;/tt&amp;gt; with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure CXXFLAGS=&amp;quot;-g3 -ggdb3&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will also override protobuf's default CXXFLAGS of &amp;lt;tt&amp;gt;-DNDEBUG&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The library will be in src/.libs/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Linux (64-bit host)==&lt;br /&gt;
This hasn't been tested, but ''should'' work on most or all 64-bit distributions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz&lt;br /&gt;
tar -xvzf protobuf-2.5.0.tar.gz&lt;br /&gt;
cd protobuf-2.5.0&lt;br /&gt;
./configure --build=i686-pc-linux-gnu CFLAGS=&amp;quot;-m32 -DNDEBUG&amp;quot; CXXFLAGS=&amp;quot;-m32 -DNDEBUG&amp;quot; LDFLAGS=-m32&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a debug build, replace &amp;lt;tt&amp;gt;./configure&amp;lt;/tt&amp;gt; with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --build=i686-pc-linux-gnu CFLAGS=&amp;quot;-m32&amp;quot; CXXFLAGS=&amp;quot;-m32 -g3 -ggdb3&amp;quot; LDFLAGS=-m32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will also override protobuf's default CXXFLAGS of &amp;lt;tt&amp;gt;-DNDEBUG&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The library will be in src/.libs/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Mac==&lt;br /&gt;
The following was tested on OS X 10.7 (Lion) and ensures that the outputted binaries are 32-bit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz&lt;br /&gt;
tar -xvzf protobuf-2.5.0.tar.gz&lt;br /&gt;
cd protobuf-2.5.0&lt;br /&gt;
./configure --build=x86-apple-darwin ABI=standard CFLAGS=&amp;quot;-DNDEBUG -m32&amp;quot; CXXFLAGS=&amp;quot;-m32 -DNDEBUG&amp;quot; LDFLAGS=-m32&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a debug build, replace &amp;lt;tt&amp;gt;./configure&amp;lt;/tt&amp;gt; with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --build=x86-apple-darwin ABI=standard CFLAGS=&amp;quot;-m32&amp;quot; CXXFLAGS=&amp;quot;-m32 -g3 -ggdb3&amp;quot; LDFLAGS=-m32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will also override protobuf's default CXXFLAGS of &amp;lt;tt&amp;gt;-DNDEBUG&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The library will be in src/.libs/&lt;/div&gt;</summary>
		<author><name>Galeksandrp</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod&amp;diff=10145</id>
		<title>Building SourceMod</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod&amp;diff=10145"/>
		<updated>2016-04-15T22:42:43Z</updated>

		<summary type="html">&lt;p&gt;Galeksandrp: /* Source and Dependencies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Compiling SourceMod is not difficult, but requires a number of prerequisites.  This article details the requirements and steps to being able to build working SourceMod binaries.&lt;br /&gt;
&lt;br /&gt;
Note that specific compiler versions are required to maintain ABI compatibility with Source engine binaries.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;Install Visual Studio or Visual C++. VS/VC 2010 or above is required for SourceMod 1.6.x and earlier. VS/VC 2013 Update 2 or above is required for SourceMod 1.7.x and later. Express editions should work fine. If you use 2013 or higher, make sure to get the &amp;quot;Desktop&amp;quot; version: [http://www.visualstudio.com/downloads/download-visual-studio-vs#d-express-windows-desktop Visual Studio Express 2013 for Desktop].&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;Install [http://git-scm.com/ Git]. Make sure that you select the option that adds Git to PATH.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;Next, you will need to start an environment capable of running Python and interacting with the Visual Studio compiler. There are two ways to do this.&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use [https://wiki.mozilla.org/MozillaBuild MozillaBuild]. MozillaBuild comes with Python, Mercurial, and a unix-like shell.&lt;br /&gt;
   &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Install MozillaBuild to &amp;lt;tt&amp;gt;C:\mozilla-build&amp;lt;/tt&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Navigate to &amp;lt;tt&amp;gt;C:\mozilla-build&amp;lt;/tt&amp;gt; and run as administrator the batch file corresponding to your Visual Studio version. For example, &amp;lt;tt&amp;gt;start-msvc10.bat&amp;lt;/tt&amp;gt; for Visual Studio 2010 (10.0). Do not run an x64 version.&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Add Git to MozillaBuild's &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;. The easiest way to do this is to enter the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo &amp;quot;export PATH=\$PATH:/c/Program\ Files\ \(x86\)/Git/bin&amp;quot; &amp;gt;&amp;gt; ~/.profile&lt;br /&gt;
source ~/.profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Or, you can manually set up a shell.&lt;br /&gt;
   &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Install [http://python.org/ Python] 2.7. It will install to C:\Python27 by default. (Version 3.4 will work, but is not recommended for compatibility with other tools).&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Add Python to your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; variable. Go to Control Panel, System, Advanced, Environment Variables. Add &amp;lt;tt&amp;gt;C:\Python27;C:\Python27\Scripts&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; (or wherever your Python install is).&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Under Start, Programs, Microsoft Visual Studio, select the &amp;quot;Visual Studio Tools&amp;quot; folder and run &amp;quot;Visual Studio Command Prompt&amp;quot;. Alternately, open a normal command prompt and run &amp;lt;tt&amp;gt;&amp;quot;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars.bat&amp;quot;&amp;lt;/tt&amp;gt;. Substitute your Visual Studio version if needed.&amp;lt;/li&amp;gt;&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;Install Git, via either system packages or from the [http://git-scm.com/ Git] distribution.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;Install either the GNU C Compiler or the Clang compiler.&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;For GCC, version 4.4 or higher is required for SourceMod 1.6.x and earlier, and version 4.7 or high for SourceMod 1.7.x and later. On Debian/Ubuntu-based systems, the commands below will install GCC (the second set of packages is required for building on 64-bit systems).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install gcc g++&lt;br /&gt;
sudo apt-get install gcc-multilib g++-multilib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
   &amp;lt;/li&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;For Clang, 3.2 or higher is required. On Debian/Ubuntu-based systems, the packages needed are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install clang&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
   &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
 &amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;If building on a 64-bit system, a few additional packages may be required. For example on Debian/Ubuntu they are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install ia32-libs&lt;br /&gt;
sudo apt-get install lib32z1 lib32z1-dev&lt;br /&gt;
sudo apt-get install libc6-dev-i386 libc6-i386&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Newer versions, for example Debian 7.0+ or Ubuntu 13.04+ require slightly different packages:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install lib32stdc++-4.8-dev&lt;br /&gt;
sudo apt-get install lib32z1 lib32z1-dev&lt;br /&gt;
sudo apt-get install libc6-dev-i386 libc6-i386&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''You can find the latest release of Clang in LLVM's apt repositories for Debian and Ubuntu. Information on this is at http://llvm.org/apt/''&lt;br /&gt;
&lt;br /&gt;
==Archlinux==&lt;br /&gt;
&lt;br /&gt;
# Enable multilib repository as described in the [https://wiki.archlinux.org/index.php/multilib Archlinux wiki page].&lt;br /&gt;
# Install the following packages:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;pacman -S git python2 gcc-multilib lib32-glibc lib32-libstdc++5 lib32-zlib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Mac OS X==&lt;br /&gt;
Mac OS X 10.7 or higher is required to build, however, SourceMod will work on 10.5. SourceMod will neither build nor run on older PPC Macs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;Install the Xcode Command Line Tools.&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;For OS X 10.9 or higher, run the command below in Terminal and click the Install button in the window that appears.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
xcode-select --install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;For earlier versions of OS X, download and install Xcode from the App Store. Launch Xcode and then navigate to Preferences -&amp;gt; Downloads -&amp;gt; Components -&amp;gt; Command Line Tools -&amp;gt; Install. If you have recently upgraded Xcode, you will need to perform this step again. SourceMod cannot build without Xcode's command line tools.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Source and Dependencies=&lt;br /&gt;
&lt;br /&gt;
First, grab the SourceMod source tree. We recommend placing it inside its own folder, since we'll also need to download its dependencies.&lt;br /&gt;
&lt;br /&gt;
'''You should do a recursive checkout of the git repo since the sourcepawn repo is a submodule of sourcemod now, see https://stackoverflow.com/questions/3796927/how-to-git-clone-including-submodules to do that.'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p alliedmodders&lt;br /&gt;
cd alliedmodders&lt;br /&gt;
git clone --recursive https://github.com/alliedmodders/sourcemod&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, run the &amp;lt;tt&amp;gt;checkout-deps.sh&amp;lt;/tt&amp;gt; script. This will download all dependencies and attempt to install AMBuild. If you are using Linux or OS X, it may prompt you for your sudo password at the very end. If you want to skip this and install AMBuild manually, just Ctrl+C. (Do not run the checkout script with sudo.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bash sourcemod/tools/checkout-deps.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After it's done, you should see a large number of hl2sdk folders and other assorted dependencies, like MySQL, Metamod:Source, and AMBuild.&lt;br /&gt;
&lt;br /&gt;
If you are on Windows, but not using MozillaBuild, then you won't be able to use the checkout-deps script. Instead, you'll have to manually clone the following repositories:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --mirror https://github.com/alliedmodders/hl2sdk hl2sdk-proxy-repo&lt;br /&gt;
# For each SDK you want to build with:&lt;br /&gt;
# git clone hl2sdk-proxy-repo hl2sdk-&amp;lt;SDK&amp;gt; -b &amp;lt;SDK&amp;gt;&lt;br /&gt;
# e.g. git clone hl2sdk-proxy-repo hl2sdk-csgo -b csgo&lt;br /&gt;
&lt;br /&gt;
git clone https://github.com/alliedmodders/metamod-source mmsource-1.10 -b 1.10-dev&lt;br /&gt;
wget https://cdn.mysql.com/archives/mysql-5.0/mysql-noinstall-5.0.24a-win32.zip mysql-noinstall-5.0.24a-win32&lt;br /&gt;
&lt;br /&gt;
# Install AMBuild&lt;br /&gt;
git clone https://github.com/alliedmodders/ambuild&lt;br /&gt;
cd ambuild&lt;br /&gt;
C:\Python27\python.exe setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that you can skip MySQL and SDK versions you don't plan to build.&lt;br /&gt;
&lt;br /&gt;
=Configuring=&lt;br /&gt;
&lt;br /&gt;
The first time you are building a SourceMod tree, you must ''configure'' the build. This step initializes some basic information and allows some customization around how things get compiled.&lt;br /&gt;
&lt;br /&gt;
First create a build folder within your sourcemod folder, and then run &amp;lt;tt&amp;gt;configure.py&amp;lt;/tt&amp;gt;. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd sourcemod&lt;br /&gt;
mkdir build&lt;br /&gt;
cd build&lt;br /&gt;
python ../configure.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is safe to reconfigure over an old build. However, it's probably a bad idea to configure inside a random, non-empty folder.&lt;br /&gt;
&lt;br /&gt;
There are a few extra options you can pass to &amp;lt;tt&amp;gt;configure&amp;lt;/tt&amp;gt;:&lt;br /&gt;
*--enable-debug - Compile with symbols and debug checks/assertions.&lt;br /&gt;
*--enable-optimize - Compile with optimizations.&lt;br /&gt;
*--no-sse - Disable floating point optimizations (if you have a very, very old CPU).&lt;br /&gt;
*--no-mysql - Don't build the MySQL database module.&lt;br /&gt;
*--sdks css - Only build css.&lt;br /&gt;
&lt;br /&gt;
See configure.py for all the options.&lt;br /&gt;
&lt;br /&gt;
=Building=&lt;br /&gt;
&lt;br /&gt;
To build SourceMod, simply type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ambuild&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In your build folder. Alternately, you can specify the path of the build folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ambuild debug-build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The full package layout that would be shipped for release is in the &amp;lt;tt&amp;gt;package&amp;lt;/tt&amp;gt; folder of the build.&lt;br /&gt;
&lt;br /&gt;
=Deprecated Tools=&lt;br /&gt;
==Visual Studio Project Files==&lt;br /&gt;
In the future, we will use AMBuild to automatically generate project files, and the existing project files will be removed from the SourceMod tree. In the meantime however, it is possible to use these files. Unfortunately, they require a bit of extra work to use.&lt;br /&gt;
&lt;br /&gt;
First, make sure you've downloaded all necessary dependencies (SDKs, Metamod:Source source code, and MySQL) via the &amp;lt;tt&amp;gt;checkout-windows-deps.bat&amp;lt;/tt&amp;gt; script. Next,&lt;br /&gt;
#Open the Control Panel (for example, via Start -&amp;gt; Settings).&lt;br /&gt;
#Open the System control.  If you don't see it, you may need to switch to &amp;quot;Classic view&amp;quot; (either via the left-hand pane or by going to Tools -&amp;gt; Folder Options).&lt;br /&gt;
#Click the Advanced tab.&lt;br /&gt;
#Click the Environment Variables button.&lt;br /&gt;
&lt;br /&gt;
Now, add your environment variables to either your User settings or your System settings. Create a new variable for each item in the list below. You may omit SDKs that you do not plan to build against. The item names are in &amp;lt;tt&amp;gt;fixed-width font&amp;lt;/tt&amp;gt; and their value descriptions follow.&lt;br /&gt;
*&amp;lt;tt&amp;gt;MMSOURCE19&amp;lt;/tt&amp;gt; - Path to Metamod:Source 1.10+&lt;br /&gt;
*&amp;lt;tt&amp;gt;MMSOURCE18&amp;lt;/tt&amp;gt; - Path to Metamod:Source 1.10+&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDK&amp;lt;/tt&amp;gt; - Path to HL2SDK Ep1/Original&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDKOB&amp;lt;/tt&amp;gt; - Path to HL2SDK Ep2/OrangeBox for mods&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDKOBVALVE&amp;lt;/tt&amp;gt; - Path to HL2SDK Source 2009 (HL2:DM, DoD:S, TF2)&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDK-SWARM&amp;lt;/tt&amp;gt; - Path to HL2SDK Alien Swarm&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDK-BGT&amp;lt;/tt&amp;gt; - Path to HL2SDK for Bloody Good Time&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDKCSGO&amp;lt;/tt&amp;gt; - Path to HL2SDK CS:GO&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDKCSS&amp;lt;/tt&amp;gt; - Path to HL2SDK CS:S&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDK-DARKM&amp;lt;/tt&amp;gt; - Path to HL2SDK Dark Messiah&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDK-EYE&amp;lt;/tt&amp;gt; - Path to HL2SDK E.Y.E.: Divine Cybermancy&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDKL4D&amp;lt;/tt&amp;gt; - Path to HL2SDK L4D1&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDKL4D2&amp;lt;/tt&amp;gt; - Path to HL2SDK L4D2&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDK-DOTA&amp;lt;/tt&amp;gt; - Path to HL2SDK DOTA 2&lt;br /&gt;
*&amp;lt;tt&amp;gt;MYSQL5&amp;lt;/tt&amp;gt; - Path to the folder that contains MySQL's &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;lib&amp;lt;/tt&amp;gt; folders.&lt;br /&gt;
&lt;br /&gt;
==Makefiles==&lt;br /&gt;
Makefiles are deprecated and will be removed from the tree soon.&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Documentation]]&lt;br /&gt;
[[Category:SourceMod Development]]&lt;/div&gt;</summary>
		<author><name>Galeksandrp</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Building_SourceMod&amp;diff=10144</id>
		<title>Building SourceMod</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Building_SourceMod&amp;diff=10144"/>
		<updated>2016-04-15T22:27:15Z</updated>

		<summary type="html">&lt;p&gt;Galeksandrp: /* Source and Dependencies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Compiling SourceMod is not difficult, but requires a number of prerequisites.  This article details the requirements and steps to being able to build working SourceMod binaries.&lt;br /&gt;
&lt;br /&gt;
Note that specific compiler versions are required to maintain ABI compatibility with Source engine binaries.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;Install Visual Studio or Visual C++. VS/VC 2010 or above is required for SourceMod 1.6.x and earlier. VS/VC 2013 Update 2 or above is required for SourceMod 1.7.x and later. Express editions should work fine. If you use 2013 or higher, make sure to get the &amp;quot;Desktop&amp;quot; version: [http://www.visualstudio.com/downloads/download-visual-studio-vs#d-express-windows-desktop Visual Studio Express 2013 for Desktop].&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;Install [http://git-scm.com/ Git]. Make sure that you select the option that adds Git to PATH.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;Next, you will need to start an environment capable of running Python and interacting with the Visual Studio compiler. There are two ways to do this.&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Use [https://wiki.mozilla.org/MozillaBuild MozillaBuild]. MozillaBuild comes with Python, Mercurial, and a unix-like shell.&lt;br /&gt;
   &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Install MozillaBuild to &amp;lt;tt&amp;gt;C:\mozilla-build&amp;lt;/tt&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Navigate to &amp;lt;tt&amp;gt;C:\mozilla-build&amp;lt;/tt&amp;gt; and run as administrator the batch file corresponding to your Visual Studio version. For example, &amp;lt;tt&amp;gt;start-msvc10.bat&amp;lt;/tt&amp;gt; for Visual Studio 2010 (10.0). Do not run an x64 version.&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Add Git to MozillaBuild's &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;. The easiest way to do this is to enter the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo &amp;quot;export PATH=\$PATH:/c/Program\ Files\ \(x86\)/Git/bin&amp;quot; &amp;gt;&amp;gt; ~/.profile&lt;br /&gt;
source ~/.profile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Or, you can manually set up a shell.&lt;br /&gt;
   &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Install [http://python.org/ Python] 2.7. It will install to C:\Python27 by default. (Version 3.4 will work, but is not recommended for compatibility with other tools).&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Add Python to your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; variable. Go to Control Panel, System, Advanced, Environment Variables. Add &amp;lt;tt&amp;gt;C:\Python27;C:\Python27\Scripts&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; (or wherever your Python install is).&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Under Start, Programs, Microsoft Visual Studio, select the &amp;quot;Visual Studio Tools&amp;quot; folder and run &amp;quot;Visual Studio Command Prompt&amp;quot;. Alternately, open a normal command prompt and run &amp;lt;tt&amp;gt;&amp;quot;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars.bat&amp;quot;&amp;lt;/tt&amp;gt;. Substitute your Visual Studio version if needed.&amp;lt;/li&amp;gt;&lt;br /&gt;
   &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;Install Git, via either system packages or from the [http://git-scm.com/ Git] distribution.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;Install either the GNU C Compiler or the Clang compiler.&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;For GCC, version 4.4 or higher is required for SourceMod 1.6.x and earlier, and version 4.7 or high for SourceMod 1.7.x and later. On Debian/Ubuntu-based systems, the commands below will install GCC (the second set of packages is required for building on 64-bit systems).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install gcc g++&lt;br /&gt;
sudo apt-get install gcc-multilib g++-multilib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
   &amp;lt;/li&amp;gt;&lt;br /&gt;
   &amp;lt;li&amp;gt;For Clang, 3.2 or higher is required. On Debian/Ubuntu-based systems, the packages needed are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install clang&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
   &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
 &amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;If building on a 64-bit system, a few additional packages may be required. For example on Debian/Ubuntu they are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install ia32-libs&lt;br /&gt;
sudo apt-get install lib32z1 lib32z1-dev&lt;br /&gt;
sudo apt-get install libc6-dev-i386 libc6-i386&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Newer versions, for example Debian 7.0+ or Ubuntu 13.04+ require slightly different packages:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install lib32stdc++-4.8-dev&lt;br /&gt;
sudo apt-get install lib32z1 lib32z1-dev&lt;br /&gt;
sudo apt-get install libc6-dev-i386 libc6-i386&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''You can find the latest release of Clang in LLVM's apt repositories for Debian and Ubuntu. Information on this is at http://llvm.org/apt/''&lt;br /&gt;
&lt;br /&gt;
==Archlinux==&lt;br /&gt;
&lt;br /&gt;
# Enable multilib repository as described in the [https://wiki.archlinux.org/index.php/multilib Archlinux wiki page].&lt;br /&gt;
# Install the following packages:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;pacman -S git python2 gcc-multilib lib32-glibc lib32-libstdc++5 lib32-zlib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Mac OS X==&lt;br /&gt;
Mac OS X 10.7 or higher is required to build, however, SourceMod will work on 10.5. SourceMod will neither build nor run on older PPC Macs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;Install the Xcode Command Line Tools.&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;For OS X 10.9 or higher, run the command below in Terminal and click the Install button in the window that appears.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
xcode-select --install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;For earlier versions of OS X, download and install Xcode from the App Store. Launch Xcode and then navigate to Preferences -&amp;gt; Downloads -&amp;gt; Components -&amp;gt; Command Line Tools -&amp;gt; Install. If you have recently upgraded Xcode, you will need to perform this step again. SourceMod cannot build without Xcode's command line tools.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Source and Dependencies=&lt;br /&gt;
&lt;br /&gt;
First, grab the SourceMod source tree. We recommend placing it inside its own folder, since we'll also need to download its dependencies.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p alliedmodders&lt;br /&gt;
cd alliedmodders&lt;br /&gt;
git clone --recursive https://github.com/alliedmodders/sourcemod&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, run the &amp;lt;tt&amp;gt;checkout-deps.sh&amp;lt;/tt&amp;gt; script. This will download all dependencies and attempt to install AMBuild. If you are using Linux or OS X, it may prompt you for your sudo password at the very end. If you want to skip this and install AMBuild manually, just Ctrl+C. (Do not run the checkout script with sudo.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bash sourcemod/tools/checkout-deps.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After it's done, you should see a large number of hl2sdk folders and other assorted dependencies, like MySQL, Metamod:Source, and AMBuild.&lt;br /&gt;
&lt;br /&gt;
If you are on Windows, but not using MozillaBuild, then you won't be able to use the checkout-deps script. Instead, you'll have to manually clone the following repositories:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --mirror https://github.com/alliedmodders/hl2sdk hl2sdk-proxy-repo&lt;br /&gt;
# For each SDK you want to build with:&lt;br /&gt;
# git clone hl2sdk-proxy-repo hl2sdk-&amp;lt;SDK&amp;gt; -b &amp;lt;SDK&amp;gt;&lt;br /&gt;
# e.g. git clone hl2sdk-proxy-repo hl2sdk-csgo -b csgo&lt;br /&gt;
&lt;br /&gt;
git clone https://github.com/alliedmodders/metamod-source mmsource-1.10 -b 1.10-dev&lt;br /&gt;
wget https://cdn.mysql.com/archives/mysql-5.0/mysql-noinstall-5.0.24a-win32.zip mysql-noinstall-5.0.24a-win32&lt;br /&gt;
&lt;br /&gt;
# Install AMBuild&lt;br /&gt;
git clone https://github.com/alliedmodders/ambuild&lt;br /&gt;
cd ambuild&lt;br /&gt;
C:\Python27\python.exe setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that you can skip MySQL and SDK versions you don't plan to build.&lt;br /&gt;
&lt;br /&gt;
=Configuring=&lt;br /&gt;
&lt;br /&gt;
The first time you are building a SourceMod tree, you must ''configure'' the build. This step initializes some basic information and allows some customization around how things get compiled.&lt;br /&gt;
&lt;br /&gt;
First create a build folder within your sourcemod folder, and then run &amp;lt;tt&amp;gt;configure.py&amp;lt;/tt&amp;gt;. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd sourcemod&lt;br /&gt;
mkdir build&lt;br /&gt;
cd build&lt;br /&gt;
python ../configure.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is safe to reconfigure over an old build. However, it's probably a bad idea to configure inside a random, non-empty folder.&lt;br /&gt;
&lt;br /&gt;
There are a few extra options you can pass to &amp;lt;tt&amp;gt;configure&amp;lt;/tt&amp;gt;:&lt;br /&gt;
*--enable-debug - Compile with symbols and debug checks/assertions.&lt;br /&gt;
*--enable-optimize - Compile with optimizations.&lt;br /&gt;
*--no-sse - Disable floating point optimizations (if you have a very, very old CPU).&lt;br /&gt;
*--no-mysql - Don't build the MySQL database module.&lt;br /&gt;
*--sdks css - Only build css.&lt;br /&gt;
&lt;br /&gt;
See configure.py for all the options.&lt;br /&gt;
&lt;br /&gt;
=Building=&lt;br /&gt;
&lt;br /&gt;
To build SourceMod, simply type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ambuild&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In your build folder. Alternately, you can specify the path of the build folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ambuild debug-build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The full package layout that would be shipped for release is in the &amp;lt;tt&amp;gt;package&amp;lt;/tt&amp;gt; folder of the build.&lt;br /&gt;
&lt;br /&gt;
=Deprecated Tools=&lt;br /&gt;
==Visual Studio Project Files==&lt;br /&gt;
In the future, we will use AMBuild to automatically generate project files, and the existing project files will be removed from the SourceMod tree. In the meantime however, it is possible to use these files. Unfortunately, they require a bit of extra work to use.&lt;br /&gt;
&lt;br /&gt;
First, make sure you've downloaded all necessary dependencies (SDKs, Metamod:Source source code, and MySQL) via the &amp;lt;tt&amp;gt;checkout-windows-deps.bat&amp;lt;/tt&amp;gt; script. Next,&lt;br /&gt;
#Open the Control Panel (for example, via Start -&amp;gt; Settings).&lt;br /&gt;
#Open the System control.  If you don't see it, you may need to switch to &amp;quot;Classic view&amp;quot; (either via the left-hand pane or by going to Tools -&amp;gt; Folder Options).&lt;br /&gt;
#Click the Advanced tab.&lt;br /&gt;
#Click the Environment Variables button.&lt;br /&gt;
&lt;br /&gt;
Now, add your environment variables to either your User settings or your System settings. Create a new variable for each item in the list below. You may omit SDKs that you do not plan to build against. The item names are in &amp;lt;tt&amp;gt;fixed-width font&amp;lt;/tt&amp;gt; and their value descriptions follow.&lt;br /&gt;
*&amp;lt;tt&amp;gt;MMSOURCE19&amp;lt;/tt&amp;gt; - Path to Metamod:Source 1.10+&lt;br /&gt;
*&amp;lt;tt&amp;gt;MMSOURCE18&amp;lt;/tt&amp;gt; - Path to Metamod:Source 1.10+&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDK&amp;lt;/tt&amp;gt; - Path to HL2SDK Ep1/Original&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDKOB&amp;lt;/tt&amp;gt; - Path to HL2SDK Ep2/OrangeBox for mods&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDKOBVALVE&amp;lt;/tt&amp;gt; - Path to HL2SDK Source 2009 (HL2:DM, DoD:S, TF2)&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDK-SWARM&amp;lt;/tt&amp;gt; - Path to HL2SDK Alien Swarm&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDK-BGT&amp;lt;/tt&amp;gt; - Path to HL2SDK for Bloody Good Time&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDKCSGO&amp;lt;/tt&amp;gt; - Path to HL2SDK CS:GO&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDKCSS&amp;lt;/tt&amp;gt; - Path to HL2SDK CS:S&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDK-DARKM&amp;lt;/tt&amp;gt; - Path to HL2SDK Dark Messiah&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDK-EYE&amp;lt;/tt&amp;gt; - Path to HL2SDK E.Y.E.: Divine Cybermancy&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDKL4D&amp;lt;/tt&amp;gt; - Path to HL2SDK L4D1&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDKL4D2&amp;lt;/tt&amp;gt; - Path to HL2SDK L4D2&lt;br /&gt;
*&amp;lt;tt&amp;gt;HL2SDK-DOTA&amp;lt;/tt&amp;gt; - Path to HL2SDK DOTA 2&lt;br /&gt;
*&amp;lt;tt&amp;gt;MYSQL5&amp;lt;/tt&amp;gt; - Path to the folder that contains MySQL's &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;lib&amp;lt;/tt&amp;gt; folders.&lt;br /&gt;
&lt;br /&gt;
==Makefiles==&lt;br /&gt;
Makefiles are deprecated and will be removed from the tree soon.&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Documentation]]&lt;br /&gt;
[[Category:SourceMod Development]]&lt;/div&gt;</summary>
		<author><name>Galeksandrp</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Subversion_Tutorial&amp;diff=10143</id>
		<title>Subversion Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Subversion_Tutorial&amp;diff=10143"/>
		<updated>2016-04-15T22:24:03Z</updated>

		<summary type="html">&lt;p&gt;Galeksandrp: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Subversion (SVN) is a version control system designed specifically to be a modern replacement for [[CVS_Tutorial|CVS]]. This article briefly overviews the essentials of SVN, as well as using SVN on Linux and on Windows (through TortoiseSVN).&lt;br /&gt;
&lt;br /&gt;
{{Note| AlliedModders no longer uses SVN as the main method of distrobution. Please check out the [[Mercurial_Tutorial]]}}&lt;br /&gt;
&lt;br /&gt;
=Essentials=&lt;br /&gt;
==Introduction==&lt;br /&gt;
The best analogy for SVN's model is a library.  The library maintains the &amp;quot;master&amp;quot; copies of all the source code.  To obtain the source code, you &amp;quot;check out&amp;quot; a copy.  You can then make revisions to your copy.  When you're ready to return your changes to the master copy, it is called a &amp;quot;commit.&amp;quot;  &lt;br /&gt;
&lt;br /&gt;
SVN source code repositories can separated into &amp;quot;modules,&amp;quot; which are simply sub-directories of the repository.  Each module can have directories or files (both text and binary).&lt;br /&gt;
&lt;br /&gt;
Access to SVN repositories is generally based on three methods:&lt;br /&gt;
* Local filesystem or network filesystem, accessed by client directly (via file://)&lt;br /&gt;
* WebDAV/DeltaV (over HTTP or HTTPS) using the mod_dav_svn module for Apache 2&lt;br /&gt;
* Custom &amp;quot;svn&amp;quot; protocol using svnserve, either plain text (svn://) or over SSH (svn+ssh://)&lt;br /&gt;
&lt;br /&gt;
==Basic Commands==&lt;br /&gt;
&lt;br /&gt;
These are the four essential SVN operations:&lt;br /&gt;
*&amp;lt;tt&amp;gt;co&amp;lt;/tt&amp;gt; (or &amp;lt;tt&amp;gt;checkout&amp;lt;/tt&amp;gt;) - Retrieves the current copy of the source tree.&lt;br /&gt;
*&amp;lt;tt&amp;gt;update&amp;lt;/tt&amp;gt; - Updates your local copy to sync any changes from the master.&lt;br /&gt;
*&amp;lt;tt&amp;gt;add&amp;lt;/tt&amp;gt; - Adds a file or directory to the local source tree.&lt;br /&gt;
*&amp;lt;tt&amp;gt;commit&amp;lt;/tt&amp;gt; - Commits any local changes to the master (including adds).&lt;br /&gt;
&lt;br /&gt;
===Checkouts===&lt;br /&gt;
Normally, you only need to checkout code once.  After this, you can simply update your code to acquire any changes.  A clean checkout often helps remove stale files.&lt;br /&gt;
&lt;br /&gt;
===Updates===&lt;br /&gt;
In practice, you should always update your local source copy before editing.  This is to prevent merge problems, where two developers edit the same file and try to commit it at the same time.&lt;br /&gt;
&lt;br /&gt;
Some people prefer to keep two copies of the source locally.  The first copy is used only for committing changes and updating, and the second copy is only used for editing.  This essentially keeps a local master and a local volatile copy.&lt;br /&gt;
&lt;br /&gt;
===Adds/Removals===&lt;br /&gt;
SVN adds are also complemented by removals (the command is &amp;lt;tt&amp;gt;remove&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;delete&amp;lt;/tt&amp;gt;).  Both are considered changes to the source tree, and thus, they do not take effect until committed.&lt;br /&gt;
&lt;br /&gt;
===Commits===&lt;br /&gt;
SVN commits are always atomic and transactional.  That means if you commit a set of changes while your copy is older than the master, or otherwise unsynced, that file cannot be committed (and you may have to manually merge changes in).  Furthermore, when committing a set of files, if one fails, the entire commit should fail.&lt;br /&gt;
&lt;br /&gt;
When commits do fail, it is important to review why.  Otherwise, you could risk reverting changes from another author.&lt;br /&gt;
&lt;br /&gt;
==Differences From CVS==&lt;br /&gt;
While SVN is fairly similar to [[CVS_Tutorial|CVS]], there are some important differences that should be noted.&lt;br /&gt;
&lt;br /&gt;
===Revisions===&lt;br /&gt;
In CVS, revisions are on a per-file basis. In Subversion, the repository looks like a single filesystem. Thus, each commit results in an entirely new filesystem tree and each tree is given a revision number. When someone speaks of revision 25, they are referring to the way the SVN repository looked after the 25th commit. In short, revision numbers refer to a particular state of the repository.&lt;br /&gt;
&lt;br /&gt;
===Directories===&lt;br /&gt;
In CVS, directories are merely containers for other files or directories. But in SVN, directories are versioned in the same way files are. If a new commit only contains directory changes then a new revision number will be assigned to that commit. This means that the &amp;lt;tt&amp;gt;remove&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;delete&amp;lt;/tt&amp;gt; commands work on directories.&lt;br /&gt;
&lt;br /&gt;
===Branches and Tags===&lt;br /&gt;
SVN does not distinguish between filesystem space and “branch” space. Branches and tags are regular directories within the repository filesystem.&lt;br /&gt;
&lt;br /&gt;
In general, the root directory of a repository might contain three directories: &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;tags&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;branches&amp;lt;/tt&amp;gt;. The trunk can be compared to a CVS repository's &amp;quot;head&amp;quot; or it could be considered as the main branch of a project. The tags and branches directories are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
Creating a tag or branch simply involves using SVN's &amp;lt;tt&amp;gt;copy&amp;lt;/tt&amp;gt; command to copy the trunk or a specfic revision into the tags or branches directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=TortoiseSVN=&lt;br /&gt;
==Introduction==&lt;br /&gt;
TortoiseSVN is a Windows Explorer/Shell SVN integration tool.  Most users like it for its inherent simplicity and the quick ability to checkout source from within any Windows directory.&lt;br /&gt;
&lt;br /&gt;
TortoiseSVN can be downloaded from: https://tortoisesvn.net/downloads.html&lt;br /&gt;
&lt;br /&gt;
Once installed, you should either kill and restart all explorer.exe instances, or simply reboot. Once installed, read below.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
To start, create an empty folder anywhere on your computer. Open it and right click somewhere inside. You should see a &amp;quot;SVN Checkout&amp;quot; option similar to below. Click it.&lt;br /&gt;
&lt;br /&gt;
[[Image:TortoiseSVN Checkout.png|thumb|250px|Empty TortoiseSVN Menu]]&lt;br /&gt;
&lt;br /&gt;
The dialog box will say &amp;quot;Checkout.&amp;quot;  This is where you enter the information about the SVN server.&lt;br /&gt;
*&amp;lt;tt&amp;gt;URL of repository:&amp;lt;/tt&amp;gt; - This is where you enter the server's path to the SVN repository. You must know this in advance.&lt;br /&gt;
*&amp;lt;tt&amp;gt;Checkout directory:&amp;lt;/tt&amp;gt; - This is where the working copy of the repository will be stored. This is usually automatically filled.&lt;br /&gt;
&lt;br /&gt;
For example, SVN connections to alliedmods.net generally look like:&lt;br /&gt;
&lt;br /&gt;
[[Image:TortoiseSVN CheckoutSample.png]]&lt;br /&gt;
&lt;br /&gt;
If you have an account on the server, and you know you have SSH based access to the repository, then &amp;lt;tt&amp;gt;svn+ssh://&amp;lt;/tt&amp;gt; should be at the beginning of the URL, followed by your account user name and a &amp;lt;tt&amp;gt;@&amp;lt;/tt&amp;gt;. This is shown in the example image. However, if you wish to anonymously check out a repository or do not have an actual account on the server, then &amp;lt;tt&amp;gt;svn://&amp;lt;/tt&amp;gt; must be at the beginning, followed by the path to repository with no user name specified. For example, it might look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;svn://alliedmods.net/sourcemm/trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the repository you are checking out has the tag/branch/trunk directory structure, you should be certain to check out the trunk or a specific branch or tag. Otherwise you may end up downloading every tag and branch along with the trunk.&lt;br /&gt;
&lt;br /&gt;
Once all the files are downloaded, you will see them in the folder. You can then perform general SVN operations, such as committing, by right clicking in the empty spaces.&lt;br /&gt;
&lt;br /&gt;
To operate on a specific file, you can simply right click on the file. TortoiseSVN addd overlays to the file icons based on their status. A green checkmark means &amp;quot;unmodified locally,&amp;quot; a red exclamation point means &amp;quot;modified locally,&amp;quot; and an orange exclamation point means &amp;quot;merge conflict.&amp;quot; Files not in the repository do not have any overlay icons.&lt;br /&gt;
&lt;br /&gt;
To commit changes, simply right click and choose &amp;quot;Commit.&amp;quot; You can either commit all changes to the local scope or one single file. When you commit, you are allowed to attach a text comment to your revision. This is a good way to let people watching or reading the SVN repository to see an overview of your changes.&lt;br /&gt;
&lt;br /&gt;
[[Image:TortoiseSVN Menu.png]]&lt;br /&gt;
&lt;br /&gt;
==Adding/Removing Files and Directories==&lt;br /&gt;
Right click on the new file and then choose &amp;quot;Add&amp;quot;. Click OK on the dialog box. You will need to commit.&lt;br /&gt;
&lt;br /&gt;
[[Image:TortoiseSVN Adding.png]]&lt;br /&gt;
&lt;br /&gt;
To add a directory and all its files, right click on the directory and click &amp;quot;Add.&amp;quot;  You will get a dialog box similar to below.  It is important to uncheck files that might accidentally get merged in, such as password text files, binaries, et cetera.&lt;br /&gt;
&lt;br /&gt;
[[Image:TortoiseSVN AddFolder.png]]&lt;br /&gt;
&lt;br /&gt;
Likewise, to remove a file, simply right click it and use &amp;quot;Remove.&amp;quot; Directories are removable as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Linux/Command Line SVN=&lt;br /&gt;
==Introduction==&lt;br /&gt;
Command line SVN requires the SVN binary to be installed and ideally accessible from your PATH environment variable. &lt;br /&gt;
&lt;br /&gt;
Before you begin, you should also know whether or not the repository you are trying to checkout will be accessed via SSH or not. If you have an account on the server containing the repository, then it is likely you will be using SSH via the &amp;lt;tt&amp;gt;svn+ssh://&amp;lt;/tt&amp;gt; protocol when you enter the URL to the repository. If you wish to anonymously checkout a repository or do not have an account on the server then you will be using the &amp;lt;tt&amp;gt;svn://&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The checkout example from TortoiseSVN would look like:&lt;br /&gt;
&amp;lt;pre&amp;gt;svn co svn+ssh://dscrab@alliedmods.net@alliedmods.net/sourcemm/trunk sourcemm&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create a new directory called &amp;quot;source&amp;quot; which will contain all the downloaded files from the master's trunk.&lt;br /&gt;
&lt;br /&gt;
To then update this copy, you simply need to type &amp;quot;svn update&amp;quot; while inside the directory.&lt;br /&gt;
&lt;br /&gt;
Similarly, &amp;quot;svn commit&amp;quot; will attempt to commit the files in the current directory.  It will bring up an editor (defined in the &amp;lt;tt&amp;gt;SVN_EDITOR&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;EDITOR&amp;lt;/tt&amp;gt; environment variables) so you can type your comment -- simply save and exit the editor once done.&lt;br /&gt;
&lt;br /&gt;
You can &amp;quot;svn add &amp;lt;file&amp;gt;&amp;quot; or &amp;quot;svn remove &amp;lt;file&amp;gt;&amp;quot; as well.&lt;br /&gt;
&lt;br /&gt;
==Creating Repositories/Modules==&lt;br /&gt;
If your SVN is local, you can create a new repository like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;svnadmin create mysvn&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will create a directory in the current location named &amp;lt;tt&amp;gt;mysvn&amp;lt;/tt&amp;gt; which will contain the new repository.&lt;br /&gt;
&lt;br /&gt;
To create a new module, create an empty directory somewhere. Then use &amp;quot;svn import&amp;quot; as shown. Note that if you use this with a directory that contains files, the files will be added as the initial import. This is a good idea if you already have the source code structure in place.&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir trunk&lt;br /&gt;
svn import -m &amp;quot;Initial import&amp;quot; trunk file:///home/users/damagedsoul/mysvn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The URL to the file can also use &amp;lt;tt&amp;gt;svn+ssh://&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;svn://&amp;lt;/tt&amp;gt; if you so desire.&lt;br /&gt;
&lt;br /&gt;
=SSH Authentication=&lt;br /&gt;
If you are accessing your repository via SSH using the &amp;lt;tt&amp;gt;svn+ssh&amp;lt;/tt&amp;gt; protocol, you may have noticed that you must enter your password more than once on certain occasions. When checking out a repository, you may have to enter your password three or four times. Operations such as adding, removing, or committing usually only ask for your password once. But other commands may also require it more than once.&lt;br /&gt;
&lt;br /&gt;
However, there is way around this through the use of a private-public key pair. See [[SSH_Keys|SSH Keys]] for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
*[http://subversion.tigris.org/ Subversion Home Page]&lt;br /&gt;
*[http://tortoisesvn.tigris.org/ TortoiseSVN Home Page]&lt;br /&gt;
*[http://svnbook.red-bean.com/ Version Control with Subversion] - free online book about Subversion with lots of helpful information&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Subversion_%28software%29 Subversion Wikipedia article]&lt;br /&gt;
&lt;br /&gt;
[[Category:Version Control Systems]]&lt;/div&gt;</summary>
		<author><name>Galeksandrp</name></author>
		
	</entry>
</feed>