]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - README.md
build: get Visual Studio 2019 to compile
[xonotic/darkplaces.git] / README.md
index 41a7b7e63a945ad1fa72031552ff9fd024727a72..acb53919f6cdd8cda81beef150e49fded6741254 100644 (file)
--- a/README.md
+++ b/README.md
@@ -22,7 +22,27 @@ Linux x86_64 builds are available in [GitHub CI](https://github.com/DarkPlacesEn
 More complete builds are available in [xonotic.org](https://beta.xonotic.org/autobuild/) engine zips.  
 These support Windows, Linux and macOS, and include the current libraries needed for all features.
 
-DarkPlaces supports many Quake-based games and you can select which it will run by renaming the executable so it's prefixed with the game's name, for example `rogue-sdl.exe`, or by passing a cmdline argument such as `-rogue`.  The supported list and related details are defined in [com_game.c](https://github.com/DarkPlacesEngine/darkplaces/blob/master/com_game.c).
+DarkPlaces supports many Quake-based games and you can select which it will run by renaming the executable so it's prefixed with the game's name, for example `rogue-sdl.exe`, or by passing a cmdline argument  
+such as `-rogue`.  This changes various engine behaviours and cvar defaults to suit the game.  
+The supported list and related details are defined in [com_game.c](https://github.com/DarkPlacesEngine/darkplaces/blob/master/com_game.c).
+
+Mods which aren't listed there can be run with (for example) `-game quake15` in which case DP will use the same behaviours and cvar defaults as for id1 Quake.
+
+## Quake Virtual File System
+
+All of Quake's data access is through a hierarchical file system, the contents
+of the file system can be transparently merged from several sources.
+
+The "base directory" is the path to the directory holding the quake.exe and
+all game directories.  This can be overridden with the "-basedir" command
+line parm to allow code debugging in a different directory.  The base
+directory is only used during filesystem initialization.
+
+The "game directory" is the first tree on the search path and directory that
+all generated files (savegames, screenshots, demos, config files) will be
+saved to.  This can be overridden with the "-game" command line parameter.
+If multiple "-game <gamedir>" args are passed the last one is the "primary"
+and files will be saved there, the rest are read-only.
 
 ## Build instructions (WIP)
 
@@ -41,7 +61,7 @@ Runtime (optional): `libcurl` `libpng` `libfreetype6` `libvorbisfile`
 Build (mandatory): `build-essential` `libjpeg-dev` `zlib1g-dev`  
 Runtime (optional): `libcurl` `libpng`  
 
-### Windows (MSYS2):
+### Windows (MSYS2 MinGW):
 
 1. Install MSYS2, found [here](https://www.msys2.org/).
 2. Once you've installed MSYS2 and have fully updated it, open a MinGW64 terminal (***not an MSYS2 terminal***) and input the following command:
@@ -65,17 +85,31 @@ brew install sdl2 libjpeg-turbo libpng libvorbis curl
 
 ### Unix (General)
 
-From a terminal, in the engine's root directory, input `make`. On macOS, input `make` with a target such as `make sdl-release`.
-
-Input `make help` for options.
+From a terminal, in the engine's root directory, input `make help` to list the targets.  
+To build the main executable, input `make sdl-release` which creates the file called  
+`darkplaces-sdl` or `darkplaces-sdl.exe` (Windows).
 
 If you get errors (that don't seem to be about missing dependencies) try `make clean` before compiling, especially if you updated your system since the last time you compiled.
 
 
-### Windows (Visual Studio)
+### Windows (Visual Studio 2019)
+
+Not recommended due to poor support for C standards, and lack of maintenance.
+
+DarkPlaces requires C11, so Windows SDK 10.0.22000.0 (VS 2019) or 10.0.20348.0 (VS 2022) or later is needed.  
+To install it, run the Visual Studio Installer, click "Modify", click "Individual components", select the latest Windows SDK version and de-select older versions.  
+You will also need the NuGet Package Manager selected (to download SDL2 headers the first time you build).
+Click "Modify" to apply the changes.  
+
+VS 2019  
+![MSVC2019](msvc2019_C11.png)  
+
+Open `darkplaces-vs2019.sln`, select build type "Debug" or "Release, and choose "Build Solution" from the "Build" menu to create the file `darkplaces-sdl2-vs2019.exe`.
+
+The Release build crashes. The Debug build doesn't crash (but is rather slow) so this will be Fun for someone to debug.
+
+To get a build suitable for playing Quake you'll need to use MinGW gcc, or download the autobuild from Xonotic (see above).
 
-May work but not recommended due to lack of support for C standards, and lack of maintenance.
-Instructions TODO.
 
 ## Contributing