Difference between revisions of "Building ioquake3 on Windows - cygwin"

From ioquake3 wiki
Jump to: navigation, search
(Added section)
 
(Replaced entire page based on MAN-AT-ARMS's guide.)
Line 1: Line 1:
<!-- Note to editors: FUCK WIKI HARD IN THE GODDAMN ASS I HATE HOW IT MANGLES FORMATTING!  YES ADDING A BUNCH OF GODDAMN BR'S IS THE ONLY WAY TO MAKE THIS NOT SUCK AND NO I CAN'T USE # FOR THE LISTS BECAUSE WIKI RENUMBERS AT THE WRONG TIMES GODDAMMIT I HATE THIS SHIT! -->
+
__NOTOC__
 +
Return to [[Building ioquake3]]
  
Return to [[Building ioquake3]]<br>
+
= Windows - cygwin =
<br>
+
How to compile ioquake3 using MinGW in a Cygwin environment.
This is based off of these instructions: http://www.ioquake.org/forums/viewtopic.php?f=12&t=1707<br>
+
 
<br>
+
''NOTE: These instructions apply to the git version.''
Credit to Undead for this info.<br>
+
# Install Cygwin and required packages (see guide below).
<br>
+
# Check out the source from git://github.com/ioquake/ioq3.git with <code>git clone git://github.com/ioquake/ioq3.git</code>
<br>
+
# Change to the ioq3 directory
Prerequisite: Unless it's been merged into svn by the time you read this, you will need https://bugzilla.icculus.org/show_bug.cgi?id=5405<br>
+
# Run <code>[http://www.gnu.org/software/make/ make]</code>
<br>
+
 
Anyway, here is how you can build on Windows 7 64bit using the 32bit build. Building for 64bit is easy for the client/engine but you have to track down/compile SDL, libcurl and openal on your own. With 32bit, you can reuse the installer's copy.<br>
+
== Detailed Guide ==
<br>
+
Detailed guide based on a [http://community.ioquake.org/t/how-to-build-ioquake3-using-cygwin/223 post by MAN-AT-ARMS].
These instructions work for a normal user although you will be prompted for an admin password at parts.<br>
+
 
<br>
+
=== 1. Install Cygwin ===
Get cygwin here (latest is 1.7.9-1): http://cygwin.com/setup.exe<br>
+
Download the Cygwin setup package from http://cygwin.com/install.html.
<br>
+
 
Use the recommended settings (C:/cygwin, all users) and select a close mirror.<br>
+
Choose either the 32-bit or 64-bit environment. 32-bit will work fine on both 32 and 64 bit versions of Windows. The setup program is also your Cygwin environment updater. If you have an existing Cygwin environment, the setup program will, by default, update your existing packages.
<br>
+
 
In the package selection area, select these in addition to the ones that cygwin has on by default. This is close to the bare minimum needed:<br>
+
* Choose where you want to install Cygwin. The entire environment is self-contained in it's own folder, but you can also interact with files from outside the environment if you want to as well. The default install path is <code>C:\Cygwin</code>.
<br>
+
* Choose a mirror to download packages from, such as the kernel.org mirrors.
Devel -> make<br>
+
* Choose a "storage area" for your package downloads.
<br>
+
 
For 32bit builds<br>
+
=== 2. Package selection ===
Devel -> mingw64-i686-binutils<br>
+
The next screen you see will be the package selections screen. In the upper left is a search box. This is where you will want to search for the necessary packages.
Devel -> mingw64-i686-gcc-core<br>
+
 
Devel -> mingw64-i686-headers<br>
+
These are the package names you'll want to search for:
Devel -> mingw64-i686-runtime<br>
+
 
<br>
+
# mingw64-i686-gcc-core (For building 32bit binaries)
For 64bit builds<br>
+
# mingw64-i686-gcc-g++ (Also for 32bit... C++ support... not required for ioquake3, but useful for compiling other software)
Devel -> mingw64-x86_64-binutils<br>
+
# mingw64-x86_64-gcc-core (For building 64bit binaries)
Devel -> mingw64-x86_64-gcc-core<br>
+
# mingw64-x86_64-gcc-g++ (For 64bit, same as above)
Devel -> mingw64-x86_64-headers<br>
+
# make
Devel -> mingw64-x86_64-runtime<br>
+
# bison
<br>
+
# git
Devel -> subversion<br>
+
 
<br>
+
When you search for your packages you'll see category listings. These packages would all be under the 'Devel' category.
<br>
+
 
Before you leave, you may want to install an editor. Nano is easy to use but the traditional choices are vim or emacs. It's possible to edit the files with Windows tools but less convenient without a little setup.<br>
+
To select a package, change the 'Skip' to the version of the package you want to install. The first click will be the newest version and subsequent clicks will allow you to choose older versions of the package. In our case here, you're probably good choosing the latest and greatest.
<br>
+
 
Click next and accept the recommendations. They are needed for the packages that you selected above.<br>
+
=== 3. Install packages ===
<br>
+
After you have selected your packages, just hit 'Next' in the lower right. Cygwin will automatically add package dependencies. Hit next again to let the install run. Done.
This will download and install cygwin. It has many of the base utilities including bash, sed, awk, etc. Using the above is enough to build ioquake3 as of r2214.<br>
+
 
<br>
+
The entire environment uses about 1GB of disk space (as opposed to about 6GB for a Visual Studio install).
As far as the actual build, it's simple too:<br>
+
 
<br>
+
=== 4. Using Cygwin to check out and build ioquake3 ===
$ svn co svn://svn.icculus.org/quake3/trunk ioquake3<br>
+
After the install has completed you should have a 'Cygwin Terminal' icon on your Desktop. This is the bash shell for Cygwin, so go ahead and run it.
$ cd ioquake3<br>
+
 
$ sh cross-make-mingw.sh  (after it is changed with the patch in https://bugzilla.icculus.org/show_bug.cgi?id=5405)<br>
+
At the command prompt type:
<br>
+
<code>git clone git://github.com/ioquake/ioq3.git</code>
Then when that builds the exe and DLL in the build/ directory, you have everything that you need. For the install, I did this:<br>
+
 
<br>
+
This will download the ioquake3 master branch source into a new ioq3 folder.
Copy baseq3 from a quake3 installation to a new directory say C:/games/quake3<br>
+
 
Install the ioquake3 engine (http://ioquake3.org/files/1.36/installer/ioquake3-1.36-3.1.x86.exe) into a related directory, C:/games/quake3/vanilla<br>
+
Change to the new ioq3 folder that was created: <code>cd ioq3</code>
<br>
+
 
The ioquake3 1.36 installer includes the necessary DLLs that the runtime needs:<br>
+
You can build ioquake3 for 32 or 64 bit Windows by running one of the following
SDL, libcurl and openal.<br>
+
* <code>make ARCH=x86</code> (32 bit)
<br>
+
* <code>make ARCH=x86_64</code> (64 bit)
$ cd /cygdrive/c/games/quake3<br>
+
 
$ cp vanilla/*.dll .<br>
+
After the build completes the output files will be in the 'build' folder. For the default Cygwin install the path it would be C:\Cygwin\home\Your_Username\ioq3\build\release-mingw32-arch.
<br>
+
 
Now you are ready to run it. For best results, I would use non-fullscreen mode so if there is an error it is easier to see.<br>
+
=== 5. Have fun! ===
<br>
 
./ioquake3 +set r_fullscreen 0<br>
 
<br>
 

Revision as of 01:13, 30 September 2015

Return to Building ioquake3

Windows - cygwin

How to compile ioquake3 using MinGW in a Cygwin environment.

NOTE: These instructions apply to the git version.

  1. Install Cygwin and required packages (see guide below).
  2. Check out the source from git://github.com/ioquake/ioq3.git with git clone git://github.com/ioquake/ioq3.git
  3. Change to the ioq3 directory
  4. Run make

Detailed Guide

Detailed guide based on a post by MAN-AT-ARMS.

1. Install Cygwin

Download the Cygwin setup package from http://cygwin.com/install.html.

Choose either the 32-bit or 64-bit environment. 32-bit will work fine on both 32 and 64 bit versions of Windows. The setup program is also your Cygwin environment updater. If you have an existing Cygwin environment, the setup program will, by default, update your existing packages.

  • Choose where you want to install Cygwin. The entire environment is self-contained in it's own folder, but you can also interact with files from outside the environment if you want to as well. The default install path is C:\Cygwin.
  • Choose a mirror to download packages from, such as the kernel.org mirrors.
  • Choose a "storage area" for your package downloads.

2. Package selection

The next screen you see will be the package selections screen. In the upper left is a search box. This is where you will want to search for the necessary packages.

These are the package names you'll want to search for:

  1. mingw64-i686-gcc-core (For building 32bit binaries)
  2. mingw64-i686-gcc-g++ (Also for 32bit... C++ support... not required for ioquake3, but useful for compiling other software)
  3. mingw64-x86_64-gcc-core (For building 64bit binaries)
  4. mingw64-x86_64-gcc-g++ (For 64bit, same as above)
  5. make
  6. bison
  7. git

When you search for your packages you'll see category listings. These packages would all be under the 'Devel' category.

To select a package, change the 'Skip' to the version of the package you want to install. The first click will be the newest version and subsequent clicks will allow you to choose older versions of the package. In our case here, you're probably good choosing the latest and greatest.

3. Install packages

After you have selected your packages, just hit 'Next' in the lower right. Cygwin will automatically add package dependencies. Hit next again to let the install run. Done.

The entire environment uses about 1GB of disk space (as opposed to about 6GB for a Visual Studio install).

4. Using Cygwin to check out and build ioquake3

After the install has completed you should have a 'Cygwin Terminal' icon on your Desktop. This is the bash shell for Cygwin, so go ahead and run it.

At the command prompt type: git clone git://github.com/ioquake/ioq3.git

This will download the ioquake3 master branch source into a new ioq3 folder.

Change to the new ioq3 folder that was created: cd ioq3

You can build ioquake3 for 32 or 64 bit Windows by running one of the following

  • make ARCH=x86 (32 bit)
  • make ARCH=x86_64 (64 bit)

After the build completes the output files will be in the 'build' folder. For the default Cygwin install the path it would be C:\Cygwin\home\Your_Username\ioq3\build\release-mingw32-arch.

5. Have fun!