Difference between revisions of "Compiling FTEQW For Dummies"

From FTE
Jump to: navigation, search
(Updated)
 
Line 1: Line 1:
 
= Key =  
 
= Key =  
  
- '''CVS''': abbreviated for Concurrent Version System<br>
+
- '''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 (fteqw.exe for example)<br>
+
- '''Binary''': A binary is the executeable that is produced from the sourcecode via a compiler.<br>
- '''Sauce code''': Don't squeeze the bottle too hard or you'll squirt sauce everywhere.<br>
+
- '''MSVC''': Microsoft Visual C, part of the Microsoft Visual Studio suite.<br>
- '''VC++''': Visual C++, referring to a program inside Microsoft Visual Studio.<br>
+
- '''GCC''': GNU C Compiler, a free Linux compiler.<br>
- '''gcc''': A free linux compiler<br>
+
- '''MinGW''': Minimalist GNU for Windows, a free compiler based on GCC to produce Windows binaries.<br>
- '''mingw''': A free windows compiler<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>
- '''cygwin''': Another free windows compiler<br>
 
 
- '''Build''': Refers to the process of compiling the sauce code.<br>
 
- '''Build''': Refers to the process of compiling the sauce code.<br>
- '''msvc''': abbreviated for Microsoft Visual C++<br>
+
- '''Compiler''': Required to turn source code (C, C++) into executable files.<br>
- '''Compiling''': Refers to the process of turning the sauce code into machine code, it's like putting a slice of cheese on bread, but you have to be careful not to but too much sauce code in your sandwich or else cows will be pissed at you for putting too much sauce on their hardship involvesd in making that cheese, well anyway they will come down and make you eat pies made from their hearts.... oh oh right i forgot thats what pies are realy made of.<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.
  
The FTE sourcecode is stored on a CVS server.
+
2 methods to access it.
  
You can manually view the FTE sourcecode through the webbased CVS client [http://cvs.sourceforge.net/viewcvs.py/fteqw here]
+
== Method #1 ==
 +
Download the GNU tar ball hosted by Sourceforge @ http://fteqw.svn.sourceforge.net/viewvc/fteqw/branches/wip/?view=tar
  
=== Windows ===
+
Pros: Doesn't require the download of a SVN client.<br>
 +
Cons: Have to redownload the tarball everytime the codebase is changed.<br>
  
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>
+
== Method #2 ==
<br>
+
Use a SVN client to checkout the WIP branch (see below for clients): https://fteqw.svn.sourceforge.net/svnroot/fteqw/branches/wip/
Alittle info about Tortoise CVS:<br>
+
 
"''TortoiseCVS lets you work with files under CVS version control directly from Windows Explorer. It's freely available under the GPL.''<br>
+
Windows: TortoiseSVN http://tortoisesvn.tigris.org/<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>
+
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>
<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>
 
<br>
 
Go into this folder, right click anywhere inside it and you should have a "'''CVS Checkout'''" option, click that.<br>
 
<br>
 
- There will be a box for '''CVSROOT''', put this in: ":pserver:anonymous@cvs.sf.net:/cvsroot/fteqw" (without the quotes)<br>
 
- Next, there is a box for '''Module''', put this in: "engine" (without the quotes)<br>
 
- Hit '''OK''', and now it should start downloading the source code. It will take afew minutes.
 
  
'''!FAQ''': (q) DUDE WTF IS A MODULE?<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>
(a) It's CVS speak, visit http://cvs.sourceforge.net/viewcvs.py/fteqw , you will notice some options:<br>
+
Cons: Some setup time, requires a sourceforge account and developer access on that account to commit code.<br>
- CVSROOT (ignore it)<br>
 
- engine (is where fteqw is)<br>
 
- fteqtv (is where the fte quaketv proxy)<br>
 
- plugins (is where the fteqw plugins reside)<br>
 
- quakec (is where the qcc stuff is)<br>
 
- sourceforge (ignore it)<br>
 
<br>
 
  
 
= Compiling The Source Code =
 
= Compiling The Source Code =
  
=== Windows ===
+
== Windows ==
'''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>
+
 
'''Point of Interest''': The Intel C++ Compiler 9.0, tends to perform some magic and manages to increase the OpenGL rendering in FTE by 5 to 10 percent. Of course I have a Pentium 4 cpu, I tried the same compiled binary on my Duron 900 and it made bugger all difference between a binary compiled with Microsoft Visual Studio.<br>
+
Requirements: MinGW (free), Microsoft Visual Studio 2005, Microsoft Visual Studio 2008 or Microsoft Visual Studio 2010.<br>
<br>
+
* note: Express edition of Visual Studio (free) is untested, but you are welcome to try and report back the results.<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/)<br>
+
 
<br>
+
=== MinGW ===
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.<br>
+
 
<br>
+
MinGW has a commandline interface<br>
Load up your compiling program, load the "workspace" and find a option to "Build" the client.. it might take 10 minutes, once done it'll end up in your sourcecode folder (example: c:\sourcecode\)<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>
 +
note * is rel or dbg or profile. rel = release, dbg = debug, profile = profiling (release with profiling support).<br>
 +
 +
If you wanted debug version of the dedicated server for example, "make sv-dbg" is the command.<br>
 +
 
= Understanding Each Build =
 
= Understanding Each Build =
 
<br>
 
<br>
Win32 MRelease = [[Merged Build]]<br>
+
Release: slow to compile, but optimized to run faster, most likely to crash.<br>
Win32 GLRelease = [[OpenGL_Renderer]]<br>
+
Debug: big because of debug information, often much slower than the release client but compiles the fastest, least likely to crash.<br>
Win32 MinGLRelease = [[Minimal_GL_Build]]<br>
+
 
Win32 Release = [[Software_Renderer]]<br>
+
note * indicates Release and/or Debug<br>
 +
 
 +
M* = [[Merged Build]] (Direct3D, OpenGL & Dedicated Server)<br>
 +
GL* = [[OpenGL_Renderer]] (OpenGL & Dedicated Server)<br>
 +
MinGL* = [[Minimal_GL_Build]] (Minimalistic OpenGL)<br>
 +
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>
Win32 MDebug for example, is the MRelease thing with debugging thingos for developement use. Same is said about any of the builds which mention Debug, Win32 MinGLDebug is obviously the debug build of Win32 MinGLRelease<br>
 

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)