Compiling FTEQW For Dummies

From FTE
Revision as of 15:03, 15 April 2011 by Moodles (talk | contribs) (Updated)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Key

- SVN: Subversion, a version control system used to commit and update code to make sure all of FTE's developers have the most updated code. Anyone can download from it, only developers can commit
- Binary: A binary is the executeable that is produced from the sourcecode via a compiler.
- MSVC: Microsoft Visual C, part of the Microsoft Visual Studio suite.
- GCC: GNU C Compiler, a free Linux compiler.
- MinGW: Minimalist GNU for Windows, a free compiler based on GCC to produce Windows binaries.
- Cygwin: Linux-like environment for Windows making it possible to port software running on POSIX systems (such as Linux, BSD, and Unix systems) to Windows.
- Build: Refers to the process of compiling the sauce code.
- Compiler: Required to turn source code (C, C++) into executable files.
- WIP: Work in progress. The branch where our latest code is located on the SVN server.
- Trunk: Relating to SVN, almost always where the most recent code is stored on the SVN server, but not in our case. The trunk was last updated mid 2010.
- Branch: Relating to SVN, branches are an offshoot of the trunk.
- Checkout: Relating to SVN, the process of downloading the entire code base, sometimes shortened to "co".
- Commit: Relating to SVN, the process of uploading a changed/added file(s) to the code base.
- MSYS: MINimal SYStem, MSYS is a collection of GNU utilities such as bash, make, gawk and grep to allow building of applications and programs which depend on traditionally UNIX tools to be present. It is intended to supplement MinGW and the deficiencies of the cmd shell.

Downloading The Source Code

All of FTE's sourcecode is hosted on Sourceforge's SVN server.

2 methods to access it.

Method #1

Download the GNU tar ball hosted by Sourceforge @ http://fteqw.svn.sourceforge.net/viewvc/fteqw/branches/wip/?view=tar

Pros: Doesn't require the download of a SVN client.
Cons: Have to redownload the tarball everytime the codebase is changed.

Method #2

Use a SVN client to checkout the WIP branch (see below for clients): https://fteqw.svn.sourceforge.net/svnroot/fteqw/branches/wip/

Windows: TortoiseSVN http://tortoisesvn.tigris.org/
Linux: Most distros come with a SVN client, and most of the time you can just do "svn co https://fteqw.svn.sourceforge.net/svnroot/fteqw/branches/wip/"

Pros: Simple matter of "svn update" or clicking the SVN update button when code is committed to the SVN, it only redownloads that changed/added file. Can commit code if user has developer access to our SVN.
Cons: Some setup time, requires a sourceforge account and developer access on that account to commit code.

Compiling The Source Code

Windows

Requirements: MinGW (free), Microsoft Visual Studio 2005, Microsoft Visual Studio 2008 or Microsoft Visual Studio 2010.

  • note: Express edition of Visual Studio (free) is untested, but you are welcome to try and report back the results.

MinGW

MinGW has a commandline interface
Pros: Basic, small download, free.
Cons: Everything must be typed in, requires MSYS (free) to supplement MinGW with Unix-like tools etc.

www.nuwen.net hosts an awesome MinGW distro that has everything FTE needs to compile on a Windows machine.

2 downloads:

  1. MinGW: http://nuwen.net/mingw.html#download "mingw-***.exe" (* where version number is)
  2. MSYS: http://nuwen.net/mingw.html#sources "msys-***.7z" (* where version number is)

Follow the install on the Nuwen's website: http://nuwen.net/mingw.html#install

MSYS and MinGW will share about 10 files, the ones from MSYS need to be used so it's OK to overwrite the files that came with MinGW.

See Commandline Compiling

Microsoft Visual Studio

Microsoft Visual Studio has a GUI interface
Pros: Easy to use, compiles quickly, user friendly when it comes to errors, Express edition which is free.
Cons: Big download, costs money for non-Express edition.

Microsoft Visual Studio 2005 use "ftequake.sln" from ./dotnet2005 folder
Microsoft Visual Studio 2008 use "ftequake.sln" from ./dotnet2008 folder
Microsoft Visual Studio 2010 use "ftequake.sln" from ./dotnet2010 folder

Alternatively if you are using any version newer than 2005, you can convert the project files from the ./dotnet2005 directory with afew clicks.

See Understanding Each Build for compile targets

Linux

Linux distros usually come with GCC and all the work is done for you.

See Commandline Compiling

Commandline Compiling

To compile FTEQCC all you need to do is go into the ./qclib folder and type "make", the same is true for FTEQTV but in it's folder.

Compiling FTEQW is fairly straight forward, "make" but this will compile everything.

To isolate an individual target:

gl-* = OpenGL & Dedicated Server
mingl-* = Minimalistic OpenGL
d3d-* = Direct3D (only available on Windows machines)
m-* = Merged (Direct3D, OpenGL & Dedicated Server)
sv-* = Dedicated Server

note * is rel or dbg or profile. rel = release, dbg = debug, profile = profiling (release with profiling support).

If you wanted debug version of the dedicated server for example, "make sv-dbg" is the command.

Understanding Each Build


Release: slow to compile, but optimized to run faster, most likely to crash.
Debug: big because of debug information, often much slower than the release client but compiles the fastest, least likely to crash.

note * indicates Release and/or Debug

M* = Merged Build (Direct3D, OpenGL & Dedicated Server)
GL* = OpenGL_Renderer (OpenGL & Dedicated Server)
MinGL* = Minimal_GL_Build (Minimalistic OpenGL)
D3D* = (Direct3D & Dedicated Server)
Dedicated Server = (Dedicated Server)
Release/Debug = Software_Renderer (redundant, software renderer only present in build 3443 and older)