Home

Awesome

ioq3-premake-msvc

Actions Status Appveyor CI Build Status

A Premake script for generating Visual Studio projects for ioquake3.

ioquake3 uses MinGW for Windows builds. There are Visual Studio projects in the offical repo, but they aren't maintained, and are incomplete and often broken.

screenshot

Instructions

  1. Update submodules to get SDL. git submodule update
  2. Clone ioquake3 and this repository to the same parent directory.
  3. Run vs2017.bat or vs2019.bat.
  4. Open build\vs201*\ioquake3.sln in Visual Studio and compile.

The compiled binaries are written to build\vs201*\bin_*. You can either manually copy them to your Quake 3 directory and run the ioquake3 executable, or read the section Debugging ioquake3 below.

Options

As an alternative to the batch files, invoke premake directly with premake5 [options] [action], where [options] are one or more of the following, and [action] is either vs2017 or vs 2019.

OptionDescription
--disable-clientDisable the ioquake3 project
--disable-serverDisable the dedicated server project
--disable-baseq3Disable the baseq3 projects
--disable-missionpackDisable the missionpack projects
--disable-renderer-gl1Disable the OpenGL 1 renderer project
--disable-renderer-gl2Disable the OpenGL 2 renderer project
--disable-renderer-bgfxDisable the bgfx renderer project
--disable-game-dllDisable the game DLL projects
--disable-game-qvmDisable the game QVM projects
--disable-oggDisable Ogg Opus and Vorbis support
--rename-baseq3=NAMERename the baseq3 project
--rename-missionpack=NAMERename the missionpack project
--standaloneRemove the dependency on Q3A

For example, run premake5 --disable-baseq3 --disable-missionpack vs2017 if you don't want the game code projects.

Debugging ioquake3

ioquake3 requires the baseq3 directory containing pak*.pk3 files to be in one of its search paths to run. The search paths are:

ioq3-premake-msvc writes the compiled binaries to build\vs201*\bin_*. If you have the Steam version of Quake 3, this is not a problem - ioquake3 points fs_steampath to Steam and you can run the ioquake3 executable from anywhere. If you have the retail version of Quake 3, you have several options:

You should now be able to run ioquake3 with the Visual Studio debugger.

To debug game code, add +set sv_pure 0 +set vm_cgame 0 +set vm_game 0 +set vm_ui 0 to the command arguments.

BGFX renderer

An unofficial renderer using bgfx is available here. To generate a project file for it, clone to the same parent directory as ioquake3 and ioq3-premake-msvc, then run premake again. Select the renderer in the game console with cl_renderer bgfx (requires a vid_restart).