Git Product home page Git Product logo

ioq3-premake-msvc's Introduction

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.

Option Description
--disable-client Disable the ioquake3 project
--disable-server Disable the dedicated server project
--disable-baseq3 Disable the baseq3 projects
--disable-missionpack Disable the missionpack projects
--disable-renderer-gl1 Disable the OpenGL 1 renderer project
--disable-renderer-gl2 Disable the OpenGL 2 renderer project
--disable-renderer-bgfx Disable the bgfx renderer project
--disable-game-dll Disable the game DLL projects
--disable-game-qvm Disable the game QVM projects
--disable-ogg Disable Ogg Opus and Vorbis support
--rename-baseq3=NAME Rename the baseq3 project
--rename-missionpack=NAME Rename the missionpack project
--standalone Remove 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:

  • fs_homepath - %APDDATA%\Quake3
  • fs_basepath - the same directory as the ioquake3 executable.
  • fs_steampath - Steam Quake 3 (if present).

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:

  • Copy your Quake 3 baseq3 directory to %APDDATA%\Quake3
  • Copy your Quake 3 baseq3 directory to build\vs201*\bin_*.
  • Point fs_steampath at your Quake 3 directory. Open the ioquake3 project properties. Select "Debugging" and set "Command Arguments" to +set fs_steampath "path", where path is the location of your Quake 3 install, e.g. +set fs_steampath "D:\Games\Quake III Arena".

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).

ioq3-premake-msvc's People

Contributors

bonn333 avatar jpcy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ioq3-premake-msvc's Issues

Adding defines / libs

Thank you for your project, it works beautifully with VS19.
At least, with the 64 bit build. The 32 bit build failed here FYI - not that this is a big deal as far as I'm concerned.

Quick question:

What I'm trying to achieve is to be able to use the VS19 debugger on my ioq3 fork - it's a full conversion and will be released soonish. To build the client, I need to meet the following criteria:

Achieved:

  • Build native DLL code for the ui, cgame, renderer and qagame, no QVM

Pending:

  • Link with the SDL2_ttf library
  • Link with the freetype library
  • Add a couple additionnal defines to the build process
  • Add a bunch of .c and .h files (my code) into the cgame, ui, etc.. projects
  • I don't care if the server builds or not. I just need to debug the client. I will be doing actual release builds with MINGW

What would be the proper workflow to achieve this all with your scripts?

I'm currently using the following command line instead of the provided vs2019.bat

premake5 --disable-server --disable-missionpack --disable-game-qvm --rename-baseq3=xq --standalone vs2019

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.