X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.wiki.git;a=blobdiff_plain;f=Programming-Tips.md;h=d05c4b10d0988f1f4572311a6c38775982e7779a;hp=188bd1a7c360f192f1a12f2ba573c46d0c9ec5e6;hb=HEAD;hpb=393865087efb5c5659c240802096ddeb29661a70 diff --git a/Programming-Tips.md b/Programming-Tips.md index 188bd1a..7530860 100644 --- a/Programming-Tips.md +++ b/Programming-Tips.md @@ -1,10 +1,20 @@ ### Faster compiling and reloading of QuakeC -You can use `QCCFLAGS_WERROR="" ZIP=: ./all compile` to let the build succeed even with warnings and to skip compressing the resulting csprogs.dat (client gamecode) into a pk3. +You can use `QCCFLAGS_WERROR=""` to let the build succeed even with some warnings and `ZIP=:` to skip compressing the resulting csprogs.dat (client gamecode) into a pk3. A compressed csprogs.dat is only useful to increase download speed of such file if you host an online dedicated server. + +`QCCFLAGS_WERROR="" ZIP=: ./all compile` Server and menu code produce progs.dat and menu.dat respectively. -No need to restart Xonotic to load the new client and server code, just start a new map with `map XXX` (depending on how you launch Xonotic you may need to use `fs_rescan; map XXX`). You can restart the menu with `menu_restart`. +Compiling the Xonotic game code without trying to compile the engine code reduces compile time a little bit, in the case you aren't interested in changing the engine code. You can do so by running this command from the xonotic-data.pk3dir directory: + +`make qc -j4` + +where `-j4` is an option that lets you use up to 4 CPU cores for the compilation (it's enabled by default in `./all compile`). If you want you can run `make all -j4` to enable csprogs.dat compression. + +To test the QC client and server programs you don't need to restart Xonotic, you just have to start a new game with `map ` (depending on how you launch Xonotic you may need to use `fs_rescan; map `). + +To test the QC menu program, you just have to restart the menu by executing `menu_restart` in the console. ### Debug prints @@ -72,7 +82,7 @@ prvm_edictwatchpoint server Incomplete [Doxygen documentation](https://timepath.github.io/scratchspace/index.html) is generated as part of CI on [xonotic-data.pk3dir](https://gitlab.com/xonotic/xonotic-data.pk3dir) - you can search functions, "classes", globals, etc. -Note that it might be incomplete or incorrect because Doxygen doesn't understand all of QC's constructs and our code heavily uses macros. See the [CI file](https://gitlab.com/xonotic/xonotic-data.pk3dir/blob/master/.gitlab-ci.yml) for details what's missing. +Note that it might be incomplete or incorrect because [Doxygen](https://www.doxygen.nl) doesn't understand all of QC's constructs and our code heavily uses macros. See the `doxygen` section of the [CI file](https://gitlab.com/xonotic/xonotic-data.pk3dir/blob/master/.gitlab-ci.yml) for details what's missing. ### Tool to find C symbols, functions, declarations and definitions inside source code