Skip to content
redsaurus edited this page Apr 23, 2013 · 22 revisions

The source code for OpenJK, which includes Jedi Outcast and Jedi Academy, can be downloaded from the git repository git@github.com:Razish/OpenJK.git. Alternatively, you can fork our project if you would like to contribute back! Either way, you must adhere to the GNU GPLv2 license, under which the original Jedi Outcast/Jedi Academy source was licensed. This means any changes to the code must be publicly available.

Generating project files

We use CMake as our cross-platform makefile generator. This allows us to maintain a single set of project files, and have CMake generate the Visual Studio solution, Makefile, or Xcode project files for us. The following instructions explain how to use CMake.

  1. Get CMake for your platform.
  2. Get the dependencies. In Windows, they're included (although external version of the libraries can be used.) Otherwise, consult the Readme for a list of required libraries, like zlib and OpenAL.
  3. Go to the folder where the OpenJK source code is located, and create a build folder.
  4. In the build folder, run cmake ... The project/make files will now be generated for you for your platform's primary build tool. If you wish to use a different generator to generate different project/makefiles (e.g., generating mingw32 makefiles on Windows), you can specify a generator using the -G flag: cmake .. -G <generator-name>. A list of generators can be found by typing cmake -h.
  5. The generated project/makefile can be found in the build directory.

Linux/Mac OS X CMake notes

  • If you wish to build on 64-bit Linux, you should force it to build 32-bit for now, by adding the CMake flags -DCMAKE_CXX_FLAGS=-m32 -DCMAKE_C_FLAGS=-m32 -DCMAKE_SHARED_LINKER_FLAGS=-m32 -DCMAKE_SIZEOF_VOID_P=4.
  • If you wish to build on Mac OS X, you should force it to build 32-bit and to use gcc rather than clang, by adding to the CMake commands -DCMAKE_CXX_FLAGS="-m32 -fasm-blocks" -DCMAKE_C_FLAGS=-m32 -DCMAKE_SHARED_LINKER_FLAGS=-m32 -DCMAKE_CXX_COMPILER=g++ -DCMAKE_SIZEOF_VOID_P=4

Compiling

Compiling the source code depends on the project/makefile generated. Instructions for the main build tool on each supported platform are supplied below.

Windows

  • Open the OpenJK.sln file in the build folder.
  • Select the build configuration to use (Debug/Release/RelWithDebInfo/MinSizeRel).
  • Build the solution.
  • Built files can be found in build/<project name>/<build configuration>/.

Linux/Mac OS X

  • Run make from the build folder.
  • Built files can be found in the same folder?
Clone this wiki locally