Difference between revisions of "Compiling FTEQW For Dummies"

From FTE
Jump to: navigation, search
(Updated)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
= 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<br>
 +
- '''Binary''': A binary is the executeable that is produced from the sourcecode via a compiler.<br>
 +
- '''MSVC''': Microsoft Visual C, part of the Microsoft Visual Studio suite.<br>
 +
- '''GCC''': GNU C Compiler, a free Linux compiler.<br>
 +
- '''MinGW''': Minimalist GNU for Windows, a free compiler based on GCC to produce Windows binaries.<br>
 +
- '''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.<br>
 +
- '''Build''': Refers to the process of compiling the sauce code.<br>
 +
- '''Compiler''': Required to turn source code (C, C++) into executable files.<br>
 +
- '''WIP''': Work in progress. The branch where our latest code is located on the SVN server.<br>
 +
- '''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.<br>
 +
- '''Branch''': Relating to SVN, branches are an offshoot of the trunk.<br>
 +
- '''Checkout''': Relating to SVN, the process of downloading the entire code base, sometimes shortened to "co".<br>
 +
- '''Commit''': Relating to SVN, the process of uploading a changed/added file(s) to the code base.<br>
 +
- '''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.<br>
 +
 
= Downloading The Source Code =
 
= Downloading The Source Code =
  
=== All ===
+
All of FTE's sourcecode is hosted on Sourceforge's SVN server.
  
CVS is abbreviated for Concurrent Version System<br>
+
2 methods to access it.
  
The FTE sourcecode is stored on a CVS server.
+
== Method #1 ==
 +
Download the GNU tar ball hosted by Sourceforge @ http://fteqw.svn.sourceforge.net/viewvc/fteqw/branches/wip/?view=tar
  
You can manually view the FTE sourcecode through the webbased CVS client [http://cvs.sourceforge.net/viewcvs.py/fteqw here]
+
Pros: Doesn't require the download of a SVN client.<br>
 +
Cons: Have to redownload the tarball everytime the codebase is changed.<br>
  
=== Windows ===
+
== Method #2 ==  
 +
Use a SVN client to checkout the WIP branch (see below for clients): https://fteqw.svn.sourceforge.net/svnroot/fteqw/branches/wip/
  
To download the FTE sourcecode from the CVS server, you will need a CVS client. I personally recommend [http://www.tortoisecvs.org/ TortoiseCVS] for Windows.<br>
+
Windows: TortoiseSVN http://tortoisesvn.tigris.org/<br>
 +
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/"<br>
 +
 
 +
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.<br>
 +
Cons: Some setup time, requires a sourceforge account and developer access on that account to commit code.<br>
 +
 
 +
= Compiling The Source Code =
 +
 
 +
== Windows ==
 +
 
 +
Requirements: MinGW (free), Microsoft Visual Studio 2005, Microsoft Visual Studio 2008 or Microsoft Visual Studio 2010.<br>
 +
* note: Express edition of Visual Studio (free) is untested, but you are welcome to try and report back the results.<br>
 +
 
 +
=== MinGW ===
 +
 
 +
MinGW has a commandline interface<br>
 +
Pros: Basic, small download, free.<br>
 +
Cons: Everything must be typed in, requires MSYS (free) to supplement MinGW with Unix-like tools etc.<br>
 +
 
 +
www.nuwen.net hosts an awesome MinGW distro that has everything FTE needs to compile on a Windows machine.<br>
 +
 
 +
2 downloads:
 +
# MinGW: http://nuwen.net/mingw.html#download "mingw-***.exe" (* where version number is)<br>
 +
# MSYS: http://nuwen.net/mingw.html#sources "msys-***.7z" (* where version number is)<br>
 +
 
 +
Follow the install on the Nuwen's website: http://nuwen.net/mingw.html#install<br>
 +
 
 +
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.<br>
 +
 
 +
See Commandline Compiling
 +
 
 +
=== Microsoft Visual Studio ===
 +
 
 +
Microsoft Visual Studio has a GUI interface<br>
 +
Pros: Easy to use, compiles quickly, user friendly when it comes to errors, Express edition which is free.<br>
 +
Cons: Big download, costs money for non-Express edition.<br>
 +
 
 +
Microsoft Visual Studio 2005 use "ftequake.sln" from ./dotnet2005 folder<br>
 +
Microsoft Visual Studio 2008 use "ftequake.sln" from ./dotnet2008 folder<br>
 +
Microsoft Visual Studio 2010 use "ftequake.sln" from ./dotnet2010 folder<br>
 +
 
 +
Alternatively if you are using any version newer than 2005, you can convert the project files from the ./dotnet2005 directory with afew clicks.<br>
 +
 
 +
See Understanding Each Build for compile targets
 +
 
 +
== Linux ==
 +
 
 +
Linux distros usually come with GCC and all the work is done for you.<br>
 +
 
 +
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.<br>
 +
 
 +
Compiling FTEQW is fairly straight forward, "make" but this will compile everything.<br>
 +
 
 +
To isolate an individual target:
 +
 
 +
gl-* = OpenGL & Dedicated Server<br>
 +
mingl-* = Minimalistic OpenGL<br>
 +
d3d-* = Direct3D (only available on Windows machines)<br>
 +
m-* = Merged (Direct3D, OpenGL & Dedicated Server)<br>
 +
sv-* = Dedicated Server<br>
 
<br>
 
<br>
Alittle info about Tortoise CVS:<br>
+
note * is rel or dbg or profile. rel = release, dbg = debug, profile = profiling (release with profiling support).<br>
"''TortoiseCVS lets you work with files under CVS version control directly from Windows Explorer. It's freely available under the GPL.''<br>
+
 
''With TortoiseCVS you can directly check out modules, update, commit and see differences by right clicking on files and folders within Explorer. You can see the state of a file with overlays on top of the normal icons within Explorer. It even works from within the file open dialog.''"<br>
+
If you wanted debug version of the dedicated server for example, "make sv-dbg" is the command.<br>
<br>
+
 
Now you have a CVS client. I would suggest making a new folder (usually on the root of the drive is nice and easy to find), name it whatever you like ("sourcecode" would be good).. so now you probably have c:\sourcecode\<br>
+
= Understanding Each Build =
<br>
 
Go into this folder, right click anywhere inside it and you should have a "'''CVS Checkout'''" option, click that.<br>
 
 
<br>
 
<br>
- There will be a box for '''CVSROOT''', put this in: ":pserver:anonymous@cvs.sf.net:/cvsroot/fteqw" (without the quotes)<br>
+
Release: slow to compile, but optimized to run faster, most likely to crash.<br>
- Next, there is a box for '''Module''', put this in: "engine" (without the quotes)<br>
+
Debug: big because of debug information, often much slower than the release client but compiles the fastest, least likely to crash.<br>
- Hit '''OK''', and now it should start downloading the source code. It will take afew minutes.
 
  
= Compiling The Source Code =
+
note * indicates Release and/or Debug<br>
  
=== Windows ===
+
M* = [[Merged Build]] (Direct3D, OpenGL & Dedicated Server)<br>
'''Note''': FTE requires "ml.exe" which a standard Microsoft Visual Studio 6.0 install lacks, you can download the Service Pack 5 or 6 which has "ml.exe"... put links to service pack, and link to the ml.exe thingo itself so people dont waste 100mb to get a little file :)<br>
+
GL* = [[OpenGL_Renderer]] (OpenGL & Dedicated Server)<br>
<br>
+
MinGL* = [[Minimal_GL_Build]] (Minimalistic OpenGL)<br>
You have 2 choices, to use '''Microsoft Visual Studio 6.0''' ''used for releases'' (build files are in /engine/ftequake/) or '''Microsoft Visual Studio .NET 2003''' (build files are in /engine/dotnet2003/ and-or /engine/dotnet/)
+
D3D* = (Direct3D & Dedicated Server)<br>
 +
Dedicated Server = (Dedicated Server)<br>
 +
Release/Debug = [[Software_Renderer]] (redundant, software renderer only present in build 3443 and older)<br>
 
<br>
 
<br>
mingw and cygwin should also compile the sourcecode for windows. It is worth noting that builds with these tools currently lack support for png, jpeg, ogg, and pk3s.
 

Latest revision as of 15:03, 15 April 2011

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)