Copy disabled (too large)
Download .txt
Showing preview only (28,487K chars total). Download the full file to get everything.
Repository: fte-team/fteqw
Branch: master
Commit: 3584377302cd
Files: 981
Total size: 27.0 MB
Directory structure:
gitextract_twr6mi4o/
├── .forgejo/
│ └── workflows/
│ └── bin-linux64-release.yaml
├── .github/
│ └── workflows/
│ └── main.yml
├── .gitignore
├── CMakeLists.txt
├── LICENSE
├── README.md
├── build_qc.sh
├── build_setup.sh
├── build_wip.sh
├── dist/
│ └── linux/
│ ├── com.riverbankcomputing.qscintilla.install.patch
│ ├── linter-exceptions.json
│ ├── org.fteqw.fteqw.desktop
│ ├── org.fteqw.fteqw.fixdownloads.patch
│ ├── org.fteqw.fteqw.fixhomedir.patch
│ ├── org.fteqw.fteqw.metainfo.xml
│ ├── org.fteqw.fteqw.sh
│ └── org.fteqw.fteqw.yml
├── documentation/
│ ├── Building.md
│ ├── Credits.md
│ ├── Dependencies.md
│ ├── QuickStart.md
│ └── Tools.md
├── dounifdef.sh
├── engine/
│ ├── BSDmakefile
│ ├── LICENSE
│ ├── Makefile
│ ├── README.MSVC
│ ├── client/
│ │ ├── anorms.h
│ │ ├── api_menu.h
│ │ ├── bymorphed.h
│ │ ├── cd_linux.c
│ │ ├── cd_null.c
│ │ ├── cd_sdl.c
│ │ ├── cd_win.c
│ │ ├── cdaudio.h
│ │ ├── cl_cam.c
│ │ ├── cl_demo.c
│ │ ├── cl_ents.c
│ │ ├── cl_ignore.c
│ │ ├── cl_ignore.h
│ │ ├── cl_input.c
│ │ ├── cl_main.c
│ │ ├── cl_master.h
│ │ ├── cl_parse.c
│ │ ├── cl_plugin.inc
│ │ ├── cl_pred.c
│ │ ├── cl_screen.c
│ │ ├── cl_tent.c
│ │ ├── clhl_game.c
│ │ ├── client.h
│ │ ├── clq2_cin.c
│ │ ├── clq2_ents.c
│ │ ├── console.c
│ │ ├── fragstats.c
│ │ ├── fte_eukara64.h
│ │ ├── image.c
│ │ ├── image_astc.h
│ │ ├── in_generic.c
│ │ ├── in_morphos.c
│ │ ├── in_morphos.h
│ │ ├── in_raw.h
│ │ ├── in_sdl.c
│ │ ├── in_win.c
│ │ ├── input.h
│ │ ├── keys.c
│ │ ├── keys.h
│ │ ├── lhfont.h
│ │ ├── m_download.c
│ │ ├── m_items.c
│ │ ├── m_master.c
│ │ ├── m_mp3.c
│ │ ├── m_multi.c
│ │ ├── m_native.c
│ │ ├── m_options.c
│ │ ├── m_script.c
│ │ ├── m_single.c
│ │ ├── menu.c
│ │ ├── menu.h
│ │ ├── merged.h
│ │ ├── modelgen.h
│ │ ├── net_master.c
│ │ ├── p_classic.c
│ │ ├── p_null.c
│ │ ├── p_script.c
│ │ ├── pr_clcmd.c
│ │ ├── pr_csqc.c
│ │ ├── pr_menu.c
│ │ ├── pr_skelobj.c
│ │ ├── q2anorms.h
│ │ ├── q2m_flash.c
│ │ ├── quake.manifest
│ │ ├── quakedef.h
│ │ ├── r_2d.c
│ │ ├── r_d3.c
│ │ ├── r_part.c
│ │ ├── r_partset.c
│ │ ├── r_partset.h
│ │ ├── r_surf.c
│ │ ├── render.h
│ │ ├── renderer.c
│ │ ├── renderque.c
│ │ ├── renderque.h
│ │ ├── resource.h
│ │ ├── roq.h
│ │ ├── roq_read.c
│ │ ├── sbar.c
│ │ ├── sbar.h
│ │ ├── screen.h
│ │ ├── skin.c
│ │ ├── snd_al.c
│ │ ├── snd_alsa.c
│ │ ├── snd_directx.c
│ │ ├── snd_dma.c
│ │ ├── snd_droid.c
│ │ ├── snd_linux.c
│ │ ├── snd_macos.c
│ │ ├── snd_mem.c
│ │ ├── snd_mix.c
│ │ ├── snd_morphos.c
│ │ ├── snd_mp3.c
│ │ ├── snd_opensl.c
│ │ ├── snd_ov.c
│ │ ├── snd_pulse.c
│ │ ├── snd_sblaster.c
│ │ ├── snd_sdl.c
│ │ ├── snd_sndio.c
│ │ ├── snd_wasapi.c
│ │ ├── snd_win.c
│ │ ├── snd_xaudio.c
│ │ ├── sound.h
│ │ ├── spritegn.h
│ │ ├── sys_axfte.cpp
│ │ ├── sys_dos.c
│ │ ├── sys_droid.c
│ │ ├── sys_linux.c
│ │ ├── sys_morphos.c
│ │ ├── sys_plugfte.c
│ │ ├── sys_plugfte.h
│ │ ├── sys_sdl.c
│ │ ├── sys_win.c
│ │ ├── sys_xdk.c
│ │ ├── teamplay.c
│ │ ├── textedit.c
│ │ ├── valid.c
│ │ ├── vid.h
│ │ ├── vid_headless.c
│ │ ├── view.c
│ │ ├── view.h
│ │ ├── vr.h
│ │ ├── wad.c
│ │ ├── wad.h
│ │ ├── winamp.h
│ │ ├── winquake.h
│ │ ├── winquake.rc
│ │ └── zqtp.c
│ ├── common/
│ │ ├── bothdefs.h
│ │ ├── bspfile.h
│ │ ├── cmd.c
│ │ ├── cmd.h
│ │ ├── com_bih.c
│ │ ├── com_bih.h
│ │ ├── com_mesh.c
│ │ ├── com_mesh.h
│ │ ├── com_phys_bullet.cpp
│ │ ├── com_phys_ode.c
│ │ ├── common.c
│ │ ├── common.h
│ │ ├── config_freecs.h
│ │ ├── config_fteqw.h
│ │ ├── config_fteqw_noweb.h
│ │ ├── config_minimal.h
│ │ ├── config_nocompat.h
│ │ ├── config_wastes.h
│ │ ├── console.h
│ │ ├── crc.c
│ │ ├── cvar.c
│ │ ├── cvar.h
│ │ ├── fs.c
│ │ ├── fs.h
│ │ ├── fs_dzip.c
│ │ ├── fs_pak.c
│ │ ├── fs_stdio.c
│ │ ├── fs_win32.c
│ │ ├── fs_xz.c
│ │ ├── fs_zip.c
│ │ ├── gl_q2bsp.c
│ │ ├── huff.c
│ │ ├── json.c
│ │ ├── log.c
│ │ ├── mathlib.c
│ │ ├── mathlib.h
│ │ ├── md4.c
│ │ ├── md5.c
│ │ ├── net.h
│ │ ├── net_chan.c
│ │ ├── net_ice.c
│ │ ├── net_ssl_gnutls.c
│ │ ├── net_ssl_winsspi.c
│ │ ├── net_wins.c
│ │ ├── netinc.h
│ │ ├── particles.h
│ │ ├── plugin.c
│ │ ├── pmove.c
│ │ ├── pmove.h
│ │ ├── pmovetst.c
│ │ ├── pr_bgcmd.c
│ │ ├── pr_common.h
│ │ ├── protocol.h
│ │ ├── q1bsp.c
│ │ ├── q2pmove.c
│ │ ├── q3api.h
│ │ ├── qvm.c
│ │ ├── sha1.c
│ │ ├── sha2.c
│ │ ├── sys.h
│ │ ├── sys_linux_threads.c
│ │ ├── sys_win_threads.c
│ │ ├── translate.c
│ │ ├── translate.h
│ │ ├── ui_public.h
│ │ ├── vm.h
│ │ ├── world.h
│ │ ├── zone.c
│ │ └── zone.h
│ ├── d3d/
│ │ ├── d3d11_backend.c
│ │ ├── d3d11_image.c
│ │ ├── d3d11_shader.c
│ │ ├── d3d8_backend.c
│ │ ├── d3d8_image.c
│ │ ├── d3d_backend.c
│ │ ├── d3d_image.c
│ │ ├── d3d_shader.c
│ │ ├── vid_d3d.c
│ │ ├── vid_d3d11.c
│ │ └── vid_d3d8.c
│ ├── droid/
│ │ ├── AndroidManifest.xml
│ │ ├── configs/
│ │ │ └── touch.cfg
│ │ ├── default.fmf
│ │ ├── fte.cfg
│ │ ├── res/
│ │ │ ├── drawable/
│ │ │ │ ├── touch_attack.tga
│ │ │ │ ├── touch_jump.tga
│ │ │ │ ├── touch_moveback.tga
│ │ │ │ ├── touch_moveforward.tga
│ │ │ │ ├── touch_moveleft.tga
│ │ │ │ ├── touch_moveright.tga
│ │ │ │ ├── touch_turnleft.tga
│ │ │ │ └── touch_turnright.tga
│ │ │ └── values/
│ │ │ └── strings.xml
│ │ └── src/
│ │ └── com/
│ │ └── fteqw/
│ │ ├── FTEDroidActivity.java
│ │ ├── FTEDroidEngine.java
│ │ └── FTENativeActivity.java
│ ├── gl/
│ │ ├── gl_alias.c
│ │ ├── gl_backend.c
│ │ ├── gl_bloom.c
│ │ ├── gl_draw.c
│ │ ├── gl_draw.h
│ │ ├── gl_font.c
│ │ ├── gl_heightmap.c
│ │ ├── gl_hlmdl.c
│ │ ├── gl_model.c
│ │ ├── gl_model.h
│ │ ├── gl_ngraph.c
│ │ ├── gl_rlight.c
│ │ ├── gl_rmain.c
│ │ ├── gl_rmisc.c
│ │ ├── gl_rsurf.c
│ │ ├── gl_screen.c
│ │ ├── gl_shader.c
│ │ ├── gl_shadow.c
│ │ ├── gl_terrain.h
│ │ ├── gl_vidcocoa.m
│ │ ├── gl_vidcommon.c
│ │ ├── gl_viddroid.c
│ │ ├── gl_videgl.c
│ │ ├── gl_videgl.h
│ │ ├── gl_vidlinuxglx.c
│ │ ├── gl_vidmacos.c
│ │ ├── gl_vidmorphos.c
│ │ ├── gl_vidnt.c
│ │ ├── gl_vidnull.c
│ │ ├── gl_vidrpi.c
│ │ ├── gl_vidsdl.c
│ │ ├── gl_vidtinyglstubs.c
│ │ ├── gl_vidwayland.c
│ │ ├── gl_warp.c
│ │ ├── gl_warp_sin.h
│ │ ├── glmod_doom.c
│ │ ├── glquake.h
│ │ ├── glsupp.h
│ │ ├── ltface.c
│ │ ├── model_hl.h
│ │ ├── r_bishaders.h
│ │ └── shader.h
│ ├── http/
│ │ ├── ftpclient.c
│ │ ├── ftpserver.c
│ │ ├── httpclient.c
│ │ ├── httpserver.c
│ │ ├── iweb.h
│ │ ├── iwebiface.c
│ │ └── webgen.c
│ ├── makeconfig.sh
│ ├── partcfgs/
│ │ ├── faithful.cfg
│ │ ├── generatebuiltin.c
│ │ ├── h2part.cfg
│ │ ├── high.cfg
│ │ ├── highfps.cfg
│ │ ├── minimal.cfg
│ │ ├── q2part.cfg
│ │ ├── spikeset.cfg
│ │ └── tsshaft.cfg
│ ├── qclib/
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── cmdlib.h
│ │ ├── comprout.c
│ │ ├── decomp.c
│ │ ├── execloop.h
│ │ ├── fteqcc.rc
│ │ ├── gui.h
│ │ ├── hash.c
│ │ ├── hash.h
│ │ ├── initlib.c
│ │ ├── packager.c
│ │ ├── pr_comp.h
│ │ ├── pr_edict.c
│ │ ├── pr_exec.c
│ │ ├── pr_multi.c
│ │ ├── pr_x86.c
│ │ ├── progsint.h
│ │ ├── progslib.h
│ │ ├── progtype.h
│ │ ├── qcc.h
│ │ ├── qcc_cmdlib.c
│ │ ├── qcc_pr_comp.c
│ │ ├── qcc_pr_lex.c
│ │ ├── qccgui.c
│ │ ├── qccguiqt.cpp
│ │ ├── qccguistuff.c
│ │ ├── qccmain.c
│ │ ├── qcctui.c
│ │ ├── qcd.h
│ │ ├── qcd_main.c
│ │ ├── qcdecomp.c
│ │ ├── readme.txt
│ │ └── test.c
│ ├── server/
│ │ ├── net_preparse.c
│ │ ├── pr_cmds.c
│ │ ├── pr_lua.c
│ │ ├── pr_q1qvm.c
│ │ ├── progdefs.h
│ │ ├── progs.h
│ │ ├── q2game.h
│ │ ├── savegame.c
│ │ ├── server.h
│ │ ├── sqlite3.h
│ │ ├── sv_ccmds.c
│ │ ├── sv_chat.c
│ │ ├── sv_cluster.c
│ │ ├── sv_demo.c
│ │ ├── sv_ents.c
│ │ ├── sv_init.c
│ │ ├── sv_main.c
│ │ ├── sv_master.c
│ │ ├── sv_move.c
│ │ ├── sv_mvd.c
│ │ ├── sv_nchan.c
│ │ ├── sv_phys.c
│ │ ├── sv_rankin.c
│ │ ├── sv_send.c
│ │ ├── sv_sql.c
│ │ ├── sv_sql.h
│ │ ├── sv_sys_unix.c
│ │ ├── sv_sys_win.c
│ │ ├── sv_user.c
│ │ ├── svhl_game.c
│ │ ├── svhl_gcapi.h
│ │ ├── svhl_phys.c
│ │ ├── svhl_world.c
│ │ ├── svq2_ents.c
│ │ ├── svq2_game.c
│ │ └── world.c
│ ├── shaders/
│ │ ├── Makefile
│ │ ├── generatebuiltinsl.c
│ │ ├── glsl/
│ │ │ ├── altwater.glsl
│ │ │ ├── bloom_blur.glsl
│ │ │ ├── bloom_filter.glsl
│ │ │ ├── bloom_final.glsl
│ │ │ ├── colourtint.glsl
│ │ │ ├── crepuscular_opaque.glsl
│ │ │ ├── crepuscular_rays.glsl
│ │ │ ├── crepuscular_sky.glsl
│ │ │ ├── default2d.glsl
│ │ │ ├── default2danim.glsl
│ │ │ ├── defaultadditivesprite.glsl
│ │ │ ├── defaultfill.glsl
│ │ │ ├── defaultgammacb.glsl
│ │ │ ├── defaultskin.glsl
│ │ │ ├── defaultsky.glsl
│ │ │ ├── defaultskybox.glsl
│ │ │ ├── defaultsprite.glsl
│ │ │ ├── defaultwall.glsl
│ │ │ ├── defaultwarp.glsl
│ │ │ ├── depthonly.glsl
│ │ │ ├── drawflat_wall.glsl
│ │ │ ├── fixedemu.glsl
│ │ │ ├── fxaa.glsl
│ │ │ ├── itemtimer.glsl
│ │ │ ├── lpp_depthnorm.glsl
│ │ │ ├── lpp_light.glsl
│ │ │ ├── lpp_wall.glsl
│ │ │ ├── menutint.glsl
│ │ │ ├── postproc_ascii.glsl
│ │ │ ├── postproc_equirectangular.glsl
│ │ │ ├── postproc_fisheye.glsl
│ │ │ ├── postproc_laea.glsl
│ │ │ ├── postproc_panini.glsl
│ │ │ ├── postproc_panorama.glsl
│ │ │ ├── postproc_stereographic.glsl
│ │ │ ├── rtlight.glsl
│ │ │ ├── terrain.glsl
│ │ │ ├── underwaterwarp.glsl
│ │ │ └── wireframe.glsl
│ │ ├── hlsl11/
│ │ │ ├── default2d.hlsl
│ │ │ ├── defaultfill.hlsl
│ │ │ ├── defaultskin.hlsl
│ │ │ ├── defaultsky.hlsl
│ │ │ ├── defaultskybox.hlsl
│ │ │ ├── defaultsprite.hlsl
│ │ │ ├── defaultwall.hlsl
│ │ │ ├── defaultwarp.hlsl
│ │ │ ├── depthonly.hlsl
│ │ │ ├── drawflat_wall.hlsl
│ │ │ ├── fixedemu.hlsl
│ │ │ ├── menutint.hlsl
│ │ │ ├── rtlight.hlsl
│ │ │ ├── terrain.hlsl
│ │ │ └── terraindebug.hlsl
│ │ ├── hlsl9/
│ │ │ ├── defaultskin.hlsl
│ │ │ ├── defaultsky.hlsl
│ │ │ ├── defaultskybox.hlsl
│ │ │ ├── defaultwall.hlsl
│ │ │ ├── defaultwarp.hlsl
│ │ │ ├── drawflat_wall.hlsl
│ │ │ ├── rtlight.hlsl
│ │ │ └── terrain.hlsl
│ │ ├── makevulkanblob.c
│ │ └── vulkan/
│ │ ├── altwater.glsl
│ │ ├── bloom_blur.glsl
│ │ ├── bloom_filter.glsl
│ │ ├── bloom_final.glsl
│ │ ├── default2d.glsl
│ │ ├── defaultadditivesprite.glsl
│ │ ├── defaultfill.glsl
│ │ ├── defaultgammacb.glsl
│ │ ├── defaultskin.glsl
│ │ ├── defaultsky.glsl
│ │ ├── defaultskybox.glsl
│ │ ├── defaultsprite.glsl
│ │ ├── defaultwall.glsl
│ │ ├── defaultwarp.glsl
│ │ ├── depthonly.glsl
│ │ ├── drawflat_wall.glsl
│ │ ├── fixedemu.glsl
│ │ ├── fixedemu_flat.glsl
│ │ ├── fxaa.glsl
│ │ ├── menutint.glsl
│ │ ├── postproc_fisheye.glsl
│ │ ├── postproc_panorama.glsl
│ │ ├── postproc_stereographic.glsl
│ │ ├── rtlight.glsl
│ │ ├── sys/
│ │ │ ├── defs.h
│ │ │ ├── fog.h
│ │ │ ├── offsetmapping.h
│ │ │ └── skeletal.h
│ │ └── underwaterwarp.glsl
│ ├── sw/
│ │ ├── sw.h
│ │ ├── sw_backend.c
│ │ ├── sw_image.c
│ │ ├── sw_rast.c
│ │ ├── sw_spans.h
│ │ ├── sw_viddos.c
│ │ └── sw_vidwin.c
│ ├── vk/
│ │ ├── vk_backend.c
│ │ ├── vk_init.c
│ │ └── vkrenderer.h
│ ├── web/
│ │ ├── fs_web.c
│ │ ├── fte_pwa.json
│ │ ├── fte_pwa_sw.js
│ │ ├── ftejslib.h
│ │ ├── ftejslib.js
│ │ ├── fteshell.html
│ │ ├── gl_vidweb.c
│ │ ├── prejs.js
│ │ └── sys_web.c
│ └── xdk/
│ ├── FTEQW_XDK.sln
│ ├── FTEQW_XDK.suo
│ └── FTEQW_XDK.vcproj
├── fte.m4
├── ftechrootbuild.sh
├── fteqtv/
│ ├── LICENSE
│ ├── Makefile
│ ├── bsd_string.h
│ ├── bsp.c
│ ├── cmd.h
│ ├── control.c
│ ├── crc.c
│ ├── forward.c
│ ├── httpsv.c
│ ├── libqtvc/
│ │ ├── Makefile
│ │ ├── glibc_sucks.c
│ │ └── msvc_sucks.c
│ ├── mdfour.c
│ ├── menu.c
│ ├── msg.c
│ ├── net_qtv.h
│ ├── netchan.c
│ ├── nq_api.c
│ ├── parse.c
│ ├── pmove.c
│ ├── protocol.h
│ ├── qtv.h
│ ├── qw.c
│ ├── rcon.c
│ ├── relay.c
│ ├── sc_dsound.c
│ ├── source.c
│ └── sp_dsound.c
├── fteqw_readme.txt
├── ftetools_readme.txt
├── games/
│ ├── fortressone.fmf
│ ├── freehl.fmf
│ ├── hexen2-demo.fmf
│ ├── ktx.fmf
│ ├── quake-demo.fmf
│ └── xonotic_85.fmf
├── imgtool.c
├── iqm/
│ ├── LICENSE
│ ├── Makefile
│ ├── Makefile.mingw
│ ├── README.txt
│ ├── iqm.cpp
│ ├── iqm.h
│ └── util.h
├── plugins/
│ ├── Makefile
│ ├── avplug/
│ │ ├── avaudio.c
│ │ ├── avdecode.c
│ │ ├── avencode.c
│ │ ├── msvc_libc/
│ │ │ ├── inttypes.h
│ │ │ └── stdint.h
│ │ └── readme.txt
│ ├── berkelium/
│ │ ├── Makefile
│ │ ├── plugapi.cpp
│ │ └── readme.txt
│ ├── botlib/
│ │ └── makebotlibdll.bat
│ ├── bullet/
│ │ └── bulletplug.cpp
│ ├── cef/
│ │ └── cef.c
│ ├── cod/
│ │ ├── codbsp.c
│ │ ├── codiwi.c
│ │ ├── codmat.c
│ │ └── codmod.c
│ ├── emailnot/
│ │ ├── emailnot.q3asm
│ │ ├── imapnoti.c
│ │ ├── md5.c
│ │ └── pop3noti.c
│ ├── engine.h
│ ├── ezhud/
│ │ ├── builtin_huds.h
│ │ ├── ezquakeisms.c
│ │ ├── ezquakeisms.h
│ │ ├── hud.c
│ │ ├── hud.h
│ │ ├── hud_common.c
│ │ ├── hud_common.h
│ │ ├── hud_editor.c
│ │ └── hud_editor.h
│ ├── ezscript/
│ │ ├── ezscript.c
│ │ └── ezscript.q3asm
│ ├── hl2/
│ │ ├── Makefile
│ │ ├── fs_gma.c
│ │ ├── fs_vpk.c
│ │ ├── fs_vpk_vtmb.c
│ │ ├── glsl/
│ │ │ └── vmt/
│ │ │ ├── lightmapped.glsl
│ │ │ ├── refract.glsl
│ │ │ ├── rt.glsl
│ │ │ ├── transition.glsl
│ │ │ ├── unlit.glsl
│ │ │ ├── vertexlit.glsl
│ │ │ └── water.glsl
│ │ ├── hl2.c
│ │ ├── img_tth.c
│ │ ├── img_vtf.c
│ │ ├── mat_vmt.c
│ │ ├── mat_vmt_progs.h
│ │ ├── mod_hl2.c
│ │ └── mod_vbsp.c
│ ├── hud/
│ │ ├── qwui.q3asm
│ │ └── ui_sbar.c
│ ├── irc/
│ │ ├── ircclient.c
│ │ ├── ircclient.q3asm
│ │ └── raw codes.txt
│ ├── jabber/
│ │ ├── jabbercl.q3asm
│ │ ├── jabberclient.c
│ │ ├── jingle.c
│ │ ├── sift.c
│ │ ├── xml.c
│ │ ├── xml.h
│ │ └── xmpp.h
│ ├── models/
│ │ ├── draco.cpp
│ │ ├── exportiqm.c
│ │ ├── gltf.c
│ │ └── models.c
│ ├── mpq/
│ │ ├── blast.c
│ │ ├── blast.h
│ │ └── fs_mpq.c
│ ├── namemaker/
│ │ ├── namemaker.c
│ │ └── namemaker.q3asm
│ ├── net_ssl_openssl.c
│ ├── openxr.c
│ ├── plugin.c
│ ├── plugin.def
│ ├── plugin.h
│ ├── qi/
│ │ └── qi.c
│ ├── quake3/
│ │ ├── botlib/
│ │ │ ├── aasfile.h
│ │ │ ├── be_aas.h
│ │ │ ├── be_aas_bsp.h
│ │ │ ├── be_aas_bspq3.c
│ │ │ ├── be_aas_cluster.c
│ │ │ ├── be_aas_cluster.h
│ │ │ ├── be_aas_debug.c
│ │ │ ├── be_aas_debug.h
│ │ │ ├── be_aas_def.h
│ │ │ ├── be_aas_entity.c
│ │ │ ├── be_aas_entity.h
│ │ │ ├── be_aas_file.c
│ │ │ ├── be_aas_file.h
│ │ │ ├── be_aas_funcs.h
│ │ │ ├── be_aas_main.c
│ │ │ ├── be_aas_main.h
│ │ │ ├── be_aas_move.c
│ │ │ ├── be_aas_move.h
│ │ │ ├── be_aas_optimize.c
│ │ │ ├── be_aas_optimize.h
│ │ │ ├── be_aas_reach.c
│ │ │ ├── be_aas_reach.h
│ │ │ ├── be_aas_route.c
│ │ │ ├── be_aas_route.h
│ │ │ ├── be_aas_routealt.c
│ │ │ ├── be_aas_routealt.h
│ │ │ ├── be_aas_sample.c
│ │ │ ├── be_aas_sample.h
│ │ │ ├── be_ai_char.c
│ │ │ ├── be_ai_char.h
│ │ │ ├── be_ai_chat.c
│ │ │ ├── be_ai_chat.h
│ │ │ ├── be_ai_gen.c
│ │ │ ├── be_ai_gen.h
│ │ │ ├── be_ai_goal.c
│ │ │ ├── be_ai_goal.h
│ │ │ ├── be_ai_move.c
│ │ │ ├── be_ai_move.h
│ │ │ ├── be_ai_weap.c
│ │ │ ├── be_ai_weap.h
│ │ │ ├── be_ai_weight.c
│ │ │ ├── be_ai_weight.h
│ │ │ ├── be_ea.c
│ │ │ ├── be_ea.h
│ │ │ ├── be_interface.c
│ │ │ ├── be_interface.h
│ │ │ ├── botlib.h
│ │ │ ├── l_crc.c
│ │ │ ├── l_crc.h
│ │ │ ├── l_libvar.c
│ │ │ ├── l_libvar.h
│ │ │ ├── l_log.c
│ │ │ ├── l_log.h
│ │ │ ├── l_memory.c
│ │ │ ├── l_memory.h
│ │ │ ├── l_precomp.c
│ │ │ ├── l_precomp.h
│ │ │ ├── l_script.c
│ │ │ ├── l_script.h
│ │ │ ├── l_struct.c
│ │ │ ├── l_struct.h
│ │ │ ├── l_utils.h
│ │ │ ├── q_platform.h
│ │ │ ├── q_shared.h
│ │ │ ├── standalone.c
│ │ │ └── surfaceflags.h
│ │ ├── clq3_cg.c
│ │ ├── clq3_parse.c
│ │ ├── clq3_ui.c
│ │ ├── clq3defs.h
│ │ ├── q3common.c
│ │ ├── q3common.h
│ │ ├── q3g_public.h
│ │ └── svq3_game.c
│ ├── serverb/
│ │ ├── cl_master.h
│ │ ├── m_master.c
│ │ └── net_master.c
│ ├── spaceinv/
│ │ ├── spaceinv.c
│ │ └── spaceinv.q3asm
│ ├── terrorgen/
│ │ └── terragen.c
│ ├── winamp/
│ │ ├── winamp.c
│ │ └── winamp.h
│ └── xsv/
│ ├── Xmd.h
│ ├── Xproto.h
│ ├── Xprotostr.h
│ ├── bigreqstr.h
│ ├── keysymdef.h
│ ├── m_x.c
│ ├── qux.h
│ ├── x.h
│ ├── x_reqs.c
│ └── x_res.c
├── q3asm2/
│ ├── Makefile
│ ├── opstrings.h
│ └── q3asm2.c
├── quakec/
│ ├── autoext/
│ │ ├── lists/
│ │ │ └── extlist.txt
│ │ └── src/
│ │ ├── autoext.qc
│ │ ├── builtins.qc
│ │ ├── defs.qc
│ │ └── progs.src
│ ├── basemod/
│ │ ├── ai.qc
│ │ ├── basemod.txt
│ │ ├── boss.qc
│ │ ├── buttons.qc
│ │ ├── client.qc
│ │ ├── combat.qc
│ │ ├── defs.qc
│ │ ├── demon.qc
│ │ ├── dog.qc
│ │ ├── doors.qc
│ │ ├── effects.qc
│ │ ├── enforcer.qc
│ │ ├── engine.qc
│ │ ├── fight.qc
│ │ ├── fish.qc
│ │ ├── hknight.qc
│ │ ├── items.qc
│ │ ├── knight.qc
│ │ ├── misc.qc
│ │ ├── monsters.qc
│ │ ├── nomonst.qc
│ │ ├── obituary.qc
│ │ ├── ogre.qc
│ │ ├── oldone.qc
│ │ ├── plats.qc
│ │ ├── player.qc
│ │ ├── progs.src
│ │ ├── proj.qc
│ │ ├── replace.qc
│ │ ├── shalrath.qc
│ │ ├── shambler.qc
│ │ ├── soldier.qc
│ │ ├── spectate.qc
│ │ ├── sprites.qc
│ │ ├── subs.qc
│ │ ├── tarbaby.qc
│ │ ├── triggers.qc
│ │ ├── weapons.qc
│ │ ├── wizard.qc
│ │ ├── world.qc
│ │ └── zombie.qc
│ ├── csaddon/
│ │ └── src/
│ │ ├── brush_draw.qc
│ │ ├── brush_history.qc
│ │ ├── brush_manip.qc
│ │ ├── brush_selection.qc
│ │ ├── brush_vertedit.qc
│ │ ├── cam.qc
│ │ ├── csaddon.qc
│ │ ├── csaddon.src
│ │ ├── csfixups.qc
│ │ ├── csplat.qc
│ │ ├── editor_brushes.qc
│ │ ├── editor_ents.qc
│ │ ├── editor_lights.qc
│ │ ├── editor_particles.qc
│ │ ├── editor_terrain.qc
│ │ ├── menu.qc
│ │ └── textfield.qc
│ ├── csqctest/
│ │ └── src/
│ │ ├── common/
│ │ │ ├── classes.qc
│ │ │ ├── econstants.qc
│ │ │ ├── makeallstatic.qc
│ │ │ ├── mconstants.qc
│ │ │ └── pmove.qc
│ │ ├── cs/
│ │ │ ├── constants.qc
│ │ │ ├── defs.qc
│ │ │ ├── editor_lights.qc
│ │ │ ├── editor_terrain.qc
│ │ │ ├── entrypoints.qc
│ │ │ ├── fun/
│ │ │ │ ├── osgk.qc
│ │ │ │ ├── skinchooser.qc
│ │ │ │ └── tetris.qc
│ │ │ ├── hlpm.qc
│ │ │ ├── hud.qc
│ │ │ ├── map.qc
│ │ │ ├── menu.qc
│ │ │ ├── movetypes.qc
│ │ │ ├── player.qc
│ │ │ ├── playerframes.inc
│ │ │ ├── prediction.qc
│ │ │ ├── q3playerm.qc
│ │ │ ├── q4player.qc
│ │ │ ├── tempent.qc
│ │ │ ├── test.qc
│ │ │ └── weapons.qc
│ │ ├── csprogs.src
│ │ ├── optsall.qc
│ │ ├── optsmenu.qc
│ │ ├── progs.src
│ │ ├── ss/
│ │ │ ├── ai.qc
│ │ │ ├── boss.qc
│ │ │ ├── buttons.qc
│ │ │ ├── client.qc
│ │ │ ├── combat.qc
│ │ │ ├── defs.qc
│ │ │ ├── demon.qc
│ │ │ ├── dog.qc
│ │ │ ├── doors.qc
│ │ │ ├── enforcer.qc
│ │ │ ├── fight.qc
│ │ │ ├── fish.qc
│ │ │ ├── flag.qc
│ │ │ ├── hknight.qc
│ │ │ ├── items.qc
│ │ │ ├── knight.qc
│ │ │ ├── misc.qc
│ │ │ ├── monsters.qc
│ │ │ ├── ogre.qc
│ │ │ ├── oldone.qc
│ │ │ ├── plats.qc
│ │ │ ├── player.qc
│ │ │ ├── shalrath.qc
│ │ │ ├── shambler.qc
│ │ │ ├── soldier.qc
│ │ │ ├── subs.qc
│ │ │ ├── tarbaby.qc
│ │ │ ├── triggers.qc
│ │ │ ├── weapons.qc
│ │ │ ├── wizard.qc
│ │ │ ├── world.qc
│ │ │ └── zombie.qc
│ │ └── ssqc.src
│ ├── dpsymbols.src
│ ├── fallout2/
│ │ ├── ai.qc
│ │ ├── boss.qc
│ │ ├── buttons.qc
│ │ ├── client.qc
│ │ ├── cmds.qc
│ │ ├── combat.qc
│ │ ├── csprogs.src
│ │ ├── csqc/
│ │ │ ├── builtins.qc
│ │ │ ├── constants.qc
│ │ │ ├── invent.qc
│ │ │ ├── main.qc
│ │ │ ├── stdbuiltins.qc
│ │ │ ├── stdconstants.qc
│ │ │ └── system.qc
│ │ ├── defs.qc
│ │ ├── demon.qc
│ │ ├── dog.qc
│ │ ├── doors.qc
│ │ ├── enforcer.qc
│ │ ├── fight.qc
│ │ ├── fish.qc
│ │ ├── hknight.qc
│ │ ├── hos.qc
│ │ ├── inventory.qc
│ │ ├── items.qc
│ │ ├── knight.qc
│ │ ├── menus.qc
│ │ ├── misc.qc
│ │ ├── mod_buy.qc
│ │ ├── mod_menus.qc
│ │ ├── mod_other.qc
│ │ ├── modbuy.qc
│ │ ├── models.qc
│ │ ├── monsters.qc
│ │ ├── name.qc
│ │ ├── ogre.qc
│ │ ├── plats.qc
│ │ ├── player.qc
│ │ ├── progs.src
│ │ ├── server.qc
│ │ ├── shalrath.qc
│ │ ├── shambler.qc
│ │ ├── soldier.qc
│ │ ├── spectate.qc
│ │ ├── sprites.qc
│ │ ├── subs.qc
│ │ ├── tf.qc
│ │ ├── triggers.qc
│ │ ├── turrets.qc
│ │ ├── weapons.qc
│ │ ├── wizard.qc
│ │ ├── world.qc
│ │ └── zombie.qc
│ └── menusys/
│ ├── README.TXT
│ ├── cs/
│ │ └── entrypoints.qc
│ ├── csprogs.src
│ ├── fteextensions.qc
│ ├── menu/
│ │ ├── cvars.qc
│ │ ├── loadsave.qc
│ │ ├── main.qc
│ │ ├── mods.qc
│ │ ├── newgame.qc
│ │ ├── options.qc
│ │ ├── options_audio.qc
│ │ ├── options_basic.qc
│ │ ├── options_configs.qc
│ │ ├── options_effects.qc
│ │ ├── options_hud.qc
│ │ ├── options_keys.qc
│ │ ├── options_particles.qc
│ │ ├── options_video.qc
│ │ ├── presets.qc
│ │ ├── quit.qc
│ │ ├── servers.qc
│ │ └── updates.qc
│ ├── menu.src
│ └── menusys/
│ ├── mitem_bind.qc
│ ├── mitem_checkbox.qc
│ ├── mitem_colours.qc
│ ├── mitem_combo.qc
│ ├── mitem_console.qc
│ ├── mitem_desktop.qc
│ ├── mitem_edittext.qc
│ ├── mitem_exmenu.qc
│ ├── mitem_frame.qc
│ ├── mitem_grid.qc
│ ├── mitem_menu.qc
│ ├── mitem_slider.qc
│ ├── mitem_spinnymodel.qc
│ ├── mitem_tabs.qc
│ ├── mitems.qc
│ ├── mitems_common.qc
│ └── readme.txt
└── specs/
├── antilag.txt
├── browser.txt
├── browserexample.html
├── bspx.txt
├── changelevels.md
├── chunkeddownloads.txt
├── compile farm scripts/
│ ├── linux/
│ │ ├── .bitchxrc
│ │ ├── build.sh
│ │ ├── build_ccache.sh
│ │ ├── build_fteqcc.sh
│ │ ├── build_fteqtv.sh
│ │ ├── build_wip.sh
│ │ ├── build_wip_ccache.sh
│ │ ├── build_wip_fteqcc.sh
│ │ ├── build_wip_fteqtv.sh
│ │ ├── buildnumber.sh
│ │ ├── ccache-alias.sh
│ │ ├── count.sh
│ │ ├── count_wip.sh
│ │ ├── svninfo.sh
│ │ └── svninfo_wip.sh
│ └── macosx/
│ └── build.sh
├── console.txt
├── csqc_for_idiots.txt
├── distort.pk3
├── distort.txt
├── example.shader
├── ext_csqc_1.txt
├── fonts.txt
├── fte_manifests.txt
├── glsl.md
├── hosting.txt
├── mapcluster.txt
├── modmaking.txt
├── multiprogs.txt
├── particles.txt
├── qc_extensions.txt
├── replacementdeltas.txt
├── rotating-brushes.md
├── rtlights.txt
├── scriptable menus.txt
├── skeletal.txt
├── spawning-entities-from-external-bsps.md
├── splitscreen.txt
├── videocapture.txt
└── viewmodels.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .forgejo/workflows/bin-linux64-release.yaml
================================================
name: bin-linux64-release
on:
push:
branches: [ master ]
jobs:
build:
runs-on: docker
steps:
- name: clone src
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: apt-get dependencies
run: |
apt-get -qq update
apt-get -qq install --no-install-recommends \
zip \
gettext \
libasound2-dev \
libgnutls28-dev \
libopenxr-dev \
libqscintilla2-qt5-dev \
libsdl2-dev \
libvulkan-dev \
libwayland-dev \
libxcursor-dev \
libxkbcommon-dev \
libxrandr-dev \
qtbase5-dev
- name: makelibs
run: cd engine && make makelibs FTE_TARGET=linux64
- name: build fteqw
run: cd engine && make m-rel FTE_TARGET=linux64 BRANDFLAGS="-DLINK_EZHUD=1"
- name: build fteqcc
run: cd engine && make qcc-rel FTE_TARGET=linux64
- name: build dedicated-server
run: cd engine && make sv-rel FTE_TARGET=linux64
- name: build plugins
run: cd engine && make plugins-rel FTE_TARGET=linux64 NATIVE_PLUGINS="ode cod ezhud hl2 irc models xmpp openxr openssl quake3 qi"
- name: build imgtool
run: cd engine && make imgtool FTE_TARGET=linux64
- name: build iqmtool
run: cd engine && make iqmtool FTE_TARGET=linux64
- name: upload release
uses: actions/forgejo-release@4d26949b75e208a9d85204fdd1d6685af0f876a8
with:
direction: upload
release-dir: ./engine/release
token: ${{ secrets.TOKEN }}
override: true
================================================
FILE: .github/workflows/main.yml
================================================
name: main
on: [ push, pull_request, workflow_dispatch ]
jobs:
cmake:
strategy:
matrix:
os: [ ubuntu-latest ]
profile: [ "Debug", "Release" ]
runs-on: ${{ matrix.os }}
steps:
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- uses: actions/checkout@v4
- name: "Install Dependencies"
run: |
sudo apt-get -qq update
sudo apt-get -qq install --no-install-recommends \
gettext \
libasound2-dev \
libbullet-dev \
libgnutls28-dev \
libopenxr-dev \
libqscintilla2-qt5-dev \
libsdl2-dev \
libpng-dev \
libvorbis-dev \
libvulkan-dev \
libwayland-dev \
libxcursor-dev \
libxkbcommon-dev \
libxrandr-dev \
qtbase5-dev
# Disabled due to warnings that break the debug build with -Werror
# libode-dev
# libavcodec-dev libavformat-dev libavutil-dev libswscale-dev
- name: "Configure: ${{ matrix.profile }}"
run: |
cmake -B build_${{ matrix.profile }} -DCMAKE_BUILD_TYPE=${{ matrix.profile }}
- name: "Build: ${{ matrix.profile }}"
run: |
cmake --build build_${{ matrix.profile }} --parallel ${{ steps.cpu-cores.outputs.count }}
make:
strategy:
matrix:
include:
- name: web
fte_target: web
make_targets: "gl-rel"
os: ubuntu-latest
- name: linux64
fte_target: linux64
make_targets: "m-rel sv-rel qtv-rel qcc-rel"
os: ubuntu-latest
packages: "libpng-dev libasound2-dev libgl-dev libegl1-mesa-dev libwayland-dev libxcursor-dev libxi-dev libxkbcommon-dev libxrandr-dev libxss-dev"
- name: win32
fte_target: win32
make_targets: "m-rel sv-rel qcc-rel"
os: ubuntu-latest
packages: "binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686"
- name: win64
fte_target: win64
make_targets: "m-rel sv-rel qcc-rel"
os: ubuntu-latest
packages: "binutils-mingw-w64-x86-64 gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64"
- name: macos-arm64
fte_target: SDL2
make_targets: "gl-rel sv-rel qcc-rel"
args: "ARCH=arm STRIPFLAGS="
packages: "sdl2"
os: macos-latest
name: make-${{ matrix.name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- uses: actions/checkout@v4
- name: Extract versions
run: grep 'VER=' engine/Makefile | tee makelibs_versions
- uses: actions/cache@v4
id: cache
with:
path: engine/libs-*
key: ${{ runner.os }}-${{ matrix.fte_target }}-${{ hashFiles('makelibs_versions') }}
- uses: mymindstorm/setup-emsdk@v14
with:
version: "2.0.12"
actions-cache-folder: "emsdk-cache-2.0.12"
cache-key: "emsdk-2.0.12"
if: matrix.fte_target == 'web'
- name: Verify emscripten
run: emcc -v
if: matrix.fte_target == 'web'
- name: Install dependencies (linux)
run: sudo apt-get -qq update && sudo apt-get -qq install --no-install-recommends ${{ matrix.packages }}
if: matrix.packages != '' && matrix.os == 'ubuntu-latest'
- name: Install dependencies (macos)
run: brew install ${{ matrix.packages }}
if: matrix.packages != '' && matrix.os == 'macos-latest'
- name: Build dependencies
working-directory: engine
run: make FTE_TARGET=${{ matrix.fte_target }} makelibs ${{ matrix.args }}
if: steps.cache.outputs.cache-hit != 'true'
- uses: ammaraskar/gcc-problem-matcher@0.3.0
- name: Build ${{ matrix.name }}
working-directory: engine
run: |
make -j ${{ steps.cpu-cores.outputs.count }} FTE_TARGET=${{ matrix.fte_target }} ${{ matrix.make_targets }} ${{ matrix.args }} LINK_EZHUD=1 LINK_OPENSSL=1
- name: Attach macOS docs
run: |
cat <<EOF > engine/release/fte_macos.txt
To allow executables to run issue for example:
chmod +x fteqw-glsdl2
xattr -d com.apple.quarantine fteqw-glsdl2
If you don't have SDL2 installed, run:
brew install sdl2
EOF
if: matrix.os == 'macos-latest'
- name: Get version
id: version
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: fteqw-${{ matrix.name }}-${{ steps.version.outputs.short_sha }}
path: |
engine/release/fte*
!engine/release/*.db
compression-level: 9
flatpak:
name: make-flatpak-${{ matrix.arch.name }}
timeout-minutes: 30
strategy:
matrix:
arch:
- name: x86_64
runner: ubuntu-latest
- name: aarch64
runner: ubuntu-24.04-arm
fail-fast: false
runs-on: ${{ matrix.arch.runner }}
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-5.15-23.08
options: --privileged
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint metadata and build manifest
run: |
echo "::group::Lint metainfo"
flatpak-builder-lint \
--user-exceptions=dist/linux/linter-exceptions.json --exceptions \
appstream ./dist/linux/org.fteqw.fteqw.metainfo.xml \
|| export FLATPAK_LINT_FAILED=1
echo "::endgroup::"
echo "::group::Lint Flatpak manifest"
flatpak-builder-lint \
--user-exceptions=dist/linux/linter-exceptions.json --exceptions \
manifest ./dist/linux/org.fteqw.fteqw.yml \
|| export FLATPAK_LINT_FAILED=1
echo "::endgroup::"
if [[ ! -z "$FLATPAK_LINT_FAILED" ]]; then
echo "::error::Metadata linting failed"
exit 1
fi
git config --global --add safe.directory $(pwd)
echo "SHORT_SHA=`git rev-parse --short HEAD`" >> $GITHUB_ENV
- name: Build flatpak
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: org.fteqw.fteqw.${{ env.SHORT_SHA }}.flatpak
manifest-path: dist/linux/org.fteqw.fteqw.yml
cache-key: flatpak-builder-${{ matrix.arch }}-${{ env.SHORT_SHA }}
arch: ${{ matrix.arch.name }}
- name: Lint build directory
run: |
flatpak-builder-lint \
--user-exceptions=dist/linux/linter-exceptions.json --exceptions \
builddir flatpak_app
================================================
FILE: .gitignore
================================================
#misc build artifacts
build
*.o
*.o.d
engine/debug/
engine/release/
engine/libs-*/
engine/bullet3-*/
engine/*.tar.gz
engine/shaders/generatebuiltinsl
engine/shaders/makevulkanblob
engine/shaders/vulkanblobs/
plugins/cef/cef_linux64/
plugins/cef/cef_windows64/
#quakec build artifacts...
quakec/csaddon/csaddon.dat
quakec/csaddon/csaddon.lno
quakec/csqctest/csprogs.dat
quakec/csqctest/csprogs.lno
quakec/csqctest/progs.dat
quakec/csqctest/progs.lno
quakec/menu.dat
quakec/menu.lno
# clangd artifacts
compile_commands.json
.cache/
#for qtcreator users.
CMakeLists.txt.user
# android target has a load of debris
engine/droid/bin/
engine/droid/gen/
engine/droid/libs/
engine/droid/default.properties
engine/droid/local.properties
engine/droid/proguard.cfg
engine/droid/build.xml
engine/droid/ftekeystore
engine/droid/proguard-project.txt
engine/droid/project.properties
# Flatpak build artifacts
.flatpak-builder
================================================
FILE: CMakeLists.txt
================================================
#Note: this file was made primarily to support msvc and its project file incompatibilities nightmare.
#Its also useful for various other IDEs like QtCreator etc.
#It uses system libraries, so it will have dependancy issues with public releases where those dependancies are distro/version-specific.
#Public builds are still built using the (overcomplicated) traditional (g)makefile.
CMAKE_MINIMUM_REQUIRED(VERSION 3.0...3.10)
cmake_policy(SET CMP0063 NEW)
PROJECT(FTEQuake)
INCLUDE_DIRECTORIES(
engine/common
engine/client
engine/qclib
engine/gl
engine/server
engine
)
IF (EXISTS ${CMAKE_SOURCE_DIR}/.svn AND NOT DEFINED FTE_REVISON)
EXECUTE_PROCESS(COMMAND
"svnversion"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE FTE_REVISON
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
)
IF (DEFINED FTE_REVISON)
MESSAGE(STATUS "FTE SVN Revision ${FTE_REVISON}")
IF(FTE_REVISON MATCHES "M")
MESSAGE(STATUS "--- PRIVATE CHANGES DETECTED ---")
SET(FTE_REVISON SVNREVISION=${FTE_REVISON})
ELSE()
MESSAGE(STATUS "No local changes")
EXECUTE_PROCESS(COMMAND
svn info --show-item last-changed-date --no-newline
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE FTE_DATE
)
SET(FTE_REVISON SVNREVISION=${FTE_REVISON} SVNDATE=${FTE_DATE})
ENDIF()
ENDIF()
ENDIF()
IF (EXISTS ${CMAKE_SOURCE_DIR}/.git AND NOT DEFINED FTE_REVISON)
EXECUTE_PROCESS(COMMAND
git describe --always --long --dirty
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE FTE_REVISON_GIT
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
)
EXECUTE_PROCESS(COMMAND
git log -1 --format=%cs
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE FTE_DATE
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
)
EXECUTE_PROCESS(COMMAND
git branch --show-current
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE FTE_BRANCH
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
)
EXECUTE_PROCESS(COMMAND
git rev-parse --is-shallow-repository
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE FTE_GIT_IS_SHALLOW
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
)
IF(FTE_GIT_IS_SHALLOW STREQUAL true)
MESSAGE(STATUS "shallow clone prevents calculation of revision number.")
SET(SVNREVISION "git-${FTE_REVISON_GIT}") #if its a shallow clone then we can't count commits properly so don't know what revision we actually are.
ELSE()
EXECUTE_PROCESS(COMMAND
git rev-list HEAD --count
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE SVNREVISION
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
)
MATH(EXPR SVNREVISION "${SVNREVISION} + 29") #not all svn commits managed to appear im the git repo, so we have a small bias to keep things consistent.
IF (FTE_BRANCH STREQUAL "master" OR FTE_BRANCH STREQUAL "")
SET(SVNREVISION "${SVNREVISION}-git-${FTE_REVISON_GIT}")
ELSE()
SET(SVNREVISION "${FTE_BRANCH}-${SVNREVISION}-git-${FTE_REVISON_GIT}") #weird branches get a different form of revision, to reduce confusion.
ENDIF()
ENDIF()
MESSAGE(STATUS "FTE GIT ${FTE_BRANCH} Revision ${SVNREVISION}, ${FTE_DATE}")
SET(FTE_REVISON SVNREVISION=${SVNREVISION} SVNDATE=${FTE_DATE} FTE_BRANCH=${FTE_BRANCH})
ENDIF()
#plugins need visibility hidden in order to avoid conflicts with function names that match the engine.
#this is consistent with how windows works so no great loss.
#plus it means that gcc can inline more (with LTO), including optimising args.
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_C_VISIBILITY_PRESET hidden)
IF(${CMAKE_VERSION} VERSION_LESS "3.9.0")
MESSAGE(STATUS "no LTO - old cmake.")
ELSE()
cmake_policy(SET CMP0069 NEW)
IF(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
#use LTO where possible. reportedly requires cmake 3.9 to actually work
INCLUDE(CheckIPOSupported)
check_ipo_supported(RESULT result)
IF(result)
SET(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
MESSAGE(STATUS "Using LTO.")
ELSE()
MESSAGE(STATUS "no LTO - not supported.")
ENDIF()
ELSE()
MESSAGE(STATUS "no LTO - debug.")
ENDIF()
ENDIF()
# Added these to solve some build issues I ran into - Brad
IF(FTE_BIG_ENDIAN)
ADD_DEFINITIONS(-DFTE_BIG_ENDIAN)
ENDIF()
IF(FTE_LITTLE_ENDIAN)
ADD_DEFINITIONS(-DFTE_LITTLE_ENDIAN)
ENDIF()
# libepoll-shim needs to be installed on the BSDs and Mac OSX to get
# some of the server code to compile and work correctly on those platforms - Brad
IF(CMAKE_SYSTEM_NAME MATCHES "BSD" OR CMAKE_SYSTEM_NAME MATCHES "Darwin")
INCLUDE(FetchContent)
FetchContent_Declare(
epoll-shim
GIT_REPOSITORY https://github.com/jiixyj/epoll-shim.git
GIT_TAG master
)
SET(epoll-shim BUILD_TESTS OFF CACHE INTERNAL "")
SET(epoll-shim BUILD_SHARED_LIBS OFF CACHE INTERNAL "")
FetchContent_MakeAvailable(epoll-shim)
SET(EPOLL_INC_DIR "${epoll-shim_SOURCE_DIR}/include")
ENDIF()
SET(FTE_BUILD_CONFIG ${PROJECT_SOURCE_DIR}/engine/common/config_fteqw.h CACHE FILEPATH "Which build config file to use to control supported features.")
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};CONFIG_FILE_NAME=${FTE_BUILD_CONFIG})
SET(FTE_USE_SDL false CACHE BOOL "Force the use of SDL2 instead of using native builds.")
INCLUDE(GNUInstallDirs)
SET(FTE_INSTALL_BINDIR games CACHE STRING "Binary dir to install to.")
SET(FTE_INSTALL_LIBDIR fteqw CACHE STRING "Binary dir to install to.")
IF(NOT WIN32)
SET(SYS_LIBS ${SYS_LIBS} m)
ELSE()
SET(SYS_LIBS ${SYS_LIBS})
ENDIF()
SET(FTE_DEP_ZLIB true CACHE BOOL "Link against zlib.")
IF(FTE_DEP_ZLIB)
FIND_PACKAGE(ZLIB)
ENDIF()
IF(ZLIB_FOUND)
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};ZLIB_STATIC)
SET(FTE_LIBS ${FTE_LIBS} ${ZLIB_LIBRARIES})
SET(FTESV_LIBS ${FTESV_LIBS} ${ZLIB_LIBRARIES})
SET(FTEQCC_LIBS ${FTEQCC_LIBS} ${ZLIB_LIBRARIES})
SET(FTEQTV_LIBS ${FTEQTV_LIBS} ${ZLIB_LIBRARIES})
ELSE()
MESSAGE(WARNING "libz library NOT available. compressed pk3, ICE, Q2E, etc etc, yada yada, blah blah will not be available.")
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_ZLIB)
ENDIF()
SET(FTE_DEP_BZIP2 true CACHE BOOL "Link against libbzip2.")
IF(FTE_DEP_BZIP2)
FIND_PACKAGE(BZip2)
ENDIF()
IF(BZIP2_FOUND)
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};AVAIL_BZLIB;BZLIB_STATIC)
SET(FTE_LIBS ${FTE_LIBS} bz2)
SET(FTESV_LIBS ${FTESV_LIBS} bz2)
# MESSAGE(STATUS "bzip2 library found. bz2-compressed pk3s will work for the price of extra bloat! yay!")
ELSE()
MESSAGE(WARNING "bzip2 library NOT available. bz2-compressed pk3s will not be available, as if anyone cares.")
ENDIF()
SET(OpenGL_GL_PREFERENCE LEGACY)
FIND_PACKAGE(OpenGL)
IF(OpenGL_FOUND)
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};GLQUAKE)
ELSE()
MESSAGE(WARNING "opengl library NOT available. Will depend upon vulkan.")
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_OPENGL)
ENDIF()
SET(FTE_DEP_JPEG true CACHE BOOL "Link against libjpeg.")
IF(FTE_DEP_JPEG)
FIND_PACKAGE(JPEG)
ENDIF()
IF(JPEG_FOUND)
INCLUDE_DIRECTORIES( ${JPEG_INCLUDE_DIRS} )
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};LIBJPEG_STATIC)
SET(FTE_LIBS ${FTE_LIBS} ${JPEG_LIBRARIES})
ELSE()
MESSAGE(WARNING "libjpeg library NOT available. Who cares?")
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_JPEG)
SET(JPEG_LIBRARIES)
ENDIF()
IF(NOT ${WIN32})
SET(FTE_DEP_DBUS true CACHE BOOL "Link against libdbus.")
IF(FTE_DEP_DBUS)
FIND_PACKAGE(DBus1)
ENDIF()
IF(DBUS1_FOUND)
INCLUDE_DIRECTORIES( ${DBus1_INCLUDE_DIRS} )
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};HAVE_DBUS)
SET(FTE_LIBS ${FTE_LIBS} ${DBus1_LIBRARIES})
ELSE()
MESSAGE(WARNING "libdbus-1 library NOT available. Who cares?")
ENDIF()
ENDIF()
SET(FTE_DEP_PNG true CACHE BOOL "Link against libpng.")
IF(FTE_DEP_PNG)
FIND_PACKAGE(PNG)
ENDIF()
IF(PNG_FOUND)
INCLUDE_DIRECTORIES( ${PNG_INCLUDE_DIRS} )
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};LIBPNG_STATIC)
SET(FTE_LIBS ${FTE_LIBS} ${PNG_LIBRARIES})
ELSE()
MESSAGE(WARNING "libpng library NOT available. Good luck with screenshots.")
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_PNG)
SET(PNG_LIBRARIES)
ENDIF()
SET(FTE_DEP_FREETYPE true CACHE BOOL "Link against libfreetype.")
IF(FTE_DEP_FREETYPE)
FIND_PACKAGE(Freetype)
ENDIF()
IF(FREETYPE_FOUND)
INCLUDE_DIRECTORIES( ${FREETYPE_INCLUDE_DIRS} )
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};LIBFREETYPE_STATIC)
SET(FTE_LIBS ${FTE_LIBS} ${FREETYPE_LIBRARIES})
FIND_PACKAGE(Fontconfig)
IF(Fontconfig_FOUND)
INCLUDE_DIRECTORIES( ${Fontconfig_INCLUDE_DIRS} )
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};LIBFONTCONFIG_STATIC)
SET(FTE_LIBS ${FTE_LIBS} ${Fontconfig_LIBRARIES})
ELSE()
MESSAGE(WARNING "fontconfig library NOT available. I hope you're not using any system fonts.")
ENDIF()
ELSE()
MESSAGE(WARNING "freetype library NOT available. I hope you're okay with ascii.")
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_FREETYPE)
ENDIF()
#this is just for headers.
FIND_PATH(VULKAN_INCLUDE_DIR vulkan/vulkan.h)
IF(VULKAN_INCLUDE_DIR)
INCLUDE_DIRECTORIES( ${VULKAN_INCLUDE_DIR} )
SET(FTE_DEFINES ${FTE_DEFINES};VKQUAKE) #no libs required, thankfully
ELSE()
MESSAGE(WARNING "Vulkan headers NOT available.")
ENDIF()
SET(FTE_DEP_VORBISFILE true CACHE BOOL "Link against libvorbisfile.")
IF(FTE_DEP_VORBISFILE)
FIND_LIBRARY(VORBISFILE_LIBRARY NAMES vorbisfile)
ENDIF()
IF(NOT VORBISFILE_LIBRARY)
INCLUDE_DIRECTORIES( ${VORBISFILE_INCLUDE_DIRS} )
MESSAGE(WARNING "libvorbisfile library NOT available. Who listens to the bgm anyway?")
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_OGG)
ENDIF()
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
SET(FTE_WERROR true CACHE BOOL "Warnings as errors.")
ELSE()
SET(FTE_WERROR false CACHE BOOL "Warnings as errors.")
ENDIF()
IF(FTE_WERROR)
SET(FTE_WERROR_ARG "-Werror")
ELSE()
SET(FTE_WERROR_ARG "")
ENDIF()
IF(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-pointer-sign")
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall ${FTE_WERROR_ARG} -Wno-pointer-sign -Wno-unknown-pragmas -Wno-format-zero-length -Wno-strict-aliasing -Wno-error=cpp")
ELSE()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 ${FTE_WERROR_ARG}")
ENDIF()
endif()
IF(CMAKE_C_COMPILER_ID MATCHES "GNU")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wstrict-prototypes") #
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wold-style-definition") #k&r c is weird and can't cope with 64bit types.
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-parameter-type") #k&r c is weird and can't cope with 64bit types.
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wold-style-declaration") #
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith") #void* stuff
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wvla") #msvc doesn't support vla
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wdeclaration-after-statement") #msvc doesn't allow defs after statements, and they're so very tempting...
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat-truncation=1")
#TODO SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-prototypes") #for finding missing statics.
#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function") #
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wswitch-enum") #to warn about omitted enums despite default.
#might as well do this, public builds use the regular Makefile.
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le" OR CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mcpu=native")
ELSE()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native")
ENDIF()
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall ${FTE_WERROR_} -Wno-pointer-sign -Wno-unknown-pragmas -Wno-format-zero-length -Wno-strict-aliasing -Wno-error=cpp")
ELSE()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 ${FTE_WERROR_}")
ENDIF()
IF (NOT FTE_USE_SDL)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,--warn-common")
ENDIF()
#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wc++-compat") #lul, thousands of errors!
ENDIF()
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
IF(NOT ${WIN32})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-strong")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu89")
ENDIF()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_DEBUG")
ENDIF()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FILE_OFFSET_BITS=64")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFTE_LIBRARY_PATH=${CMAKE_INSTALL_FULL_LIBDIR}/${FTE_INSTALL_LIBDIR} -DFTE_DATA_DIR=${CMAKE_INSTALL_FULL_DATAROOTDIR}")
FUNCTION(EMBED_PLUGIN_META PLUGNAME PLUGTITLE PLUGDESC)
SET_TARGET_PROPERTIES(plug_${PLUGNAME} PROPERTIES OUTPUT_NAME "${PLUGNAME}")
SET_TARGET_PROPERTIES(plug_${PLUGNAME} PROPERTIES PREFIX "fteplug_")
SET_TARGET_PROPERTIES(plug_${PLUGNAME} PROPERTIES LINK_FLAGS "-Wl,--no-undefined")
SET(INSTALLTARGS ${INSTALLTARGS} "plug_${PLUGNAME}" PARENT_SCOPE)
#sadly we need to use a temp zip file, because otherwise zip insists on using zip64 extensions which breaks zip -A (as well as any attempts to read any files).
ADD_CUSTOM_COMMAND(
TARGET plug_${PLUGNAME} POST_BUILD
COMMAND /bin/echo -e "{\\n package fteplug_${PLUGNAME}\\n ver \"${SVNREVISION}\"\\n category Plugins\\n title \"${PLUGTITLE}\"\\n gamedir \"\"\\n desc \"${PLUGDESC}\"\\n}" | zip -q -9 -fz- $<TARGET_FILE:plug_${PLUGNAME}>.zip -
COMMAND cmake -E cat $<TARGET_FILE:plug_${PLUGNAME}>.zip >> "$<TARGET_FILE:plug_${PLUGNAME}>"
COMMAND zip -A "$<TARGET_FILE:plug_${PLUGNAME}>"
COMMAND cmake -E rm $<TARGET_FILE:plug_${PLUGNAME}>.zip
VERBATIM)
ENDFUNCTION()
SET(FTE_DEP_GNUTLS true CACHE BOOL "Link against gnutls")
IF(FTE_DEP_GNUTLS)
FIND_PACKAGE(GnuTLS)
IF(NOT GNUTLS_FOUND)
MESSAGE(WARNING "gnutls library NOT available. HTTPS/DTLS will not be available.")
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_GNUTLS)
ELSE()
IF(WIN32)
SET(GNUTLS_STATIC true CACHE BOOL "Link gnutls statically.") #usually as an .so though. :/
ELSE()
SET(GNUTLS_STATIC false CACHE BOOL "Link gnutls statically.") #usually as an .so though. :/
ENDIF()
IF(GNUTLS_STATIC)
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};GNUTLS_STATIC)
SET(FTE_LIBS ${FTE_LIBS} ${GNUTLS_LIBRARY})
SET(FTESV_LIBS ${FTESV_LIBS} ${GNUTLS_LIBRARY})
ENDIF()
ENDIF()
ENDIF()
IF(WIN32)
SET(FTE_DEP_WINSSPI true CACHE BOOL "Link against winsspi(schannel)")
IF(NOT FTE_DEP_WINSSPI)
SET(FTE_DEFINES ${FTE_DEFINES};NO_WINSSPI)
ENDIF()
ENDIF()
SET(FTE_DEP_SDL3 false CACHE BOOL "Use SDL3 if available (disabling many platform-specific behaviours).")
IF(FTE_DEP_SDL3)
FIND_PACKAGE(SDL3 QUIET)
ENDIF()
IF(SDL3_FOUND) #SDL3
MESSAGE(STATUS "SDL3 library found, woo, modern, for now.")
# FIND_PACKAGE(PkgConfig REQUIRED)
# PKG_SEARCH_MODULE(sdl3 REQUIRED sdl3)
FIND_PACKAGE(SDL3 REQUIRED)
INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIRS} ${SDL3_INCLUDE_DIRS})
SET(FTE_DEFINES ${FTE_DEFINES};FTE_SDL3;MULTITHREAD)
SET(FTE_LIBS ${FTE_LIBS} ${SYS_LIBS} ${CMAKE_DL_LIBS} ${SDL3_LIBRARIES})
SET(FTE_ARCH_FILES
engine/client/sys_sdl.c
engine/client/snd_al.c
engine/client/snd_sdl.c
engine/client/in_sdl.c
engine/client/cd_sdl.c
engine/gl/gl_vidsdl.c
)
SET(FTESV_DEFINES ${FTESV_DEFINES};MULTITHREAD)
SET(FTESV_LIBS ${FTESV_LIBS} ${SYS_LIBS} ${CMAKE_DL_LIBS} ${SDL3_LIBRARIES})
IF(WIN32)
SET(FTE_LIBS ${FTE_LIBS} wsock32 gdi32 ole32)
SET(FTE_DEFINES ${FTE_DEFINES})
SET(FTE_ARCH_FILES ${FTE_ARCH_FILES}
engine/client/winquake.rc
engine/common/net_ssl_winsspi.c
engine/common/fs_win32.c
)
SET(FTESV_ARCH_FILES ${FTESV_ARCH_FILES}
engine/client/winquake.rc
engine/common/net_ssl_winsspi.c
engine/common/fs_win32.c
engine/server/sv_sys_win.c
)
ELSE()
SET(FTE_ARCH_FILES ${FTE_ARCH_FILES}
engine/common/net_ssl_gnutls.c
)
SET(FTESV_ARCH_FILES ${FTESV_ARCH_FILES}
engine/common/net_ssl_gnutls.c
engine/common/sys_linux_threads.c
engine/server/sv_sys_unix.c
)
SET(FTESV_LIBS ${FTESV_LIBS} pthread)
ENDIF()
ELSEIF(${ANDROID})
# FIND_PACKAGE(Freetype REQUIRED)
# INCLUDE_DIRECTORIES( ${FREETYPE_INCLUDE_DIRS} )
SET(FTE_DEFINES ${FTE_DEFINES};ANDROID;VKQUAKE;MULTITHREAD)
SET(FTE_LIBS ${FTE_LIBS} android log EGL ${SYS_LIBS} ${CMAKE_DL_LIBS})
SET(FTE_ARCH_FILES
engine/client/sys_droid.c
engine/common/sys_linux_threads.c
engine/client/snd_droid.c
engine/client/cd_null.c
engine/gl/gl_viddroid.c
)
ELSEIF(WIN32 AND NOT FTE_USE_SDL)
INCLUDE_DIRECTORIES(engine/libs engine/libs/freetype2/include)
# LINK_DIRECTORIES(engine/libs/mingw64-libs)
# engine/server/sv_sys_win.c
SET(FTE_LIBS ${FTE_LIBS} ole32 gdi32 wsock32 winmm dxguid)
SET(FTE_DEFINES ${FTE_DEFINES};D3D9QUAKE;D3D11QUAKE)
SET(FTE_ARCH_FILES
engine/client/winquake.rc
engine/common/sys_win_threads.c
engine/common/net_ssl_winsspi.c
engine/common/net_ssl_gnutls.c
engine/common/fs_win32.c
engine/client/cd_win.c
engine/client/in_win.c
engine/client/snd_al.c
engine/client/snd_directx.c
engine/client/snd_wasapi.c
engine/client/snd_win.c
engine/client/snd_xaudio.c
engine/client/sys_win.c
engine/gl/gl_vidnt.c
engine/d3d/d3d_backend.c
engine/d3d/d3d_image.c
engine/d3d/d3d_shader.c
engine/d3d/d3d11_backend.c
engine/d3d/d3d11_image.c
engine/d3d/d3d11_shader.c
engine/d3d/d3d8_backend.c
engine/d3d/d3d8_image.c
engine/d3d/vid_d3d.c
engine/d3d/vid_d3d11.c
engine/d3d/vid_d3d8.c
)
SET(FTESV_LIBS ${FTESV_LIBS} wsock32 winmm)
SET(FTESV_ARCH_FILES
engine/client/winquake.rc
engine/common/sys_win_threads.c
engine/common/net_ssl_winsspi.c
engine/common/net_ssl_gnutls.c
engine/common/fs_win32.c
engine/server/sv_sys_win.c
)
ELSEIF(UNIX AND NOT FTE_USE_SDL) #linux(ish)
#openbsd will have issues with snd_linux.c
#linux-only packages
FIND_PACKAGE(ALSA)
IF(ALSA_FOUND)
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};AUDIO_ALSA;AUDIO_PULSE)
ELSE()
MESSAGE(WARNING "asound (alsa) library NOT available.")
ENDIF()
FIND_PACKAGE(X11)
IF(X11_FOUND)
IF (NOT X11_Xcursor_FOUND)
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_X11_CURSOR)
MESSAGE(WARNING "Xcursor library NOT available.")
ENDIF()
IF (NOT X11_Xrandr_FOUND)
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_X11_RANDR)
MESSAGE(WARNING "Xrandr library NOT available.")
ENDIF()
IF (NOT X11_Xscreensaver_FOUND)
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_X11_XSS)
MESSAGE(WARNING "Xss library NOT available.")
ENDIF()
ELSE()
MESSAGE(WARNING "x11 library NOT available.")
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_X11)
ENDIF()
SET(FTE_DEFINES ${FTE_DEFINES};DYNAMIC_SDL;MULTITHREAD)
SET(FTE_LIBS ${FTE_LIBS} ${SYS_LIBS} ${CMAKE_DL_LIBS} pthread ${SDL2_LIBRARIES})
SET(FTE_ARCH_FILES ${FTE_ARCH_FILES}
engine/client/sys_linux.c
engine/common/sys_linux_threads.c
engine/common/net_ssl_gnutls.c
engine/client/snd_al.c
engine/client/snd_alsa.c
engine/client/snd_linux.c
engine/client/snd_pulse.c
engine/client/snd_sdl.c #we use SDL audio even without sys_sdl, because of pulseaudio fucking over alsa, alsa fucking over oss3, and oss4 not being used. Either way, openal should be the default anyway.
engine/client/cd_linux.c
engine/gl/gl_vidlinuxglx.c
engine/gl/gl_videgl.c
# engine/gl/gl_vidrpi.c
# engine/gl/gl_vidwayland.c
)
#openbsd uses a libossaudio library for all the oss stuff, use that to ensure that we still get sound
FIND_LIBRARY(
OSSAUDIO_LIBRARY
NAMES ossaudio
)
IF(OSSAUDIO_LIBRARY)
SET(FTE_LIBS ${FTE_LIBS} ${OSSAUDIO_LIBRARY})
ENDIF()
#on linux, use wayland (we normally dynamically link, but we still need headers).
FIND_LIBRARY(
WAYLAND_CLIENT_LIBRARY
NAMES wayland-client libwayland-client
)
FIND_LIBRARY(
WAYLAND_EGL
NAMES wayland-egl
)
FIND_LIBRARY(
HAVE_XKBCOMMON
NAMES xkbcommon
)
IF(NOT HAVE_XKBCOMMON)
MESSAGE(WARNING "xkbcommon library not found, needed for wayland to be usable.")
UNSET(WAYLAND_CLIENT_LIBRARY)
ENDIF()
IF(WAYLAND_CLIENT_LIBRARY AND WAYLAND_EGL)
# SET(FTE_LIBS ${FTE_LIBS} ${WAYLAND_CLIENT_LIBRARY} ${HAVE_XKBCOMMON} ${WAYLAND_EGL})
# SET(FTE_DEFINES ${FTE_DEFINES};STATIC_WAYLAND)
SET(FTE_DEFINES ${FTE_DEFINES};WAYLANDQUAKE;USE_EGL)
SET(FTE_ARCH_FILES ${FTE_ARCH_FILES}
engine/gl/gl_vidwayland.c
)
ELSE()
MESSAGE(WARNING "Wayland library NOT available. X11 will live forever anyway.")
IF(NOT X11_FOUND)
MESSAGE(WARNING "No renderers supported!")
SET(FTE_NO_RENDERERS 1)
ENDIF()
ENDIF()
IF(CMAKE_SYSTEM_NAME MATCHES "BSD" OR CMAKE_SYSTEM_NAME MATCHES "Darwin")
FIND_LIBRARY(epoll-shim REQUIRED)
INCLUDE_DIRECTORIES(${EPOLL_INC_DIR})
SET(FTESV_LIBS ${FTESV_LIBS} epoll-shim)
SET(FTESV_DEFINES ${FTESV_DEFINES};HAVE_EPOLL)
ENDIF()
SET(FTESV_DEFINES ${FTESV_DEFINES};MULTITHREAD)
SET(FTESV_ARCH_FILES ${FTESV_ARCH_FILES}
engine/server/sv_sys_unix.c
engine/common/sys_linux_threads.c
engine/common/net_ssl_gnutls.c
)
SET(FTESV_LIBS ${FTESV_LIBS} ${SYS_LIBS} ${CMAKE_DL_LIBS} pthread)
ELSEIF(1) #SDL2
# FIND_PACKAGE(Freetype REQUIRED)
# INCLUDE_DIRECTORIES(engine/libs engine/libs/freetype2/include)
FIND_PACKAGE(PkgConfig REQUIRED)
PKG_SEARCH_MODULE(sdl2 REQUIRED sdl2)
FIND_PACKAGE(SDL2 REQUIRED)
INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIRS} ${SDL2_INCLUDE_DIRS})
#SDL2.0.7 supports vulkan, so lets use it.
SET(FTE_DEFINES ${FTE_DEFINES};FTE_SDL;MULTITHREAD)
SET(FTE_LIBS ${FTE_LIBS} ${SYS_LIBS} ${CMAKE_DL_LIBS} ${SDL2_LIBRARIES})
SET(FTE_ARCH_FILES
engine/client/sys_sdl.c
engine/client/snd_al.c
engine/client/snd_sdl.c
engine/client/in_sdl.c
engine/client/cd_sdl.c
engine/gl/gl_vidsdl.c
)
SET(FTESV_DEFINES ${FTESV_DEFINES};MULTITHREAD)
SET(FTESV_LIBS ${FTESV_LIBS} ${SYS_LIBS} ${CMAKE_DL_LIBS} ${SDL2_LIBRARIES})
IF(WIN32)
SET(FTE_LIBS ${FTE_LIBS} wsock32 gdi32 ole32)
SET(FTE_DEFINES ${FTE_DEFINES};NO_DIRECTX)
SET(FTE_ARCH_FILES ${FTE_ARCH_FILES}
engine/client/winquake.rc
engine/common/net_ssl_winsspi.c
engine/common/fs_win32.c
)
SET(FTESV_ARCH_FILES ${FTESV_ARCH_FILES}
engine/client/winquake.rc
engine/common/net_ssl_winsspi.c
engine/common/fs_win32.c
engine/server/sv_sys_win.c
)
ELSE()
SET(FTE_ARCH_FILES ${FTE_ARCH_FILES}
engine/common/net_ssl_gnutls.c
)
SET(FTESV_ARCH_FILES ${FTESV_ARCH_FILES}
engine/common/net_ssl_gnutls.c
engine/common/sys_linux_threads.c
engine/server/sv_sys_unix.c
)
SET(FTESV_LIBS ${FTESV_LIBS} pthread)
ENDIF()
ELSE()
# engine/common/sys_linux_threads.c
# engine/common/net_ssl_gnutls.c
# engine/server/sv_sys_unix.c
# engine/client/snd_alsa.c
# engine/client/snd_droid.c
# engine/client/snd_linux.c
# engine/client/snd_macos.c
# engine/client/snd_morphos.c
# engine/client/snd_sblaster.c
# engine/client/snd_sdl.c
# engine/client/snd_sndio.c
# engine/client/sys_dos.c
# engine/client/sys_droid.c
# engine/client/sys_linux.c
# engine/client/sys_morphos.c
# engine/client/sys_plugfte.c
# engine/client/sys_sdl.c
# engine/client/sys_xdk.c
# engine/client/cd_linux.c
# engine/client/cd_null.c
# engine/client/cd_sdl.c
# engine/client/in_morphos.c
# engine/client/in_sdl.c
# engine/gl/gl_viddroid.c
# engine/gl/gl_videgl.c
# engine/gl/gl_vidlinuxglx.c
# engine/gl/gl_vidmacos.c
# engine/gl/gl_vidmorphos.c
# engine/gl/gl_vidnull.c
# engine/gl/gl_vidrpi.c
# engine/gl/gl_vidsdl.c
# engine/gl/gl_vidtinyglstubs.c
# engine/gl/gl_vidwayland.c
ENDIF()
SET(FTE_GL_FILES
#These are GL-specific, but can be left even if no gl is supported.
engine/gl/gl_backend.c
engine/gl/gl_bloom.c
engine/gl/gl_draw.c
engine/gl/gl_rmain.c
engine/gl/gl_rmisc.c
engine/gl/gl_rsurf.c
engine/gl/gl_screen.c
engine/gl/gl_vidcommon.c
engine/gl/glmod_doom.c
)
SET(FTE_VK_FILES
engine/vk/vk_backend.c
engine/vk/vk_init.c
)
SET(FTE_QCVM_FILES
engine/qclib/comprout.c
engine/qclib/initlib.c
engine/qclib/pr_edict.c
engine/qclib/pr_exec.c
engine/qclib/pr_multi.c
engine/qclib/qcc_cmdlib.c
engine/qclib/qcc_pr_comp.c
engine/qclib/qcc_pr_lex.c
# engine/qclib/decomp.c
# engine/qclib/packager.c
# engine/qclib/pr_x86.c
# engine/qclib/qccgui.c
# engine/qclib/qccguistuff.c
# engine/qclib/qcctui.c
engine/qclib/qccmain.c
engine/qclib/qcd_main.c
engine/qclib/qcdecomp.c
)
SET(FTE_COMMON_FILES
#these files are common to both server-only and client+server builds.
engine/common/cmd.c
engine/common/com_mesh.c
engine/common/com_bih.c
engine/common/common.c
engine/common/json.c
engine/common/crc.c
engine/common/cvar.c
engine/common/fs.c
engine/common/fs_dzip.c
engine/common/fs_pak.c
engine/common/fs_stdio.c
engine/common/fs_xz.c
engine/common/fs_zip.c
engine/common/gl_q2bsp.c
engine/common/huff.c
engine/common/log.c
engine/common/mathlib.c
engine/common/md4.c
engine/common/md5.c
engine/common/net_chan.c
engine/common/net_ice.c
engine/common/net_wins.c
engine/common/plugin.c
engine/common/pmove.c
engine/common/pmovetst.c
engine/common/pr_bgcmd.c
engine/common/q1bsp.c
engine/common/q2pmove.c
engine/common/qvm.c
engine/common/sha1.c
engine/common/sha2.c
engine/common/translate.c
engine/common/zone.c
#important headers
engine/common/bothdefs.h
engine/common/config_fteqw.h
engine/common/config_minimal.h
engine/common/config_nocompat.h
engine/common/config_wastes.h
engine/common/config_freecs.h
engine/common/config_fteqw_noweb.h
#useless headers that I'll never search for
engine/client/api_menu.h
engine/client/cdaudio.h
engine/client/client.h
engine/client/cl_ignore.h
engine/client/cl_master.h
engine/client/input.h
engine/client/keys.h
engine/client/menu.h
engine/client/merged.h
engine/client/modelgen.h
engine/client/quakedef.h
engine/client/render.h
engine/client/sbar.h
engine/client/screen.h
engine/client/sound.h
engine/client/spritegn.h
# engine/client/sys_plugfte.h
engine/client/vid.h
engine/client/view.h
engine/client/wad.h
# engine/client/winquake.h
engine/common/bothdefs.h
engine/common/bspfile.h
engine/common/cmd.h
engine/common/com_mesh.h
engine/common/common.h
engine/common/console.h
engine/common/cvar.h
engine/common/fs.h
engine/common/mathlib.h
engine/common/net.h
engine/common/netinc.h
engine/common/particles.h
engine/common/pmove.h
engine/common/pr_common.h
engine/common/protocol.h
engine/common/sys.h
engine/common/translate.h
engine/common/ui_public.h
engine/common/vm.h
engine/common/world.h
engine/common/zone.h
engine/gl/gl_draw.h
engine/gl/gl_model.h
engine/gl/glquake.h
engine/gl/glsupp.h
engine/gl/gl_terrain.h
engine/gl/gl_videgl.h
engine/gl/model_hl.h
engine/gl/shader.h
engine/http/iweb.h
engine/qclib/cmdlib.h
engine/qclib/execloop.h
engine/qclib/gui.h
engine/qclib/hash.h
engine/qclib/pr_comp.h
engine/qclib/progsint.h
engine/qclib/progslib.h
engine/qclib/progtype.h
engine/qclib/qcc.h
engine/qclib/qcd.h
engine/server/progdefs.h
engine/server/progs.h
engine/server/q2game.h
engine/server/server.h
#engine/server/svhl_gcapi.h
engine/server/sv_sql.h
#engine/sw/sw.h
#engine/sw/sw_spans.h
engine/vk/vkrenderer.h
engine/web/ftejslib.h
#sigh
engine/client/pr_skelobj.c
engine/client/m_download.c
engine/client/net_master.c
engine/client/r_d3.c
#these are here because of hitmodel etc
engine/gl/gl_heightmap.c
engine/gl/gl_hlmdl.c
engine/gl/gl_model.c
engine/server/sv_move.c
engine/server/sv_phys.c
engine/server/world.c
${FTE_QCVM_FILES}
engine/qclib/hash.c
engine/http/httpclient.c
)
SET(FTE_SERVER_FILES
engine/server/net_preparse.c
engine/server/pr_cmds.c
engine/server/pr_lua.c
engine/server/pr_q1qvm.c
engine/server/savegame.c
engine/server/sv_ccmds.c
engine/server/sv_chat.c
engine/server/sv_cluster.c
engine/server/sv_demo.c
engine/server/sv_ents.c
engine/server/sv_init.c
engine/server/sv_main.c
engine/server/sv_master.c
engine/server/sv_mvd.c
engine/server/sv_nchan.c
engine/server/sv_rankin.c
engine/server/sv_send.c
engine/server/sv_sql.c
engine/server/sv_user.c
# engine/server/svhl_game.c
# engine/server/svhl_phys.c
# engine/server/svhl_world.c
engine/server/svq2_ents.c
engine/server/svq2_game.c
)
#these files are only in the client
SET(FTE_CLIENT_FILES
engine/client/cl_cam.c
engine/client/cl_demo.c
engine/client/cl_ents.c
engine/client/cl_ignore.c
engine/client/cl_input.c
engine/client/cl_main.c
engine/client/cl_parse.c
engine/client/cl_pred.c
engine/client/cl_screen.c
engine/client/cl_tent.c
# engine/client/clhl_game.c
engine/client/clq2_cin.c
engine/client/clq2_ents.c
engine/client/console.c
engine/client/fragstats.c
engine/client/image.c
engine/client/in_generic.c
engine/client/keys.c
engine/client/m_items.c
engine/client/m_master.c
engine/client/m_mp3.c
engine/client/m_multi.c
engine/client/m_options.c
engine/client/m_script.c
engine/client/m_native.c
engine/client/m_single.c
engine/client/menu.c
engine/client/p_classic.c
engine/client/p_null.c
engine/client/p_script.c
engine/client/pr_clcmd.c
engine/client/pr_csqc.c
engine/client/pr_menu.c
engine/client/r_2d.c
engine/client/r_d3.c
engine/client/r_part.c
engine/client/r_partset.c
engine/client/r_surf.c
engine/client/renderer.c
engine/client/renderque.c
engine/client/roq_read.c
engine/client/sbar.c
engine/client/skin.c
engine/client/snd_dma.c
engine/client/snd_mem.c
engine/client/snd_mix.c
engine/client/snd_mp3.c
engine/client/snd_ov.c
engine/client/textedit.c
engine/client/valid.c
engine/client/view.c
engine/client/wad.c
engine/client/zqtp.c
#These are generic renderer files and no longer gl-specific (for the most part)
engine/gl/gl_alias.c
engine/gl/gl_font.c
engine/gl/gl_ngraph.c
engine/gl/gl_rlight.c
engine/gl/gl_shader.c
engine/gl/gl_shadow.c
engine/gl/gl_warp.c
engine/gl/ltface.c
#these are renderer-specific
engine/client/vid_headless.c
${FTE_GL_FILES}
${FTE_VK_FILES}
)
SET(FTE_Q3_FILES
plugins/quake3/botlib/be_aas_bspq3.c
plugins/quake3/botlib/be_aas_entity.c
plugins/quake3/botlib/be_aas_move.c
plugins/quake3/botlib/be_aas_routealt.c
plugins/quake3/botlib/be_ai_char.c
plugins/quake3/botlib/be_ai_goal.c
plugins/quake3/botlib/be_ai_weight.c
plugins/quake3/botlib/l_crc.c
plugins/quake3/botlib/l_memory.c
plugins/quake3/botlib/l_struct.c
plugins/quake3/botlib/be_aas_cluster.c
plugins/quake3/botlib/be_aas_file.c
plugins/quake3/botlib/be_aas_optimize.c
plugins/quake3/botlib/be_aas_route.c
plugins/quake3/botlib/be_ai_chat.c
plugins/quake3/botlib/be_ai_move.c
plugins/quake3/botlib/be_ea.c
plugins/quake3/botlib/l_libvar.c
plugins/quake3/botlib/l_precomp.c
plugins/quake3/botlib/be_aas_debug.c
plugins/quake3/botlib/be_aas_main.c
plugins/quake3/botlib/be_aas_reach.c
plugins/quake3/botlib/be_aas_sample.c
plugins/quake3/botlib/be_ai_gen.c
plugins/quake3/botlib/be_ai_weap.c
plugins/quake3/botlib/be_interface.c
plugins/quake3/botlib/l_log.c
plugins/quake3/botlib/l_script.c
plugins/quake3/botlib/standalone.c
plugins/quake3/clq3_cg.c
plugins/quake3/clq3_ui.c
plugins/quake3/clq3_parse.c
plugins/quake3/svq3_game.c
plugins/quake3/q3common.c
plugins/quake3/q3common.h
plugins/quake3/clq3defs.h
plugins/quake3/q3g_public.h
)
#For annoying compressed gltf2 files.
SET(FTE_DEP_DRACO false CACHE BOOL "Link against libdraco (apache2).")
IF(FTE_DEP_DRACO)
FIND_LIBRARY(
DRACO_LIBRARY
NAMES draco
)
IF(DRACO_LIBRARY)
SET(DRACO_FILES plugins/models/draco.cpp)
SET(DRACO_CFLAGS HAVE_DRACO)
SET(FTE_COMMON_FILES ${FTE_COMMON_FILES} ${DRACO_FILES})
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};${DRACO_CFLAGS})
SET(FTE_LIBS ${FTE_LIBS} ${DRACO_LIBRARY})
SET(FTESV_LIBS ${FTESV_LIBS} ${DRACO_LIBRARY})
ELSE()
MESSAGE(WARNING "draco library not found, needed for GLTF's KHR_draco_mesh_compression to be usable.")
ENDIF()
ENDIF()
SET(FTE_PLUG_QUAKE3 true CACHE BOOL "Compile Quake3 plugin.")
IF(FTE_PLUG_QUAKE3)
IF (0)
SET(FTE_DEFINES ${FTE_DEFINES};${Q3_DEFINES})
SET(FTE_LIBS ${FTE_LIBS} quake3)
#define the modules and make sure they're linked (one generic, one for server-only builds.
ADD_LIBRARY(quake3 STATIC ${FTE_Q3_FILES})
SET_TARGET_PROPERTIES(quake3 PROPERTIES COMPILE_DEFINITIONS "${FTE_LIB_DEFINES};${FTE_REVISON};BOTLIB;BOTLIB_STATIC;FTEPLUGIN;STATIC_Q3")
TARGET_LINK_LIBRARIES(quake3 ${SYS_LIBS})
#ADD_LIBRARY(q3sv STATIC EXCLUDE_FROM_ALL ${FTE_Q3_FILES})
#SET_TARGET_PROPERTIES(q3sv PROPERTIES COMPILE_DEFINITIONS "${FTE_LIB_DEFINES};${FTE_REVISON};BOTLIB;BOTLIB_STATIC;SERVERONLY")
#SET_TARGET_PROPERTIES(q3sv PROPERTIES LINK_FLAGS "-Wl,--no-undefined")
#TARGET_LINK_LIBRARIES(q3sv ${SYS_LIBS})
#SET(FTESV_LIBS ${FTESV_LIBS} q3sv)
ELSE()
#define the modules and make sure they're linked (one generic, one for server-only builds.
ADD_LIBRARY(plug_quake3 MODULE ${FTE_Q3_FILES} plugins/plugin.c)
SET_TARGET_PROPERTIES(plug_quake3 PROPERTIES COMPILE_DEFINITIONS "${FTE_LIB_DEFINES};${FTE_REVISON};BOTLIB;BOTLIB_STATIC;FTEPLUGIN")
TARGET_LINK_LIBRARIES(plug_quake3 ${SYS_LIBS})
EMBED_PLUGIN_META(quake3 "Quake3 Compat" "Provides compatability with Quake3's gamecode.")
ENDIF()
ENDIF()
#still a wip, so disabled by default
SET(FTE_PLUG_COD true CACHE BOOL "Compile Call of Duty plugin.")
IF(FTE_PLUG_COD)
ADD_LIBRARY(plug_cod MODULE
plugins/cod/codmod.c
plugins/cod/codbsp.c
plugins/cod/codmat.c
plugins/cod/codiwi.c
#plugins/cod/codff.c
plugins/plugin.c)
SET_TARGET_PROPERTIES(plug_cod PROPERTIES COMPILE_DEFINITIONS "${FTE_LIB_DEFINES};${FTE_REVISON};FTEPLUGIN")
TARGET_LINK_LIBRARIES(plug_cod ${SYS_LIBS}
#${ZLIB_LIBRARIES}
)
EMBED_PLUGIN_META(cod "CoD Formats" "Provides compatability with Call Of Duty's file formats.")
ENDIF()
FILE(STRINGS "${FTE_BUILD_CONFIG}" BULLET_INTERNAL REGEX "^#define[\t ]+USE_INTERNAL_BULLET")
IF(BULLET_INTERNAL)
#Built-in bullet physics plugin...
FIND_PACKAGE(Bullet REQUIRED)
SET(FTE_COMMON_FILES ${FTE_COMMON_FILES} plugins/bullet/bulletplug.cpp)
INCLUDE_DIRECTORIES( ${BULLET_INCLUDE_DIRS} )
SET(FTE_LIBS ${FTE_LIBS} ${BULLET_LIBRARIES})
SET(FTESV_LIBS ${FTESV_LIBS} ${BULLET_LIBRARIES})
ELSE()
#Bullet Physics library plugin
SET(FTE_PLUG_BULLET true CACHE BOOL "Compile bullet rigid body physics plugin.")
IF(FTE_PLUG_BULLET)
FIND_PACKAGE(Bullet)
IF (BULLET_FOUND)
ADD_LIBRARY(plug_bullet MODULE
plugins/plugin.c
plugins/bullet/bulletplug.cpp
)
TARGET_INCLUDE_DIRECTORIES(plug_bullet PUBLIC ${BULLET_INCLUDE_DIRS})
SET_TARGET_PROPERTIES(plug_bullet PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;${FTE_LIB_DEFINES}")
TARGET_LINK_LIBRARIES(plug_bullet ${SYS_LIBS} ${BULLET_LIBRARIES})
EMBED_PLUGIN_META(bullet "Bullet Physics Plugin" "Provides Rigid Body Physics.")
ELSE()
MESSAGE(WARNING "bullet library not detected, skipping plugin")
ENDIF()
ENDIF()
ENDIF()
#ODE Physics library plugin
SET(FTE_PLUG_ODE true CACHE BOOL "Compile ODE rigid body physics plugin.")
SET_PROPERTY(CACHE FTE_PLUG_ODE PROPERTY STRINGS false true static)
IF(FTE_PLUG_ODE)
FIND_PATH(LIBODE_INCLUDE_DIR ode/ode.h)
IF (LIBODE_INCLUDE_DIR)
FIND_LIBRARY(LIBODE_LIBRARY ode)
ENDIF()
IF (LIBODE_LIBRARY)
IF (FTE_PLUG_ODE STREQUAL "static")
#SET (FTE_COMMON_FILES ${FTE_COMMON_FILES} engine/common/com_phys_ode.c)
SET(FTE_LIB_DEFINES "${FTE_LIB_DEFINES};USE_INTERNAL_ODE;ODE_STATIC")
SET(FTE_LIBS ${FTE_LIBS} ${LIBODE_LIBRARY})
SET(FTESV_LIBS ${FTESV_LIBS} ${LIBODE_LIBRARY})
SET(FTE_INCLUDES ${FTE_INCLUDES} ${ODE_INCLUDE_DIRS})
ELSE()
ADD_LIBRARY(plug_ode MODULE
plugins/plugin.c
engine/common/com_phys_ode.c
engine/common/mathlib.c
)
TARGET_INCLUDE_DIRECTORIES(plug_ode PUBLIC ${ODE_INCLUDE_DIRS})
SET_TARGET_PROPERTIES(plug_ode PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;ODE_STATIC")
TARGET_LINK_LIBRARIES(plug_ode ${SYS_LIBS} ${LIBODE_LIBRARY})
EMBED_PLUGIN_META(ode "ODE Physics" "Provides Rigid Body Physics behaviours.")
ENDIF()
ELSE()
MESSAGE(WARNING "ODE library not found, no ode plugin for you")
ENDIF()
ENDIF()
IF(ANDROID)
#android sucks. everything is a library. so we build the engine as a shared library and completely ignore dedicated servers+tools
SET(FTE_ENGINE_FTEDROID true CACHE BOOL "Compile ftedroid engine shared library.")
IF(FTE_ENGINE_FTEDROID)
ADD_LIBRARY(ftedroid MODULE
${FTE_ARCH_FILES}
${FTE_COMMON_FILES}
${FTE_CLIENT_FILES}
)
SET_TARGET_PROPERTIES(ftedroid PROPERTIES COMPILE_DEFINITIONS "${FTE_LIB_DEFINES};${FTE_DEFINES};${FTE_REVISON}")
TARGET_INCLUDE_DIRECTORIES(ftedroid PUBLIC ${FTE_INCLUDES})
TARGET_LINK_LIBRARIES(ftedroid ${FTE_LIBS} )
SET(INSTALLTARGS ${INSTALLTARGS} ftedroid)
ENDIF()
ELSE()
#systems that actually have executables...
SET(FTE_ENGINE true CACHE BOOL "Compile fteqw engine binary.")
IF(FTE_ENGINE)
ADD_EXECUTABLE(fteqw WIN32
${FTE_ARCH_FILES}
${FTE_COMMON_FILES}
${FTE_CLIENT_FILES}
${FTE_SERVER_FILES}
)
IF(CMAKE_SYSTEM_NAME MATCHES "BSD" OR CMAKE_SYSTEM_NAME MATCHES "Darwin")
FIND_LIBRARY(epoll-shim REQUIRED)
SET(FTE_INCLUDES ${FTE_INCLUDES} "${EPOLL_INC_DIR}")
SET(FTE_LIBS ${FTE_LIBS} epoll-shim)
SET(FTE_DEFINES ${FTE_DEFINES};HAVE_EPOLL)
ENDIF()
SET_TARGET_PROPERTIES(fteqw PROPERTIES COMPILE_DEFINITIONS "${FTE_LIB_DEFINES};${FTE_DEFINES};${FTE_REVISON}")
TARGET_INCLUDE_DIRECTORIES(fteqw PUBLIC ${FTE_INCLUDES})
TARGET_LINK_LIBRARIES(fteqw ${FTE_LIBS})
SET(INSTALLTARGS ${INSTALLTARGS} fteqw)
ADD_CUSTOM_TARGET(fteqw-i18n ALL
VERBATIM
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMAND xgettext --output=${CMAKE_CURRENT_BINARY_DIR}/fteqw.pot -k -kCon_TPrintf -kCon_SafeTPrintf -kNetchan_OutOfBandTPrintf:4 -kSV_OutOfBandTPrintf:4 -klangtext -kSV_TPrintToClient:3 -kSV_ClientTPrintf:3 -kSV_BroadcastTPrintf:2 -kCVARAFCD:6 -kCVARAFD:5 -kCVARFCD:5 -kCVARAD:4 -kCVARFD:4 -kCVARCD:4 -kCVARD:3 -kCmd_AddCommandD:3 -kCmd_AddCommandAD:4 -kMenu_Prompt:4:5:6 -kHost_EndGame ${FTE_ARCH_FILES} ${FTE_COMMON_FILES} ${FTE_CLIENT_FILES} ${FTE_SERVER_FILES}
BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/fteqw.pot"
SOURCES
${FTE_ARCH_FILES} ${FTE_COMMON_FILES} ${FTE_CLIENT_FILES} ${FTE_SERVER_FILES}
)
ENDIF()
SET(FTE_ENGINE_SERVER_ONLY true CACHE BOOL "Compile fteqw-sv (server only) engine binary.")
IF(FTE_ENGINE_SERVER_ONLY)
ADD_EXECUTABLE(fteqw-sv
${FTESV_ARCH_FILES}
${FTE_COMMON_FILES}
${FTE_SERVER_FILES}
)
SET_TARGET_PROPERTIES(fteqw-sv PROPERTIES COMPILE_DEFINITIONS "SERVERONLY;${FTE_LIB_DEFINES};${FTESV_DEFINES};${FTE_REVISON}")
TARGET_INCLUDE_DIRECTORIES(fteqw-sv PUBLIC ${FTE_INCLUDES})
TARGET_LINK_LIBRARIES(fteqw-sv ${FTESV_LIBS})
SET(INSTALLTARGS ${INSTALLTARGS} fteqw-sv)
ENDIF()
SET(FTE_ENGINE_CLIENT_ONLY false CACHE BOOL "Compile ftedw-cl (client-only) engine binary.")
IF(FTE_ENGINE_CLIENT_ONLY)
ADD_EXECUTABLE(fteqw-cl
${FTE_ARCH_FILES}
${FTE_COMMON_FILES}
${FTE_CLIENT_FILES}
)
SET_TARGET_PROPERTIES(fteqw-cl PROPERTIES COMPILE_DEFINITIONS "CLIENTONLY;${FTE_LIB_DEFINES};${FTE_DEFINES};${FTE_REVISON}")
TARGET_INCLUDE_DIRECTORIES(fteqw-cl PUBLIC ${FTE_INCLUDES})
TARGET_LINK_LIBRARIES(fteqw-cl ${FTE_LIBS})
SET(INSTALLTARGS ${INSTALLTARGS} fteqw-cl)
ENDIF()
IF(FTE_ENGINE OR FTE_ENGINE_CLIENT)
FIND_PACKAGE(SDL2)
IF(SDL2_FOUND)
SET(FTE_SDL2 FTE_SDL)
SET(FTE_SDL2_INCLUDES ${SDL2_INCLUDE_DIRS})
ENDIF()
ENDIF()
SET(FTE_TOOL_IQM true CACHE BOOL "Compile IQM Tool.")
IF(FTE_TOOL_IQM)
ADD_EXECUTABLE(iqmtool
iqm/iqm.cpp
plugins/models/gltf.c
${DRACO_FILES}
engine/common/json.c
engine/client/image.c
imgtool.c
iqm/iqm.h
)
SET_TARGET_PROPERTIES(iqmtool PROPERTIES COMPILE_DEFINITIONS "IQMTOOL;${DRACO_CFLAGS};${FTE_LIB_DEFINES};${FTE_REVISON}")
TARGET_LINK_LIBRARIES(iqmtool ${CMAKE_DL_LIBS} ${DRACO_LIBRARY} ${JPEG_LIBRARIES} ${PNG_LIBRARIES})
SET(INSTALLTARGS ${INSTALLTARGS} iqmtool)
ENDIF()
SET(FTE_TOOL_IMAGE true CACHE BOOL "Compile Image Tool.")
IF(FTE_TOOL_IMAGE)
ADD_EXECUTABLE(imgtool
engine/client/image.c
imgtool.c
)
TARGET_INCLUDE_DIRECTORIES(imgtool PUBLIC ${FTE_SDL2_INCLUDES})
SET_TARGET_PROPERTIES(imgtool PROPERTIES COMPILE_DEFINITIONS "IMGTOOL;${FTE_LIB_DEFINES};${FTE_DEFINES};${FTE_REVISON};${FTE_SDL2}")
TARGET_LINK_LIBRARIES(imgtool ${FTE_LIBS} )
SET(INSTALLTARGS ${INSTALLTARGS} imgtool)
ENDIF()
SET(FTE_TOOL_QTV true CACHE BOOL "Compile qtv server.")
IF(FTE_TOOL_QTV)
ADD_EXECUTABLE(qtv
fteqtv/netchan.c
fteqtv/parse.c
fteqtv/msg.c
fteqtv/qw.c
fteqtv/source.c
fteqtv/bsp.c
fteqtv/rcon.c
fteqtv/relay.c
fteqtv/mdfour.c
engine/common/md5.c
fteqtv/crc.c
fteqtv/control.c
fteqtv/forward.c
fteqtv/pmove.c
fteqtv/menu.c
fteqtv/httpsv.c
fteqtv/libqtvc/glibc_sucks.c
engine/common/sha1.c
)
SET_TARGET_PROPERTIES(qtv PROPERTIES COMPILE_DEFINITIONS "${FTE_REVISON};${FTE_LIB_DEFINES}")
IF(WIN32)
TARGET_LINK_LIBRARIES(qtv ws2_32 winmm ${SYS_LIBS} ${FTEQTV_LIBS})
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "BSD" OR CMAKE_SYSTEM_NAME MATCHES "Darwin")
# Add Epoll-shim for the kqueue Unixes here - Brad
FIND_LIBRARY(epoll-shim REQUIRED)
TARGET_INCLUDE_DIRECTORIES(qtv PUBLIC "${EPOLL_INC_DIR}")
TARGET_LINK_LIBRARIES(qtv epoll-shim ${SYS_LIBS} ${FTEQTV_LIBS})
SET_TARGET_PROPERTIES(qtv PROPERTIES COMPILE_DEFINITIONS "${FTE_REVISON};${FTE_LIB_DEFINES};HAVE_EPOLL")
ELSE()
TARGET_LINK_LIBRARIES(qtv ${SYS_LIBS} ${FTEQTV_LIBS})
ENDIF()
SET(INSTALLTARGS ${INSTALLTARGS} qtv)
ENDIF()
IF(WIN32)
SET(FTE_TOOL_MASTER false CACHE BOOL "Compile master server.")
ELSE()
SET(FTE_TOOL_MASTER true CACHE BOOL "Compile master server.")
ENDIF()
IF(FTE_TOOL_MASTER)
ADD_EXECUTABLE(ftemaster
${FTESV_ARCH_FILES}
engine/server/sv_master.c
engine/common/net_ice.c #for the stun responses.
engine/common/net_wins.c
engine/common/cvar.c
engine/common/cmd.c
engine/common/sha1.c #for websockets
engine/common/sha2.c #for fingerprints
engine/http/httpclient.c #for the pipe stuff
engine/common/log.c
engine/common/fs.c
engine/common/fs_stdio.c
engine/common/common.c
engine/common/translate.c
engine/common/zone.c
engine/qclib/hash.c
)
SET_TARGET_PROPERTIES(ftemaster PROPERTIES COMPILE_DEFINITIONS "MASTERONLY;${FTE_LIB_DEFINES};${FTESV_DEFINES};${FTE_REVISON}")
TARGET_LINK_LIBRARIES(ftemaster ${FTESV_LIBS})
SET(INSTALLTARGS ${INSTALLTARGS} ftemaster)
ENDIF()
SET(FTE_TOOL_HTTPSV true CACHE BOOL "Compile small http server.")
IF(FTE_TOOL_HTTPSV)
ADD_EXECUTABLE(httpserver
engine/common/fs_stdio.c
engine/http/httpserver.c
engine/http/iwebiface.c
engine/http/ftpserver.c
)
SET_TARGET_PROPERTIES(httpserver PROPERTIES COMPILE_DEFINITIONS "WEBSERVER;WEBSVONLY;${FTE_REVISON}")
IF(WIN32)
TARGET_LINK_LIBRARIES(httpserver ws2_32)
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "BSD" OR CMAKE_SYSTEM_NAME MATCHES "Darwin")
FIND_LIBRARY(epoll-shim REQUIRED)
TARGET_INCLUDE_DIRECTORIES(httpserver PUBLIC "${EPOLL_INC_DIR}")
TARGET_LINK_LIBRARIES(httpserver epoll-shim)
SET_TARGET_PROPERTIES(httpserver PROPERTIES COMPILE_DEFINITIONS "WEBSERVER;WEBSVONLY;${FTE_REVISON};HAVE_EPOLL")
ENDIF()
#SET(INSTALLTARGS ${INSTALLTARGS} httpserver)
ENDIF()
SET(FTE_TOOL_QCVM false CACHE BOOL "Compile standalone qcvm.")
IF(FTE_TOOL_QCVM)
ADD_EXECUTABLE(qcvm
engine/qclib/test.c
engine/qclib/hash.c
${FTE_QCVM_FILES}
)
SET_TARGET_PROPERTIES(qcvm PROPERTIES COMPILE_DEFINITIONS "${FTE_LIB_DEFINES};${FTE_REVISON}")
TARGET_LINK_LIBRARIES(qcvm ${FTEQCC_LIBS} ${SYS_LIBS})
SET(INSTALLTARGS ${INSTALLTARGS} qcvm)
ENDIF()
SET(FTE_TOOL_QCC true CACHE BOOL "Compile commandline qc compiler.")
IF(FTE_TOOL_QCC)
ADD_EXECUTABLE(fteqcc
engine/qclib/qcctui.c
engine/qclib/comprout.c
engine/qclib/hash.c
engine/qclib/qcc_cmdlib.c
engine/qclib/qcc_pr_comp.c
engine/qclib/qcc_pr_lex.c
engine/qclib/qccmain.c
engine/qclib/qcd_main.c
engine/qclib/decomp.c
engine/qclib/packager.c
)
SET_TARGET_PROPERTIES(fteqcc PROPERTIES COMPILE_DEFINITIONS "${FTE_LIB_DEFINES};${FTE_REVISON}")
TARGET_LINK_LIBRARIES(fteqcc ${FTEQCC_LIBS} ${SYS_LIBS})
SET(INSTALLTARGS ${INSTALLTARGS} fteqcc)
ENDIF()
SET(FTE_TOOL_QCCGUI true CACHE BOOL "Compile gui qc compiler.")
IF(FTE_TOOL_QCCGUI)
IF(${WIN32})
ADD_EXECUTABLE(fteqccgui WIN32
engine/qclib/qccgui.c
engine/qclib/qccguistuff.c
engine/qclib/comprout.c
engine/qclib/hash.c
engine/qclib/qcc_cmdlib.c
engine/qclib/qcc_pr_comp.c
engine/qclib/qcc_pr_lex.c
engine/qclib/qccmain.c
engine/qclib/decomp.c
engine/qclib/packager.c
engine/qclib/qcd_main.c
)
SET_TARGET_PROPERTIES(fteqccgui PROPERTIES COMPILE_DEFINITIONS "${FTE_LIB_DEFINES};${FTE_REVISON}")
TARGET_LINK_LIBRARIES(fteqccgui ${FTEQCC_LIBS} shlwapi ole32 comctl32 comdlg32)
SET(INSTALLTARGS ${INSTALLTARGS} fteqccgui)
ELSE()
FIND_PACKAGE(Qt5Widgets)
FIND_PATH(QSCINTILLA_INCLUDE_DIR
NAMES Qsci/qsciglobal.h
PATHS ${Qt5Widgets_INCLUDE_DIRS}
PATH_SUFFIXES Qsci
)
FIND_LIBRARY(QSCINTILLA_LIBRARY
NAMES qscintilla2_qt5
PATHS
${QT_LIBRARY_DIR}
/usr/local/lib
/usr/local/lib/qt5
/usr/lib
)
IF (QSCINTILLA_INCLUDE_DIR AND QSCINTILLA_LIBRARY AND Qt5Widgets_FOUND)
ADD_EXECUTABLE(fteqccgui
engine/qclib/qccguiqt.cpp
engine/qclib/qccguistuff.c
engine/qclib/comprout.c
engine/qclib/hash.c
engine/qclib/qcc_cmdlib.c
engine/qclib/qcc_pr_comp.c
engine/qclib/qcc_pr_lex.c
engine/qclib/qccmain.c
engine/qclib/decomp.c
# engine/qclib/packager.c
engine/qclib/qcd_main.c
)
TARGET_INCLUDE_DIRECTORIES(fteqccgui PUBLIC ${Qt5Widgets_INCLUDE_DIRS} ${QSCINTILLA_INCLUDE_DIR})
SET_TARGET_PROPERTIES(fteqccgui PROPERTIES COMPILE_DEFINITIONS "${FTE_LIB_DEFINES};${FTE_REVISON};${Qt5Widgets_COMPILE_DEFINITIONS}")
SET_PROPERTY(TARGET fteqccgui PROPERTY POSITION_INDEPENDENT_CODE TRUE)
TARGET_LINK_LIBRARIES(fteqccgui ${FTEQCC_LIBS} ${Qt5Widgets_LIBRARIES} ${QSCINTILLA_LIBRARY})
SET(INSTALLTARGS ${INSTALLTARGS} fteqccgui)
ELSE()
MESSAGE(WARNING "qscintilla/qt5widgets library not detected, no fteqccgui for you")
ENDIF()
ENDIF()
ENDIF()
ENDIF()
IF(0)
#software renderer plugin
#not stable enough, and probably won't ever be
ADD_LIBRARY(sw MODULE
plugins/plugin.c
engine/sw/sw_backend.c
engine/sw/sw_image.c
engine/sw/sw_rast.c
#engine/sw/sw_viddos.c
# engine/sw/sw_vidwin.c
engine/common/mathlib.c
# engine/client/in_win.c
engine/sw/sw.h
engine/sw/sw_spans.h
)
SET_TARGET_PROPERTIES(sw PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;${FTE_LIB_DEFINES};SWQUAKE")
TARGET_LINK_LIBRARIES(sw ${SYS_LIBS})
EMBED_PLUGIN_META(sw "Software Renderer" "Provides software rendering. Slow.")
ENDIF()
#Quake Injector Alike plugin
SET(FTE_PLUG_QI true CACHE BOOL "Compile Quake-Injnector plugin.")
IF(FTE_PLUG_QI)
ADD_LIBRARY(plug_qi MODULE
plugins/plugin.c
plugins/qi/qi.c
plugins/jabber/xml.c
)
SET_TARGET_PROPERTIES(plug_qi PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;${FTE_LIB_DEFINES}")
TARGET_LINK_LIBRARIES(plug_qi ${SYS_LIBS})
EMBED_PLUGIN_META(qi "Quaddicted Map Database" "Provides easy access to the quaddicted map database. Once installed you can use eg 'map qi_dopa:start' to begin playing dopa, or load it via the menus.")
ENDIF()
SET(FTE_PLUG_OPENSSL false CACHE BOOL "Compile OpenSSL.")
IF(FTE_PLUG_OPENSSL)
#the openssl license is incompatible with the GPL, so while we have code to use it distributing the binaries built with it is not a (legal) option.
#note that openssl 3.0.0 upwards are apache-2 licensed, which IS gpl-3 compatible (though not gpl-2). debian has not caught up with that yet, however.
#Crosscompile linux->win64: sudo ln -s ${pwd}/engine/libs-x86_64-w64-mingw32/openssl-openssl-3.0.1/ /usr/x86_64-w64-mingw32/OpenSSL
SET(OPENSSL_USE_STATIC_LIBS true CACHE BOOL "Link openssl statically.") #usually as an .so though. :/)
FIND_PACKAGE(OpenSSL)
IF(OPENSSL_VERSION_MAJOR LESS 3)
SET(FTE_PRIVATE_USE_ONLY false CACHE BOOL "Ignore license violations.")
ENDIF()
IF(NOT OPENSSL_FOUND)
MESSAGE(WARNING "openssl library NOT available. you'll have to use some other library.")
ELSEIF(OPENSSL_VERSION_MAJOR LESS 3 AND NOT FTE_PRIVATE_USE_ONLY)
MESSAGE(WARNING "openssl v3 required for GPL compliance. Enable FTE_PRIVATE_USE_ONLY to compile openssl plugin.")
ELSE()
IF(OPENSSL_VERSION_MAJOR LESS 3)
MESSAGE(WARNING "openssl library version is not 3 or above. You may not distribute plugin binaries due to license conflict.")
ELSE()
MESSAGE(WARNING "Using openssl. Resulting plugin must be licensed as GPLv3.")
ENDIF()
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES})
if (WIN32)
SET(OPENSSL_LIBRARIES ${OPENSSL_LIBRARIES} ws2_32)
ENDIF()
ADD_LIBRARY(plug_openssl MODULE
plugins/plugin.c
plugins/net_ssl_openssl.c
)
TARGET_INCLUDE_DIRECTORIES(plug_openssl PRIVATE ${OPENSSL_INCLUDE_DIR})
SET_TARGET_PROPERTIES(plug_openssl PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;${FTE_LIB_DEFINES}")
TARGET_LINK_LIBRARIES(plug_openssl ${SYS_LIBS} ${OPENSSL_LIBRARIES})
EMBED_PLUGIN_META(openssl "OpenSSL" "Provides OpenSSL support for dtls/tls/https support. The crypto library that is actually used is controlled via the tls_provider cvar.")
ENDIF()
ENDIF()
#SET(FTE_PLUG_GNUTLS true CACHE BOOL "Compile GnuTLS Library.")
#IF(FTE_PLUG_GNUTLS)
# FIND_PACKAGE(GnuTLS)
# IF(NOT GNUTLS_FOUND)
# MESSAGE(WARNING "gnutls library NOT available. you'll have to use some other library.")
# ELSE()
# SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES})
#
# ADD_LIBRARY(plug_gnutls MODULE
# plugins/plugin.c
# engine/common/net_ssl_gnutls.c
# )
# SET_TARGET_PROPERTIES(plug_gnutls PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;${FTE_LIB_DEFINES}")
# TARGET_LINK_LIBRARIES(plug_gnutls ${SYS_LIBS} ${GNUTLS_LIBRARIES})
#
# EMBED_PLUGIN_META(gnutls "GnuTLS" "Provides GnuTLS support for dtls/tls/https support. The crypto library that is actually used is controlled via the tls_provider cvar.")
# ENDIF()
#ENDIF()
#EzQuake Hud port plugin
SET(FTE_PLUG_EZHUD true CACHE BOOL "Compile MoreQuakeWorld Hud plugin .")
IF(FTE_PLUG_EZHUD)
ADD_LIBRARY(plug_ezhud MODULE
plugins/plugin.c
plugins/ezhud/ezquakeisms.c
plugins/ezhud/hud.c
plugins/ezhud/hud_common.c
plugins/ezhud/hud_editor.c
)
SET_TARGET_PROPERTIES(plug_ezhud PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;${FTE_LIB_DEFINES}")
TARGET_LINK_LIBRARIES(plug_ezhud ${SYS_LIBS})
EMBED_PLUGIN_META(ezhud "EzHud Plugin" "Provides compat with ezquake's hud scripts.")
ENDIF()
#NameMaker string generation plugin
SET(FTE_PLUG_NAMEMAKER false CACHE BOOL "Compile namemaker plugin.")
IF(FTE_PLUG_NAMEMAKER)
ADD_LIBRARY(plug_namemaker MODULE
plugins/plugin.c
plugins/namemaker/namemaker.c
)
SET_TARGET_PROPERTIES(plug_namemaker PROPERTIES COMPILE_DEFINITIONS "${FTE_LIB_DEFINES}")
TARGET_LINK_LIBRARIES(plug_namemaker ${SYS_LIBS})
EMBED_PLUGIN_META(namemaker "Name Maker Plugin" "Provides a lame UI for selecting arbitrary non-ascii glyphs as part of your nickname.")
ENDIF()
#Terrain Generation plugin
SET(FTE_PLUG_TERRAINGEN false CACHE BOOL "Compile sample terrain generation plugin.")
IF(FTE_PLUG_TERRAINGEN)
ADD_LIBRARY(plug_terraingen MODULE
plugins/plugin.c
plugins/terrorgen/terragen.c
)
SET_TARGET_PROPERTIES(plug_terraingen PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;${FTE_LIB_DEFINES}")
TARGET_LINK_LIBRARIES(plug_terraingen ${SYS_LIBS})
EMBED_PLUGIN_META(terraingen "TerrainGen Plugin" "A lame example plugin for randomised terrain generation.")
ENDIF()
#IRC client plugin
SET(FTE_PLUG_IRC true CACHE BOOL "Compile irc plugin.")
IF(FTE_PLUG_IRC)
ADD_LIBRARY(plug_irc MODULE
plugins/plugin.c
plugins/irc/ircclient.c
)
SET_TARGET_PROPERTIES(plug_irc PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;${FTE_REVISON};${FTE_LIB_DEFINES}")
TARGET_LINK_LIBRARIES(plug_irc ${SYS_LIBS})
EMBED_PLUGIN_META(irc "IRC Plugin" "Allows you to chat on IRC without tabbing out.")
ENDIF()
IF(ZLIB_FOUND)
#mpq package format plugin (blizzard games)
SET(FTE_PLUG_MPQ false CACHE BOOL "Compile mpq junk.")
IF(FTE_PLUG_MPQ)
ADD_LIBRARY(plug_mpq MODULE
plugins/plugin.c
plugins/mpq/blast.c
plugins/mpq/fs_mpq.c
)
SET_TARGET_PROPERTIES(plug_mpq PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;${FTE_LIB_DEFINES}")
TARGET_LINK_LIBRARIES(plug_mpq ${SYS_LIBS} ${ZLIB_LIBRARIES})
EMBED_PLUGIN_META(irc "MPQ Archive Plugin" "Adds support for reading .mpq files. Not very useful...")
ENDIF()
ENDIF()
#vpk package format plugin (halflife2)
SET(FTE_PLUG_HL2 true CACHE BOOL "Compile support for hl2 file formats.")
IF(FTE_PLUG_HL2)
ADD_LIBRARY(plug_hl2 MODULE
plugins/plugin.c
plugins/hl2/hl2.c
plugins/hl2/fs_vpk.c
plugins/hl2/fs_vpk_vtmb.c
plugins/hl2/fs_gma.c
plugins/hl2/img_tth.c
plugins/hl2/img_vtf.c
plugins/hl2/mod_hl2.c
plugins/hl2/mod_vbsp.c
plugins/hl2/mat_vmt.c
)
SET_TARGET_PROPERTIES(plug_hl2 PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;MULTITHREAD;${FTE_LIB_DEFINES}")
TARGET_LINK_LIBRARIES(plug_hl2 ${SYS_LIBS} ${ZLIB_LIBRARIES})
EMBED_PLUGIN_META(hl2 "HalfLife2 Formats Plugin" "Adds support for reading various file formats used by HalfLife2. Requires mod support to be useful.")
ENDIF()
#model formats plugin
SET(FTE_PLUG_MODELS true CACHE BOOL "Compile models formats plugin.")
IF(FTE_PLUG_MODELS)
ADD_LIBRARY(plug_models MODULE
plugins/plugin.c
plugins/models/models.c
plugins/models/gltf.c
${DRACO_FILES}
engine/common/json.c
plugins/models/exportiqm.c
)
SET_TARGET_PROPERTIES(plug_models PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;${DRACO_CFLAGS};${FTE_LIB_DEFINES}")
TARGET_LINK_LIBRARIES(plug_models ${SYS_LIBS} ${DRACO_LIBRARY})
EMBED_PLUGIN_META(models "Models Plugin" "Kinda redundant now that the engine has gltf2 loading.")
ENDIF()
SET(FTE_PLUG_X11SV false CACHE BOOL "Compile x11 server plugin.")
IF(FTE_PLUG_X11SV)
#x11 server plugin (note: for displaying other programs)
#not stable enough, and probably won't ever be
ADD_LIBRARY(plug_x11sv MODULE
plugins/plugin.c
plugins/xsv/m_x.c
plugins/xsv/x_reqs.c
plugins/xsv/x_res.c
engine/qclib/hash.c
)
SET_TARGET_PROPERTIES(plug_x11sv PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;${FTE_LIB_DEFINES}")
TARGET_LINK_LIBRARIES(plug_x11sv ${SYS_LIBS})
EMBED_PLUGIN_META(x11sv "X11 Server Plugin" "Provides a primitive X11 server in the form of a video decoder plugin.")
ENDIF()
#ffmpeg client plugin. no proper way to detect dependancies right now, so I've gotta try the manual way.
SET(FTE_PLUG_FFMPEG true CACHE BOOL "Compile ffmpeg media plugin.")
IF(FTE_PLUG_FFMPEG)
FIND_PATH(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h)
FIND_PATH(AVFORMAT_INCLUDE_DIR libavformat/avformat.h)
FIND_PATH(AVUTIL_INCLUDE_DIR libavutil/avutil.h)
FIND_PATH(AVSWSCALE_INCLUDE_DIR libswscale/swscale.h)
IF((AVFORMAT_INCLUDE_DIR) AND (AVSWSCALE_INCLUDE_DIR))
FIND_LIBRARY(AVCODEC_LIBRARY avcodec)
FIND_LIBRARY(AVFORMAT_LIBRARY avformat)
FIND_LIBRARY(AVUTIL_LIBRARY avutil)
FIND_LIBRARY(AVSWSCALE_LIBRARY swscale)
ADD_LIBRARY(plug_ffmpeg MODULE
plugins/plugin.c
plugins/avplug/avaudio.c
plugins/avplug/avdecode.c
plugins/avplug/avencode.c
)
TARGET_INCLUDE_DIRECTORIES(plug_ffmpeg PUBLIC ${AVCODEC_INCLUDE_DIR} ${AVFORMAT_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR} ${AVSWSCALE_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(plug_ffmpeg ${SYS_LIBS} ${AVFORMAT_LIBRARY} ${AVCODEC_LIBRARY} ${AVUTIL_LIBRARY} ${AVSWSCALE_LIBRARY})
SET_TARGET_PROPERTIES(plug_ffmpeg PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;${FTE_LIB_DEFINES}")
EMBED_PLUGIN_META(ffmpeg "FFMPEG Video Decoding Plugin" "Provides support for more audio formats, as well as video playback and better capture support.")
ELSE()
MESSAGE(WARNING "ffmpeg library NOT available. Quake shouldn't be playing fmv anyway.")
ENDIF()
ENDIF()
SET(FTE_PLUG_TIMIDITY false CACHE BOOL "Compile timidity audio plugin.")
IF(FTE_PLUG_TIMIDITY)
#timidity
FIND_PATH(TIMIDITY_INCLUDE_DIR timidity/timidity.h)
IF(TIMIDITY_INCLUDE_DIR)
FIND_LIBRARY(TIMIDITY_LIBRARY timidity)
ADD_LIBRARY(plug_timidity MODULE
plugins/plugin.c
plugins/timidity.c
)
TARGET_INCLUDE_DIRECTORIES(plug_timidity PUBLIC ${TIMIDITY_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(plug_timidity ${SYS_LIBS} ${TIMIDITY_LIBRARY})
SET_TARGET_PROPERTIES(plug_timidity PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;${FTE_LIB_DEFINES}")
EMBED_PLUGIN_META(timidity "Timidity Plugin" "Provides support for playback of midi files.")
ELSE()
MESSAGE(WARNING "timidity library NOT available. We'll just stick to fake-cd music for hexen2.")
ENDIF()
ENDIF()
#openxr plugin
SET(FTE_PLUG_OPENXR true CACHE BOOL "Compile openxr plugin (for vr support).")
IF(FTE_PLUG_OPENXR)
FIND_PACKAGE(PkgConfig)
IF (PKGCONFIG_FOUND)
IF (NOT CMAKE_CROSSCOMPILING) #its picking up the linux headers then complaining that they're missing in mingw. also almost entirely untested so no great loss.
PKG_SEARCH_MODULE(OPENXR openxr)
ENDIF()
IF (OPENXR_FOUND)
ADD_LIBRARY(plug_openxr MODULE
plugins/plugin.c
plugins/openxr.c
)
TARGET_INCLUDE_DIRECTORIES(plug_openxr PRIVATE ${OPENXR_INCLUDE_DIRS} )
IF (1) #dynamically link
SET_TARGET_PROPERTIES(plug_openxr PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;${FTE_LIB_DEFINES};${FTE_DEFINES};XR_NO_PROTOTYPES")
TARGET_LINK_LIBRARIES(plug_openxr ${SYS_LIBS})
ELSE() #statically link
SET_TARGET_PROPERTIES(plug_openxr PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;${FTE_LIB_DEFINES};${FTE_DEFINES}")
TARGET_LINK_LIBRARIES(plug_openxr ${SYS_LIBS} ${OPENXR_LIBRARIES})
ENDIF()
EMBED_PLUGIN_META(openxr "OpenXR Plugin" "Provides support for Virtual Reality headsets and input devices.")
ELSE()
MESSAGE(WARNING "openxr library NOT available. Quake is already a reality anyway.")
ENDIF()
ENDIF()
ENDIF()
##cef plugin
##libcef itself can be obtained from https://cef-builds.spotifycdn.com/index.html#linux64 (minimal builds, which still ends up with a 1,162,752,744 byte libcef.so - yes, actual size)
##(be sure to manually strip the binary of its debug info)
##to get this cmake stuff to recognise the headers etc:
## cd $FTEQW-REPO && ln -s $FOO/cef_binary_$FOO+chromium-$FOO_linux64_minimal plugins/cef/cef_linux64
##(note that other systems use other subdir names)
SET(FTE_PLUG_CEF true CACHE BOOL "Compile libcef (webbrowser) plugin.")
SET(CEF_PATH ${CEF_PATH} CACHE PATH "Base location of libcef for target platform.")
IF(FTE_PLUG_CEF)
IF(CEF_PATH MATCHES "")
UNSET(CEF_PATH CACHE)
IF(WIN32)
IF(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "AMD64")
FIND_PATH (CEF_PATH include/cef_version.h plugins/cef/cef_windows64)
ELSEIF(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86")
FIND_PATH (CEF_PATH include/cef_version.h plugins/cef/cef_windows32)
ELSEIF(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "ARM64")
FIND_PATH (CEF_PATH include/cef_version.h plugins/cef/cef_windowsarm64)
ENDIF()
ELSEIF("${CMAKE_SYSTEM}" MATCHES "Linux")
IF(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64")
FIND_PATH (CEF_PATH include/cef_version.h plugins/cef/cef_linux64)
ELSEIF(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i686")
FIND_PATH (CEF_PATH include/cef_version.h plugins/cef/cef_linux32)
ENDIF()
ENDIF()
ENDIF()
#FIND_LIBRARY(CEF_LIBRARIES cef ${CEF_PATH}/Release)
IF (CEF_PATH)
##statically link only for release builds. debug builds probably don't want to have to wait for ages for the debugger to finish loading debug info unless we're actually using this stuff.
IF(CMAKE_BUILD_TYPE MATCHES "Release")
SET(CEF_LIBRARIES "${CMAKE_BINARY_DIR}/libcef.so")
ENDIF()
ADD_LIBRARY(plug_cef MODULE
plugins/plugin.c
plugins/cef/cef.c
)
TARGET_INCLUDE_DIRECTORIES(plug_cef PRIVATE ${CEF_PATH})
SET_TARGET_PROPERTIES(plug_cef PROPERTIES BUILD_RPATH_USE_ORIGIN true)
if (CEF_LIBRARIES)
SET_TARGET_PROPERTIES(plug_cef PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;${FTE_LIB_DEFINES};${FTE_DEFINES};LIBCEF_STATIC")
TARGET_LINK_LIBRARIES(plug_cef ${SYS_LIBS} ${CEF_LIBRARIES} ${CMAKE_DL_LIBS})
ELSE()
SET_TARGET_PROPERTIES(plug_cef PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;${FTE_LIB_DEFINES};${FTE_DEFINES};LIBCEF_DYNAMIC")
TARGET_LINK_LIBRARIES(plug_cef ${SYS_LIBS} ${CMAKE_DL_LIBS})
ENDIF()
IF(NOT ${UNIX})
ADD_CUSTOM_COMMAND(
TARGET plug_cef PRE_LINK
COMMAND cp ${CEF_PATH}/Release/* ${CMAKE_BINARY_DIR}
COMMAND cp ${CEF_PATH}/Resources/* ${CMAKE_BINARY_DIR}
)
ELSE()
IF(CMAKE_BUILD_TYPE MATCHES "Release")
#sigh, cef ain't stripped properly on linux.
ADD_CUSTOM_COMMAND(
TARGET plug_cef PRE_LINK
COMMAND ln -f -s ${CEF_PATH}/Release/* ${CMAKE_BINARY_DIR}
COMMAND strip ${CMAKE_BINARY_DIR}/libcef.so -o libcef.so
COMMAND strip ${CMAKE_BINARY_DIR}/libEGL.so -o libEGL.so
COMMAND strip ${CMAKE_BINARY_DIR}/libGLESv2.so -o libGLESv2.so
COMMAND strip ${CMAKE_BINARY_DIR}/chrome-sandbox -o chrome-sandbox
COMMAND ln -f -s ${CEF_PATH}/Resources/* ${CMAKE_BINARY_DIR}
)
ELSE()
ADD_CUSTOM_COMMAND(
TARGET plug_cef PRE_LINK
COMMAND ln -f -s ${CEF_PATH}/Release/* ${CMAKE_BINARY_DIR}
COMMAND ln -f -s ${CEF_PATH}/Resources/* ${CMAKE_BINARY_DIR}
)
ENDIF()
ENDIF()
EMBED_PLUGIN_META(cef "libcef(Browser) Plugin" "This plugin provides support for an in-game web browser.")
ELSE()
MESSAGE(WARNING "libcef library NOT available. no web browser support on walls.")
ENDIF()
ENDIF()
SET(FTE_PLUG_XMPP true CACHE BOOL "Compile xmpp/jabber instant-messenger plugin.")
IF(FTE_PLUG_XMPP)
#XMPP/jabber client plugin
ADD_LIBRARY(plug_xmpp MODULE
plugins/plugin.c
plugins/jabber/jabberclient.c
plugins/jabber/xml.c
plugins/jabber/jingle.c
plugins/jabber/sift.c
engine/common/sha1.c
engine/common/sha2.c
plugins/emailnot/md5.c
)
SET_TARGET_PROPERTIES(plug_xmpp PROPERTIES COMPILE_DEFINITIONS "FTEPLUGIN;${FTE_LIB_DEFINES}")
#for SRV lookups, so we actually get the right server from account names/etc.
IF(ANDROID) #libresolv issues.
ELSEIF(${WIN32}) #softlinks a dll
ELSE()
TARGET_LINK_LIBRARIES(plug_xmpp ${SYS_LIBS} resolv)
ENDIF()
EMBED_PLUGIN_META(xmpp "XMPP Plugin" "XMPP/Jabber instant messenger plugin for chatting without tabbing out.")
ENDIF()
INSTALL(TARGETS ${INSTALLTARGS}
RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/${FTE_INSTALL_BINDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/${FTE_INSTALL_LIBDIR}"
)
IF(UNIX AND NOT APPLE)
INSTALL(FILES
${CMAKE_SOURCE_DIR}/dist/linux/org.fteqw.fteqw.desktop
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications/")
INSTALL(FILES
${CMAKE_SOURCE_DIR}/dist/org.fteqw.fteqw.svg
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps/")
INSTALL(FILES
${CMAKE_SOURCE_DIR}/dist/linux/org.fteqw.fteqw.metainfo.xml
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo/")
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/games
DESTINATION "${CMAKE_INSTALL_PREFIX}/etc/xdg/fteqw"
FILES_MATCHING PATTERN "*.fmf")
ENDIF()
SET(FTE_MENU_SYS true CACHE BOOL "Compile System Menu.")
IF(FTE_MENU_SYS)
ADD_CUSTOM_TARGET(menusys ALL
VERBATIM
DEPENDS fteqcc
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/quakec/menusys/"
COMMAND fteqcc -srcfile "menu.src" -o "${CMAKE_CURRENT_BINARY_DIR}/menu.dat" -DREVISION="${SVNREVISION}" -DDATE="${FTE_DATE}" -DBRANCH="${FTE_BRANCH}"
COMMAND /bin/echo -e "{\\n package fte_menusys\\n ver \"${SVNREVISION}\"\\n category Plugins\\n title \"Replacement Menus\"\\n gamedir \"id1\"\\n desc \"Modern menus to replace the ancient quake ones\"\\n}" | zip -j -q -9 -fz- "${CMAKE_CURRENT_BINARY_DIR}/menusys.pk3" - "${CMAKE_CURRENT_BINARY_DIR}/menu.dat"
BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/menu.dat" "${CMAKE_CURRENT_BINARY_DIR}/menu.lno" "${CMAKE_CURRENT_BINARY_DIR}/menusys.pk3"
SOURCES
quakec/menusys/menu.src
quakec/menusys/fteextensions.qc
quakec/menusys/menusys/mitems.qc
quakec/menusys/menusys/mitems_common.qc
quakec/menusys/menusys/mitem_frame.qc
quakec/menusys/menusys/mitem_desktop.qc
quakec/menusys/menusys/mitem_exmenu.qc
quakec/menusys/menusys/mitem_edittext.qc
quakec/menusys/menusys/mitem_tabs.qc
quakec/menusys/menusys/mitem_colours.qc
quakec/menusys/menusys/mitem_checkbox.qc
quakec/menusys/menusys/mitem_slider.qc
quakec/menusys/menusys/mitem_combo.qc
quakec/menusys/menusys/mitem_bind.qc
quakec/menusys/menusys/mitem_spinnymodel.qc
quakec/menusys/menu/loadsave.qc
quakec/menusys/menu/newgame.qc
quakec/menusys/menu/options_basic.qc
quakec/menusys/menu/options_effects.qc
quakec/menusys/menu/options_keys.qc
quakec/menusys/menu/options.qc
quakec/menusys/menu/presets.qc
quakec/menusys/menu/servers.qc
quakec/menusys/menu/main.qc
quakec/menusys/menu/mods.qc
quakec/menusys/menu/cvars.qc
quakec/menusys/menu/updates.qc
quakec/menusys/menu/options_audio.qc
quakec/menusys/menu/options_configs.qc
quakec/menusys/menu/options_hud.qc
quakec/menusys/menu/options_particles.qc
quakec/menusys/menu/options_video.qc
quakec/menusys/menu/quit.qc
)
INSTALL(FILES
${CMAKE_CURRENT_BINARY_DIR}/menusys.pk3
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/games/quake/id1/")
ENDIF()
SET(FTE_CSADDON true CACHE BOOL "CS Addon.")
IF(FTE_CSADDON)
ADD_CUSTOM_TARGET(csaddon ALL
VERBATIM
DEPENDS fteqcc
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/quakec/csaddon/src/"
COMMAND fteqcc -srcfile "csaddon.src" -o "${CMAKE_CURRENT_BINARY_DIR}/csaddon.dat"
COMMAND /bin/echo -e "{\\n package fte_csaddon\\n ver \"${SVNREVISION}\"\\n category Plugins\\n title \"${PLUGTITLE}\"\\n gamedir \"id1\"\\n desc \"${PLUGDESC}\"\\n}" | zip -j -q -9 -fz- "${CMAKE_CURRENT_BINARY_DIR}/csaddon.pk3" - "${CMAKE_CURRENT_BINARY_DIR}/csaddon.dat"
BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/csaddon.dat" "${CMAKE_CURRENT_BINARY_DIR}/csaddon.lno" "${CMAKE_CURRENT_BINARY_DIR}/csaddon.pk3"
SOURCES
quakec/csaddon/src/csaddon.src
quakec/csaddon/src/csplat.qc
quakec/csaddon/src/csfixups.qc
quakec/csaddon/src/editor_lights.qc
quakec/csaddon/src/editor_terrain.qc
quakec/csaddon/src/brush_selection.qc
quakec/csaddon/src/brush_history.qc
quakec/csaddon/src/brush_manip.qc
quakec/csaddon/src/brush_draw.qc
quakec/csaddon/src/brush_vertedit.qc
quakec/csaddon/src/editor_brushes.qc
quakec/csaddon/src/editor_ents.qc
quakec/csaddon/src/textfield.qc
quakec/csaddon/src/editor_particles.qc
quakec/csaddon/src/menu.qc
quakec/csaddon/src/cam.qc
quakec/csaddon/src/csaddon.qc
)
INSTALL(FILES
${CMAKE_CURRENT_BINARY_DIR}/csaddon.pk3
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/games/quake/id1/")
ENDIF()
================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
<https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
one line to give the program's name and an idea of what it does.
Copyright (C) yyyy name of author
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, see
<https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
type `show w'. This is free software, and you are welcome
to redistribute it under certain conditions; type `show c'
for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright
interest in the program `Gnomovision'
(which makes passes at compilers) written
by James Hacker.
signature of Moe Ghoul, 1 April 1989
Moe Ghoul, President of Vice
This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License.
================================================
FILE: README.md
================================================
# [FTEQW](https://fteqw.org)

Powerful engine for playing and modding idTech based games.
# What is FTEQW?
FTEQW is an advanced and portable Quake engine. It supports multiple games running on idTech, plus its own set of games that developers have created.
Due to the vast amount of supported formats, features, and innovations inside the engine and its very own QuakeC compiler (FTEQCC), it's very much considered the swiss-army knife of Quake engines.
### Highlights:
- Single & multi-player support
- Supports multiple games
- Vast amount of map, model, & image formats are supported
- Advanced console, with descriptions & autocompletion
- Plugin support, enabling use of FFMPEG, Bullet/ODE physics & more
- Extensive suite of QuakeC/entity debugging features
- Deep integration with FTEQCC (fork of QuakeC created for FTEQW), which can even be executed in-game
- Support for split-screen local multiplayer
- Voice-chat via Opus & Speex
- Support for hundreds of players on a single server
- Works on Windows, Linux, OpenBSD... & more
- New features are added all the time in cooperation with modders
# Contributions
Contributions and help is always welcomed.
### Guidelines:
- Be kind and respectful
- GPL2 licensed contributions are preferred, but plugins can be different but GPL-compatbile licenses
- This codebase follows USA/EU/UK copyright laws
- Always give credit from other codebases and make sure licenses are compatible
- Test your changes and ensure nothing else has been broken (games, plugins, formats, etc)
# Reporting Issues
Bug reports are welcomed! :)
### Required Information:
- Your system information such as your **Operating System** and **Hardware** (GPU/CPU)
- If the binary is pre-built (e.g. from fteqw.org) or if it was built manually
- What version of FTEQW you're using (type `version` in console)
- If it is a supported game/mod/plugin/etc you're having issues with, then provide the version info for it, and tell us how it should be behaving
- Make sure you have read the included documentation and ensure you have done everything right
- Remember to double check the problem hasn't already been reported
- Screenshots and/or video are generally desired if it is a visual malfunction
**Windows Users**
Please make sure you have not renamed your executable, `fteqw.exe`, to be `winquake.exe` or `glquake.exe` as Windows attempts compatability fixes that are not required for FTEQW and will cause problems.
# Documentation
Please see the `documentation` folder inside the repo for building, using the engine, tools, and more.
The `specs` folder is for more advanced users seeking QuakeC and idTech file format related information or examples.
# Contact
### Matrix
https://matrix.to/#/#fte:matrix.org
### IRC
**Server:** irc.quakenet.org
**Channel:** #fte
### Forums
**[Spike](https://forums.insideqc.com/memberlist.php?mode=viewprofile&u=26)** and **[eukara](https://forums.insideqc.com/memberlist.php?mode=viewprofile&u=949)** can be found on [insideqc.com](https://forums.insideqc.com/)
### Discord
https://discord.gg/p2ag7x6Ca6
# Credits
Please see the `Credits.md` file.
# License
Copyright (c) 2004-2025 FTE's team and its contributors
Quake source (c) 1999 id Software
FTEQW is supplied to you under the terms of the same license as the
original Quake sources, the GNU General Public License Version 2.
Please read the `LICENSE` file for details.
# Download
The latest source & binaries are always available at:
[fteqw.org](https://fteqw.org)
[fteqcc.org](https://fteqcc.org)
================================================
FILE: build_qc.sh
================================================
#!/bin/bash
#FTEQCC and FTEQW must be defined.
#QSS should be defined...
BUILDFOLDER=~/htdocs
BUILDLOGFOLDER=$BUILDFOLDER/build_logs
if [ "$FTEQCC" == "" ]; then
QSS=~/htdocs/qss/quakespasm-spiked-linux64
FTEQW=~/htdocs/linux_amd64/fteqw64
FTEQCC=~/htdocs/linux_amd64/fteqcc64
fi
#this really should use the native cpu type... until then we use 32bit in case anyone's still using a 32bit kernel.
if [ "$FTEQW" != "" ]; then
echo "--- QC builds ---"
echo "Making fteextensions.qc"
BASEDIR=~/.fte
GAMEDIR=fte
mkdir -p $BASEDIR/$GAMEDIR/src
#generate fte's extensions
CFG=$BASEDIR/fte/minusargsaresilly.cfg
echo "pr_dumpplatform -o fteextensions" > $CFG
echo "pr_dumpplatform -o csqcsysdefs -Tcs" >> $CFG
echo "pr_dumpplatform -o menusysdefs -Tmenu" >> $CFG
$FTEQW -basedir $BASEDIR -nohome -quake -game $GAMEDIR +set snd_device none -nosound +set vid_renderer sv +exec minusargsaresilly.cfg +quit >> /dev/null
#if we have fteqcc available then try to generate some symbol lists for our generic defs
if [ "$FTEQCC" != "" ]; then
#get QSS to spit out its defs for completeness.
if [ "$QSS" != "" ] && [ -e "$BASEDIR/id1/pak1.pak" ] && [ -e "$QSS" ]; then
CFG=$BASEDIR/$GAMEDIR/gen.cfg
echo "pr_dumpplatform -Oqscsextensions -Tcs" > $CFG
echo "pr_dumpplatform -Oqsextensions -Tss" >> $CFG
echo "pr_dumpplatform -Oqsmenuextensions -Tmenu" >> $CFG
$QSS -dedicated -nohome -game $GAMEDIR -basedir $BASEDIR +exec gen.cfg +quit >>/dev/null
else
echo "QSS not available?"
fi
if [ ! -e "$BASEDIR/fte/src/dpsymbols.src" ]; then
ln -sr quakec/dpsymbols.src $BASEDIR/$GAMEDIR/src/
fi
if [ ! -e "$BASEDIR/fte/src/dpdefs/" ]; then
echo "no dpdefs subdir found in $BASEDIR/fte/src/ ... manual intervention required"
fi
#generate symbol tables from the various engines's defs
( cd $BASEDIR/$GAMEDIR/src
$FTEQCC -Fdumpsymbols -oqsscs.dat qscsextensions.qc && sort -o qss_cs.sym qsscs.dat.sym
$FTEQCC -Fdumpsymbols -oqssss.dat qsextensions.qc && sort -o qss_ss.sym qssss.dat.sym
$FTEQCC -Fdumpsymbols -oqssmn.dat qsmenuextensions.qc && sort -o qss_menu.sym qssmn.dat.sym
$FTEQCC -Fdumpsymbols -oftecs.dat -DCSQC fteextensions.qc && sort -o fte_cs.sym ftecs.dat.sym
$FTEQCC -Fdumpsymbols -oftess.dat -DSSQC fteextensions.qc && sort -o fte_ss.sym ftess.dat.sym
$FTEQCC -Fdumpsymbols -oftemn.dat -DMENU fteextensions.qc && sort -o fte_menu.sym ftemn.dat.sym
$FTEQCC -Fdumpsymbols -odpcs.dat -DCSQC dpsymbols.src && sort -o dp_cs.sym dpcs.dat.sym
$FTEQCC -Fdumpsymbols -odpss.dat -DSSQC dpsymbols.src && sort -o dp_ss.sym dpss.dat.sym
$FTEQCC -Fdumpsymbols -odpmn.dat -DMENU dpsymbols.src && sort -o dp_menu.sym dpmn.dat.sym
) >>/dev/null
#generate generic extensions
CFG=$BASEDIR/fte/minusargsaresilly.cfg
echo "pr_dumpplatform -Ocsqc_api -Fdepfilter -Tsimplecs" > $CFG
echo "pr_dumpplatform -Ofte_csqc_api -Fdepfilter -Tcs" >> $CFG
echo "pr_dumpplatform -Odp_csqc_api -Fdepfilter -Tdpcs" >> $CFG
echo "pr_dumpplatform -Ossqc_api -Fdepfilter -Tnq" >> $CFG
echo "pr_dumpplatform -Omenu_api -Fdepfilter -Tmenu" >> $CFG
$FTEQW -basedir $BASEDIR -nohome -quake -game $GAMEDIR +set snd_device none -nosound +set vid_renderer sv +exec minusargsaresilly.cfg +quit >> /dev/null
fi
#fix up and copy the results somewhere useful
rm $CFG
mkdir -p $BUILDFOLDER/ftedefs $BUILDFOLDER/genericdefs
mv $BASEDIR/$GAMEDIR/src/fteextensions.qc $BUILDFOLDER/ftedefs
mv $BASEDIR/$GAMEDIR/src/csqcsysdefs.qc $BUILDFOLDER/ftedefs
mv $BASEDIR/$GAMEDIR/src/menusysdefs.qc $BUILDFOLDER/ftedefs
mv $BASEDIR/$GAMEDIR/src/*_api.qc $BUILDFOLDER/genericdefs
fi
if [ "$FTEQCC" != "" ]; then
mkdir -p $BUILDFOLDER/csaddon/
( cd quakec/csaddon/src
echo -n "Making csaddon... "
$FTEQCC -srcfile csaddon.src > $BUILDLOGFOLDER/csaddon.txt 2>&1
if [ $? -eq 0 ]; then
echo "done"
cp ../csaddon.dat $BUILDFOLDER/csaddon/
cd ..
zip -q9 $BUILDFOLDER/csaddon/csaddon.pk3 csaddon.dat
else
echo "failed"
fi
)
( cd quakec/menusys
echo -n "Making menusys... "
$FTEQCC -srcfile menu.src > $BUILDLOGFOLDER/menu.txt 2>&1
if [ $? -eq 0 ]; then
echo "done"
zip -q -q9 -o -r $BUILDFOLDER/csaddon/menusys_src.zip .
cp ../menu.dat $BUILDFOLDER/csaddon/
cd ..
zip -q9 $BUILDFOLDER/csaddon/menusys.pk3 menu.dat
else
echo "failed"
fi
)
else
echo "Skiping csaddon + qcmenu, no compiler build"
fi
================================================
FILE: build_setup.sh
================================================
#!/bin/bash
#sets up dependancies for debian-jessie (8.7)
#this script must be run twice. first time as root, which installs system packages
#second time as a regular user (probably not your normal one), which installs 3rd-party stuff
SVNROOT=$(cd "$(dirname "$BASH_SOURCE")" && pwd)
FTEROOT=$(realpath $SVNROOT/..)
FTEROOT=${FTEROOT:-~}
FTECONFIG=$SVNROOT/build.cfg
BUILDFOLDER=`echo ~`/htdocs
BUILDLOGFOLDER=$BUILDFOLDER/build_logs
#mac defaults
OSXCROSSROOT=$FTEROOT/osxcross
#emscripten defaults
EMSCRIPTENROOT=$FTEROOT/emsdk-portable
#android defaults
ANDROIDROOT=$FTEROOT/android
if [ ! -z "$(uname -o 2>&1 | grep Cygwin)" ]; then
ANDROID_HOSTSYSTEM=windows-x86_64
else
ANDROID_HOSTSYSTEM=linux-$(uname -m)
fi
ANDROIDBUILDTOOLS=25.0.0
ANDROID_ZIPALIGN=$ANDROIDROOT/build-tools/$ANDROIDBUILDTOOLS/zipalign #relative to ndk tools
THREADS="-j 4"
TARGETS_LINUX="qcc-rel rel dbg plugins-rel plugins-dbg" #gl-rel vk-rel
TARGETS_WINDOWS="sv-rel m-rel qcc-rel qccgui-scintilla qccgui-dbg m-dbg sv-dbg plugins-dbg plugins-rel" #gl-rel vk-rel mingl-rel d3d-rel
PLUGINS_DROID="qi ezhud irc hl2"
PLUGINS_LINUXx86="openxr ode qi ezhud xmpp irc hl2"
PLUGINS_LINUXx64="openxr ode qi ezhud xmpp irc hl2"
PLUGINS_LINUXx32="qi ezhud xmpp irc hl2"
PLUGINS_LINUXarmhf="qi ezhud xmpp irc hl2"
PLUGINS_LINUXaarch64="qi ezhud xmpp irc hl2"
if [ "$(uname -m)" != "x86_64" ]; then
PLUGINS_LINUXx86="openxr ode qi ezhud xmpp irc hl2"
fi
if [ "$(uname -m)" == "x86_64" ]; then
PLUGINS_LINUX64="openxr ode qi ezhud xmpp irc hl2"
fi
#windows is always cross compiled, so we don't have issues with non-native ffmpeg
#windows doesn't cross compile, so no system dependancy issues
#skip some dependancies if we're running on cygwin, ode is buggy.
if [ "$(uname -s)" == "Linux" ]; then
PLUGINS_WIN32="ode qi ezhud xmpp irc hl2"
PLUGINS_WIN64="ode qi ezhud xmpp irc hl2"
else
PLUGINS_WIN32="qi ezhud xmpp irc hl2"
PLUGINS_WIN64="qi ezhud xmpp irc hl2"
fi
echo
echo "This is Spike's script to set up various cross compilers and dependancies."
echo "This script will check dependancies. If something isn't installed you can either rerun the script as root (which will ONLY install system packages), or manually apt-get or whatever. You can then re-run the script as a regular user to finish configuring 3rd party dependancies."
echo
echo "You can change your choices later by just re-running this script"
echo "(Your settings will be autosaved in $FTECONFIG)"
echo
echo "If you just want to compile a native build, just use the following command:"
echo "cd $SVNROOT/engine && make gl-rel"
echo "(if you're in cygwin, add FTE_TARGET=win32 to compile for native windows)"
echo "(add plugins-rel qcc-rel qccgui-rel sv-rel vk-rel etc for additional targets)"
echo "(or use -dbg if you want debug builds for whatever reason)"
echo
#always execute it if it exists, so that we preserve custom paths etc that are not prompted for here
if [ -e $FTECONFIG ]; then
. $FTECONFIG
if [ $UID -eq 0 ]; then
REUSE_CONFIG="y" #root shouldn't be writing/owning the config file.
else
REUSE_CONFIG="u"
fi
else
if [ $UID -eq 0 ]; then
exit #root can't create the output, as that would take ownership.
else
REUSE_CONFIG="n"
fi
fi
if [ "$BUILD_CLEAN" == "n" ]; then
NOUPDATE="y"
fi
#check args (and override config as desired)
while [[ $# -gt 0 ]]
do
case $1 in
-r) #for people that want to build a specific revision for some reason.
SVN_REV_ARG="-r $2"
NOUPDATE=
shift
;;
-j)
THREADS="-j $2"
shift
;;
-help|--help)
echo " -r VER Specifies the SVN revision to update to"
echo " -j THREADS Specifies how many jobs to make with"
echo " --help This text"
exit 0
;;
-build|--build) #for custom build settings
TARGET="FTE_CONFIG=$2"
shift
;;
--fast) #for people that want to live dangerously.
BUILD_CLEAN="n"
;;
--noupdate) #for people living privately or building old revisions...
NOUPDATE="y"
;;
--unattended) #don't prompt, use various defaults.
UNATTENDED="y"
REUSE_CONFIG="y"
;;
*)
echo "Unknown option $1"
;;
esac
shift
done
if [ "$REUSE_CONFIG" == "u" ]; then
read -n 1 -p "Reuse previous build config? [y/N] " REUSE_CONFIG && echo
REUSE_CONFIG=${REUSE_CONFIG:-n}
fi
if [ "$REUSE_CONFIG" != "y" ]; then
#linux compiles are native-only, so don't bug out on cygwin which lacks a cross compiler.
BUILD_LINUXx86=n
BUILD_LINUXx64=n
BUILD_LINUXx32=n
BUILD_LINUXarmhf=n
if [ "$(uname -s)" == "Linux" ]; then
read -n 1 -p "Build for Linux x86? [Y/n] " BUILD_LINUXx86 && echo
read -n 1 -p "Build for Linux x86_64? [Y/n] " BUILD_LINUXx64 && echo
read -n 1 -p "Build for Linux x32? [y/N] " BUILD_LINUXx32 && echo
#ubuntu's gcc-multilib-arm-foo package conflicts with gcc-multilib...
#the whole point of multilib was to avoid conflicts... someone fucked up.
#read -n 1 -p "Build for Linux armhf [y/N] " BUILD_LINUXarmhf && echo
else
echo "Skipping Linux options."
fi
BUILD_CYGWIN=n
BUILD_MSVC=n
if [ "$(uname -o)" == "Cygwin" ]; then
read -n 1 -p "Build for Cygwin? [y/N] " BUILD_CYGWIN && echo
read -n 1 -p "Build with MSVC? (requires windows7 sdk) [y/N] " BUILD_MSVC && echo
else
echo "Skipping Cygwin options."
fi
read -n 1 -p "Build for Windows x86? [Y/n] " BUILD_WIN32 && echo
read -n 1 -p "Build for Windows x86_64? [Y/n] " BUILD_WIN64 && echo
BUILD_DOS=n
if [ "$(uname -o)" == "Cygwin" ]; then
read -n 1 -p "Build for Dos? [y/N] " BUILD_DOS && echo
fi
BUILD_SDL_LINUXx86=n
BUILD_SDL_LINUXx64=n
BUILD_SDL_WIN32=n
BUILD_SDL_WIN64=n
if [ "$(uname -sm)" == "Linux i686" ]; then
read -n 1 -p "Build for Linux x86 SDL? [y/N] " BUILD_SDL_LINUXx32 && echo
fi
if [ "$(uname -sm)" == "Linux x86_64" ]; then
read -n 1 -p "Build for Linux x86_64 SDL? [y/N] " BUILD_SDL_LINUXx64 && echo
fi
read -n 1 -p "Build for Android? [y/N] " BUILD_ANDROID && echo
read -n 1 -p "Build for Emscripten? [y/N] " BUILD_WEB && echo
if [ 0 -ne 0 ]; then
read -n 1 -p "Build for MacOSX? [y/N] " BUILD_MAC && echo
else
echo "Skipping mac option."
fi
fi
BUILD_CLEAN=${BUILD_CLEAN:-y}
BUILD_LINUXx86=${BUILD_LINUXx86:-y}
BUILD_LINUXx64=${BUILD_LINUXx64:-y}
BUILD_LINUXx32=${BUILD_LINUXx32:-n}
BUILD_LINUXarmhf=${BUILD_LINUXarmhf:-n}
BUILD_LINUXaarch64=${BUILD_LINUXaarch64:-n}
BUILD_CYGWIN=${BUILD_CYGWIN:-n}
BUILD_WIN32=${BUILD_WIN32:-y}
BUILD_WIN64=${BUILD_WIN64:-y}
BUILD_DOS=${BUILD_DOS:-n}
BUILD_MSVC=${BUILD_MSVC:-n}
BUILD_SDL=${BUILD_SDL:-n}
BUILD_ANDROID=${BUILD_ANDROID:-n}
BUILD_WEB=${BUILD_WEB:-n}
BUILD_MAC=${BUILD_MAC:-n}
if [ "$UID" != "0" ]; then
echo "#path config for fte build scripts" >$FTECONFIG
echo "THREADS=\"$THREADS\"" >>$FTECONFIG
echo "BUILDFOLDER=\"$BUILDFOLDER\"" >>$FTECONFIG
echo "BUILDLOGFOLDER=\"$BUILDLOGFOLDER\"" >>$FTECONFIG
echo "SVNROOT=\"$SVNROOT\"" >>$FTECONFIG
echo "ANDROIDROOT=\"$ANDROIDROOT\"" >>$FTECONFIG
echo "export ANDROID_HOSTSYSTEM=\"$ANDROID_HOSTSYSTEM\"" >>$FTECONFIG
echo "export ANDROID_ZIPALIGN=\"$ANDROID_ZIPALIGN\"" >>$FTECONFIG
echo "EMSCRIPTENROOT=\"$EMSCRIPTENROOT\"" >>$FTECONFIG
echo "OSXCROSSROOT=\"$OSXCROSSROOT\"" >>$FTECONFIG
echo "BUILD_CLEAN=\"$BUILD_CLEAN\"" >>$FTECONFIG
echo "BUILD_LINUXx86=\"$BUILD_LINUXx86\"" >>$FTECONFIG
echo "BUILD_LINUXx64=\"$BUILD_LINUXx64\"" >>$FTECONFIG
echo "BUILD_LINUXx32=\"$BUILD_LINUXx32\"" >>$FTECONFIG
echo "BUILD_LINUXarmhf=\"$BUILD_LINUXarmhf\"" >>$FTECONFIG
echo "BUILD_LINUXaarch64=\"$BUILD_LINUXaarch64\"" >>$FTECONFIG
echo "BUILD_CYGWIN=\"$BUILD_CYGWIN\"" >>$FTECONFIG
echo "BUILD_WIN32=\"$BUILD_WIN32\"" >>$FTECONFIG
echo "BUILD_WIN64=\"$BUILD_WIN64\"" >>$FTECONFIG
echo "BUILD_DOS=\"$BUILD_DOS\"" >>$FTECONFIG
echo "BUILD_MSVC=\"$BUILD_MSVC\"" >>$FTECONFIG
echo "BUILD_ANDROID=\"$BUILD_ANDROID\"" >>$FTECONFIG
echo "BUILD_SDL=\"$BUILD_SDL\"" >>$FTECONFIG
echo "BUILD_WEB=\"$BUILD_WEB\"" >>$FTECONFIG
echo "BUILD_MAC=\"$BUILD_MAC\"" >>$FTECONFIG
echo "TARGETS_WINDOWS=\"$TARGETS_WINDOWS\"" >>$FTECONFIG
echo "TARGETS_LINUX=\"$TARGETS_LINUX\"" >>$FTECONFIG
echo "PLUGINS_WIN32=\"$PLUGINS_WIN32\"" >>$FTECONFIG
echo "PLUGINS_WIN64=\"$PLUGINS_WIN64\"" >>$FTECONFIG
echo "PLUGINS_LINUXx86=\"$PLUGINS_LINUXx86\"" >>$FTECONFIG
echo "PLUGINS_LINUXx64=\"$PLUGINS_LINUXx64\"" >>$FTECONFIG
echo "PLUGINS_LINUXx32=\"$PLUGINS_LINUXx32\"" >>$FTECONFIG
echo "PLUGINS_LINUXarmhf=\"$PLUGINS_LINUXarmhf\"" >>$FTECONFIG
echo "PLUGINS_LINUXaarch64=\"$PLUGINS_LINUXaarch64\"" >>$FTECONFIG
echo "PLUGINS_DROID=\"$PLUGINS_DROID\"" >>$FTECONFIG
fi
true
true=$?
false
false=$?
if [ "$(uname -s)" == "Linux" ]; then
. /etc/os-release
fi
function debianpackages {
#make sure apt-get is installed
if [ -z `which apt-get 2>>/dev/null` ]; then
return $false
fi
local ret=$true
for i in "$@"
do
dpkg -s $i 2>&1 >> /dev/null
if [ $? -eq 1 ]; then
echo "Package missing: $i"
ret=$false
fi
done
if [ $ret == $false ]; then
echo "Packages are not installed. Press enter to continue (or ctrl+c and install)."
if [ "$UNATTENDED" != "y" ]; then
read
fi
ret=$true
fi
return $ret
}
function jessiepackages {
if [ "$PRETTY_NAME" != "Debian GNU/Linux 8 (jessie)" ]; then
return $false
fi
debianpackages $@
return $?
}
#we don't really know what system we're on. assume they have any system dependancies.
#fixme: args are programs findable with which
function otherpackages {
if [ -z "$PRETTY_NAME" ]; then
return $true
fi
return $false
}
#Note: only the native linux-sdl target can be compiled, as libSDL[2]-dev doesn't support multiarch properly, and we depend upon it instead of building from source (thus ensuring it has whatever distro stuff needed... though frankly that should be inside the .so instead of the headers).
#if [ $UID -eq 0 ] && [ ! -z `which apt-get` ]; then
#because multiarch requires separate packages for some things, we'll need to set that up now (in case noone did that yet)
# dpkg --add-architecture i386
# apt-get update
#fi
#generic crap. much of this is needed to set up and decompress dependancies and stuff.
debianpackages git make automake libtool p7zip-full zip ca-certificates || otherpackages z7 make git || exit
if [ "$BUILD_LINUXx86" == "y" ]; then
#for building linux targets
debianpackages gcc-multilib g++-multilib mesa-common-dev libasound2-dev libxcursor-dev || otherpackages gcc || exit
jessiepackages libgnutls28-dev || debianpackages libgnutls28-dev || otherpackages gcc || exit
if [[ "$PLUGINS_LINUXx86" =~ "ffmpeg" ]]; then
debianpackages libswscale-dev libavcodec-dev || otherpackages || exit
fi
if [[ "$PLUGINS_LINUXx86" =~ "openxr" ]]; then
debianpackages libopenxr-dev || otherpackages || exit
fi
fi
if [ "$BUILD_LINUXx64" == "y" ]; then
#for building linux targets
debianpackages gcc-multilib g++-multilib mesa-common-dev libasound2-dev libxcursor-dev || otherpackages gcc || exit
jessiepackages libgnutls28-dev || debianpackages libgnutls28-dev || otherpackages gcc || exit
if [[ "$PLUGINS_LINUXx64" =~ "ffmpeg" ]]; then
debianpackages libswscale-dev libavcodec-dev || otherpackages || exit
fi
if [[ "$PLUGINS_LINUXx64" =~ "openxr" ]]; then
debianpackages libopenxr-dev || otherpackages || exit
fi
fi
if [ "$BUILD_LINUXx32" == "y" ]; then
#for building linux targets
debianpackages gcc-multilib g++-multilib mesa-common-dev libasound2-dev libxcursor-dev || otherpackages gcc || exit
jessiepackages libgnutls28-dev || debianpackages libgnutls28-dev || otherpackages gcc || exit
fi
if [ "$BUILD_LINUXarmhf" == "y" ]; then
#for building linux targets
debianpackages gcc-multilib-arm-linux-gnueabihf g++-multilib-arm-linux-gnueabihf mesa-common-dev libasound2-dev libxcursor-dev || otherpackages gcc || exit
jessiepackages libgnutls28-dev || debianpackages libgnutls28-dev || otherpackages gcc || exit
fi
if [ "$BUILD_SDL" == "y" ]; then
#for building SDL targets
debianpackages libSDL1.2-dev libSDL2-dev libspeex-dev libspeexdsp-dev || otherpackages || exit
fi
if [ "$BUILD_WIN32" == "y" ] || [ "$BUILD_WIN64" == "y" ]; then
#for building windows targets
#tools package provides pkg-config
#python is needed to configure scintilla properly.
debianpackages mingw-w64 mingw-w64-tools python || otherpackages x86_64-w64-mingw32-gcc python || exit
fi
if [ "$BUILD_ANDROID" == "y" ]; then
( (jessiepackages openjdk-8-jdk-headless || debianpackages openjdk-8-jdk-headless ) && debianpackages ant) || otherpackages || exit
fi
if [ "$BUILD_WEB" == "y" ]; then
( (jessiepackages cmake || debianpackages cmake) && debianpackages git build-essential) || exit
fi
if [ "$BUILD_MAC" == "y" ]; then
debianpackages git cmake libxml2-dev fuse || otherpackages || exit
fi
debianpackages subversion make build-essential || otherpackages svn make || exit
echo "System Package checks complete."
if [ "$UID" == "0" ]; then
#avoid root taking ownership of anything.
echo "Refusing to update/rebuild toolchains as root."
echo "Please continue running this script as a regular user."
exit
fi
if [ "$UNATTENDED" != "y" ]; then
echo
echo "(Any new toolchains will be installed to $FTEROOT)"
echo "(Say no if you're certain you already set up everything)"
read -n 1 -p "Rebuild/update any toolchains now? [y/N] " REBUILD_TOOLCHAINS && echo
else
REBUILD_TOOLCHAINS="y"
fi
REBUILD_TOOLCHAINS=${REBUILD_TOOLCHAINS:-n}
mkdir -p $FTEROOT
#dos shit
if [ "$BUILD_DOS" == "y" ] && [ $UID -ne 0 ] && [ $REBUILD_TOOLCHAINS == "y" ]; then
echo "You'll need to manually install djgpp for DOS builds."
fi
#android shit. WARNING: should come first as it spits out some EULAs that need confirming.
if [ "$BUILD_ANDROID" == "y" ] && [ $UID -ne 0 ] && [ $REBUILD_TOOLCHAINS == "y" ]; then
mkdir -p $ANDROIDROOT
cd $ANDROIDROOT
wget -N https://dl.google.com/android/repository/tools_r25.2.3-linux.zip
unzip -qn tools_r25.2.3-linux.zip
cd tools/bin
#yes, android-8 is fucking old now. newer versions won't work on older devices.
echo "downloading android build tools"
./sdkmanager "build-tools;$ANDROID_BUILDTOOLS"
echo "downloading android platform tools"
./sdkmanager "platform-tools"
echo "downloading android-9"
./sdkmanager "platforms;android-9"
echo "downloading android ndk"
./sdkmanager "ndk-bundle"
cd ~
fi
#emscripten/web shit
if [ "$BUILD_WEB" == "y" ] && [ $UID -ne 0 ] && [ $REBUILD_TOOLCHAINS == "y" ]; then
mkdir -p $EMSCRIPTENROOT
cd $EMSCRIPTENROOT/..
wget -N https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz
cd $EMSCRIPTENROOT
tar xzf ../emsdk-portable.tar.gz --strip-components=1
./emsdk install latest
./emsdk activate latest
cd ~
fi
#osxcross, for mac crap
if [ "$BUILD_MAC" == "y" ] && [ $UID -ne 0 ] && [ $REBUILD_TOOLCHAINS == "y" ] && [ "$UNATTENDED" != "y" ]; then
echo "Setting up OSXCross... THIS IS TOTALLY UNTESTED"
read -p "You need to download xcode first. Where did you download the .dmg file to?" XCODE
git clone https://github.com/tpoechtrager/osxcross.git $OSXCROSSROOT
cd $OSXCROSSROOT
tools/gen_sdk_package_darling_dmg.sh $XCODE
cp *.tar.xz
SDK_VERSION=10.10 UNATTENDED=0 ./build.sh
cd ~
fi
if [ $UID -ne 0 ] && [ $REBUILD_TOOLCHAINS == "y" ]; then
#initial checkout of fte's svn
if [ "$NOUPDATE"!="n" ]; then
if [ ! -d $SVNROOT ]; then
svn checkout https://svn.code.sf.net/p/fteqw/code/trunk $SVNROOT $SVN_REV_ARG
else
cd $SVNROOT
svn up $SVN_REV_ARG
fi
fi
#FIXME: there may be race conditions when compiling.
#so make sure we've pre-built certain targets without using -j
#linux distros vary too much with various dependancies and versions and such, so we might as well pre-build our own copies of certain libraries. this really only needs to be done once, but its safe to retry anyway.
cd $SVNROOT/engine
if [ "$BUILD_LINUXx86" == "y" ]; then
echo "Making libraries (linux x86)..."
make FTE_TARGET=linux32 makelibs CPUOPTIMISATIONS=-fno-finite-math-only 2>&1 >>/dev/null
fi
if [ "$BUILD_LINUXx64" == "y" ]; then
echo "Making libraries (linux x86_64)..."
make FTE_TARGET=linux64 makelibs CPUOPTIMISATIONS=-fno-finite-math-only 2>&1 >>/dev/null
fi
if [ "$BUILD_LINUXx32" == "y" ]; then
echo "Making libraries (linux x32)..."
make FTE_TARGET=linuxx32 makelibs CPUOPTIMISATIONS=-fno-finite-math-only 2>&1 >>/dev/null
fi
if [ "$BUILD_LINUXarmhf" == "y" ]; then
echo "Making libraries (linux armhf)..."
make FTE_TARGET=linuxarmhf makelibs CPUOPTIMISATIONS=-fno-finite-math-only 2>&1 >>/dev/null
fi
if [ "$BUILD_LINUXaarch64" == "y" ]; then
echo "Making libraries (linux aarch64)..."
make FTE_TARGET=linuxaarch64 makelibs CPUOPTIMISATIONS=-fno-finite-math-only 2>&1 >>/dev/null
fi
if [ "$BUILD_WIN32" == "y" ]; then
echo "Making libraries (win32)..."
make FTE_TARGET=win32 makelibs CPUOPTIMISATIONS=-fno-finite-math-only 2>&1 >>/dev/null
fi
if [ "$BUILD_WIN64" == "y" ]; then
echo "Making libraries (win64)..."
make FTE_TARGET=win64 makelibs CPUOPTIMISATIONS=-fno-finite-math-only 2>&1 >>/dev/null
fi
#These plugins have external 3rd-party dependancies that are downloaded as part of building.
if [ "$BUILD_WIN32" == "y" ] && [[ "$PLUGINS_WIN32" =~ "ode" ]]; then
echo "Prebuilding ODE library (win32)..."
make FTE_TARGET=win32 plugins-rel NATIVE_PLUGINS=ode 2>&1 >>/dev/null
fi
if [ "$BUILD_WIN64" == "y" ] && [[ "$PLUGINS_WIN64" =~ "ode" ]]; then
echo "Prebuilding ODE library (win64)..."
make FTE_TARGET=win64 plugins-rel NATIVE_PLUGINS=ode 2>&1 >>/dev/null
fi
if [ "$BUILD_LINUXx86" == "y" ] && [[ "$PLUGINS_LINUXx86" =~ "ode" ]]; then
echo "Prebuilding ODE library (linux x86)..."
make FTE_TARGET=linux32 plugins-rel NATIVE_PLUGINS=ode CPUOPTIMISATIONS=-fno-finite-math-only 2>&1 >>/dev/null
fi
if [ "$BUILD_LINUXx64" == "y" ] && [[ "$PLUGINS_LINUXx64" =~ "ode" ]]; then
echo "Prebuilding ODE library (linux x86_64)..."
make FTE_TARGET=linux64 plugins-rel NATIVE_PLUGINS=ode CPUOPTIMISATIONS=-fno-finite-math-only 2>&1 >>/dev/null
fi
if [ "$BUILD_WIN32" == "y" ] && [[ "$PLUGINS_WIN32" =~ "ffmpeg" ]]; then
echo "Obtaining ffmpeg library (win32)..."
make FTE_TARGET=win32 plugins-rel NATIVE_PLUGINS=ffmpeg 2>&1 >>/dev/null
fi
if [ "$BUILD_WIN64" == "y" ] && [[ "$PLUGINS_WIN64" =~ "ffmpeg" ]]; then
echo "Obtaining ffmpeg library (win64)..."
make FTE_TARGET=win64 plugins-rel NATIVE_PLUGINS=ffmpeg 2>&1 >>/dev/null
fi
cd ~
fi
echo "Setup script complete."
echo "When you run build_wip.sh output will be written to $BUILDFOLDER/*"
================================================
FILE: build_wip.sh
================================================
#!/bin/bash
START=$(date +%s)
SVNROOT=$(cd "$(dirname "$(readlink "$BASH_SOURCE")")" && pwd)
FTECONFIG=$SVNROOT/build.cfg
HOME=`echo ~`
BASE=$SVNROOT/..
#set this if you want non-default branding, for customised builds.
#export BRANDING=wastes
#defaults, if we're not set up properly.
#should be overriden in build.cfg
BUILDFOLDER=$HOME/htdocs
BUILDLOGFOLDER=$BUILDFOLDER/build_logs
SVNROOT=$BASE/fteqw-code
BUILD_LINUXx86=y
BUILD_LINUXx64=y
BUILD_WIN32=y
BUILD_WIN64=y
BUILD_ANDROID=y
BUILD_WEB=y
PLUGINS_LINUXx86="qi ezhud xmpp irc hl2"
PLUGINS_LINUXx64="qi ezhud xmpp irc hl2"
PLUGINS_LINUXx32="qi ezhud xmpp irc hl2"
PLUGINS_WIN32="ffmpeg ode qi ezhud xmpp irc hl2"
PLUGINS_WIN64="ffmpeg ode qi ezhud xmpp irc hl2"
THREADS="-j 4"
TARGETS_LINUX="qcc-rel rel dbg vk-rel plugins-rel plugins-dbg"
TARGETS_WINDOWS="sv-rel m-rel qcc-rel qccgui-scintilla qccgui-dbg m-dbg sv-dbg plugins-dbg plugins-rel"
TARGETS_WEB="gl-rel"
if [ -e $FTECONFIG ]; then
. $FTECONFIG
else
echo "WARNING: $FTECONFIG does not exist yet."
fi
if [ "$BUILD_CLEAN" == "n" ]; then
NOUPDATE="y"
fi
#check args (and override config as desired)
while [[ $# -gt 0 ]]
do
case $1 in
-r)
SVN_REV_ARG="-r $2"
NOUPDATE=
shift
;;
-j)
THREADS="-j $2"
shift
;;
-help|--help)
echo " -r VER Specifies the SVN revision to update to"
echo " -j THREADS Specifies how many jobs to make with"
echo " --help This text"
echo " --noupdate Don't do svn updates"
echo " --unclean Don't do make clean, for faster rebuilds"
echo " --web Build web target (excluding all others)"
echo " --droid Build android target (excluding others)"
exit 0
;;
-build|--build)
TARGET="FTE_CONFIG=$2"
shift
;;
--noupdate)
NOUPDATE="y"
;;
--unclean)
BUILD_CLEAN="n"
;;
--web)
BUILD_LINUXx86="n"
BUILD_LINUXx64="n"
BUILD_LINUXarmhf="n"
BUILD_LINUXaarch64="n"
BUILD_WIN32="n"
BUILD_WIN64="n"
BUILD_ANDROID="n"
BUILD_WEB="y"
;;
--droid)
BUILD_LINUXx86="n"
BUILD_LINUXx64="n"
BUILD_LINUXarmhf="n"
BUILD_LINUXaarch64="n"
BUILD_WIN32="n"
BUILD_WIN64="n"
BUILD_ANDROID="y"
BUILD_WEB="n"
;;
*)
echo "Unknown option $1"
;;
esac
shift
done
MAKEARGS="$THREADS $TARGET"
########### Emscripten / Web Stuff
export EMSDK=$EMSCRIPTENROOT
#export WEB_PREJS="--pre-js $HOME/prejs.js"
########### Android Stuff. so messy...
#This is some android password that you should keep private. You should keep the keystore file private too, of course. Frankly, that part is more important than this small random number.
KEYPASSFILE=$BASE/.fte_keypass
if [ ! -e $KEYPASSFILE ]; then
dd if=/dev/urandom count=9 bs=1 2>/dev/null | base64 > $KEYPASSFILE
chmod 400 $KEYPASSFILE
fi
KEYPASS=`cat $KEYPASSFILE`
export JAVA_HOME=/usr
if [ ! -z "$ANDROIDROOT" ]; then
export ANDROID_HOME=$ANDROIDROOT
fi
if [ ! -z "$ANDROIDNDKROOT" ]; then
export ANDROID_NDK_ROOT=$ANDROIDNDKROOT
else
export ANDROID_NDK_ROOT=$ANDROID_HOME/ndk-bundle
fi
export KEYTOOLARGS="-keypass $KEYPASS -storepass $KEYPASS -dname \"CN=fteqw.com, OU=ID, O=FTE, L=Unknown, S=Unknown, C=GB\""
export JARSIGNARGS="-storepass $KEYPASS"
########### Various Output etc Paths
QCCBUILDFOLDER=$BUILDFOLDER/fteqcc
SVNFOLDER=$SVNROOT/engine/release
ARCHIVEFOLDER=$BUILDFOLDER/archive
SVNDBGFOLDER=$SVNROOT/engine/debug
WARNINGLEVEL="-w"
FILELOCK=$BASE/.fte_buildlock
#./ccache-alias.sh
exec 9>$FILELOCK
if ! flock -n 9 ; then
echo "Build script is already running!";
exit 1
fi
mkdir -p $BUILDLOGFOLDER
if [ ! -d $SVNROOT ]; then
#just in case...
svn checkout https://svn.code.sf.net/p/fteqw/code/trunk $SVNROOT $SVN_REV_ARG
fi
cd $SVNROOT/
if [ "$NOUPDATE" != "y" ]; then
echo "SVN Update"
svn update $SVN_REV_ARG
fi
cd engine
date > $BUILDLOGFOLDER/buildlog.txt
echo "Starting build" >> $BUILDLOGFOLDER/buildlog.txt
function build {
BUILDSTART=$(date +%s)
NAME=$1
DEST=$2
shift; shift
if [ "$BUILD_CLEAN" != "n" ]; then
make clean >> /dev/null
fi
echo -n "Making $NAME... "
date > $BUILDLOGFOLDER/$DEST.txt
echo BUILD: $NAME >> $BUILDLOGFOLDER/$DEST.txt
echo PLUGINS: $NATIVE_PLUGINS >> $BUILDLOGFOLDER/$DEST.txt
echo make $MAKEARGS $* >> $BUILDLOGFOLDER/$DEST.txt 2>&1
make $MAKEARGS $* >> $BUILDLOGFOLDER/$DEST.txt 2>&1
if [ $? -eq 0 ]; then
BUILDEND=$(date +%s)
BUILDTIME=$(( $BUILDEND - $BUILDSTART ))
echo "$BUILDTIME seconds"
echo "$NAME done, took $BUILDTIME seconds" >> $BUILDLOGFOLDER/buildlog.txt
rm -rf $BUILDFOLDER/$DEST >> /dev/null 2>&1
mkdir $BUILDFOLDER/$DEST 2>> /dev/null
mkdir $BUILDFOLDER/$DEST/debug 2>> /dev/null
cp $SVNFOLDER/* $BUILDFOLDER/$DEST >> /dev/null 2>> /dev/null
cp $SVNDBGFOLDER/* $BUILDFOLDER/$DEST/debug >> /dev/null 2>> /dev/null
rm -rf $BUILDFOLDER/$DEST/*.a >> /dev/null 2>&1
rm -rf $BUILDFOLDER/$DEST/debug/*.a >> /dev/null 2>&1
rmdir $BUILDFOLDER/$DEST/debug 2>> /dev/null
else
echo "$NAME failed" >> $BUILDLOGFOLDER/buildlog.txt
echo "failed"
fi
}
function build_fteqcc {
echo "--- no code ---"
}
echo "--- Engine builds ---"
#the -fno-finite-math-only is to avoid a glibc dependancy
if [ "$BUILD_LINUXx86" != "n" ]; then
NATIVE_PLUGINS="$PLUGINS_LINUXx86" build "Linux 32-bit" linux_x86 FTE_TARGET=linux32 CPUOPTIMIZATIONS=-fno-finite-math-only $TARGETS_LINUX
fi
if [ "$BUILD_LINUXx64" != "n" ]; then
NATIVE_PLUGINS="$PLUGINS_LINUXx64" build "Linux 64-bit" linux_amd64 FTE_TARGET=linux64 CPUOPTIMIZATIONS=-fno-finite-math-only $TARGETS_LINUX
fi
if [ "$BUILD_LINUXx32" != "n" ]; then
# CFLAGS="-DNO_JPEG"
NATIVE_PLUGINS="$PLUGINS_LINUXx32" build "Linux x32" linux_x32 FTE_TARGET=linux_x32 CPUOPTIMIZATIONS=-fno-finite-math-only $TARGETS_LINUX
fi
if [ "$BUILD_LINUXarmhf" != "n" ]; then
#debian/ubuntu's armhf targets armv7. we instead target armv6, because that means we work on rpi too (but still with hard-float). It should be compatible although we likely need more ops.
NATIVE_PLUGINS="$PLUGINS_LINUXarmhf" build "Linux ARMhf" linux_armhf FTE_TARGET=linux_armhf CPUOPTIMIZATIONS=-fno-finite-math-only $TARGETS_LINUX
fi
if [ "$BUILD_LINUXaarch64" != "n" ]; then
NATIVE_PLUGINS="$PLUGINS_LINUXaarch64" build "Linux aarch64" linux_aarch64 FTE_TARGET=linux_aarch64 CPUOPTIMIZATIONS=-fno-finite-math-only $TARGETS_LINUX
fi
if [ "$BUILD_CYGWIN" != "n" ]; then
NATIVE_PLUGINS="qi ezhud" build "Cygwin" cygwin qcc-rel rel dbg plugins-rel plugins-dbg
fi
if [ "$BUILD_WIN32" != "n" ]; then
NATIVE_PLUGINS="$PLUGINS_WIN32" build "Windows 32-bit" win32 FTE_TARGET=win32 CFLAGS="$WARNINGLEVEL" $TARGETS_WINDOWS
fi
if [ "$BUILD_WIN64" != "n" ]; then
NATIVE_PLUGINS="$PLUGINS_WIN64" build "Windows 64-bit" win64 FTE_TARGET=win64 CFLAGS="$WARNINGLEVEL" $TARGETS_WINDOWS
fi
if [ "$BUILD_MSVC" != "n" ]; then
NATIVE_PLUGINS="$PLUGINS_WIN32" build "Windows MSVC 32-bit" msvc FTE_TARGET=vc BITS=32 CFLAGS="$WARNINGLEVEL" sv-rel gl-rel vk-rel mingl-rel m-rel d3d-rel qcc-rel qccgui-scintilla qccgui-dbg gl-dbg sv-dbg plugins-dbg plugins-rel
NATIVE_PLUGINS="$PLUGINS_WIN64" build "Windows MSVC 64-bit" msvc FTE_TARGET=vc BITS=64 CFLAGS="$WARNINGLEVEL" sv-rel gl-rel vk-rel mingl-rel m-rel d3d-rel qcc-rel qccgui-scintilla qccgui-dbg gl-dbg sv-dbg plugins-dbg plugins-rel
fi
export NATIVE_PLUGINS="qi ezhud xmpp irc"
if [ "$BUILD_ANDROID" != "n" ]; then
NATIVE_PLUGINS="$PLUGINS_DROID" build "Android" android droid-rel
fi
if [ "$BUILD_DOS" == "y" ]; then
#no networking makes dedicated servers useless. and only a crappy sw renderer is implemented right now.
#the qcc might be useful to someone though!
build "DOS" dos m-rel qcc-rel
fi
if [ "$BUILD_WEB" != "n" ]; then
source $EMSDK/emsdk_env.sh >> /dev/null
LTO= build "Emscripten" web FTE_TARGET=web $TARGETS_WEB CC=emcc
fi
if [ "$BUILD_SDL_LINUXx86" == "y" ]; then
build "Linux 32-bit (SDL)" linux_x86_sdl FTE_TARGET=SDL2 BITS=32 $TARGETS_SDL
fi
if [ "$BUILD_SDL_LINUXx64" == "y" ]; then
build "Linux 64-bit (SDL)" linux_amd64_sdl FTE_TARGET=SDL2 BITS=64 $TARGETS_SDL
fi
if [ "$BUILD_SDL_WIN32" == "y" ]; then
build "Windows 32-bit (SDL)" win32_sdl FTE_TARGET=win32_SDL $TARGETS_SDL
# CFLAGS="$WARNINGLEVEL -DNOLEGACY -DOMIT_QCC" build "Windows 32-bit nocompat" nocompat FTE_TARGET=win32 LTO=1 NOCOMPAT=1 BOTLIB_CFLAGS="" BOTLIB_OBJS="" $TARGETS_SDL
fi
if [ "$BUILD_SDL_WIN64" == "y" ]; then
build "Windows 64-bit (SDL)" win64_sdl FTE_TARGET=win64_SDL $TARGETS_SDL
fi
####build "MorphOS" morphos CFLAGS="-I$BASE/morphos/os-include/ -I$BASE/morphos/lib/ -L$BASE/morphos/lib/ -I$BASE/zlib/zlib-1.2.5 -L$BASE/zlib/zlib-1.2.5 -I./libs $WARNINGLEVEL" gl-rel mingl-rel sv-rel qcc-rel
if [ "$BUILD_MAC" != "n" ]; then
#build "MacOSX" macosx_tiger CFLAGS="-I$BASE/mac/x86/include/ -L$BASE/mac/x86/lib -I./libs" FTE_TARGET=macosx_x86 sv-rel gl-rel mingl-rel qcc-rel
#FIXME: figure out how to do universal binaries or whatever they're called
build "MacOSX 32-bit" osx32 CC=o32-clang CXX=o32-clang++ FTE_TARGET=osx_x86 BITS=32 sv-rel gl-rel mingl-rel qcc-rel
build "MacOSX 64-bit" osx64 CC=o64-clang CXX=o64-clang++ FTE_TARGET=osx_x86_64 BITS=64 sv-rel gl-rel mingl-rel qcc-rel
fi
#third party stuff / misc crap
if [ "$BUILD_WEB" != "n" ]; then
cp $BASE/3rdparty/web/* $BUILDFOLDER/web/
fi
if [ "$BUILD_WIN32" != "n" ]; then
if [ -e "$BASE/3rdparty/win32/3rdparty.zip" ]; then
cp $BASE/3rdparty/win32/3rdparty.zip $BUILDFOLDER/win32/3rdparty.zip
else
rm -f $BUILDFOLDER/win32/3rdparty.zip
fi
# if [ "$BUILD_SDL_WIN32" != "n" ]; then
# cp $SVNROOT/engine/libs/SDL2-2.0.1/i686-w64-mingw32/bin/SDL2.dll $BUILDFOLDER/win32_sdl
# fi
fi
if [ "$BUILD_WIN64" != "n" ]; then
if [ -e "$BASE/3rdparty/win64/3rdparty.zip" ]; then
cp $BASE/3rdparty/win64/3rdparty.zip $BUILDFOLDER/win64/3rdparty.zip
else
rm -f $BUILDFOLDER/win64/3rdparty.zip
fi
# if [ "$BUILD_SDL_WIN64" != "n" ]; then
# cp $SVNROOT/engine/libs/SDL2-2.0.1/x86_64-w64-mingw32/bin/SDL2.dll $BUILDFOLDER/win64_sdl
# fi
fi
if [ -e "$HOME/nocompat_readme.html" ]; then
cp $HOME/nocompat_readme.html $BUILDFOLDER/nocompat/README.html
fi
#call out to build_qc.sh to invoke native builds as appropriate.
case "$(uname -m)" in
x86_64)
if [ "$BUILD_LINUXx64" != "n" ]; then
rm -rf $QCCBUILDFOLDER 2>&1
mkdir -p $QCCBUILDFOLDER
cd $SVNROOT/
FTEQCC=$BUILDFOLDER/linux_amd64/fteqcc64 FTEQW=$BUILDFOLDER/linux_amd64/fteqw64 QSS=$BUILDFOLDER/qss/quakespasm-spiked-linux64 ./build_qc.sh
fi
;;
i386 | i486 | i586)
if [ "$BUILD_LINUXx86" != "n" ]; then
rm -rf $QCCBUILDFOLDER 2>&1
mkdir -p $QCCBUILDFOLDER
cd $SVNROOT/
FTEQCC=$BUILDFOLDER/linux_x86/fteqcc32 FTEQW=$BUILDFOLDER/linux_x86/fteqw32 QSS= ./build_qc.sh
fi
;;
esac
cd $SVNROOT/engine/
svn info > $BUILDFOLDER/version.txt
if [ "$BUILD_LINUXx86" != "n" ]; then
cp $BUILDFOLDER/linux_x86/fteqcc32 $QCCBUILDFOLDER/linux32-fteqcc
fi
if [ "$BUILD_LINUXx64" != "n" ]; then
cp $BUILDFOLDER/linux_amd64/fteqcc64 $QCCBUILDFOLDER/linux64-fteqcc
fi
if [ "$BUILD_LINUXx32" != "n" ]; then
cp $BUILDFOLDER/linux_x32/fteqccx32 $QCCBUILDFOLDER/linuxx32-fteqcc
fi
if [ "$BUILD_LINUXarmhf" != "n" ]; then
cp $BUILDFOLDER/linux_armhf/fteqccarmhf $QCCBUILDFOLDER/linuxarmhf-fteqcc
fi
if [ "$BUILD_LINUXaarch64" != "n" ]; then
cp $BUILDFOLDER/linux_armhf/fteqccaarch64 $QCCBUILDFOLDER/linuxaarch64-fteqcc
fi
if [ "$BUILD_WIN32" != "n" ]; then
cp $BUILDFOLDER/win32/fteqcc.exe $QCCBUILDFOLDER/win32-fteqcc.exe
cp $BUILDFOLDER/win32/fteqccgui.exe $QCCBUILDFOLDER/win32-fteqccgui.exe
fi
if [ "$BUILD_WIN64" != "n" ]; then
cp $BUILDFOLDER/win64/fteqcc64.exe $QCCBUILDFOLDER/win64-fteqcc.exe
cp $BUILDFOLDER/win64/fteqccgui64.exe $QCCBUILDFOLDER/win64-fteqccgui.exe
fi
#cp $BUILDFOLDER/morphos/fteqcc $QCCBUILDFOLDER/morphos-fteqcc
#cp $BUILDFOLDER/macosx_tiger/fteqcc $QCCBUILDFOLDER/macosx_tiger-fteqcc
cp $BUILDFOLDER/version.txt $QCCBUILDFOLDER/version.txt
if [ "$BUILD_WIN32" != "n" ] && [ "$BUILD_WIN64" != "n" ]; then
echo Archiving output
SVNVER=$(svnversion $SVNROOT)
if [ -e $ARCHIVEFOLDER ]; then
cd $BUILDFOLDER/
zip -q -9 $ARCHIVEFOLDER/win_fteqw_$SVNVER.zip win32/fteglqw.exe win32/fteqwsv.exe win32/fteqccgui.exe win32/debug/fteglqw.exe win64/fteqw.exe win64/debug/fteglqw.exe
fi
if [ -e $BUILDFOLDER/fteqw_for_windows.zip ]; then
cd $BUILDFOLDER/win32/
zip -q -j -9 $BUILDFOLDER/fteqw_for_windows.zip fteglqw.exe fteqwsv.exe fteqccgui.exe fteplug_qi_x86.dll fteplug_xmpp_x86.dll fteplug_irc_x86.dll fteplug_ezhud_x86.dll
cd $HOME/3rdparty_win32/
zip -q -9 $BUILDFOLDER/fteqw_for_windows.zip ogg.dll vorbis.dll vorbisfile.dll freetype6.dll zlib1.dll
mkdir -p $BASE/tmp/fte
cd $BASE/tmp/
cp $BUILDFOLDER/csaddon/menu.dat fte
zip -q -9 $BUILDFOLDER/fteqw_for_windows.zip fte/menu.dat
fi
#~/afterquake/updatemini.sh
fi
echo "All done"
END=$(date +%s)
DIFF=$(( $END - $START ))
MINS=$(( $DIFF / 60 ))
echo "Total Compile Time: $MINS minutes" >> $BUILDLOGFOLDER/buildlog.txt
echo "Total Compile Time: $MINS minutes"
cd $HOME
#./errorlog.sh
#cd $HOME
#rm .bitchxrc
#cp ./fteqw/.bitchxrc ./
#./BitchX -a irc.quakenet.org -A -c "#fte" -n A_Gorilla
================================================
FILE: dist/linux/com.riverbankcomputing.qscintilla.install.patch
================================================
diff -ur QScintilla_src-2.13.4.orig/src/qscintilla.pro QScintilla_src-2.13.4/src/qscintilla.pro
--- QScintilla_src-2.13.4.orig/src/qscintilla.pro 2023-01-15 19:13:30.751242600 +0100
+++ QScintilla_src-2.13.4/src/qscintilla.pro 2023-04-18 01:42:25.794709139 +0200
@@ -70,22 +70,22 @@
# Scintilla namespace rather than pollute the global namespace.
#DEFINES += SCI_NAMESPACE
-target.path = $$[QT_INSTALL_LIBS]
+target.path = /app/lib
INSTALLS += target
-header.path = $$[QT_INSTALL_HEADERS]
+header.path = /app/include
header.files = Qsci
INSTALLS += header
-trans.path = $$[QT_INSTALL_TRANSLATIONS]
+trans.path = /app/share/qt5/translations
trans.files = qscintilla_*.qm
INSTALLS += trans
-qsci.path = $$[QT_INSTALL_DATA]
+qsci.path = /app/share/qt5
qsci.files = ../qsci
INSTALLS += qsci
-features.path = $$[QT_HOST_DATA]/mkspecs/features
+features.path = /app/lib/qt5/mkspecs/features
CONFIG(staticlib) {
features.files = $$PWD/features_staticlib/qscintilla2.prf
} else {
================================================
FILE: dist/linux/linter-exceptions.json
================================================
{
"org.fteqw.fteqw": {
"appstream-external-screenshot-url": "Screenshots do not need mirroring to Flathub",
"runtime-is-eol-org.kde.Platform-5.15-23.08": "fteqccgui needs migrating to Qt6 and fteqw to ffmpeg 7.x and SDL3 for current runtimes",
"module-fteqw-source-git-branch": "fteqw has no tagged releases"
}
}
================================================
FILE: dist/linux/org.fteqw.fteqw.desktop
================================================
[Desktop Entry]
Version=1.0
Type=Application
Name=FTEQW Game Engine
Comment=Cross-platform port for the Quake game engine
Exec=fteqw %u
Icon=org.fteqw.fteqw
Terminal=false
Categories=Game;
MimeType=application/x-quakeworlddemo;x-scheme-handler/quake;x-scheme-handler/qw;
Actions=quake;rerel;netquake;quake2;quake3;hexen2;hexen2mp
[Desktop Action quake]
Name=Play Quake
Exec=fteqw %u -quake
[Desktop Action rerel]
Name=Play Quake Rerelease
Exec=fteqw %u -quake_rerel
[Desktop Action netquake]
Name=Play Classic Quake
Exec=fteqw %u -netquake
[Desktop Action quake2]
Name=Play QuakeII
Exec=fteqw %u -quake2
[Desktop Action quake3]
Name=Play Quake III Arena
Exec=fteqw %u -quake
[Desktop Action hexen2]
Name=Play Hexen2
Exec=fteqw %u -hexen2
[Desktop Action hexen2mp]
Name=Play Hexen2 Mission Pack
Exec=fteqw %u -portals
================================================
FILE: dist/linux/org.fteqw.fteqw.fixdownloads.patch
================================================
diff --git a/engine/client/m_download.c b/engine/client/m_download.c
index 2d618c1b1..74a4a51b4 100644
--- a/engine/client/m_download.c
+++ b/engine/client/m_download.c
@@ -2205,7 +2205,9 @@ static void PM_PreparePackageList(void)
{
int parm;
qofs_t sz = 0;
- char *f = FS_MallocFile(INSTALLEDFILES, FS_ROOT, &sz);
+ char full_filename[256];
+ snprintf(full_filename, sizeof(full_filename), "%s/%s", getenv("XDG_DATA_HOME"), INSTALLEDFILES);
+ char *f = FS_MallocFile(full_filename, FS_ROOT, &sz);
loadedinstalled = true;
if (f)
{
@@ -3526,11 +3528,13 @@ static void PM_WriteInstalledPackages(void)
int i;
char *s;
package_t *p;
- vfsfile_t *f = FS_OpenVFS(INSTALLEDFILES, "wbp", FS_ROOT);
+ char full_filename[256];
+ snprintf(full_filename, sizeof(full_filename), "%s/%s", getenv("XDG_DATA_HOME"), INSTALLEDFILES);
+ vfsfile_t *f = FS_OpenVFS(full_filename, "wbp", FS_ROOT);
qboolean v3 = false;
if (!f)
{
- if (FS_DisplayPath(INSTALLEDFILES, FS_ROOT, buf, sizeof(buf)))
+ if (FS_DisplayPath(full_filename, FS_ROOT, buf, sizeof(buf)))
Con_Printf("package manager: Can't write %s\n", buf);
else
Con_Printf("package manager: Can't update installed list\n");
================================================
FILE: dist/linux/org.fteqw.fteqw.fixhomedir.patch
================================================
diff --git a/engine/common/fs.c b/engine/common/fs.c
index 68b59d1b9..412d01bb7 100644
--- a/engine/common/fs.c
+++ b/engine/common/fs.c
@@ -466,7 +466,7 @@ static searchpath_t *gameonly_gamedir;
char com_gamepath[MAX_OSPATH]; //c:\games\quake
char com_homepath[MAX_OSPATH]; //c:\users\foo\my docs\fte\quake
-qboolean com_homepathenabled;
+qboolean com_homepathenabled = true;
static qboolean com_homepathusable; //com_homepath is safe, even if not enabled.
//char com_configdir[MAX_OSPATH]; //homedir/fte/configs
@@ -2527,20 +2527,21 @@ static const char *FS_GetCleanPath(const char *pattern, qboolean silent, char *o
if (*s == ':')
{
if (s == pattern+1 && (s[1] == '/' || s[1] == '\\'))
- Con_ThrottlePrintf(&throttletimer, 0, "Error: absolute path in filename %s\n", pattern);
- else
+ Con_ThrottlePrintf(&throttletimer, 0, "Warning: absolute path in filename %s\n", pattern);
+ else {
Con_ThrottlePrintf(&throttletimer, 0, "Error: alternative data stream in filename %s\n", pattern);
- return NULL;
+ return NULL;
+ }
}
else if (*s == '\\' || *s == '/' || !*s)
{ //end of segment
if (o == seg)
{
- if (o == outbuf)
- {
- Con_ThrottlePrintf(&throttletimer, 0, "Error: absolute path in filename %s\n", pattern);
- return NULL;
- }
+ // if (o == outbuf)
+ // {
+ // Con_ThrottlePrintf(&throttletimer, 0, "Error: absolute path in filename %s\n", pattern);
+ // return NULL;
+ // }
if (!*s)
{
*o++ = '\0';
@@ -2987,7 +2988,7 @@ vfsfile_t *QDECL FS_OpenVFS(const char *filename, const char *mode, enum fs_rela
}
else
{
- if (!try_snprintf(fullname, sizeof(fullname), "%s%s/%s", com_homepath, gamedirfile, filename))
+ if (!try_snprintf(fullname, sizeof(fullname), "%s/%s", com_homepath, filename))
return NULL;
if (*mode == 'w')
COM_CreatePath(fullname);
================================================
FILE: dist/linux/org.fteqw.fteqw.metainfo.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>org.fteqw.fteqw</id>
<name>FTEQW</name>
<developer id="org.fteqw.fteqw">
<name>Forethought Entertainment</name>
<url>https://github.com/fte-team/fteqw/graphs/contributors</url>
</developer>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0</project_license>
<summary>Modern Quake source port</summary>
<launchable type="desktop-id">org.fteqw.fteqw.desktop</launchable>
<description>
<p>FTEQW is a highly versatile game engine originally based on QuakeWorld with support for
a number of Quake engine games.</p>
<p>Features:</p>
<ul>
<li>Single- and multiplayer support</li>
<li>Supports multiple games: Quake, QuakeWorld, Quake II, Quake III Arena, Hexen II, ...</li>
<li>A vast amount of map, model and image formats are supported</li>
<li>Advanced console, with descriptions and autocompletion</li>
<li>Plugin support, enabling use of FFMPEG, Bullet/ODE physics and more</li>
<li>Extensive suite of QuakeC/entity debugging features</li>
<li>Deep integration with FTEQCC, which can even be executed in-game</li>
<li>Support for split-screen local multiplayer</li>
<li>Voice-chat via Opus and Speex</li>
<li>Support for hundreds of players on a single server</li>
<li>Works on Windows, Linux, OpenBSD and more!</li>
<li>New features are added all the time in cooperation with modders!</li>
</ul>
</description>
<branding>
<color type="primary" scheme_preference="light">#c2a6f4</color>
<color type="primary" scheme_preference="dark">#1e191e</color>
</branding>
<provides>
<binary>fteqw</binary>
<binary>fteqcc</binary>
<binary>fteqccgui</binary>
<binary>ftemaster</binary>
<binary>qtv</binary>
</provides>
<supports>
<control>gamepad</control>
</supports>
<recommends>
<control>keyboard</control>
<control>pointing</control>
</recommends>
<keywords>
<keyword>retro</keyword>
<keyword>fps</keyword>
<keyword>shooter</keyword>
<keyword>sourceport</keyword>
<keyword>quake</keyword>
</keywords>
<url type="homepage">https://fteqw.org/</url>
<url type="bugtracker">https://github.com/fte-team/fteqw/issues</url>
<url type="contribute">https://github.com/fte-team/fteqw</url>
<screenshots>
<screenshot type="default">
<caption>Introduction level rendering in the default graphics setting via OpenGL</caption>
<image type="source">https://www.fteqw.org/img/q1/1.png</image>
</screenshot>
<screenshot>
<caption>Integrated server browser with filtering capabilities</caption>
<image type="source">https://www.fteqw.org/img/q1/2.png</image>
</screenshot>
<screenshot>
<caption>Graphics preset imitating a 256-colour software renderer</caption>
<image type="source">https://www.fteqw.org/img/q1/3.png</image>
</screenshot>
<screenshot>
<caption>More advanced graphics setting with real-time lights, advanced particle engine and light coronas</caption>
<image type="source">https://www.fteqw.org/img/q1/4.png</image>
</screenshot>
<screenshot>
<caption>EZHud plugin for user-defined HUDs</caption>
<image type="source">https://www.fteqw.org/img/qw/4.png</image>
</screenshot>
<screenshot>
<caption>Optimised multiplayer HUD and player name tags</caption>
<image type="source">https://www.fteqw.org/img/qw/3.png</image>
</screenshot>
<screenshot>
<caption>Action Quake II running in FTEQW</caption>
<image type="source">https://www.fteqw.org/img/q2/4.png</image>
</screenshot>
<screenshot>
<caption>Quake II</caption>
<image type="source">https://www.fteqw.org/img/q2/3.png</image>
</screenshot>
<screenshot>
<caption>Quake III Arena</caption>
<image type="source">https://www.fteqw.org/img/q3/2.png</image>
</screenshot>
<screenshot>
<caption>HeXen II</caption>
<image type="source">https://www.fteqw.org/img/h2/1.png</image>
</screenshot>
<screenshot>
<caption>HeXen II's particle system</caption>
<image type="source">https://www.fteqw.org/img/h2/3.png</image>
</screenshot>
<screenshot>
<caption>HeXen II with realtime shadows and lighting</caption>
<image type="source">https://www.fteqw.org/img/h2/4.png</image>
</screenshot>
</screenshots>
<content_rating type="oars-1.1">
<content_attribute id="violence-fantasy">intense</content_attribute>
<content_attribute id="violence-bloodshed">mild</content_attribute>
<content_attribute id="social-chat">intense</content_attribute>
</content_rating>
<releases>
<release version="latest" date="2025-05-14" />
<release version="6202" date="2022-03-01" />
</releases>
</component>
================================================
FILE: dist/linux/org.fteqw.fteqw.sh
================================================
#!/bin/bash
function check_game_data () {
if [[ "$1" == "" ]]; then
zenity --error --ok-label "Quit" --width=400 --title "Could not find Quake game data" \
--text "Please copy the Quake game data files (at least <tt>pak0.pak</tt>) to <tt><b>$XDG_DATA_HOME/id1/</b></tt>."
exit 1
fi
}
function check_exit_code () {
if [[ "$1" != "0" ]]; then
zenity --error --ok-label "Quit" --width=400 --title "fteqw exited with an error" \
--text "For a detailed error message, please run fteqw from a terminal window using\n <tt><b>flatpak run $FLATPAK_ID</b></tt>."
exit 1
fi
}
/app/bin/fteqw -basedir $XDG_DATA_HOME "$@"
check_exit_code $?
================================================
FILE: dist/linux/org.fteqw.fteqw.yml
================================================
---
# Flatpak runtime version issues:
# - 22.08 has a slightly-too-old version of SDL2 that doesn't include SDL_misc.h
# - 24.08 includes ffmpeg 7.x, which fteqw fails to build against
#
# Options to resolve this:
# - manually build ffmpeg 6.x? on the 24.08 runtime
# - manually build a newer SDL2 on the 22.08 runtime
# - update fteqw to use SDL3 and ffmpeg 7.x (which are the 24.08 runtime versions)
app-id: org.fteqw.fteqw
command: org.fteqw.fteqw.sh
# runtime: org.freedesktop.Platform
# runtime-version: "23.08"
# sdk: org.freedesktop.Sdk
# The KDE runtime includes Qt which is useful for building fteqccgui.
# However, Qt 5.15 is EOL so this runtime doesn't work super well.
runtime: org.kde.Platform
runtime-version: "5.15-23.08"
sdk: org.kde.Sdk
finish-args:
# Network for multiplayer
- --share=network
# Hardware 3D and game controllers
- --device=all
# GUI
- --share=ipc
- --socket=fallback-x11
- --socket=wayland
# Audio
- --socket=pulseaudio
cleanup:
- /include
- "*.a"
- /lib/cmake
- /lib/pkgconfig
- /share/aclocal
- /share/doc
- /share/man
modules:
- name: bullet
buildsystem: cmake-ninja
config-opts:
- -DOpenGL_GL_PREFERENCE=GLVND
- -DBUILD_SHARED_LIBS=ON
- -DBULLET2_MULTITHREADING=ON
- -DUSE_GRAPHICAL_BENCHMARK=OFF
- -DBUILD_EGL=OFF
- -DBUILD_EXTRAS=OFF
- -DBUILD_CPU_DEMOS=OFF
- -DBUILD_OPENGL3_DEMOS=OFF
- -DBUILD_BULLET2_DEMOS=OFF
- -DBUILD_UNIT_TESTS=OFF
- -DINSTALL_LIBS=ON
sources:
- type: archive
url: https://github.com/bulletphysics/bullet3/archive/3.25.tar.gz
dest-filename: bullet.tar.gz
sha256: c45afb6399e3f68036ddb641c6bf6f552bf332d5ab6be62f7e6c54eda05ceb77
x-checker-data:
type: json
url: https://api.github.com/repos/bulletphysics/bullet3/releases/latest
version-query: .tag_name
url-query: .tarball_url
- name: ode
buildsystem: cmake-ninja
config-opts:
- -DODE_WITH_DEMOS=OFF
- -DODE_WITH_TESTS=OFF
cleanup:
- /bin/ode-config
sources:
- type: archive
url: https://bitbucket.org/odedevs/ode/downloads/ode-0.16.6.tar.gz
sha256: c91a28c6ff2650284784a79c726a380d6afec87ecf7a35c32a6be0c5b74513e8
x-checker-data:
type: anitya
project-id: 2532
url-template: https://bitbucket.org/odedevs/ode/downloads/ode-$version.tar.gz
- name: openxr
buildsystem: cmake-ninja
sources:
- type: archive
url: https://github.com/KhronosGroup/OpenXR-SDK/archive/release-1.1.47.tar.gz
sha256: 82c7f4e3658578a22e438b5f005ecaf22c3f724b09fe031fa0f8ffc97c30c9ba
x-checker-data:
type: json
url: https://api.github.com/repos/KhronosGroup/OpenXR-SDK/releases/latest
version-query: .tag_name | sub("release-", "")
url-query: .tarball_url
# libcef fails to build for reasons beyond my ability to debug
# - name: libcef
# buildsystem: cmake-ninja
# no-make-install: true
# config-opts:
# - -DCMAKE_BUILD_TYPE=RelWithDbgInfo
# make-args:
# - libcef_dll_wrapper
# build-commands:
# - mkdir -p /app/cef/libcef_dll_wrapper
# - cp -R ./include /app/include
# - cp -R ./Release /app/lib
# - cp -R ./Resources /app/cef
# - cp -R ./libcef_dll_wrapper/libcef_dll_wrapper.a /app/lib/libcef_dll_wrapper.a
# cleanup:
# - "*.a"
# - "./*"
# sources:
# - type: archive
# url: https://cdn-fastly.obsproject.com/downloads/cef_binary_4280_linux64.tar.bz2
# sha256: d91c78349ecbfbfdfc18d5f882dc28b939028f1a631191c603b5d0d938ada972
# QScintilla is used by fteqccgui
- name: qscintilla
buildsystem: qmake
subdir: src
cleanup:
- /lib/qt5
- /share/qt5
make-install-args:
- DESTDIR=/app
- PREFIX=/app
config-opts:
- CONFIG+=release
sources:
- type: archive
url: https://www.riverbankcomputing.com/static/Downloads/QScintilla/2.14.1/QScintilla_src-2.14.1.tar.gz
sha256: dfe13c6acc9d85dfcba76ccc8061e71a223957a6c02f3c343b30a9d43a4cdd4d
x-checker-data:
type: anitya
project-id: 10082
url-template: https://www.riverbankcomputing.com/static/Downloads/QScintilla/$version/QScintilla_src-$version.tar.gz
- type: patch
path: com.riverbankcomputing.qscintilla.install.patch
- name: fteqw
buildsystem: cmake-ninja
builddir: true
config-opts:
- -DFTE_USE_SDL=true
- -DFTE_ENGINE_SERVER_ONLY=false
- -DFTE_TOOL_QTV=true
- -DFTE_TOOL_MASTER=true
- -DFTE_TOOL_HTTPSV=false
- -DFTE_TOOL_QCC=true
- -DFTE_TOOL_IQM=false
- -DFTE_TOOL_IMAGE=false
- -DFTE_INSTALL_BINDIR=bin
- -DFTE_PLUG_FFMPEG=false
sources:
# Launcher script
- type: file
path: org.fteqw.fteqw.sh
- type: git
url: https://github.com/fte-team/fteqw.git
branch: master
# In an ideal world, fteqw would be built off of tagged releases so the Flatpak infra can auto-update:
# - type: archive
# url: https://api.github.com/repos/fte-team/fteqw/zipball/v6202
# dest-filename: fteqw.zip
# sha256: 1955a7c7eb2e6c3ba2da689d115d10f89c6e5e261577e67cd0ad176bea1b97ef
# x-checker-data:
# type: json
# url: https://api.github.com/repos/fte-team/fteqw/releases/latest
# version-query: .tag_name | sub("^v"; "")
# url-query: .zipball_url
# Patches to fix Flatpak sandbox compliance, currently WIP
- type: patch
path: org.fteqw.fteqw.fixdownloads.patch
- type: patch
path: org.fteqw.fteqw.fixhomedir.patch
post-install:
- install -Dm755 ${FLATPAK_BUILDER_BUILDDIR}/org.fteqw.fteqw.sh /app/bin/
================================================
FILE: documentation/Building.md
================================================
> Yay, you found out the secrit location to download the sauce code from!
>
> Right, urm, now what?
> Yeah, good question.
>
> Urm.
# Preface
Welcome to the building guide for FTEQW, as there are many systems supported, there is a number of ways to build the engine.
This should cover most, if not all the supported systems and methods.
### Contents
- [Repo Layout](#repo-layout)
- [Compiling](#compiling)
- [Easy Build Bot System (Linux)](#easy-build-bot-system-linux)
- [Windows Systems (cygwin)](#windows-systems-cygwin)
- [Linux/BSD Systems](#linux-bsd-system)
- [Android (FTEDroid) with cygwin](#android-ftedroid-with-cygwin)
- [Browser (emscripten)](#browser-emscripten)
- [FTEQCC](#fteqcc)
- [FTEIMG](#fteimg)
- [FTEIQM](#fteiqm)
- [FTEQTV](#fteqtv)
- [Plugins](#plugins)
# Repo Layout
- `.github/workflows:` Github Actions source files.
- `documentation:` General help and introduction.
- `engine:` FTEQW game engine itself. Both client and dedicated server.
- `engine/release:` The Makefile writes its release-build binaries here. Intermediate files are contained within a sub-directory.
- `engine/debug:` The Makefile writes its debug-build binaries here. Intermediate files are contained within a sub-directory.
- `fteqtv:` The QTV proxy server program.
- `plugins:` several optional plugins that do various interesting things, though not so interesting.
- `q3asm2:` Spike's quick hack at a QVM Assembler which is not horribly slow. Ignore it.
- `quakec:` Various QuakeC mods. Some interesting, some not.
- `quakec/basemod:` TimeServ's attempt to bugfix and modify vanilla Quake.
- `quakec/csaddon:` In-game CSQC-controlled editors. Currently contains the camquake featureset (thanks Jogi), rtlights editor, terrain editor ui, particle editor.
- `quakec/csqctest:` Spike's CSQC sample mod. Originally created as a feature testbed for the CSQC API. Useful as a reference/sample, but you perhaps don't want to use it as a base.
- `specs:` Modder/Advanced documentation and samples.
# Compiling
Compiling FTEQW is straightforward once you have the bare minimum of build dependencies (see `Dependencies.md` for more info).
For the binaries hosted here, we choose to statically link against many of the dependencies for portability reasons, while also linking against recent versions
of libc for security reasons.
All binaries hosted here were built inside the `engine` dir of the src tree using GNU make, aka gmake.
### Build Systems
You have the choice of two build systems:
- Make
- CMake
This guide will show commands for both.
## Easy Build Bot System (Linux)
If you want to set up a Linux box that cross-compiles each target with your own private customisations, then you can run the `build_setup.sh` script to set up which targets you wish to support.
You can then just run the `build_wip.sh` script any time your code changes to have it rebuild every target you previously picked.
The setup script will install **android+emscripten** dependancies for you, so you're likely to find this an easier way to deal with those special targets.
### Notes
- The Android SDK can be a big download, while installing emscripten may require several hours to compile clang and about **40gb** of disk space if emscripten doesn't provide prebuilt stuff for your distro.
- The script can also be run from cygwin, but does not support compiling for Linux then.
## Windows Systems (cygwin)
If you want to compile a Win64 build in cygwin, it should be as simple as:
make makelibs FTE_TARGET=win64
make gl-rel FTE_TARGET=win64
or
TODO
You only should need gcc and make installed in cygwin for this.
### Notes
It's currently not recommended to build using MSYS2, due to issues with zlib.
## Linux/BSD Systems
It's usually as straight-forward as:
make makelibs
make m-rel
or
TODO
### Notes
- You can also change `FTE_TARGET` to be `win32`, `SDL2` and on Linux systems `linux32` and `linux64`.
- On BSD, you don't need to pass anything specific, but they should also compile the `linux` targets as well as the `SDL2` target fine.
- Not building with `makelibs` will attempt to dynamically link against your system-level versions of dependencies.
Sometimes you want this, sometimes you don't. You definitely want that if you're trying to link against the Steam runtime.
## Renders
### Vulkan
make vk-rel
### OpenGL
make gl-rel
make glcl-rel
make mingl-rel
make mcl-rel
### DirectX
make d3d-rel
## Android (FTEDroid) with cygwin
The phone port requires the Android SDk and can be compiled with the following command:
make droid-rel PATH=C:\Cygwin\bin\ DROID_SDK_PATH=/path/to/android-sdk DROID_NDK_PATH=/path/to/android-ndk-r7 ANT=/path/to/apache-ant-1.8.2/bin/ant JAVATOOL="/path/to/jdk1.7.0_02/bin/" DROID_ARCH="armeabi x86" -j4 DROID_PACKSU=/path/to/pak0.pak
or
-DFTE_ENGINE_FTEDROID=TRUE
On Linux/Unix systems you can omit the `PATH`, `ANT`, and `JAVATOOL` parts as they should already be in the path.
The `DROID_PACKSU` part is used to include the PAK file within the android package. Ideally you would use a PK3 file instead.
Also you would use something that will not violate id Software's copyright. THIS IS AN EXAMPLE ONLY. You can omit the setting entirely if you require the user to provide their own packages.
Finally, install the `FTEDroid.apk` file on your Android device which should be located under the `release` folder.
### Notes
- There is no way to install the package with a different name at this time.
- Touchscreen controls are built-in.
- The APK looks for game data under:
Android/data/com.fteqw/files
- Configs may be located at:
/fte
or
sdcard/fte
## Browser (emscripten)
make FTE_TARGET=web web-rel
or
-DFTE_PLUG_CEF=TRUE
## FTEQCC
make qcc-rel
or
-DFTE_TOOL_QCC=TRUE
## FTEQCC GUI
make qccgui-rel
or
-DFTE_TOOL_QCCGUI=TRUE
## Standalone QCVM
TODO
or
-DFTE_TOOL_QCVM=TRUE
## FTE Dedicated Server
make sv-rel
or
FTE_ENGINE_SERVER_ONLY=TRUE
## FTE Master Server
make master-rel
or
-DFTE_TOOL_MASTER=TRUE
## FTE Image Tool
make imgtool-rel
or
-DFTE_TOOL_IMAGE=TRUE
## FTE IQM Tool
make iqm-rel
or
-DFTE_TOOL_IQM=TRUE
## FTEQTV
make qtv-rel
or
-DFTE_TOOL_QTV=TRUE
## Small HTTP Server
make httpserver
or
-DFTE_TOOL_HTTPSV=TRUE
## Plugins
To build all currently stable plugins, it's as simple as:
make plugins-rel
or
TODO
You can specify which plugins get compiled by passing PLUGINS_NATIVE as an example:
make plugins-rel NATIVE_PLUGINS="ffmpeg bullet irc"
or
-DFTE_PLUG_FFMPEG=TRUE
-DFTE_PLUG_BULLET=TRUE
-DFTE_PLUG_IRC=TRUE
The list of available plugins:
> [!IMPORTANT]
> Some plugins will require additional dependencies or flags on some systems, see `Dependencies.md` for more info.
- Bullet Physics
> Provides Rigid Body Physics.
bullet
-DFTE_PLUG_BULLET=TRUE
- Call of Duty (1 & 2) Format Support
> Provides compatability with Call Of Duty's file formats.
cod
-DFTE_PLUG_COD=TRUE
- EzHUD
> Provides compat with ezquake's hud scripts.
ezhud
-DFTE_PLUG_EZHUD=TRUE
- FFMPEG Video Decoding & RTMP Streaming
> Provides support for more audio formats, as well as video playback and better capture support.
ffmpeg
-DFTE_PLUG_FFMPEG=TRUE
- GnuTLS
> Provides GnuTLS support for dtls/tls/https support. The crypto library that is actually used is controlled via the tls_provider cvar.
gnutls
-DFTE_PLUG_GNUTLS=TRUE
- Half-Life 2
> Adds support for reading various file formats used by Half-Life 2.
hl2
-DFTE_PLUG_HL2=TRUE
- IRC
> Allows you to chat on IRC without tabbing out.
irc
-DFTE_PLUG_IRC=TRUE
- libcef(Browser) Plugin
>This plugin provides support for an in-game web browser.
libcef
-DFTE_PLUG_CEF=TRUE
- Name Maker Plugin
> Provides a lame UI for selecting arbitrary non-ascii glyphs as part of your nickname.
namemaker
-DFTE_PLUG_NAMEMAKER=TRUE
- MPQ Archive Plugin
> Adds support for reading .mpq files (Diablo 1 + 2, World of Warcraft).
mpq
-DFTE_PLUG_MPQ=TRUE
- ODE Physics
> Provides Rigid Body Physics behaviours.
ode
-DFTE_PLUG_ODE=TRUE
- OpenSSL
> Provides OpenSSL support for dtls/tls/https support. The crypto library that is actually used is controlled via the tls_provider cvar.
openssl
-DFTE_PLUG_OPENSSL=TRUE
- OpenXR Support
> Provides support for Virtual Reality headsets and input devices.
openxr
-DFTE_PLUG_OPENXR=TRUE
- Quaddicted Map Database (Quake Injector)
> Provides easy access to the quaddicted map database. Once installed you can use eg 'map qi_dopa:start' to begin playing dopa, or load it via the menus.
qi
-DFTE_PLUG_QI=TRUE
- Quake 3 Game Logic and VM Support
> Provides compatability with Quake3's gamecode.
quake3
-DFTE_PLUG_QUAKE3=TRUE
- TerrainGen Plugin
> A lame example plugin for randomised terrain generation.
terraingen
-DFTE_PLUG_TERRAINGEN=TRUE
- Timidity Plugin
> Provides support for playback of midi files.
timidity
-DFTE_PLUG_TIMIDITY=TRUE
- XMPP/Jabber Protocol Support
> XMPP/Jabber instant messenger plugin for chatting without tabbing out.
xmpp
-DFTE_PLUG_XMPP=TRUE
- X11 Display Server (Standalone)
> Provides a primitive X11 server in the form of a video decoder plugin.
x11server
-DFTE_PLUG_X11SV=TRUE
================================================
FILE: documentation/Credits.md
================================================
# Credits
### Developers
- **[Spike](https://github.com/Shpoike)** - Creator of FTEQW & FTEQCC
- **[eukara](https://github.com/eukara)** - Maintainer, QuakeC guru
### Contributors
- **[4LT](https://github.com/4LT)** - QC bugfixes
- **Andreas Kirsch** - QC Additions & bugfixes
- **[Blub](https://github.com/blubs)** - IQM & QC bugfixes
- **Circlemaster** - Demo & Console additions
- **[Daniel Svensson](https://github.com/dsvensson)** - Github Actions & Bugfixes
- **[erysdren](https://github.com/erysdren)** - Haiku OS port
- **[ewhac](https://github.com/ewhac)** - Joystick bugfixes & .gitignore
- **[Fix](https://github.com/fhomolka)** - Cleanup & Bugfixes
- **Hexum** - Linux Port & Fixes
- **James "Ender" Brown** - Half-Life Model Support
- **Jogi** - Menu Bugfixes
- **[JohnNy_cz](https://github.com/johnnycz)** - Bugfixes
- **KrimZon** - GLSL Additions & Bugfixes
- **Lance "Moodles"** - Many Additions & Bugfixes
- **Luis Gutierrez** - IQM Fixes
- **Magnus**
- **Mark Olsen** - Many Additions & Bugfixes
- **Molgrum** - Many Additions & Bugfixes
- **Theuaredead** - Extensive Win32 Bugtesting
- **TimeServ** - Many Additions & Bugfixes
- **[Xylemon](https://github.com/Xylemon)** - Technical support, Enthusiast
================================================
FILE: documentation/Dependencies.md
================================================
# Dependencies
Here is a list of dependencies required for building FTEQW on several platforms.
## Debian / Raspbian
### Base
apt-get install libgl-dev gnutls-dev
### SDL2
apt-get install libsdl2-dev
### GLX / X11 (part of libsdl2-dev)
apt-get install libx11-dev libxcursor-dev libxrender-dev
### Plugin: ODE
apt-get install autoconf automake libtool
### Plugin: FFMPEG
apt-get install libavformat-dev libswscale-dev
## OpenBSD
### SDL2
pkg_add sdl2
### Plugin: FFMPEG
pkg_add ffmpeg
## Arch Linux
### Base
pacman -S make gcc Xorg
### Plugin: ODE
pacman -S zip automake autoconf
### Plugin: FFMPEG
pacman -S ffmpeg4.4
You must pass these flags to compile the plugin:
make plugins-rel NATIVE_PLUGINS="ffmpeg" AV_BASE=/usr/include/ffmpeg4.4/ AV_LDFLAGS="-l:libavcodec.so.58 -l:libavformat.so.58 -l:libavutil.so.56 -l:libswscale.so.5"
### SDL2
pacman -S sdl2
## OpenSUSE
### Base
zypper in make gcc gcc-c++ mesa-libGL-devel libgnutls-devel alsa-devel libopus-devel speex-devel libvorbis-devel
### SDL2
zypper in libSDL2-devel
### GLX / X11
zypper in libX11-devel libXcursor-devel libXrandr-devel
### Plugin: ODE
zypper in autoconf automake libtool zip
### Plugin: FFMPEG
zypper in ffmpeg-4-libavformat-devel ffmpeg-4-libswscale-devel
## Fedora
dnf install make gcc gcc-c++ mesa-libGL-devel gnutls-devel alsa-devel libopus-devel speex-devel libvorbis-devel
### SDL2
dnf install SDL2-devel
### GLX / X11 (part of libsdl2-dev)
dnf install libX11-devel libXcursor-devel libXrender-devel
### Plugin: ODE
dnf install autoconf automake libtool zip
### Plugin: FFMPEG
You need to install the RPM Fusion repo if you don't have it. We recommend reading their official guide: https://rpmfusion.org/Configuration
Then you can install the required version of FFMPEG:
dnf install compat-ffmpeg4-devel
Finally, you must pass these flags to compile the plugin:
make plugins-rel NATIVE_PLUGINS="ffmpeg" AV_BASE=/usr/include/compat-ffmpeg4 AV_LDFLAGS="-l:libavcodec.so.58 -l:libavformat.so.58 -l:libavutil.so.56 -l:libswscale.so.5"
================================================
FILE: documentation/QuickStart.md
================================================
# FTEQW README
This file contains the following sections:
- [0. PREFACE](#0-preface)
- [1. ABOUT](#1-about)
- [2. FEATURES](#2-features)
- [3. INSTALLING](#3-installing)
- [4. NETWORK QUICK-START](#4-network-quick-start)
- [5. TWEAKS](#5-tweaks)
- [6. TROUBLESHOOTING](#6-troubleshooting)
- [7. FURTHER READING](#7-further-reading)
- [8. CONTACT](#8-contact)
- [9. LICENSE](#9-license)
# 0. PREFACE
Thank you for downloading FTEQW, we hope you enjoy the many advanced features and ways to play. We understand the engine can be a bit daunting at times, so we hope this will help you get up and running with little to no hasle.
# 1. ABOUT
FTEQW is an advanced portable Quake engine.
It supports multiple games running on idTech, plus its own set of
games that developers have created. Due to the vast amount of supported
formats, features and innovations inside the engine and its very own
QuakeC compiler (fteqcc), it's very much considered the swiss-army
knife of Quake engines.
# 2. FEATURES
- Portable engine that runs on x86, amd64, ARM/64, PPC64LE and Web
- Hybrid protocol engine that supports multiple games
- Rendering API support for D3D8, D3D9, D3D11, OpenGL, Vulkan
- Splitscreen support for Quake and most mods
- In-game voice chat powered by either Opus or Speex
- Advanced renderer features, powered by a strong material system
and support for both HLSL and GLSL shader code
- Multiple audio backends, from OSS to SDL_Sound and OpenAL Soft,
plus API so developers can take advantage of AL EAX reverb features.
And yes, DirectSound.
- Integrated next-generation QuakeC compiler and debugger
with support for breakpoints, real-time ingame attribute debugging
and much more
- Support for IPv4 and IPv6
- Video output presets, to make your games either look like the
original versions, or more modern with real-time lighting and more
accurate shading
- Support for CD-DA/Red Book music replacement in a variety of formats,
such as Vorbis, MPEG-3, WAVE and FLAC (ffmpeg plugin required)
# 3. INSTALLING
Put the engine binary and desired plugins for your platform into the
root of the game directory.
Supported games:
- Quake and its Missionpacks
- QuakeWorld
- Quake II and its Missionpacks
- Quake III Arena and Team Arena
- HeXen II and its Missionpack
- Half-Life 1 & 2 (via the Rad Therapy project)
If you want to be explicit about the game you're starting, you can pass
the command-line parameters (read below for a complete list) for the
respective game. This will make sure that in a crowded universal game
directory, FTE starts the right game.
If you want to install music replacement files, you put them into the
`music` folder with the `trackXX` naming convention, starting with `track02`.
## Important note regarding Quake II based support
If you're running a 64-bit version of FTEQW, then you also need 64-bit
game-logic for Quake II. We recommend getting the game .dll/.so from the
Yamagi Quake II project for your respective platform. It's recommended
that you do for win32 as well, as that will ensure that save games work
properly and you can stop worrying about them becoming incompatible
between other machines.
## Android Installation
When using the Android app, you need to copy your gamedata folders
in the `Android/data/com.fteqw/files` folder.
An install of Quake should look like this for example:
Android/data/com.fteqw/files/id1/pak0.pak
Android/data/com.fteqw/files/id1/pak1.pak
> [!WARNING]
> FTEQW is included in other Android APKs such as idTech4a++,
> please consult their documentation and help forums as we do not
> provide support to these unofficial third-party ports.
## Steam
FTEQW can detect and load data from the `/SteamApps/common/GAMEHERE` folders.
This includes the Quake I and II Remasters.
## Linux/Unix System Games Folder
FTEQW supports loading the legacy Unix game folders and will look for
gamedata in the following folders:
- /usr/share/games/quake
- /usr/share/games/quake2
- /usr/share/games/quake3
- /usr/share/games/hexen2
- /usr/share/games/halflife
- /usr/share/games/halflife2
## 4. NETWORK QUICK-START
Upon launching FTEQW, you can use the multiplayer menu's own built-in
server browser to join and connect to a vast array of matches across all
the different protocols. No more QuakeSpy/GameSpy 3D client required!
If you want to host a game, you can either run a listen server with
the ports forwarded, or host a listen server using frag-net.com's online
service. Start a new multiplayer server, change the "Public" setting to
"Holepunch" and players will automatically see your game in their
server-browser once it's started.
You can also set FTEQW to run in a terminal/command-prompt for hosting
a dedicated server session.
Simply pass the command-line argument like so:
fteqw -dedicated
This will create an interactive shell reminiscent to the console that's
accessible in-game.
You can host a game directly with frag-net.com without having to worry
about port-forwarding and have a map up and running like so:
fteqw +set sv_public 2 +set sv_playerslots 8 +map dm4
# 5. TWEAKS
You can apply tweaks by opening the console (SHIFT+ESC) and entering
commands into the line buffer. In there you can enter console variables
(cvars) that affect how the game behaves, as well as enter console
commands that trigger an action in the engine.
You can always find a list of both of these with the console commands
`cvarlist` and `cmdlist` respectively.
## Some example commands
`bind <key> <command>` Binds a command to a key, e.g. `bind F12 quit`
`map <mapname>` Starts a new game on <mapname>, e.g. `map dm4`
`connect <address>` Establishes a connection to the specified
IP/hostname address.
`disconnect` Closes and remote or local game session.
`cfg_save` Save amy unsaved configuration changes.
`quit` Quits the game.
## About console variables
Unlike other Quake engines, FTEs console variable system is more akin to
those of later idTech engines. Console variables can be set temporarily
(until the next engine restart) or permanently.
`set sv_port 26000` Sets the current port to 26000 for this session
`seta sv_port 26000` Sets the current port gets set to 26000 and makes
sure it will get "archived", aka saved.
Sometimes, you'll be able to change a cvar without entering `set` or
`seta` beforehand. This is due to the cvar/cmd suggestion system.
When you simply set a cvar that way, `set` is assumed.
So those changes are only temporary.
## Commandline arguments
You can pass cvars and commands directly to the engine binary, prefixed
with a plus symbol like so:
fteqw +set sv_port 26000 +map dm4
There's also other interesting commandline only arguments you can pass:
`-nohome` Don't attempt to save configs, saves, screenshots in the
home or user directory.
`-basedir <path>` Specifies the root game directory path.
`-basegame <dir>` Specifies which folder to look in for main game data.
`-game <dir>` Specifies which mod folder to load over the game data
`-window` Tells the renderer to run in a window
`-manifest <fmf>` Specifies a game manifest to load.
This is for advanced game and mod switching.
`-dedicated` Run the engine in dedicated server mode, no video out.
## Changing games and mods
Launching a Quake 1 mod can be done like so:
fteqw -game fortress
That will assume a basegame of `id1` and the mod `fortress` will be
loaded on top of it.
However, if you're playing a game that uses no data from Quake 1:
fteqw -basegame openquartz
Then it'll never even touch or peek into the folder `id1`.
Of course you can pass `-game` after that, too.
If you want to specify a supported game for more accurate behavior
and automatic data path finding, then you can pass these arguements
to load a specific game and behaviour:
-quake
-quake2
-quake3
-hexen2
-halflife
-halflife2
> [!NOTE]
> Half-Life 1 & 2 will download the Rad-Therapy project in place of their game logic, and HL2 also requires the Source formats plugin.
## Understanding manifests (advanced users)
You can setup custom game configurations with FTE's manifest files.
Those can be quite advanced, as they might inherit multiple directories,
change the name of the window title, set binds, aliases and cvars ahead
of time and much more.
FTEMANIFEST 1
GAME funky
NAME "Funky QW Game"
BASEGAME id1
BASEGAME qw
BASEGAME funky
An example manifest that will load id1, qw and then funky.
If you wanted, you can set default cvars and aliases in there like so:
-set sv_example 1234
-seta cl_foobar 5678
-alias funky1 "impulse 416"
+bind g funky1
Note the dash and plus symbols, they actually notate when to execute the
command in question. '-' means before the engine loads the game config
whereas '+' notates it will override anything that will usually be set
by the game.
You'd then save this as, for example, funky.fmf and load the manifest
via the command-line:
fteqw -manifest funky.fmf
# 6. TROUBLESHOOTING
If you're running FTEQW on an older machine with Intel GMA graphics,
you probably want to try running the engine in D3D9 mode if you're
encountering any graphical issues:
fteqw +set vid_renderer d3d9
If you can only run OpenGL but still have graphical issues, try forcing
support for the builtin GLSL off:
fteqw +set gl_blacklist_debug_glsl 1
If FTEQW is seemingly not saving your settings, make sure you tell it to
save your config when you quit the game. If it still does not work
somehow, enter the console command `cfg_save` into the console. It
should output where the file gets saved or if there's any problems
writing the configuration file.
If OpenAL is causing crashes at launch (happens with some distributions,
that is out of our control) then try starting FTEQW with:
fteqw +set s_al_disable 1
# 7. FURTHER READING
Here's a small selection of some links we recommend for more info on FTEQW:
- [Spirit's excellent FTEQW wiki](https://quakewiki.org/wiki/FTEQW_Wiki)
- [@eukara's must read FTEQCC manual/QuakeC help](https://icculus.org/~marco/txtfiles.html)
- [@Shpoike's old FTEQW website and wiki](https://fte.triptohell.info/wiki/index.php/Main_Page)
# 8. CONTACT
If you need more help, have suggestions or want to hang out with the
developers that make FTEQW what it is, join us on a platform listed below!
Bug reports are welcomed! See our [public bug tracker](https://github.com/fte-team/fteqw/issues).
### Matrix
https://matrix.to/#/#fte:matrix.org
### IRC
**Server:** irc.quakenet.org
**Channel:** #fte
### Forums
**[Spike](https://forums.insideqc.com/memberlist.php?mode=viewprofile&u=26)** and **[eukara](https://forums.insideqc.com/memberlist.php?mode=viewprofile&u=949)** can be found on [insideqc.com](https://forums.insideqc.com/)
### Discord
https://discord.gg/p2ag7x6Ca6
# 9. LICENSE
Copyright (c) 2004-2025 FTE's team and its contributors
Quake source (c) 1999 id Software
FTEQW is supplied to you under the terms of the same license as the
original Quake sources, the GNU General Public License Version 2.
Please read the `LICENSE` file for details.
The latest source & binaries are always available at:
[fteqw.org](https://fteqw.org)
[fteqcc.org](https://fteqcc.org)
================================================
FILE: documentation/Tools.md
================================================
# FTE Tools README
# Preface
This file covers the tools include with the FTEQW source code.
FTEQW features a set of tools for compiling and editing QuackeC, textures, models, packages, and other formats associated with idTech.
### Contents
- [FTEQCC](#fteqcc)
- [IQM Tool](#iqm-tool)
- [Image Tool](#image-tool)
- [License](#license)
# FTEQCC
FTEQCC is the defacto compiler for FTE's unique variant of QuakeC called, **FTEQC**.
It is (generally) backwards compatible with standard QuakeC and is used to compile code usually found in the `src` folder. It will output a memory-safe and architecture independent `progs.dat` that is loaded in a virtual machine within the engine.
Client-side progs are also able to be compiled if the code-base supports it into a `csprogs.dat` file.
Another unique feature of FTEQC is the concept of "objects", similar to other C-like languages such as C++ or Obj-C.
Some games (HeXen II) and the Nuclide SDK have a concept of multi-progs, meaning uniquely named progs can be arbitrarily compiled and loaded alongside the main progs.
Full FTEQCC documentation can be found [here](https://fte.triptohell.info/moodles/fteqcc/README.html)
> [!TIP]
> You can also compile within FTEQW itself by typing `compile` in the console (must have a `src` folder in the mounted directory)
### GUI
There is a GUI available for FTEQCC built on the Qt toolkit. It is incomplete and features vary by platform.
### Package Management
The commandline version of FTEQCC doubles up as a PAK/PK3 creator or extractor:
fteqcc -l PACKAGENAME
Lists the contents of a file on the stdout.
fteqcc -x PACKAGENAME
Extracts all files from the named package to the working directory. You should normally use `../foo.pak` in order to avoid overwriting files unintentionally.
fteqcc -x PACKAGENAME SUBDIR
Extracts specific files from the named package.
fteqcc -0 SUBDIR
Generates a `subdir.pak` file with the contents of that subdir. Unlike most pak generators, the pak will also be openable with any zip tool for users to easily view files (they shouldn't edit them though).
fteqcc -9 SUBDIR
Generates a `subdir.pk3` file with the contents of that subdir. Contents will be compressed to reduce filesize, but won't work in vanilla quake.
fteqcc -z SUBDIR
Generate a `subdir.pk3` dictionary file, and an (additional) `subdir.pXX` file (name generated sequentially). The dictionary file will be versioned with different servers potentially using different versions. This prevents re-downloading redundant copies of the same files for each different version. The spanned data files are not versioned, so these should only be generated by authoritive developers (ie: not same-filename forks).
Many engines support interpreting `foo.pk3dir` subdirs as proto-packages, which makes it easier to test packages without constant re-compression.
# IQM Tool
### About:
This is a commandline tool for creating iqm files from intermediate files exported from modelling programs.
### Possible Inputs:
- SMD
- GLTF
- GLB
- IQE
- MD5Mesh
- MD5Anim
- FBX
- OBJ
### Outputs:
- IQM / VVM
The default format. IQM supports skeletal animations and other features used by modern model formats.
**VVM** is a moniker for the backwards-compatible extensions FTE supports which are not supported by other engines/tools. Think of it as a "fork" of the IQM model format.
The **VVM** variant was created by Vera Visions hence the name, "Vera Visions Model".
- MDL
Quake's model format (idTech 2). It is vertex animation based and has many limitations, therefore it's recommend to use IQM / VVM unless you are targeting stock Quake.
> [!WARNING]
> While Half-Life 1 & 2 also use the `.mdl` extension, it is a different format altogether and _not yet_ supported by IQM Tool.
### Usage:
IQM Tool Can be used two ways:
iqm foo.cmd
Uses a command script to decide which files to read, modifiers for each sequence or mesh, etc.
iqm foo.iqm foo.gltf
Converts the gltf file to an iqm file. Animation rate will be guessed.
iqm foo.mdl foo.gltf
Writes out a Quake MDL file. Framegroups will be used for each animation sequence.
### Command script:
#COMMENT
//COMMENT
Just a comment, ignored.
exec filename
Invokes an external script (useful when you have multiple models with the same animations or so).
modelflags BITS
Sets the output model's flags. Queryable in gamecode.
mesh MESHNAME ATTRIBUTELIST
Overrides attributes of an imported mesh to use for the visible part of the model. Use the `import` command to actually import the geometry.
Attributes are:
contents BITSORNAMES
Controls which traces may impact the imported surfaces. You should normally specify 0 if you are using hitboxes. Default is CONTENTS_BODY.
surfaceflags BITSORNAMES
Misc info eg reported by tracelines.
body NUM
The 'body' number which can be queried in gamecode (typically used to report eg headshots).
geomset SET ID
Sets this mesh to only draw when geomset SET has been configured as ID.
lodrange MIN MAX
This mesh will only be drawn when the screen coverage is within the specified range. Exact interpretation can vary according to engine cvars.
hitbox BODYNUM BONENAME MINS MAXS
Creates a cuboid mesh around the named bone (as a box in the base pose). The mesh will be given CONTENTS_BODY such that it will be hit by hitmesh traces.
The bodynum arg can be queried via gamecode.
bone NAME ATTRIBUTELIST
rename NEWNAME
The bone read from input files will be written as NEWNAME in the output file (so gamecode can manipulate things consistently).
group GROUPNUM
Bones can be reordered in the output according to their group numbers. Only the root bone of each group needs its group specified (children will inherit).
This simplies bone range operations in gamecode
import FILENAME ATTRIBUTELIST
model FILENAME ATTRIBUTELIST
scene FILENAME ATTRIBUTELIST
animation FILENAME ATTRIBUTELIST
Loads model AND animation data from an imported file.
File formats must match the given filename extensions.
Attributes are:
Any attributes supported by the mesh command (such attributes here define the default values for imported meshes).
name NEWNAME
The animation will be queryable to gamecode as the NEWNAME.
fps RATE
Overrides the frame rate of the animation.
loop
Specifies that the animation must loop.
clamp
Specifies that the animation must NOT loop (animation will stop once it reaches the last pose).
unpack
Generates single-pose animations, consistent with the way vanilla QC animates.
pack
Generates multiple-pose animations, gamecode will be able to specify animation and time separately.
nomesh
Do NOT generate meshes from this file.
noanim
Do NOT generate animations from this file.
materialprefix PATH
Prefixes the imported texture with an additional path (to avoid conflicts with other files).
start FRAME
end FRAME
Limits inputed data to the specified poses.
scale SCALE
Resizes the input data.
rotate PITCH ROLL YAW
Rotates the imported data (quake is +x=forward, +y=left, +z=up).
translate X Y Z
Moves the mesh+bones around a bit.
event [SEQUENCE:]POSE EVCODE EVSTRING
Defines a model event at the specified timestamp.
output FILENAME
output_iqm FILENAME
output_vvm FILENAME
output_qmdl FILENAME
output_md16 FILENAME
Specifies the file to be written. You may have one per supported output model format, each will contain roughly equivelent data (where supported).
# Image Tool
### About:
This is a tool for converting various image file types to more favourable ones.
This includes generating wad files, cubemap images, etc.
### Wad Examples:
imgtool --ext mip [--PIXFMT] [--resize W H] *.EXT
Converts the input files to quake's miptex format. Input files will not be changed.
If compression was specified, the resulting miptex will contain an additional high-colour alternative.
If `--resize` is used, the paletted data will be resized without affecting the high-colour alternative.
Supported pixel formats:
rgba8,rgb8, rgb565,rgba5551,rgba4444, l8, bc1-7, etc1,etc2,etcp,etca, astc*x*, e5bgr9
> [!NOTE]
> Use of alternative formats requires a qbsp which does NOT strip this information.
> The vanilla qbsp will work fine for this purpose, but more advanced qbsp utils have a tendancy to strip the info (including ericw's sadly).
imgtool -w WADFILE *.mip
Packs the specified miptex files into the named wad file.
imgtool -x --ext EXT WADORBSP
Extracts the textures from the specified wad or bsp file, saving them as EXT files.
### General Examples:
imgtool --help
Shows a list of compressed pixel formats, and supported file formats.
imgtool -i FILE
Shows info about the named file(s).
imgtool --ext ktx [--PIXFMT] *.EXT
imgtool --ext dds [--PIXFMT] *.EXT
Converts the input files to a hardware-friendly file format (with the specified pixel format). Input files will not be changed.
ktx supports all recognised hardware formats. dds is more limited (and eg doesn't support etc or astc).
HUD artwork should generally be astc4x4 or bc7 for best quality.
models and walls can be of lower quality, astc6x6, etc2, or bc1 are good choices.
for hdr pixel formats, try astc4x4_hdr or bc6.
imgtool --ext png *.EXT
Converts the input files to png format for viewing/editing. Input files will not be changed.
imgtool --cube [--PIXFMT] -o mysky.dds mysky_*.tga
Converts 6 input files to a single cubemap file.
Inputs will be reordered according to quake's typical cubemap postfixes (and flipped as appropriate), otherwise be careful with wildcards.
imgtool --2darray [--PIXFMT] -o foo.ktx IDX0 IDX1 IDXN
Converts the input textures into a 2d texture array. Input file order matters.
imgtool --3d [--PIXFMT] -o foo.ktx LAYER0 LAYER1 LAYERN
Converts the input textures into a 3d texture. Input file order matters.
### Which pixel format to use:
### ASTC:
- The ldr-only profile is part of the gles3.2 spec (but likely to be emulated on nvidia).
- ASTC has a range of block sizes with each block being 16 bytes, thus larger block sizes yield greater compression.
- This format supports multiple planes, which reduces issues with multiple gradients in a block, which means it can cope with pixel art better than eg s3tc with larger block sizes.
- Bits are distributed according to usage per block, this means it can use more bits for the rgb channels where alpha is constant, giving it more useful bits than eg bc3.
- ASTC is able to use a second set of weights for any single channel (not just alpha), which makes it suitable for encoding normalmaps for instance.
- To encode ASTC pixel formats, you will need to install astcenc - https://github.com/ARM-software/astc-encoder/releases (or use astc-encoded source files).
### ETC2:
- Part of the gles3.0/gl4.3 spec
- ETC2 is a superset of ETC1, and has been somewhat obsoleted by ASTC.
### BC1/2/3:
- AKA s3tc, AKA dxt, available only via optional extensions, but is mandated by d3d 9_1 feature level.
- These formats all encode two 565 colours per 4x4 block with 2-bits per pixel for interpolation, which can result in discolouration.
- bc2 uses an additional 64bit block to encode 4bit alpha.
- bc3 also uses an additional block for alpha, but does so simiarly to its rgb values (two 8bit alpha values, with 3-way interpolation).
- To encode s3tc pixel formats, you will need to install libnvtt-bin (or export from image editors as dds or ktx files).
### BC4/5:
- AKA rgtc, part of the gl3.0 spec, or d3d10.
- These formats reuse bc3's 'alpha' compression to encode one or two channels respectively. BC1 can be handy for heightmaps/greyscale/etc, while BC5 can be useful for 2-channel normalmaps. They are not generally useful as eg wall textures.
### BC6/7:
- AKA bptc, part of the gl4.2, or d3d11.
- These formats support one or two planes per block, which means they can cope with pixel art quite a bit better than bc1/3.
- While they're the same size as bc3 (twice that of bc1), they have multiple modes per block that allow them to eg avoid wasting bits on unused alpha data.
- The difference is that BC7 encodes RGBA ldr data, while BC6 encodes RGB hdr data.
- To encode s3tc pixel formats, you will need to install libnvtt-bin (or export from image editors as dds or ktx files).
### Too Long didn't read:
- Use ASTC if you're targetting modern mobile devices (astc6x6 for walls, astc4x4 for huds, or something).
- Use ETC2 if you're targetting older mobile users.
- Use BC1 for desktop model/wall textures, and bc3 for things with non-binary alpha channels.
- Use BC7 for desktop hud textures or other textures where BC1 does a terrible job.
- Use jpegs if you just want to get filesize down without caring about performance.
- If the user's hardware doesn't support the used formats then FTE can software-decode, so if you're expecting both mobile+desktop users with a single set of textures then favour mobile (desktop GPUs have better memory bandwidth).
# License
Copyright (c) 2004-2025 FTE's team and its contributors
Quake source (c) 1999 id Software
FTEQW is supplied to you under the terms of the same license as the
original Quake sources, the GNU General Public License Version 2.
Please read the `LICENSE` file for details.
The latest source & binaries are always available at:
[fteqw.org](https://fteqw.org)
[fteqcc.org](https://fteqcc.org)
================================================
FILE: dounifdef.sh
================================================
#!/bin/sh
#this script is DANGEROUS
#be sure to have committed *BEFORE* running this script.
#Note: This script does not understand dead files (including botlib).
#expect '-Wmisleading-indentation' warnings (that were previously muted by nearby ifdefs).
#DO NOT COMMIT THE RESULTS TO FTE'S TRUNK
CONFIG=wastes
#must have trailing slashes
SRCDIR=./
NEWDIR=/tmp/fte-$CONFIG/
echo "WARNING: This script will lock-in a build config upon your C files."
echo "The resulting files will support only your choice of feature set, instead of having lots of unused code mixed in."
echo "THIS IS DESTRUCTIVE SO MUST ONLY BE USED FOR FORKS."
read -p "Press name the build config (or ctrl+c to abort)" CONFIG
if [ "$foo" == "" ]; then
echo "no config specified."
exit 1
fi
mkdir -p $NEWDIR
cat $SRCDIR/engine/common/config_$CONFIG.h | grep "#define" | sed "s/\/\/#define/#undef/g" > $NEWDIR/unifdefrules
cat $SRCDIR/engine/common/config_$CONFIG.h | grep "#undef" >> $NEWDIR/unifdefrules
if [ "$SRCDIR" != "$NEWDIR" ]; then
echo "Copying files to strip to $NEWDIR."
cp -r $SRCDIR* $NEWDIR
else
echo "WARNING: WRITING FILES IN PLACE MUST ONLY BE USED FOR FORKS."
read -p "Press y<enter> to confirm (or ctrl+c to abort)" foo
if [ "$foo" != "y" ]; then
exit 1
fi
fi
cd $NEWDIR
for FILENAME in engine/*/*.c; do
unifdef -f unifdefrules -m $FILENAME
done
#headers keep any defines that will be expanded in code.
cat $NEWDIR/unifdefrules | grep -v FULLENGINENAME | grep -v DISTRIBUTION | grep -v ENGINEWEBSITE | grep -v MAX_SPLITS | grep GAME_SHORTNAME > $NEWDIR/unifdefhrules
for FILENAME in engine/*/*.h; do
unifdef -f unifdefhrules -m $FILENAME
done
rm $NEWDIR/unifdefrules
echo "Files in $NEWDIR have now been stripped down."
echo "Some things may require hand-editing to remove warnings (or just compile with CFLAGS=-Wno-misleading-indentation)."
echo "You still need to set FTE_CONFIG too."
read -p "Press enter to test-compile" foo
cd $NEWDIR/engine && make sv-rel m-rel -j8 FTE_CONFIG=$CONFIG -k
================================================
FILE: engine/BSDmakefile
================================================
#just a stub to make things easier.
#you still need gmake and gcc.
all:
gmake all
help:
gmake help
clean:
gmake clean
gl-dbg:
gmake gl-dbg
sw-dbg:
gmake sw-dbg
m-dbg:
gmake m-dbg
sv-dbg:
gmake sv-dbg
gl-rel:
gmake gl-rel
sw-rel:
gmake sw-rel
m-rel:
gmake m-rel
sv-rel:
gmake sv-rel
================================================
FILE: engine/LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the
gitextract_twr6mi4o/
├── .forgejo/
│ └── workflows/
│ └── bin-linux64-release.yaml
├── .github/
│ └── workflows/
│ └── main.yml
├── .gitignore
├── CMakeLists.txt
├── LICENSE
├── README.md
├── build_qc.sh
├── build_setup.sh
├── build_wip.sh
├── dist/
│ └── linux/
│ ├── com.riverbankcomputing.qscintilla.install.patch
│ ├── linter-exceptions.json
│ ├── org.fteqw.fteqw.desktop
│ ├── org.fteqw.fteqw.fixdownloads.patch
│ ├── org.fteqw.fteqw.fixhomedir.patch
│ ├── org.fteqw.fteqw.metainfo.xml
│ ├── org.fteqw.fteqw.sh
│ └── org.fteqw.fteqw.yml
├── documentation/
│ ├── Building.md
│ ├── Credits.md
│ ├── Dependencies.md
│ ├── QuickStart.md
│ └── Tools.md
├── dounifdef.sh
├── engine/
│ ├── BSDmakefile
│ ├── LICENSE
│ ├── Makefile
│ ├── README.MSVC
│ ├── client/
│ │ ├── anorms.h
│ │ ├── api_menu.h
│ │ ├── bymorphed.h
│ │ ├── cd_linux.c
│ │ ├── cd_null.c
│ │ ├── cd_sdl.c
│ │ ├── cd_win.c
│ │ ├── cdaudio.h
│ │ ├── cl_cam.c
│ │ ├── cl_demo.c
│ │ ├── cl_ents.c
│ │ ├── cl_ignore.c
│ │ ├── cl_ignore.h
│ │ ├── cl_input.c
│ │ ├── cl_main.c
│ │ ├── cl_master.h
│ │ ├── cl_parse.c
│ │ ├── cl_plugin.inc
│ │ ├── cl_pred.c
│ │ ├── cl_screen.c
│ │ ├── cl_tent.c
│ │ ├── clhl_game.c
│ │ ├── client.h
│ │ ├── clq2_cin.c
│ │ ├── clq2_ents.c
│ │ ├── console.c
│ │ ├── fragstats.c
│ │ ├── fte_eukara64.h
│ │ ├── image.c
│ │ ├── image_astc.h
│ │ ├── in_generic.c
│ │ ├── in_morphos.c
│ │ ├── in_morphos.h
│ │ ├── in_raw.h
│ │ ├── in_sdl.c
│ │ ├── in_win.c
│ │ ├── input.h
│ │ ├── keys.c
│ │ ├── keys.h
│ │ ├── lhfont.h
│ │ ├── m_download.c
│ │ ├── m_items.c
│ │ ├── m_master.c
│ │ ├── m_mp3.c
│ │ ├── m_multi.c
│ │ ├── m_native.c
│ │ ├── m_options.c
│ │ ├── m_script.c
│ │ ├── m_single.c
│ │ ├── menu.c
│ │ ├── menu.h
│ │ ├── merged.h
│ │ ├── modelgen.h
│ │ ├── net_master.c
│ │ ├── p_classic.c
│ │ ├── p_null.c
│ │ ├── p_script.c
│ │ ├── pr_clcmd.c
│ │ ├── pr_csqc.c
│ │ ├── pr_menu.c
│ │ ├── pr_skelobj.c
│ │ ├── q2anorms.h
│ │ ├── q2m_flash.c
│ │ ├── quake.manifest
│ │ ├── quakedef.h
│ │ ├── r_2d.c
│ │ ├── r_d3.c
│ │ ├── r_part.c
│ │ ├── r_partset.c
│ │ ├── r_partset.h
│ │ ├── r_surf.c
│ │ ├── render.h
│ │ ├── renderer.c
│ │ ├── renderque.c
│ │ ├── renderque.h
│ │ ├── resource.h
│ │ ├── roq.h
│ │ ├── roq_read.c
│ │ ├── sbar.c
│ │ ├── sbar.h
│ │ ├── screen.h
│ │ ├── skin.c
│ │ ├── snd_al.c
│ │ ├── snd_alsa.c
│ │ ├── snd_directx.c
│ │ ├── snd_dma.c
│ │ ├── snd_droid.c
│ │ ├── snd_linux.c
│ │ ├── snd_macos.c
│ │ ├── snd_mem.c
│ │ ├── snd_mix.c
│ │ ├── snd_morphos.c
│ │ ├── snd_mp3.c
│ │ ├── snd_opensl.c
│ │ ├── snd_ov.c
│ │ ├── snd_pulse.c
│ │ ├── snd_sblaster.c
│ │ ├── snd_sdl.c
│ │ ├── snd_sndio.c
│ │ ├── snd_wasapi.c
│ │ ├── snd_win.c
│ │ ├── snd_xaudio.c
│ │ ├── sound.h
│ │ ├── spritegn.h
│ │ ├── sys_axfte.cpp
│ │ ├── sys_dos.c
│ │ ├── sys_droid.c
│ │ ├── sys_linux.c
│ │ ├── sys_morphos.c
│ │ ├── sys_plugfte.c
│ │ ├── sys_plugfte.h
│ │ ├── sys_sdl.c
│ │ ├── sys_win.c
│ │ ├── sys_xdk.c
│ │ ├── teamplay.c
│ │ ├── textedit.c
│ │ ├── valid.c
│ │ ├── vid.h
│ │ ├── vid_headless.c
│ │ ├── view.c
│ │ ├── view.h
│ │ ├── vr.h
│ │ ├── wad.c
│ │ ├── wad.h
│ │ ├── winamp.h
│ │ ├── winquake.h
│ │ ├── winquake.rc
│ │ └── zqtp.c
│ ├── common/
│ │ ├── bothdefs.h
│ │ ├── bspfile.h
│ │ ├── cmd.c
│ │ ├── cmd.h
│ │ ├── com_bih.c
│ │ ├── com_bih.h
│ │ ├── com_mesh.c
│ │ ├── com_mesh.h
│ │ ├── com_phys_bullet.cpp
│ │ ├── com_phys_ode.c
│ │ ├── common.c
│ │ ├── common.h
│ │ ├── config_freecs.h
│ │ ├── config_fteqw.h
│ │ ├── config_fteqw_noweb.h
│ │ ├── config_minimal.h
│ │ ├── config_nocompat.h
│ │ ├── config_wastes.h
│ │ ├── console.h
│ │ ├── crc.c
│ │ ├── cvar.c
│ │ ├── cvar.h
│ │ ├── fs.c
│ │ ├── fs.h
│ │ ├── fs_dzip.c
│ │ ├── fs_pak.c
│ │ ├── fs_stdio.c
│ │ ├── fs_win32.c
│ │ ├── fs_xz.c
│ │ ├── fs_zip.c
│ │ ├── gl_q2bsp.c
│ │ ├── huff.c
│ │ ├── json.c
│ │ ├── log.c
│ │ ├── mathlib.c
│ │ ├── mathlib.h
│ │ ├── md4.c
│ │ ├── md5.c
│ │ ├── net.h
│ │ ├── net_chan.c
│ │ ├── net_ice.c
│ │ ├── net_ssl_gnutls.c
│ │ ├── net_ssl_winsspi.c
│ │ ├── net_wins.c
│ │ ├── netinc.h
│ │ ├── particles.h
│ │ ├── plugin.c
│ │ ├── pmove.c
│ │ ├── pmove.h
│ │ ├── pmovetst.c
│ │ ├── pr_bgcmd.c
│ │ ├── pr_common.h
│ │ ├── protocol.h
│ │ ├── q1bsp.c
│ │ ├── q2pmove.c
│ │ ├── q3api.h
│ │ ├── qvm.c
│ │ ├── sha1.c
│ │ ├── sha2.c
│ │ ├── sys.h
│ │ ├── sys_linux_threads.c
│ │ ├── sys_win_threads.c
│ │ ├── translate.c
│ │ ├── translate.h
│ │ ├── ui_public.h
│ │ ├── vm.h
│ │ ├── world.h
│ │ ├── zone.c
│ │ └── zone.h
│ ├── d3d/
│ │ ├── d3d11_backend.c
│ │ ├── d3d11_image.c
│ │ ├── d3d11_shader.c
│ │ ├── d3d8_backend.c
│ │ ├── d3d8_image.c
│ │ ├── d3d_backend.c
│ │ ├── d3d_image.c
│ │ ├── d3d_shader.c
│ │ ├── vid_d3d.c
│ │ ├── vid_d3d11.c
│ │ └── vid_d3d8.c
│ ├── droid/
│ │ ├── AndroidManifest.xml
│ │ ├── configs/
│ │ │ └── touch.cfg
│ │ ├── default.fmf
│ │ ├── fte.cfg
│ │ ├── res/
│ │ │ ├── drawable/
│ │ │ │ ├── touch_attack.tga
│ │ │ │ ├── touch_jump.tga
│ │ │ │ ├── touch_moveback.tga
│ │ │ │ ├── touch_moveforward.tga
│ │ │ │ ├── touch_moveleft.tga
│ │ │ │ ├── touch_moveright.tga
│ │ │ │ ├── touch_turnleft.tga
│ │ │ │ └── touch_turnright.tga
│ │ │ └── values/
│ │ │ └── strings.xml
│ │ └── src/
│ │ └── com/
│ │ └── fteqw/
│ │ ├── FTEDroidActivity.java
│ │ ├── FTEDroidEngine.java
│ │ └── FTENativeActivity.java
│ ├── gl/
│ │ ├── gl_alias.c
│ │ ├── gl_backend.c
│ │ ├── gl_bloom.c
│ │ ├── gl_draw.c
│ │ ├── gl_draw.h
│ │ ├── gl_font.c
│ │ ├── gl_heightmap.c
│ │ ├── gl_hlmdl.c
│ │ ├── gl_model.c
│ │ ├── gl_model.h
│ │ ├── gl_ngraph.c
│ │ ├── gl_rlight.c
│ │ ├── gl_rmain.c
│ │ ├── gl_rmisc.c
│ │ ├── gl_rsurf.c
│ │ ├── gl_screen.c
│ │ ├── gl_shader.c
│ │ ├── gl_shadow.c
│ │ ├── gl_terrain.h
│ │ ├── gl_vidcocoa.m
│ │ ├── gl_vidcommon.c
│ │ ├── gl_viddroid.c
│ │ ├── gl_videgl.c
│ │ ├── gl_videgl.h
│ │ ├── gl_vidlinuxglx.c
│ │ ├── gl_vidmacos.c
│ │ ├── gl_vidmorphos.c
│ │ ├── gl_vidnt.c
│ │ ├── gl_vidnull.c
│ │ ├── gl_vidrpi.c
│ │ ├── gl_vidsdl.c
│ │ ├── gl_vidtinyglstubs.c
│ │ ├── gl_vidwayland.c
│ │ ├── gl_warp.c
│ │ ├── gl_warp_sin.h
│ │ ├── glmod_doom.c
│ │ ├── glquake.h
│ │ ├── glsupp.h
│ │ ├── ltface.c
│ │ ├── model_hl.h
│ │ ├── r_bishaders.h
│ │ └── shader.h
│ ├── http/
│ │ ├── ftpclient.c
│ │ ├── ftpserver.c
│ │ ├── httpclient.c
│ │ ├── httpserver.c
│ │ ├── iweb.h
│ │ ├── iwebiface.c
│ │ └── webgen.c
│ ├── makeconfig.sh
│ ├── partcfgs/
│ │ ├── faithful.cfg
│ │ ├── generatebuiltin.c
│ │ ├── h2part.cfg
│ │ ├── high.cfg
│ │ ├── highfps.cfg
│ │ ├── minimal.cfg
│ │ ├── q2part.cfg
│ │ ├── spikeset.cfg
│ │ └── tsshaft.cfg
│ ├── qclib/
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── cmdlib.h
│ │ ├── comprout.c
│ │ ├── decomp.c
│ │ ├── execloop.h
│ │ ├── fteqcc.rc
│ │ ├── gui.h
│ │ ├── hash.c
│ │ ├── hash.h
│ │ ├── initlib.c
│ │ ├── packager.c
│ │ ├── pr_comp.h
│ │ ├── pr_edict.c
│ │ ├── pr_exec.c
│ │ ├── pr_multi.c
│ │ ├── pr_x86.c
│ │ ├── progsint.h
│ │ ├── progslib.h
│ │ ├── progtype.h
│ │ ├── qcc.h
│ │ ├── qcc_cmdlib.c
│ │ ├── qcc_pr_comp.c
│ │ ├── qcc_pr_lex.c
│ │ ├── qccgui.c
│ │ ├── qccguiqt.cpp
│ │ ├── qccguistuff.c
│ │ ├── qccmain.c
│ │ ├── qcctui.c
│ │ ├── qcd.h
│ │ ├── qcd_main.c
│ │ ├── qcdecomp.c
│ │ ├── readme.txt
│ │ └── test.c
│ ├── server/
│ │ ├── net_preparse.c
│ │ ├── pr_cmds.c
│ │ ├── pr_lua.c
│ │ ├── pr_q1qvm.c
│ │ ├── progdefs.h
│ │ ├── progs.h
│ │ ├── q2game.h
│ │ ├── savegame.c
│ │ ├── server.h
│ │ ├── sqlite3.h
│ │ ├── sv_ccmds.c
│ │ ├── sv_chat.c
│ │ ├── sv_cluster.c
│ │ ├── sv_demo.c
│ │ ├── sv_ents.c
│ │ ├── sv_init.c
│ │ ├── sv_main.c
│ │ ├── sv_master.c
│ │ ├── sv_move.c
│ │ ├── sv_mvd.c
│ │ ├── sv_nchan.c
│ │ ├── sv_phys.c
│ │ ├── sv_rankin.c
│ │ ├── sv_send.c
│ │ ├── sv_sql.c
│ │ ├── sv_sql.h
│ │ ├── sv_sys_unix.c
│ │ ├── sv_sys_win.c
│ │ ├── sv_user.c
│ │ ├── svhl_game.c
│ │ ├── svhl_gcapi.h
│ │ ├── svhl_phys.c
│ │ ├── svhl_world.c
│ │ ├── svq2_ents.c
│ │ ├── svq2_game.c
│ │ └── world.c
│ ├── shaders/
│ │ ├── Makefile
│ │ ├── generatebuiltinsl.c
│ │ ├── glsl/
│ │ │ ├── altwater.glsl
│ │ │ ├── bloom_blur.glsl
│ │ │ ├── bloom_filter.glsl
│ │ │ ├── bloom_final.glsl
│ │ │ ├── colourtint.glsl
│ │ │ ├── crepuscular_opaque.glsl
│ │ │ ├── crepuscular_rays.glsl
│ │ │ ├── crepuscular_sky.glsl
│ │ │ ├── default2d.glsl
│ │ │ ├── default2danim.glsl
│ │ │ ├── defaultadditivesprite.glsl
│ │ │ ├── defaultfill.glsl
│ │ │ ├── defaultgammacb.glsl
│ │ │ ├── defaultskin.glsl
│ │ │ ├── defaultsky.glsl
│ │ │ ├── defaultskybox.glsl
│ │ │ ├── defaultsprite.glsl
│ │ │ ├── defaultwall.glsl
│ │ │ ├── defaultwarp.glsl
│ │ │ ├── depthonly.glsl
│ │ │ ├── drawflat_wall.glsl
│ │ │ ├── fixedemu.glsl
│ │ │ ├── fxaa.glsl
│ │ │ ├── itemtimer.glsl
│ │ │ ├── lpp_depthnorm.glsl
│ │ │ ├── lpp_light.glsl
│ │ │ ├── lpp_wall.glsl
│ │ │ ├── menutint.glsl
│ │ │ ├── postproc_ascii.glsl
│ │ │ ├── postproc_equirectangular.glsl
│ │ │ ├── postproc_fisheye.glsl
│ │ │ ├── postproc_laea.glsl
│ │ │ ├── postproc_panini.glsl
│ │ │ ├── postproc_panorama.glsl
│ │ │ ├── postproc_stereographic.glsl
│ │ │ ├── rtlight.glsl
│ │ │ ├── terrain.glsl
│ │ │ ├── underwaterwarp.glsl
│ │ │ └── wireframe.glsl
│ │ ├── hlsl11/
│ │ │ ├── default2d.hlsl
│ │ │ ├── defaultfill.hlsl
│ │ │ ├── defaultskin.hlsl
│ │ │ ├── defaultsky.hlsl
│ │ │ ├── defaultskybox.hlsl
│ │ │ ├── defaultsprite.hlsl
│ │ │ ├── defaultwall.hlsl
│ │ │ ├── defaultwarp.hlsl
│ │ │ ├── depthonly.hlsl
│ │ │ ├── drawflat_wall.hlsl
│ │ │ ├── fixedemu.hlsl
│ │ │ ├── menutint.hlsl
│ │ │ ├── rtlight.hlsl
│ │ │ ├── terrain.hlsl
│ │ │ └── terraindebug.hlsl
│ │ ├── hlsl9/
│ │ │ ├── defaultskin.hlsl
│ │ │ ├── defaultsky.hlsl
│ │ │ ├── defaultskybox.hlsl
│ │ │ ├── defaultwall.hlsl
│ │ │ ├── defaultwarp.hlsl
│ │ │ ├── drawflat_wall.hlsl
│ │ │ ├── rtlight.hlsl
│ │ │ └── terrain.hlsl
│ │ ├── makevulkanblob.c
│ │ └── vulkan/
│ │ ├── altwater.glsl
│ │ ├── bloom_blur.glsl
│ │ ├── bloom_filter.glsl
│ │ ├── bloom_final.glsl
│ │ ├── default2d.glsl
│ │ ├── defaultadditivesprite.glsl
│ │ ├── defaultfill.glsl
│ │ ├── defaultgammacb.glsl
│ │ ├── defaultskin.glsl
│ │ ├── defaultsky.glsl
│ │ ├── defaultskybox.glsl
│ │ ├── defaultsprite.glsl
│ │ ├── defaultwall.glsl
│ │ ├── defaultwarp.glsl
│ │ ├── depthonly.glsl
│ │ ├── drawflat_wall.glsl
│ │ ├── fixedemu.glsl
│ │ ├── fixedemu_flat.glsl
│ │ ├── fxaa.glsl
│ │ ├── menutint.glsl
│ │ ├── postproc_fisheye.glsl
│ │ ├── postproc_panorama.glsl
│ │ ├── postproc_stereographic.glsl
│ │ ├── rtlight.glsl
│ │ ├── sys/
│ │ │ ├── defs.h
│ │ │ ├── fog.h
│ │ │ ├── offsetmapping.h
│ │ │ └── skeletal.h
│ │ └── underwaterwarp.glsl
│ ├── sw/
│ │ ├── sw.h
│ │ ├── sw_backend.c
│ │ ├── sw_image.c
│ │ ├── sw_rast.c
│ │ ├── sw_spans.h
│ │ ├── sw_viddos.c
│ │ └── sw_vidwin.c
│ ├── vk/
│ │ ├── vk_backend.c
│ │ ├── vk_init.c
│ │ └── vkrenderer.h
│ ├── web/
│ │ ├── fs_web.c
│ │ ├── fte_pwa.json
│ │ ├── fte_pwa_sw.js
│ │ ├── ftejslib.h
│ │ ├── ftejslib.js
│ │ ├── fteshell.html
│ │ ├── gl_vidweb.c
│ │ ├── prejs.js
│ │ └── sys_web.c
│ └── xdk/
│ ├── FTEQW_XDK.sln
│ ├── FTEQW_XDK.suo
│ └── FTEQW_XDK.vcproj
├── fte.m4
├── ftechrootbuild.sh
├── fteqtv/
│ ├── LICENSE
│ ├── Makefile
│ ├── bsd_string.h
│ ├── bsp.c
│ ├── cmd.h
│ ├── control.c
│ ├── crc.c
│ ├── forward.c
│ ├── httpsv.c
│ ├── libqtvc/
│ │ ├── Makefile
│ │ ├── glibc_sucks.c
│ │ └── msvc_sucks.c
│ ├── mdfour.c
│ ├── menu.c
│ ├── msg.c
│ ├── net_qtv.h
│ ├── netchan.c
│ ├── nq_api.c
│ ├── parse.c
│ ├── pmove.c
│ ├── protocol.h
│ ├── qtv.h
│ ├── qw.c
│ ├── rcon.c
│ ├── relay.c
│ ├── sc_dsound.c
│ ├── source.c
│ └── sp_dsound.c
├── fteqw_readme.txt
├── ftetools_readme.txt
├── games/
│ ├── fortressone.fmf
│ ├── freehl.fmf
│ ├── hexen2-demo.fmf
│ ├── ktx.fmf
│ ├── quake-demo.fmf
│ └── xonotic_85.fmf
├── imgtool.c
├── iqm/
│ ├── LICENSE
│ ├── Makefile
│ ├── Makefile.mingw
│ ├── README.txt
│ ├── iqm.cpp
│ ├── iqm.h
│ └── util.h
├── plugins/
│ ├── Makefile
│ ├── avplug/
│ │ ├── avaudio.c
│ │ ├── avdecode.c
│ │ ├── avencode.c
│ │ ├── msvc_libc/
│ │ │ ├── inttypes.h
│ │ │ └── stdint.h
│ │ └── readme.txt
│ ├── berkelium/
│ │ ├── Makefile
│ │ ├── plugapi.cpp
│ │ └── readme.txt
│ ├── botlib/
│ │ └── makebotlibdll.bat
│ ├── bullet/
│ │ └── bulletplug.cpp
│ ├── cef/
│ │ └── cef.c
│ ├── cod/
│ │ ├── codbsp.c
│ │ ├── codiwi.c
│ │ ├── codmat.c
│ │ └── codmod.c
│ ├── emailnot/
│ │ ├── emailnot.q3asm
│ │ ├── imapnoti.c
│ │ ├── md5.c
│ │ └── pop3noti.c
│ ├── engine.h
│ ├── ezhud/
│ │ ├── builtin_huds.h
│ │ ├── ezquakeisms.c
│ │ ├── ezquakeisms.h
│ │ ├── hud.c
│ │ ├── hud.h
│ │ ├── hud_common.c
│ │ ├── hud_common.h
│ │ ├── hud_editor.c
│ │ └── hud_editor.h
│ ├── ezscript/
│ │ ├── ezscript.c
│ │ └── ezscript.q3asm
│ ├── hl2/
│ │ ├── Makefile
│ │ ├── fs_gma.c
│ │ ├── fs_vpk.c
│ │ ├── fs_vpk_vtmb.c
│ │ ├── glsl/
│ │ │ └── vmt/
│ │ │ ├── lightmapped.glsl
│ │ │ ├── refract.glsl
│ │ │ ├── rt.glsl
│ │ │ ├── transition.glsl
│ │ │ ├── unlit.glsl
│ │ │ ├── vertexlit.glsl
│ │ │ └── water.glsl
│ │ ├── hl2.c
│ │ ├── img_tth.c
│ │ ├── img_vtf.c
│ │ ├── mat_vmt.c
│ │ ├── mat_vmt_progs.h
│ │ ├── mod_hl2.c
│ │ └── mod_vbsp.c
│ ├── hud/
│ │ ├── qwui.q3asm
│ │ └── ui_sbar.c
│ ├── irc/
│ │ ├── ircclient.c
│ │ ├── ircclient.q3asm
│ │ └── raw codes.txt
│ ├── jabber/
│ │ ├── jabbercl.q3asm
│ │ ├── jabberclient.c
│ │ ├── jingle.c
│ │ ├── sift.c
│ │ ├── xml.c
│ │ ├── xml.h
│ │ └── xmpp.h
│ ├── models/
│ │ ├── draco.cpp
│ │ ├── exportiqm.c
│ │ ├── gltf.c
│ │ └── models.c
│ ├── mpq/
│ │ ├── blast.c
│ │ ├── blast.h
│ │ └── fs_mpq.c
│ ├── namemaker/
│ │ ├── namemaker.c
│ │ └── namemaker.q3asm
│ ├── net_ssl_openssl.c
│ ├── openxr.c
│ ├── plugin.c
│ ├── plugin.def
│ ├── plugin.h
│ ├── qi/
│ │ └── qi.c
│ ├── quake3/
│ │ ├── botlib/
│ │ │ ├── aasfile.h
│ │ │ ├── be_aas.h
│ │ │ ├── be_aas_bsp.h
│ │ │ ├── be_aas_bspq3.c
│ │ │ ├── be_aas_cluster.c
│ │ │ ├── be_aas_cluster.h
│ │ │ ├── be_aas_debug.c
│ │ │ ├── be_aas_debug.h
│ │ │ ├── be_aas_def.h
│ │ │ ├── be_aas_entity.c
│ │ │ ├── be_aas_entity.h
│ │ │ ├── be_aas_file.c
│ │ │ ├── be_aas_file.h
│ │ │ ├── be_aas_funcs.h
│ │ │ ├── be_aas_main.c
│ │ │ ├── be_aas_main.h
│ │ │ ├── be_aas_move.c
│ │ │ ├── be_aas_move.h
│ │ │ ├── be_aas_optimize.c
│ │ │ ├── be_aas_optimize.h
│ │ │ ├── be_aas_reach.c
│ │ │ ├── be_aas_reach.h
│ │ │ ├── be_aas_route.c
│ │ │ ├── be_aas_route.h
│ │ │ ├── be_aas_routealt.c
│ │ │ ├── be_aas_routealt.h
│ │ │ ├── be_aas_sample.c
│ │ │ ├── be_aas_sample.h
│ │ │ ├── be_ai_char.c
│ │ │ ├── be_ai_char.h
│ │ │ ├── be_ai_chat.c
│ │ │ ├── be_ai_chat.h
│ │ │ ├── be_ai_gen.c
│ │ │ ├── be_ai_gen.h
│ │ │ ├── be_ai_goal.c
│ │ │ ├── be_ai_goal.h
│ │ │ ├── be_ai_move.c
│ │ │ ├── be_ai_move.h
│ │ │ ├── be_ai_weap.c
│ │ │ ├── be_ai_weap.h
│ │ │ ├── be_ai_weight.c
│ │ │ ├── be_ai_weight.h
│ │ │ ├── be_ea.c
│ │ │ ├── be_ea.h
│ │ │ ├── be_interface.c
│ │ │ ├── be_interface.h
│ │ │ ├── botlib.h
│ │ │ ├── l_crc.c
│ │ │ ├── l_crc.h
│ │ │ ├── l_libvar.c
│ │ │ ├── l_libvar.h
│ │ │ ├── l_log.c
│ │ │ ├── l_log.h
│ │ │ ├── l_memory.c
│ │ │ ├── l_memory.h
│ │ │ ├── l_precomp.c
│ │ │ ├── l_precomp.h
│ │ │ ├── l_script.c
│ │ │ ├── l_script.h
│ │ │ ├── l_struct.c
│ │ │ ├── l_struct.h
│ │ │ ├── l_utils.h
│ │ │ ├── q_platform.h
│ │ │ ├── q_shared.h
│ │ │ ├── standalone.c
│ │ │ └── surfaceflags.h
│ │ ├── clq3_cg.c
│ │ ├── clq3_parse.c
│ │ ├── clq3_ui.c
│ │ ├── clq3defs.h
│ │ ├── q3common.c
│ │ ├── q3common.h
│ │ ├── q3g_public.h
│ │ └── svq3_game.c
│ ├── serverb/
│ │ ├── cl_master.h
│ │ ├── m_master.c
│ │ └── net_master.c
│ ├── spaceinv/
│ │ ├── spaceinv.c
│ │ └── spaceinv.q3asm
│ ├── terrorgen/
│ │ └── terragen.c
│ ├── winamp/
│ │ ├── winamp.c
│ │ └── winamp.h
│ └── xsv/
│ ├── Xmd.h
│ ├── Xproto.h
│ ├── Xprotostr.h
│ ├── bigreqstr.h
│ ├── keysymdef.h
│ ├── m_x.c
│ ├── qux.h
│ ├── x.h
│ ├── x_reqs.c
│ └── x_res.c
├── q3asm2/
│ ├── Makefile
│ ├── opstrings.h
│ └── q3asm2.c
├── quakec/
│ ├── autoext/
│ │ ├── lists/
│ │ │ └── extlist.txt
│ │ └── src/
│ │ ├── autoext.qc
│ │ ├── builtins.qc
│ │ ├── defs.qc
│ │ └── progs.src
│ ├── basemod/
│ │ ├── ai.qc
│ │ ├── basemod.txt
│ │ ├── boss.qc
│ │ ├── buttons.qc
│ │ ├── client.qc
│ │ ├── combat.qc
│ │ ├── defs.qc
│ │ ├── demon.qc
│ │ ├── dog.qc
│ │ ├── doors.qc
│ │ ├── effects.qc
│ │ ├── enforcer.qc
│ │ ├── engine.qc
│ │ ├── fight.qc
│ │ ├── fish.qc
│ │ ├── hknight.qc
│ │ ├── items.qc
│ │ ├── knight.qc
│ │ ├── misc.qc
│ │ ├── monsters.qc
│ │ ├── nomonst.qc
│ │ ├── obituary.qc
│ │ ├── ogre.qc
│ │ ├── oldone.qc
│ │ ├── plats.qc
│ │ ├── player.qc
│ │ ├── progs.src
│ │ ├── proj.qc
│ │ ├── replace.qc
│ │ ├── shalrath.qc
│ │ ├── shambler.qc
│ │ ├── soldier.qc
│ │ ├── spectate.qc
│ │ ├── sprites.qc
│ │ ├── subs.qc
│ │ ├── tarbaby.qc
│ │ ├── triggers.qc
│ │ ├── weapons.qc
│ │ ├── wizard.qc
│ │ ├── world.qc
│ │ └── zombie.qc
│ ├── csaddon/
│ │ └── src/
│ │ ├── brush_draw.qc
│ │ ├── brush_history.qc
│ │ ├── brush_manip.qc
│ │ ├── brush_selection.qc
│ │ ├── brush_vertedit.qc
│ │ ├── cam.qc
│ │ ├── csaddon.qc
│ │ ├── csaddon.src
│ │ ├── csfixups.qc
│ │ ├── csplat.qc
│ │ ├── editor_brushes.qc
│ │ ├── editor_ents.qc
│ │ ├── editor_lights.qc
│ │ ├── editor_particles.qc
│ │ ├── editor_terrain.qc
│ │ ├── menu.qc
│ │ └── textfield.qc
│ ├── csqctest/
│ │ └── src/
│ │ ├── common/
│ │ │ ├── classes.qc
│ │ │ ├── econstants.qc
│ │ │ ├── makeallstatic.qc
│ │ │ ├── mconstants.qc
│ │ │ └── pmove.qc
│ │ ├── cs/
│ │ │ ├── constants.qc
│ │ │ ├── defs.qc
│ │ │ ├── editor_lights.qc
│ │ │ ├── editor_terrain.qc
│ │ │ ├── entrypoints.qc
│ │ │ ├── fun/
│ │ │ │ ├── osgk.qc
│ │ │ │ ├── skinchooser.qc
│ │ │ │ └── tetris.qc
│ │ │ ├── hlpm.qc
│ │ │ ├── hud.qc
│ │ │ ├── map.qc
│ │ │ ├── menu.qc
│ │ │ ├── movetypes.qc
│ │ │ ├── player.qc
│ │ │ ├── playerframes.inc
│ │ │ ├── prediction.qc
│ │ │ ├── q3playerm.qc
│ │ │ ├── q4player.qc
│ │ │ ├── tempent.qc
│ │ │ ├── test.qc
│ │ │ └── weapons.qc
│ │ ├── csprogs.src
│ │ ├── optsall.qc
│ │ ├── optsmenu.qc
│ │ ├── progs.src
│ │ ├── ss/
│ │ │ ├── ai.qc
│ │ │ ├── boss.qc
│ │ │ ├── buttons.qc
│ │ │ ├── client.qc
│ │ │ ├── combat.qc
│ │ │ ├── defs.qc
│ │ │ ├── demon.qc
│ │ │ ├── dog.qc
│ │ │ ├── doors.qc
│ │ │ ├── enforcer.qc
│ │ │ ├── fight.qc
│ │ │ ├── fish.qc
│ │ │ ├── flag.qc
│ │ │ ├── hknight.qc
│ │ │ ├── items.qc
│ │ │ ├── knight.qc
│ │ │ ├── misc.qc
│ │ │ ├── monsters.qc
│ │ │ ├── ogre.qc
│ │ │ ├── oldone.qc
│ │ │ ├── plats.qc
│ │ │ ├── player.qc
│ │ │ ├── shalrath.qc
│ │ │ ├── shambler.qc
│ │ │ ├── soldier.qc
│ │ │ ├── subs.qc
│ │ │ ├── tarbaby.qc
│ │ │ ├── triggers.qc
│ │ │ ├── weapons.qc
│ │ │ ├── wizard.qc
│ │ │ ├── world.qc
│ │ │ └── zombie.qc
│ │ └── ssqc.src
│ ├── dpsymbols.src
│ ├── fallout2/
│ │ ├── ai.qc
│ │ ├── boss.qc
│ │ ├── buttons.qc
│ │ ├── client.qc
│ │ ├── cmds.qc
│ │ ├── combat.qc
│ │ ├── csprogs.src
│ │ ├── csqc/
│ │ │ ├── builtins.qc
│ │ │ ├── constants.qc
│ │ │ ├── invent.qc
│ │ │ ├── main.qc
│ │ │ ├── stdbuiltins.qc
│ │ │ ├── stdconstants.qc
│ │ │ └── system.qc
│ │ ├── defs.qc
│ │ ├── demon.qc
│ │ ├── dog.qc
│ │ ├── doors.qc
│ │ ├── enforcer.qc
│ │ ├── fight.qc
│ │ ├── fish.qc
│ │ ├── hknight.qc
│ │ ├── hos.qc
│ │ ├── inventory.qc
│ │ ├── items.qc
│ │ ├── knight.qc
│ │ ├── menus.qc
│ │ ├── misc.qc
│ │ ├── mod_buy.qc
│ │ ├── mod_menus.qc
│ │ ├── mod_other.qc
│ │ ├── modbuy.qc
│ │ ├── models.qc
│ │ ├── monsters.qc
│ │ ├── name.qc
│ │ ├── ogre.qc
│ │ ├── plats.qc
│ │ ├── player.qc
│ │ ├── progs.src
│ │ ├── server.qc
│ │ ├── shalrath.qc
│ │ ├── shambler.qc
│ │ ├── soldier.qc
│ │ ├── spectate.qc
│ │ ├── sprites.qc
│ │ ├── subs.qc
│ │ ├── tf.qc
│ │ ├── triggers.qc
│ │ ├── turrets.qc
│ │ ├── weapons.qc
│ │ ├── wizard.qc
│ │ ├── world.qc
│ │ └── zombie.qc
│ └── menusys/
│ ├── README.TXT
│ ├── cs/
│ │ └── entrypoints.qc
│ ├── csprogs.src
│ ├── fteextensions.qc
│ ├── menu/
│ │ ├── cvars.qc
│ │ ├── loadsave.qc
│ │ ├── main.qc
│ │ ├── mods.qc
│ │ ├── newgame.qc
│ │ ├── options.qc
│ │ ├── options_audio.qc
│ │ ├── options_basic.qc
│ │ ├── options_configs.qc
│ │ ├── options_effects.qc
│ │ ├── options_hud.qc
│ │ ├── options_keys.qc
│ │ ├── options_particles.qc
│ │ ├── options_video.qc
│ │ ├── presets.qc
│ │ ├── quit.qc
│ │ ├── servers.qc
│ │ └── updates.qc
│ ├── menu.src
│ └── menusys/
│ ├── mitem_bind.qc
│ ├── mitem_checkbox.qc
│ ├── mitem_colours.qc
│ ├── mitem_combo.qc
│ ├── mitem_console.qc
│ ├── mitem_desktop.qc
│ ├── mitem_edittext.qc
│ ├── mitem_exmenu.qc
│ ├── mitem_frame.qc
│ ├── mitem_grid.qc
│ ├── mitem_menu.qc
│ ├── mitem_slider.qc
│ ├── mitem_spinnymodel.qc
│ ├── mitem_tabs.qc
│ ├── mitems.qc
│ ├── mitems_common.qc
│ └── readme.txt
└── specs/
├── antilag.txt
├── browser.txt
├── browserexample.html
├── bspx.txt
├── changelevels.md
├── chunkeddownloads.txt
├── compile farm scripts/
│ ├── linux/
│ │ ├── .bitchxrc
│ │ ├── build.sh
│ │ ├── build_ccache.sh
│ │ ├── build_fteqcc.sh
│ │ ├── build_fteqtv.sh
│ │ ├── build_wip.sh
│ │ ├── build_wip_ccache.sh
│ │ ├── build_wip_fteqcc.sh
│ │ ├── build_wip_fteqtv.sh
│ │ ├── buildnumber.sh
│ │ ├── ccache-alias.sh
│ │ ├── count.sh
│ │ ├── count_wip.sh
│ │ ├── svninfo.sh
│ │ └── svninfo_wip.sh
│ └── macosx/
│ └── build.sh
├── console.txt
├── csqc_for_idiots.txt
├── distort.pk3
├── distort.txt
├── example.shader
├── ext_csqc_1.txt
├── fonts.txt
├── fte_manifests.txt
├── glsl.md
├── hosting.txt
├── mapcluster.txt
├── modmaking.txt
├── multiprogs.txt
├── particles.txt
├── qc_extensions.txt
├── replacementdeltas.txt
├── rotating-brushes.md
├── rtlights.txt
├── scriptable menus.txt
├── skeletal.txt
├── spawning-entities-from-external-bsps.md
├── splitscreen.txt
├── videocapture.txt
└── viewmodels.md
Copy disabled (too large)
Download .json
Condensed preview — 981 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (31,542K chars).
[
{
"path": ".forgejo/workflows/bin-linux64-release.yaml",
"chars": 1564,
"preview": "name: bin-linux64-release\n\non:\n push:\n branches: [ master ]\n\njobs:\n build:\n runs-on: docker\n\n steps:\n - na"
},
{
"path": ".github/workflows/main.yml",
"chars": 7655,
"preview": "name: main\n\non: [ push, pull_request, workflow_dispatch ]\n\njobs:\n cmake:\n strategy:\n matrix:\n os: [ ubun"
},
{
"path": ".gitignore",
"chars": 915,
"preview": "#misc build artifacts\nbuild\n*.o\n*.o.d\nengine/debug/\nengine/release/\nengine/libs-*/\nengine/bullet3-*/\nengine/*.tar.gz\neng"
},
{
"path": "CMakeLists.txt",
"chars": 67929,
"preview": "#Note: this file was made primarily to support msvc and its project file incompatibilities nightmare.\r\n#Its also useful "
},
{
"path": "LICENSE",
"chars": 17523,
"preview": "GNU GENERAL PUBLIC LICENSE\n\nVersion 2, June 1991\n\nCopyright (C) 1989, 1991 Free Software Foundation, Inc.\n<https://fsf.o"
},
{
"path": "README.md",
"chars": 3598,
"preview": "# [FTEQW](https://fteqw.org)\n\n\n\nPowerful engine for playing and modding idTec"
},
{
"path": "build_qc.sh",
"chars": 4493,
"preview": "#!/bin/bash\n#FTEQCC and FTEQW must be defined.\n#QSS should be defined...\n\nBUILDFOLDER=~/htdocs\nBUILDLOGFOLDER=$BUILDFOLD"
},
{
"path": "build_setup.sh",
"chars": 18421,
"preview": "#!/bin/bash\n#sets up dependancies for debian-jessie (8.7)\n#this script must be run twice. first time as root, which inst"
},
{
"path": "build_wip.sh",
"chars": 12976,
"preview": "#!/bin/bash\nSTART=$(date +%s)\n\nSVNROOT=$(cd \"$(dirname \"$(readlink \"$BASH_SOURCE\")\")\" && pwd)\nFTECONFIG=$SVNROOT/build.c"
},
{
"path": "dist/linux/com.riverbankcomputing.qscintilla.install.patch",
"chars": 998,
"preview": "diff -ur QScintilla_src-2.13.4.orig/src/qscintilla.pro QScintilla_src-2.13.4/src/qscintilla.pro\n--- QScintilla_src-2.13."
},
{
"path": "dist/linux/linter-exceptions.json",
"chars": 345,
"preview": "{\n \"org.fteqw.fteqw\": {\n \"appstream-external-screenshot-url\": \"Screenshots do not need mirroring to Flathub\",\n"
},
{
"path": "dist/linux/org.fteqw.fteqw.desktop",
"chars": 825,
"preview": "[Desktop Entry]\nVersion=1.0\nType=Application\nName=FTEQW Game Engine\nComment=Cross-platform port for the Quake game engin"
},
{
"path": "dist/linux/org.fteqw.fteqw.fixdownloads.patch",
"chars": 1204,
"preview": "diff --git a/engine/client/m_download.c b/engine/client/m_download.c\nindex 2d618c1b1..74a4a51b4 100644\n--- a/engine/clie"
},
{
"path": "dist/linux/org.fteqw.fteqw.fixhomedir.patch",
"chars": 1895,
"preview": "diff --git a/engine/common/fs.c b/engine/common/fs.c\nindex 68b59d1b9..412d01bb7 100644\n--- a/engine/common/fs.c\n+++ b/en"
},
{
"path": "dist/linux/org.fteqw.fteqw.metainfo.xml",
"chars": 4920,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<component type=\"desktop-application\">\n <id>org.fteqw.fteqw</id>\n <name>FTEQW</"
},
{
"path": "dist/linux/org.fteqw.fteqw.sh",
"chars": 666,
"preview": "#!/bin/bash\nfunction check_game_data () {\n if [[ \"$1\" == \"\" ]]; then\n zenity --error --ok-label \"Quit\" --width=400 -"
},
{
"path": "dist/linux/org.fteqw.fteqw.yml",
"chars": 5863,
"preview": "---\n# Flatpak runtime version issues:\n# - 22.08 has a slightly-too-old version of SDL2 that doesn't include SDL_misc.h"
},
{
"path": "documentation/Building.md",
"chars": 9231,
"preview": "> Yay, you found out the secrit location to download the sauce code from!\n>\n> Right, urm, now what?\n> Yeah, good questio"
},
{
"path": "documentation/Credits.md",
"chars": 1226,
"preview": "# Credits\n\n### Developers\n\n- **[Spike](https://github.com/Shpoike)** - Creator of FTEQW & FTEQCC\n- **[eukara](https://gi"
},
{
"path": "documentation/Dependencies.md",
"chars": 2087,
"preview": "# Dependencies\n\nHere is a list of dependencies required for building FTEQW on several platforms.\n\n## Debian / Raspbian\n\n"
},
{
"path": "documentation/QuickStart.md",
"chars": 11203,
"preview": "# FTEQW README\n\nThis file contains the following sections:\n\n- [0. PREFACE](#0-preface)\n- [1. ABOUT](#1-about)\n- [2. FEAT"
},
{
"path": "documentation/Tools.md",
"chars": 13370,
"preview": "# FTE Tools README\n\n# Preface\n\nThis file covers the tools include with the FTEQW source code.\n\nFTEQW features a set of t"
},
{
"path": "dounifdef.sh",
"chars": 2007,
"preview": "#!/bin/sh\n#this script is DANGEROUS\n#be sure to have committed *BEFORE* running this script.\n\n#Note: This script does no"
},
{
"path": "engine/BSDmakefile",
"chars": 304,
"preview": "#just a stub to make things easier.\n#you still need gmake and gcc.\n\nall:\n\tgmake all\n\nhelp:\n\tgmake help\n\nclean:\n\tgmake cl"
},
{
"path": "engine/LICENSE",
"chars": 14882,
"preview": "GNU GENERAL PUBLIC LICENSE\nVersion 2, June 1991 \n\nCopyright (C) 1989, 1991 Free Software Foundation, Inc. \n59 Temple Pl"
},
{
"path": "engine/Makefile",
"chars": 103946,
"preview": "#FTEQW Makefile\n\n#make m-rel plugins-rel sv-rel [FTE_TARGET=$ARCH]\n\n#only limited forms of cross-making is supported\n#on"
},
{
"path": "engine/README.MSVC",
"chars": 2176,
"preview": "This code compiles against libjpeg, libpng, zlib, dx7, libogg and libvorbis.\nYou can find the main MSVC 6 workspace in t"
},
{
"path": "engine/client/anorms.h",
"chars": 6295,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/api_menu.h",
"chars": 8968,
"preview": " /*\r\n * Copyright (c) 2015-2018\r\n * Marco Cawthorne All rights reserved.\r\n * \r\n * This is free software: you can redist"
},
{
"path": "engine/client/bymorphed.h",
"chars": 14272,
"preview": "/* GIMP RGBA C-Source image dump (bymorphed.c) */\n\nstatic const struct {\n unsigned int \t width;\n unsigned int \t height"
},
{
"path": "engine/client/cd_linux.c",
"chars": 7911,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/cd_null.c",
"chars": 619,
"preview": "#include \"quakedef.h\"\n\n#ifdef HAVE_CDPLAYER\n\n#ifdef _WIN32\n//not really needed, but nice none-the-less.\n#include \"winqua"
},
{
"path": "engine/client/cd_sdl.c",
"chars": 1894,
"preview": "#include \"quakedef.h\"\n\n#ifdef FTE_SDL3\n#include <SDL3/SDL.h>\n#else\n#include <SDL.h>\n#endif\n\n#ifndef HAVE_CDPLAYER\n\t//not"
},
{
"path": "engine/client/cd_win.c",
"chars": 9791,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/cdaudio.h",
"chars": 1342,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/cl_cam.c",
"chars": 34184,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/cl_demo.c",
"chars": 81046,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/cl_ents.c",
"chars": 177156,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/cl_ignore.c",
"chars": 15399,
"preview": "/*\n\nCopyright (C) 2001-2002 A Nourai\n\nThis program is free software; you can redistribute it and/or\nmodify it unde"
},
{
"path": "engine/client/cl_ignore.h",
"chars": 1282,
"preview": "/*\n\nCopyright (C) 2001-2002 A Nourai\n\nThis program is free software; you can redistribute it and/or\nmodify it unde"
},
{
"path": "engine/client/cl_input.c",
"chars": 100475,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/cl_main.c",
"chars": 239970,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/cl_master.h",
"chars": 6315,
"preview": "#ifndef CL_MASTER_H\n#define CL_MASTER_H\n\nenum masterprotocol_e\n{\n\tMP_UNSPECIFIED,\n\tMP_QUAKEWORLD,\n#if defined(Q2CLIENT) "
},
{
"path": "engine/client/cl_parse.c",
"chars": 273278,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/cl_plugin.inc",
"chars": 33042,
"preview": "//included directly from plugin.c\n//this is the client-only things.\n\nstatic plugin_t *protocolclientplugin;\n\n\nstatic voi"
},
{
"path": "engine/client/cl_pred.c",
"chars": 45635,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/cl_screen.c",
"chars": 92818,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/cl_tent.c",
"chars": 88390,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/clhl_game.c",
"chars": 38770,
"preview": "#include \"quakedef.h\"\r\n#include \"shader.h\"\r\n\r\n#ifdef _WIN32\r\n#include \"winquake.h\"\r\n#endif\r\n\r\n#ifdef HLCLIENT\r\nextern un"
},
{
"path": "engine/client/client.h",
"chars": 60740,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/clq2_cin.c",
"chars": 9642,
"preview": "#include \"quakedef.h\"\n#if defined(HAVE_MEDIA_DECODER) && defined(Q2CLIENT)\n\ntypedef struct\n{\n\tqbyte\t*data;\n\tsize_t\tcount"
},
{
"path": "engine/client/clq2_ents.c",
"chars": 89410,
"preview": "#include \"quakedef.h\"\n#include \"particles.h\"\n\n#ifdef Q2CLIENT\n#include \"shader.h\"\n\n//q2pro's framerate scaling runs the "
},
{
"path": "engine/client/console.c",
"chars": 98339,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/fragstats.c",
"chars": 22751,
"preview": "\n#include \"quakedef.h\"\n\n#ifdef QUAKEHUD\n#define MAX_WEAPONS 64 //fixme: make dynamic.\n\ntypedef enum {\n\t//one componant\n\t"
},
{
"path": "engine/client/fte_eukara64.h",
"chars": 49248,
"preview": "/* GIMP RGBA C-Source image dump (fte_eukara64.c) */\n\nstatic const struct {\n unsigned int \t width;\n unsigned int \t h"
},
{
"path": "engine/client/image.c",
"chars": 489301,
"preview": "#include \"quakedef.h\"\n#include \"shader.h\"\n#include \"glquake.h\"\t//we need some of the gl format enums\n\n#ifdef __GNUC__\n#p"
},
{
"path": "engine/client/image_astc.h",
"chars": 52174,
"preview": "//Note: this code does not claim to be bit-correct.\n//It doesn't support volume textures.\n//It doesn't validate block ex"
},
{
"path": "engine/client/in_generic.c",
"chars": 37777,
"preview": "//Generic input code.\r\n//mostly mouse support, but can also handle a few keyboard events.\r\n\r\n//Issues:\r\n\r\n//VirtualBox m"
},
{
"path": "engine/client/in_morphos.c",
"chars": 7439,
"preview": "/*\nCopyright (C) 2006-2007 Mark Olsen\n\nThis program is free software; you can redistribute it and/or\nmodify it under the"
},
{
"path": "engine/client/in_morphos.h",
"chars": 811,
"preview": "/*\nCopyright (C) 2006-2007 Mark Olsen\n\nThis program is free software; you can redistribute it and/or\nmodify it under the"
},
{
"path": "engine/client/in_raw.h",
"chars": 3905,
"preview": "// Raw input includes\n\n#ifndef WINUSERAPI\n#define WINUSERAPI\n#endif\n\n#ifndef RIM_TYPEMOUSE\n#define WM_INPUT 255\n\n#undef "
},
{
"path": "engine/client/in_sdl.c",
"chars": 65266,
"preview": "#include \"quakedef.h\"\n\n#ifdef FTE_SDL3\n#include <SDL3/SDL.h>\n\n#ifdef VKQUAKE\n#include \"../vk/vkrenderer.h\"\n#endif\n#else\n"
},
{
"path": "engine/client/in_win.c",
"chars": 70421,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/input.h",
"chars": 4404,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/keys.c",
"chars": 87614,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/keys.h",
"chars": 8274,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/lhfont.h",
"chars": 56868,
"preview": "0x00,0x00,0x0B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x08,0x08,0x99,0x00,0x83,0xFF,0xFF,0x00,"
},
{
"path": "engine/client/m_download.c",
"chars": 202497,
"preview": "//copyright 'Spike', license gplv2+\n//provides both a package manager and downloads menu.\n//FIXME: block downloads of ex"
},
{
"path": "engine/client/m_items.c",
"chars": 79160,
"preview": "//read menu.h\n\n#include \"quakedef.h\"\n#include \"shader.h\"\n#include \"fs.h\"\n\n//draws the size specified, plus a little extr"
},
{
"path": "engine/client/m_master.c",
"chars": 44268,
"preview": "#include \"quakedef.h\"\n\n#if defined(CL_MASTER) && !defined(NOBUILTINMENUS)\n#include \"cl_master.h\"\n#include \"shader.h\"\n\n//"
},
{
"path": "engine/client/m_mp3.c",
"chars": 143175,
"preview": "//mp3 menu and track selector.\n//was origonally an mp3 track selector, now handles lots of media specific stuff - like q"
},
{
"path": "engine/client/m_multi.c",
"chars": 41226,
"preview": "//read menu.h\n\n#include \"quakedef.h\"\n#include \"winquake.h\"\n#include \"shader.h\"\n\n#ifndef NOBUILTINMENUS\n\nextern cvar_t ma"
},
{
"path": "engine/client/m_native.c",
"chars": 13850,
"preview": "#include \"quakedef.h\"\r\n#ifdef MENU_NATIVECODE\r\nstatic dllhandle_t *libmenu;\r\nmenu_export_t *mn_entry;\r\n\r\nextern unsigned"
},
{
"path": "engine/client/m_options.c",
"chars": 137961,
"preview": "//read menu.h\n\n#include \"quakedef.h\"\n#include \"winquake.h\"\n#include \"fs.h\"\n\n\nstatic const char *res4x3[] =\n{\n\t\"640x480\","
},
{
"path": "engine/client/m_script.c",
"chars": 10410,
"preview": "//read menu.h\n\n#include \"quakedef.h\"\n#include \"shader.h\"\n\n#ifndef NOBUILTINMENUS\n\nint selectitem;\nemenu_t *menu_script;\n"
},
{
"path": "engine/client/m_single.c",
"chars": 35894,
"preview": "//read menu.h\n\n#include \"quakedef.h\"\n#include \"winquake.h\"\n#include \"shader.h\"\n#ifndef NOBUILTINMENUS\n#if !defined(CLIEN"
},
{
"path": "engine/client/menu.c",
"chars": 40706,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/menu.h",
"chars": 21865,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/merged.h",
"chars": 20828,
"preview": "#ifndef MERGED_H\n#define MERGED_H\n\n#ifdef VKQUAKE\n//we need some types available elsewhere, but don't really want to hav"
},
{
"path": "engine/client/modelgen.h",
"chars": 3536,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/net_master.c",
"chars": 118878,
"preview": "/*\nserverside master heartbeat code\nclientside master queries and server ping/polls\n*/\n\n#include \"quakedef.h\"\n#include \""
},
{
"path": "engine/client/p_classic.c",
"chars": 28133,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/p_null.c",
"chars": 2495,
"preview": "#include \"quakedef.h\"\r\n#include \"glquake.h\"\r\n\r\n#include \"particles.h\"\r\n#include \"renderque.h\"\r\n\r\n//returns a valid effec"
},
{
"path": "engine/client/p_script.c",
"chars": 220713,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/pr_clcmd.c",
"chars": 46601,
"preview": "//file for builtin implementations relevent to only clientside VMs (menu+csqc).\n#include \"quakedef.h\"\n\n#include \"pr_comm"
},
{
"path": "engine/client/pr_csqc.c",
"chars": 307493,
"preview": "/*\nCopyright (C) 2011 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it under t"
},
{
"path": "engine/client/pr_menu.c",
"chars": 113687,
"preview": "#include \"quakedef.h\"\n\n#include \"pr_common.h\"\n#include \"shader.h\"\n\n#ifdef GLQUAKE\n#include \"glquake.h\"\n#endif\n\n#if defin"
},
{
"path": "engine/client/pr_skelobj.c",
"chars": 89438,
"preview": "/*\r\nCopyright (C) 2011 Id Software, Inc.\r\n\r\nThis program is free software; you can redistribute it and/or\r\nmodify it und"
},
{
"path": "engine/client/q2anorms.h",
"chars": 6295,
"preview": "/*\nCopyright (C) 1997-2001 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/q2m_flash.c",
"chars": 18181,
"preview": "/*\nCopyright (C) 1997-2001 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/quake.manifest",
"chars": 565,
"preview": "<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\" xmlns:asmv3=\"urn:schemas-microsoft-com:asm.v3\">"
},
{
"path": "engine/client/quakedef.h",
"chars": 13964,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/r_2d.c",
"chars": 52132,
"preview": "#include \"quakedef.h\"\n#ifndef SERVERONLY\n#include \"shader.h\"\n#include \"gl_draw.h\"\n\n#define WIN32_BLOATED\n#include \"glqua"
},
{
"path": "engine/client/r_d3.c",
"chars": 42122,
"preview": "#include \"quakedef.h\"\r\n#ifdef MAP_PROC\r\n\r\n#ifdef HAVE_CLIENT\r\n#include \"shader.h\"\r\n#endif\r\n#include \"com_mesh.h\"\r\n\r\n//FI"
},
{
"path": "engine/client/r_part.c",
"chars": 35822,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/r_partset.c",
"chars": 92076,
"preview": "/*\nWARNING: THIS FILE IS GENERATED BY 'generatebuiltin.c'.\nYOU SHOULD NOT EDIT THIS FILE BY HAND\n*/\n\n#include \"bothdefs."
},
{
"path": "engine/client/r_partset.h",
"chars": 1325,
"preview": "/*\nWARNING: THIS FILE IS GENERATED BY 'generatebuiltin.c'.\nYOU SHOULD NOT EDIT THIS FILE BY HAND\n*/\n\n#ifndef QUAKETC\next"
},
{
"path": "engine/client/r_surf.c",
"chars": 117502,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/render.h",
"chars": 33450,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/renderer.c",
"chars": 121473,
"preview": "#include \"quakedef.h\"\n#include \"winquake.h\"\n#include \"pr_common.h\"\n#include \"gl_draw.h\"\n#include \"shader.h\"\n#include \"gl"
},
{
"path": "engine/client/renderque.c",
"chars": 3621,
"preview": "//this is to render transparent things in a distance oriented order\n\n#include \"quakedef.h\"\n#include \"renderque.h\"\n\n#defi"
},
{
"path": "engine/client/renderque.h",
"chars": 419,
"preview": "#ifndef RENDERQUE_H\n#define RENDERQUE_H\n\nvoid RQ_BeginFrame(void);\nvoid RQ_AddDistReorder(void (*render) (int count, voi"
},
{
"path": "engine/client/resource.h",
"chars": 548,
"preview": "//{{NO_DEPENDENCIES}}\n// Microsoft Developer Studio generated include file.\n// Used by winquake.rc\n//\n#define IDC_STATIC"
},
{
"path": "engine/client/roq.h",
"chars": 1289,
"preview": "#ifndef _av_roq_h\n#define _av_roq_h\n\n#define RoQ_INFO\t\t\t\t\t0x1001\n#define RoQ_QUAD_CODEBOOK\t\t0x1002\n#define RoQ_QUAD_VQ\t\t"
},
{
"path": "engine/client/roq_read.c",
"chars": 15439,
"preview": "/* ------------------------------------------------------------------------\n * Id Software's RoQ video file format decod"
},
{
"path": "engine/client/sbar.c",
"chars": 114154,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/sbar.h",
"chars": 2228,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/screen.h",
"chars": 15664,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/skin.c",
"chars": 15670,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/snd_al.c",
"chars": 72050,
"preview": "#include \"quakedef.h\"\r\n\r\n/*\r\nThis is based on Jogi's OpenAL support.\r\nMuch of it is stripped, to try and get it clean/co"
},
{
"path": "engine/client/snd_alsa.c",
"chars": 17583,
"preview": "/*\n\tsnd_alsa.c\n\n\tSupport for the ALSA 1.0.1 sound driver\n\n\tCopyright (C) 1999,2000 contributors of the QuakeForge proje"
},
{
"path": "engine/client/snd_directx.c",
"chars": 39633,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/snd_dma.c",
"chars": 122550,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/snd_droid.c",
"chars": 4185,
"preview": "/*\r\nthis file is basically a copy of the SDL one\r\njava code has a function or two which just periodically calls us to as"
},
{
"path": "engine/client/snd_linux.c",
"chars": 15363,
"preview": "#include <unistd.h>\n#include <fcntl.h>\n#include <stdlib.h>\n#include <sys/types.h>\n#include <sys/ioctl.h>\n#include <sys/m"
},
{
"path": "engine/client/snd_macos.c",
"chars": 6799,
"preview": "/*\r\n \r\n Copyright (C) 2001-2002 A Nourai\r\n Copyright (C) 2006 Jacek Piszczek (Mac OSX port)\r\n \r\n This p"
},
{
"path": "engine/client/snd_mem.c",
"chars": 34668,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/snd_mix.c",
"chars": 28377,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/snd_morphos.c",
"chars": 6644,
"preview": "/*\nCopyright (C) 2006-2007 Mark Olsen\n\nThis program is free software; you can redistribute it and/or\nmodify it under the"
},
{
"path": "engine/client/snd_mp3.c",
"chars": 12748,
"preview": "//source file by david walton, derived from minimad.c\n//modified slightly to use new library functions instead for singl"
},
{
"path": "engine/client/snd_opensl.c",
"chars": 5395,
"preview": "#include \"quakedef.h\"\n\n#include <SLES/OpenSLES.h>\n\n#define AUDIODRIVERNAME \"OpenSLES\"\n\nstatic void QDECL OSL_RegisterCva"
},
{
"path": "engine/client/snd_ov.c",
"chars": 15162,
"preview": "#include \"quakedef.h\"\n\n#ifdef AVAIL_OGGVORBIS\n#define OV_EXCLUDE_STATIC_CALLBACKS\n\n#ifdef __MORPHOS__\n\t#include <exec/ex"
},
{
"path": "engine/client/snd_pulse.c",
"chars": 5880,
"preview": "#include \"quakedef.h\"\n#ifdef AUDIO_PULSE\n\n#if 0\n#include <pulse/simple.h>\n#else\ntypedef struct pa_simple pa_simple;\ntype"
},
{
"path": "engine/client/snd_sblaster.c",
"chars": 13644,
"preview": "/*\r\nCopyright (C) 1996-1997 Id Software, Inc.\r\n\r\nThis program is free software; you can redistribute it and/or\r\nmodify i"
},
{
"path": "engine/client/snd_sdl.c",
"chars": 21869,
"preview": "#include \"quakedef.h\"\n\n#if defined(HAVE_MIXER) || defined(VOICECHAT)\n#include \"winquake.h\"\n\n#ifdef DYNAMIC_SDL\n#define S"
},
{
"path": "engine/client/snd_sndio.c",
"chars": 5939,
"preview": "/*\r\n* Copyright (c) 2010 Jacob Meuser <jakemsr@sdf.lonestar.org>\r\n*\r\n* Permission to use, copy, modify, and distribute t"
},
{
"path": "engine/client/snd_wasapi.c",
"chars": 20528,
"preview": "#include \"quakedef.h\"\n\n#if defined(AVAIL_WASAPI) && !defined(SERVERONLY)\n//wasapi is nice in that you can use it to bypa"
},
{
"path": "engine/client/snd_win.c",
"chars": 8301,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/snd_xaudio.c",
"chars": 8722,
"preview": "#include \"quakedef.h\"\r\n\r\n//frankly, xaudio2 gives nothing over directsound, unless we're getting it to do all the mixing"
},
{
"path": "engine/client/sound.h",
"chars": 17896,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/spritegn.h",
"chars": 3729,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/sys_axfte.cpp",
"chars": 23024,
"preview": "#include \"quakedef.h\"\r\n\r\n#ifdef _WIN32\r\n#include \"sys_plugfte.h\"\r\n\r\n#include <windows.h>\r\n#include <objsafe.h>\t/*IObject"
},
{
"path": "engine/client/sys_dos.c",
"chars": 5629,
"preview": "#include <quakedef.h>\r\n\r\n//because cake.\r\n#include \"sys_linux.c\"\r\n\r\n#include <dos.h>\r\n#include <dpmi.h>\r\n_go32_dpmi_regi"
},
{
"path": "engine/client/sys_droid.c",
"chars": 43050,
"preview": "#include <jni.h>\r\n#include <errno.h>\r\n\r\n#include <android/log.h>\r\n\r\n#include \"quakedef.h\"\r\n#include <unistd.h>\r\n#include"
},
{
"path": "engine/client/sys_linux.c",
"chars": 42716,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/sys_morphos.c",
"chars": 8104,
"preview": "/*\nCopyright (C) 2006-2007 Mark Olsen\n\nThis program is free software; you can redistribute it and/or\nmodify it under the"
},
{
"path": "engine/client/sys_plugfte.c",
"chars": 54818,
"preview": "#include \"quakedef.h\"\r\n#include \"winquake.h\"\r\n#include \"sys_plugfte.h\"\r\n#include \"../http/iweb.h\"\r\n#ifndef _WIN32\r\n#incl"
},
{
"path": "engine/client/sys_plugfte.h",
"chars": 3821,
"preview": "#ifndef __QUAKEDEF_H__\r\ntypedef enum qboolean;\r\ntypedef void *vfsfile_t;\r\n#endif\r\n\r\nstruct pipetype;\r\nstruct browserfunc"
},
{
"path": "engine/client/sys_sdl.c",
"chars": 51095,
"preview": "#include \"quakedef.h\"\n\n#ifdef FTE_SDL3\n\t#include <SDL3/SDL.h>\n#else\n\t#include <SDL.h>\n\t#ifdef MULTITHREAD\n\t\t#include <SD"
},
{
"path": "engine/client/sys_win.c",
"chars": 133946,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/sys_xdk.c",
"chars": 6656,
"preview": "#include \"quakedef.h\"\r\n#include <xtl.h>\r\n\r\n#define MAXPRINTMSG 1024 // Yes\r\nqboolean isDedicated = false;\r\n\r\n/*Timers, s"
},
{
"path": "engine/client/teamplay.c",
"chars": 150,
"preview": "/*\n\treplaced by zqtp.c (read: teamplay.c ported from zquake instead, with later fuhquake+ezquake additions, the ravages "
},
{
"path": "engine/client/textedit.c",
"chars": 35624,
"preview": "//DMW\n\n/*\nF1 will return to progs.src\nF2 will try to open a file with the name of which is on that line. (excluding comm"
},
{
"path": "engine/client/valid.c",
"chars": 58628,
"preview": "#include \"quakedef.h\"\n#include <ctype.h>\n\n//ruleset validation:\n//internal rulesets are taken at their word.\n//\twe canno"
},
{
"path": "engine/client/vid.h",
"chars": 5237,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/vid_headless.c",
"chars": 11317,
"preview": "#include \"quakedef.h\"\n#ifdef HEADLESSQUAKE\n#ifndef SERVERONLY\n#include \"gl_draw.h\"\n#include \"shader.h\"\n\n#ifdef _WIN32\n#i"
},
{
"path": "engine/client/view.c",
"chars": 82664,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/view.h",
"chars": 1961,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/vr.h",
"chars": 2381,
"preview": "#include \"merged.h\"\ntypedef struct vrsetup_s\n{\n\t//engine-set\n\tsize_t structsize;\n\tenum\n\t{\n\t\tVR_HEADLESS,\t//not to be con"
},
{
"path": "engine/client/wad.c",
"chars": 23936,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/wad.h",
"chars": 2802,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/winamp.h",
"chars": 13321,
"preview": "/*\n\n** Winamp frontend/plug-in control API documentation v1.1.\n\n** By Justin Frankel. Updates by Christophe Thibault.\n\n*"
},
{
"path": "engine/client/winquake.h",
"chars": 5152,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/client/winquake.rc",
"chars": 4793,
"preview": "// Microsoft Visual C++ generated resource script.\n//\n#include \"resource.h\"\n\n#define APSTUDIO_READONLY_SYMBOLS\n/////////"
},
{
"path": "engine/client/zqtp.c",
"chars": 100098,
"preview": "/*\n\tteamplay.c\n\n\tTeamplay enhancements\n\n\tCopyright (C) 2000-2001 Anton Gavrilov\n\n\tThis program is free software; y"
},
{
"path": "engine/common/bothdefs.h",
"chars": 34773,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/common/bspfile.h",
"chars": 26710,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/common/cmd.c",
"chars": 109437,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/common/cmd.h",
"chars": 11786,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/common/com_bih.c",
"chars": 53189,
"preview": "#include \"quakedef.h\"\n#ifndef SERVERONLY\n#include \"glquake.h\"\n#endif\n#include \"com_mesh.h\"\n#include \"com_bih.h\"\n\n//BIH t"
},
{
"path": "engine/common/com_bih.h",
"chars": 1951,
"preview": "#if 1\n\t#define BIH_USEBIH\n#else\n\t#define BIH_USEBVH\n#endif\n\ntypedef struct q2mapsurface_s // used internally due to nam"
},
{
"path": "engine/common/com_mesh.c",
"chars": 299993,
"preview": "#include \"quakedef.h\"\n\n#include \"com_bih.h\"\n#include \"com_mesh.h\"\n\n#ifdef __F16C__\n#ifdef _MSC_VER\n\t#include <intrin.h>\n"
},
{
"path": "engine/common/com_mesh.h",
"chars": 10651,
"preview": "#ifndef COM_MESH_H\n#define COM_MESH_H\n\n#include \"quakedef.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include \"hash.h\"\n"
},
{
"path": "engine/common/com_phys_bullet.cpp",
"chars": 144,
"preview": "#include \"quakedef.h\"\r\n\r\n#ifdef USE_INTERNAL_BULLET\r\n#define FTEENGINE\r\n#undef FTEPLUGIN\r\n#include \"../../plugins/bullet"
},
{
"path": "engine/common/com_phys_ode.c",
"chars": 136423,
"preview": "/*\r\nCopyright (C) 1996-1997 Id Software, Inc.\r\n\r\nThis program is free software; you can redistribute it and/or\r\nmodify i"
},
{
"path": "engine/common/common.c",
"chars": 228112,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/common/common.h",
"chars": 50290,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/common/config_freecs.h",
"chars": 8181,
"preview": "// The Wastes' config.h\r\n// We support both GL and D3D9. If Vulkan matures yeahsurewhynot\r\n// I want to get this mostly "
},
{
"path": "engine/common/config_fteqw.h",
"chars": 14481,
"preview": "// Build-Config file for FTE's standard builds, the default settings.\r\n// to use: make FTE_CONFIG=fteqw\r\n\r\n// Features s"
},
{
"path": "engine/common/config_fteqw_noweb.h",
"chars": 416,
"preview": "// Build-Config file for FTE's webless nearly-standard builds.\r\n// these builds have crippled networking options to see "
},
{
"path": "engine/common/config_minimal.h",
"chars": 13577,
"preview": "// Build-Config file for FTE's minimal builds.\r\n// to use: make FTE_CONFIG=minimal\r\n// These builds are a compromise bet"
},
{
"path": "engine/common/config_nocompat.h",
"chars": 13383,
"preview": "// Build-Config file for Quake-derived total-conversion mods that have chosen to break compatibility.\r\n// to use: make F"
},
{
"path": "engine/common/config_wastes.h",
"chars": 7753,
"preview": "/***\r\n*\r\n* Copyright (c) 2000-2022, Vera Visions. All rights reserved.\r\n*\r\n****/\r\n\r\n#ifndef DEMO\r\n\t#define FULLENGINEN"
},
{
"path": "engine/common/console.h",
"chars": 10819,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/common/crc.c",
"chars": 4291,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/common/cvar.c",
"chars": 43605,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/common/cvar.h",
"chars": 10247,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/common/fs.c",
"chars": 263172,
"preview": "#include \"quakedef.h\"\n#include \"netinc.h\"\n\n//#define com_gamedir com__gamedir\n\n#include <ctype.h>\n#include <limits.h>\n\n#"
},
{
"path": "engine/common/fs.h",
"chars": 9118,
"preview": "#include \"hash.h\"\n\n/*\nThreading:\nWhen the main thread will harm the filesystem tree/hash, it will first lock fs_thread_m"
},
{
"path": "engine/common/fs_dzip.c",
"chars": 36514,
"preview": "/*\r\nCopyright notice from dzip (zlib license):\r\n\r\n (C) 2000-2002 Stefan Schwoon, Nolan Pflug\r\n\r\n This software is provi"
},
{
"path": "engine/common/fs_pak.c",
"chars": 15426,
"preview": "#include \"quakedef.h\"\n#include \"fs.h\"\n\n#ifdef PACKAGE_Q1PAK\n\n//\n// in memory\n//\n\ntypedef struct\n{\n\tfsbucket_t bucket;\n\n\t"
},
{
"path": "engine/common/fs_stdio.c",
"chars": 13605,
"preview": "#include \"quakedef.h\"\n#include \"fs.h\"\n#include \"errno.h\"\n#if _POSIX_C_SOURCE >= 200112L\n#include <sys/stat.h>\n#endif\n\n#i"
},
{
"path": "engine/common/fs_win32.c",
"chars": 23291,
"preview": "#include \"quakedef.h\"\n#include \"fs.h\"\n#include \"winquake.h\"\n\n#ifdef FTE_SDL\n#define WinNT true\n#endif\n\n//FIXME: find som"
},
{
"path": "engine/common/fs_xz.c",
"chars": 85892,
"preview": "#include \"quakedef.h\"\r\n#include \"fs.h\"\r\n\r\n#ifdef AVAIL_XZDEC\r\n\r\n#define XZ_EXTERN static\r\n#define XZ_DEC_DYNALLOC\t//data"
},
{
"path": "engine/common/fs_zip.c",
"chars": 69381,
"preview": "#include \"quakedef.h\"\n#include \"fs.h\"\n\n//#define AVAIL_BZLIB\n//#define DYNAMIC_BZLIB\n\n\n\n//supported ZIP features:\n//zip6"
},
{
"path": "engine/common/gl_q2bsp.c",
"chars": 212782,
"preview": "#include \"quakedef.h\"\n#ifndef SERVERONLY\n#include \"glquake.h\"\n#endif\n#include \"com_mesh.h\"\n#include \"com_bih.h\"\n\n#define"
},
{
"path": "engine/common/huff.c",
"chars": 17115,
"preview": "/*\n===========================================================================\nCopyright (C) 1999-2005 Id Software, Inc."
},
{
"path": "engine/common/json.c",
"chars": 16121,
"preview": "#include \"quakedef.h\"\n\n/*struct jsonparsectx_s\n{\n\tchar const *const data;\n\tconst size_t size;\n\tsize_t pos;\n};*/\n\n//node "
},
{
"path": "engine/common/log.c",
"chars": 30628,
"preview": "// log.c: handles console logging functions and cvars\n\n#include \"quakedef.h\"\n\n// cvar callbacks\nstatic void QDECL Log_Di"
},
{
"path": "engine/common/mathlib.c",
"chars": 52990,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/common/mathlib.h",
"chars": 12111,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/common/md4.c",
"chars": 10070,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/common/md5.c",
"chars": 8981,
"preview": "/* md5.c - MD5 Message-Digest Algorithm\n * Copyright (C) 1995,1996,1998,1999,2001,2002,\n * 2003 Free Soft"
},
{
"path": "engine/common/net.h",
"chars": 16636,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/common/net_chan.c",
"chars": 42404,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/common/net_ice.c",
"chars": 185792,
"preview": "/*\nInteractive Connectivity Establishment (rfc 5245)\nfind out your peer's potential ports.\nspam your peer with stun pack"
},
{
"path": "engine/common/net_ssl_gnutls.c",
"chars": 61559,
"preview": "//This file should be easily portable.\n//The biggest strength of this plugin system is that ALL interactions are perform"
},
{
"path": "engine/common/net_ssl_winsspi.c",
"chars": 59242,
"preview": "#include \"quakedef.h\"\r\n#if defined(HAVE_WINSSPI)\r\n\r\n/*regarding HAVE_DTLS\r\nDTLS1.0 is supported from win8 onwards, or pa"
},
{
"path": "engine/common/net_wins.c",
"chars": 346495,
"preview": "/*\nCopyright (C) 1996-1997 Id Software, Inc.\n\nThis program is free software; you can redistribute it and/or\nmodify it un"
},
{
"path": "engine/common/netinc.h",
"chars": 15821,
"preview": "#ifndef NETINC_INCLUDED\n#define NETINC_INCLUDED\n\n\n#ifndef HAVE_PACKET\n\n#ifndef _XBOX\n//\tstruct sockaddr\n//\t{\n//\t\tshort "
}
]
// ... and 781 more files (download for full content)
About this extraction
This page contains the full source code of the fte-team/fteqw GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 981 files (27.0 MB), approximately 7.1M tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.