Difference between revisions of "Compiling The Engine"

From Trepidation
Jump to: navigation, search
(Created page with "== For Linux == If you are on Ubuntu or Debian, the easiest way to compile this the following: $ sudo aptitude build-dep ioquake3 $ sudo apt-get install libsdl1.2-dev libx...")
 
(For Windows: =)
 
(6 intermediate revisions by the same user not shown)
Line 3: Line 3:
  
 
  $ sudo aptitude build-dep ioquake3
 
  $ sudo aptitude build-dep ioquake3
  $ sudo apt-get install libsdl1.2-dev libxmp-dev libsdl2-dev
+
  $ sudo apt-get install libsdl1.2-dev libxmp-dev libsdl2-dev libvorbis libogg libvorbisfile
 
  $ git clone git://github.com/q3shafe/trepidation.git
 
  $ git clone git://github.com/q3shafe/trepidation.git
 
  $ cd trepidation/trep-engine
 
  $ cd trepidation/trep-engine
 
  $ make
 
  $ make
  
 +
= Windows - msys2 =
 +
How to compile ioquake3 using MinGW in a MSYS2 environment.
  
== For Windows: ===
 
  
 +
== 64-Bit Binaries ==
 +
To build 64-bit binaries, follow these instructions:
  
'''1. Install Cygwin'''
+
1. Install msys2 from https://msys2.github.io/ , following the instructions there.
Download the Cygwin setup package from http://cygwin.com/install.html.
+
: It doesn't matter which version you download, just get one appropriate for your OS.
  
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.
+
2. Start "MSYS2 MinGW 64-bit" from the Start Menu.
  
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.
+
3. Install mingw-w64-x86_64:
Choose a mirror to download packages from, such as the kernel.org mirrors.
+
pacman -S mingw-w64-x86_64-gcc
  
Choose a "storage area" for your package downloads.
+
4. Install make:
 +
pacman -S make
  
'''2. Package selection'''
+
5. Grab latest ioq3 source code from github.
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.
+
Use git, or just grab https://github.com/ioquake/ioq3/archive/master.zip and unzip it somewhere.
  
These are the package names you'll want to search for:
+
6. Change directory to where you put the source and run make:
 +
: Note that in msys2, your drives are linked as folders in the root directory: C:\ is /c/, D:\ is /d/, and so on.
 +
cd /c/ioq3
 +
make ARCH=x86_64
  
mingw64-i686-gcc-core (For building 32bit binaries)
+
7. Find the executables and dlls in build/release-mingw64-x86_64 .
mingw64-i686-gcc-g++ (Also for 32bit... C++ support... not required for ioquake3, but useful for compiling other software)
 
mingw64-x86_64-gcc-core (For building 64bit binaries)
 
mingw64-x86_64-gcc-g++ (For 64bit, same as above)
 
make
 
bison
 
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.
+
== 32-Bit Binaries ==
 +
To build 32-bit binaries, follow these instructions:
  
'''3. Install packages'''
+
1. Install msys2 from https://msys2.github.io/ , following the instructions there.
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.
+
: It doesn't matter which version you download, just get one appropriate for your OS.
  
The entire environment uses about 1GB of disk space (as opposed to about 6GB for a Visual Studio install).
+
2. Start "MSYS2 MinGW 32-bit" from the Start Menu.
  
'''4. Using Cygwin to check out and build the engine'''
+
3. Install mingw-w64-i686-gcc:
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.
+
pacman -S mingw-w64-i686-gcc
  
At the command prompt type: git clone git://github.com/q3shafe/trepidation.git
+
4. Install make from msys:
 +
pacman -S make
  
This will download the trepidation master branch source into a new trepidation folder.
+
5. Grab latest ioq3 source code from github
 +
Use git, or just grab https://github.com/ioquake/ioq3/archive/master.zip and unzip it somewhere.
  
Change to the new trepidation engine folder that was created: cd trepidation/trep-engine
+
6. Change directory to where you put the source and run make:
 +
: Note that in msys2, your drives are linked as folders in the root directory: C:\ is /c/, D:\ is /d/, and so on.
 +
cd /c/ioq3
 +
make ARCH=x86 WINDRES="windres -F pe-i386"
  
You can build trepidation for 32 or 64 bit Windows by running one of the following
+
7. Find the executables and dlls in build/release-mingw32-x86 .
 
 
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.
 

Latest revision as of 21:20, 28 May 2017

For Linux

If you are on Ubuntu or Debian, the easiest way to compile this the following:

$ sudo aptitude build-dep ioquake3
$ sudo apt-get install libsdl1.2-dev libxmp-dev libsdl2-dev libvorbis libogg libvorbisfile
$ git clone git://github.com/q3shafe/trepidation.git
$ cd trepidation/trep-engine
$ make

Windows - msys2

How to compile ioquake3 using MinGW in a MSYS2 environment.


64-Bit Binaries

To build 64-bit binaries, follow these instructions:

1. Install msys2 from https://msys2.github.io/ , following the instructions there.

It doesn't matter which version you download, just get one appropriate for your OS.

2. Start "MSYS2 MinGW 64-bit" from the Start Menu.

3. Install mingw-w64-x86_64:

pacman -S mingw-w64-x86_64-gcc

4. Install make:

pacman -S make

5. Grab latest ioq3 source code from github. Use git, or just grab https://github.com/ioquake/ioq3/archive/master.zip and unzip it somewhere.

6. Change directory to where you put the source and run make:

Note that in msys2, your drives are linked as folders in the root directory: C:\ is /c/, D:\ is /d/, and so on.
cd /c/ioq3
make ARCH=x86_64

7. Find the executables and dlls in build/release-mingw64-x86_64 .


32-Bit Binaries

To build 32-bit binaries, follow these instructions:

1. Install msys2 from https://msys2.github.io/ , following the instructions there.

It doesn't matter which version you download, just get one appropriate for your OS.

2. Start "MSYS2 MinGW 32-bit" from the Start Menu.

3. Install mingw-w64-i686-gcc:

pacman -S mingw-w64-i686-gcc

4. Install make from msys:

pacman -S make

5. Grab latest ioq3 source code from github Use git, or just grab https://github.com/ioquake/ioq3/archive/master.zip and unzip it somewhere.

6. Change directory to where you put the source and run make:

Note that in msys2, your drives are linked as folders in the root directory: C:\ is /c/, D:\ is /d/, and so on.
cd /c/ioq3
make ARCH=x86 WINDRES="windres -F pe-i386"

7. Find the executables and dlls in build/release-mingw32-x86 .