![](/images/forum/corner-1.png) |
![](/images/forum/corner-2.png) |
|
![](/images/forum/corners-inner-top.png)
Member 216 posts
Registered: Feb 2011
Although ezQuake development seems to have died down, I thought it would be interesting to build a windows client from the latest 3.0 alpha sources (even though most of the changes are to improve the OSX and Linux clients). In older versions, you used to be able to build with Visual Studio, but that is no longer the case. It took me some trial and error to figure out how to install MinGW with all the required libraries, so I wanted to document the steps here in case anyone is looking to start developing (from windows) again. ===== Install MinGW (instructions summarized from http://www.mingw.org/wiki/Getting_Started) ===== 1- Run this package https://sourceforge.net/projects/mingw/files/latest/download 2- When done, press Continue to get to the GUI Package installer 3- Add the following Packages a. mingw32-base b. mingw32-libexpat (dev and dll) c. mingw32-libz (dev and dll) d. msys-base e. msys-expat (bin) f. msys-wget (bin) and click on Installation -> Apply Changes 4- Right-click on your "My Computer" or "This PC" icon and select "Properties". 5- Click on the "Advanced" tab, then on the "Environment Variables" button. 6- Edit your PATH variable and add this to the end: ";C:\MinGW\bin;C:\MinGW\MSYS\1.0\local\bin;C:\MinGW\MSYS\1.0\bin" NOTE: Substitute <C:\MinGW> with the FULL absolute path name of the installation target directory you chose 7- While you're here, also Create a PKG_CONFIG_PATH variable and set it to: "C:\MinGW\mingw32\lib" so that pkg-config (installed later) can find the *.pc files. 8- Go to C:\MinGW\MSYS\1.0\etc and create a file called "fstab" with notepad 9- Edit the file and ensure that it contains one line which reads: C:\MinGW /mingw 10- Ensure that there is at least one blank line at the bottom, below all of the entries that may exist, then save and close the file. Now if you open a new Command Prompt (for the new environment variables to take effect), you can run MinGW and MSYS tools like "make". ===== Install PKG-CONFIG (instructions summarized from http://www.gaia-gis.it/spatialite-3.0.0-BETA/mingw_how_to.html#pkg-config) ===== 1- Download http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.26-1_win32.zip 2- Unzip it and copy the bin/pkg-config.exe file to c:\MinGW\bin 3- Download http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28/glib_2.28.1-1_win32.zip 4- Unzip it and copy the bin/libglib-2.0-0.dll file to c:\MinGW\bin 5- Go to c:\MinGW\bin and copy libintl-8.dll to intl.dll ===== Install packages needed by PKG-CONFIG (based on http://www.multigesture.net/articles/how-to-upgrade-your-mingw-with-commonly-used-libraries/) ===== Ensure that the PKG_CONFIG_PATH environment variable has been created according to the instructions above
1- PCRE a. Download ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.gz b. Run C:\MinGW\msys\1.0\msys.bat c. Go to where you downloaded the file (e.g. "cd /C/Users/Mark/Downloads" ) d. tar -zxvf pcre-8.36.tar.gz e. cd pcre-8.36 f. ./configure --disable-cpp --disable-shared -prefix=/C/mingw g. make h. make install
2- CURL a. Download http://curl.haxx.se/download/curl-7.42.0.tar.gz b. Run C:\MinGW\msys\1.0\msys.bat c. Go to where you downloaded the file (e.g. "cd /C/Users/Mark/Downloads" ) d. tar -zxvf curl-7.42.0.tar.gz e. cd curl-7.42.0 f. ./configure --disable-shared --disable-ldap -prefix=/C/mingw g. make (note: if fails on line 3212 of url.c because trying to access member 'ntlm', see https://github.com/bagder/curl/issues/231 or use newer version of curl when available) h. make install
3- LIBPNG a. Download http://sourceforge.net/projects/libpng/files/libpng12/1.2.53/libpng-1.2.53.tar.gz/download b. Run C:\MinGW\msys\1.0\msys.bat c. Go to where you downloaded the file (e.g. "cd /C/Users/Mark/Downloads" ) d. tar -zxvf libpng-1.2.53.tar.gz e. cd libpng-1.2.53 f. ./configure -prefix=/C/mingw g. make h. make install
4- JANSSON a. Download http://www.digip.org/jansson/releases/jansson-2.7.tar.bz2 b. Run C:\MinGW\msys\1.0\msys.bat c. Go to where you downloaded the file (e.g. "cd /C/Users/Mark/Downloads" ) d. bunzip2 -c jansson-2.7.tar.bz2 | tar xf - e. cd jansson-2.7 f. ./configure -prefix=/C/mingw g. make h. make check i. make install
5- Install SDL a. Download http://libsdl.org/release/SDL2-devel-2.0.3-mingw.tar.gz and go into the SDL2-2.0.3\i686-w64-mingw32\ folder once extracted b.Follow step #3 from https://users.cs.jmu.edu/bernstdh/web/common/help/cpp_mingw-sdl-setup.php , i.e.: 1. Copy the 4 .a files from the lib directory to the C:\MinGW\lib directory 2. Copy the SDL2 directory from the i686-w64-mingw32\include directory to the MinGW\include directory c. SDL 2.0.3 may throw an error during compilation (see Empezar's post on page 2): C:/MinGW/include/SDL2/SDL_platform.h:121:26: fatal error: winapifamily.h: No such file or directory #include <winapifamily.h> If so, overwrite C:\MinGW\include\SDL2\SDL_platform.h with https://hg.libsdl.org/SDL/raw-file/e217ed463f25/include/SDL_platform.h ===== Compile EZQuake! ===== 1- make sure you have git installed and run "git clone https://github.com/ezQuake/ezquake-source.git" 2- go to the ezquake-source directory and create a file called ".config" with the following:
CONFIG_WINDOWS=TRUE CFLAGS=-m32 -O3 -g0 -D_DEBUG -D_WIN32_WINNT=0x0501 -D_WIN32_IE=0x0501 -D__USE_MINGW_ANSI_STDIO -DWITH_WINAMP CC=mingw32-gcc PCRE_CFLAGS=-DPCRE_STATIC #PCRE_LIBS=/C:/MinGW/lib/libpcre.a CURL_CFLAGS=-DCURL_STATICLIB #CURL_LIBS=-lcurl #CURL_LIBS=/C:/MinGW/lib/libcurl.a SPEEX_LIBS= #EXPAT_LIBS=/C:/MinGW/lib/libexpat.a #ZLIB_LIBS=/C:/MinGW/lib/libz.a SDL2_CFLAGS=-I/C:/MinGW/include/SDL2 -Dmain=SDL_main SDL2_LIBS=/C:/MinGW/lib/libSDL2.a -lole32 -limm32 -lcomctl32 -lversion -loleaut32 -lmingw32 -lSDL2main -lSDL2 -mwindows WINDRES=mingw32-windres STRIP=mingw32-strip LDFLAGS=-static -mwindows
3- make 4- "make strip" to remove debugging stuff and reduce the size of the binary by about 50% 5- copy the new ezquake.exe to your quake folder 6- enjoy! I tried to reduce the steps and additional software required to the bare minimum, but I may have missed something. Cheers, BD (Edited 2015-07-06, 21:55)
Administrator 1025 posts
Registered: Apr 2006
Nice tutorial BD. Just want to note that it's possible (and how we did it) to compile for Windows on a Linux machine.
So if you have a linux box, just do basically the same thing as above on that machine and compile with mingw and you'll get a windows binary.
Member 216 posts
Registered: Feb 2011
Thanks Dimman ![](/images/smileys/emoticon_smile.png) For those who would like to try the latest build (ezquake 3.0 Alpha r666), you can find it here. Would be cool to have people try it out and report if there are any issues!
Member 35 posts
Registered: Feb 2011
Is there any place I can see the changes from the actual version?
Member 375 posts
Registered: Sep 2009
NICE!!!!!!!!!
I've tried to compile it some days ago, but I didn't know that we can't use Visual Studio anymore....
so, quoting overflow: changes from the actual version? I'm curious!!! (QW Nickname: AL.Kernell)
News Writer 912 posts
Registered: Jan 2006
Why does it not surprise me that BD is using a non-official client... what else did you code in there mister?
Administrator 1025 posts
Registered: Apr 2006
Why does it not surprise me that BD is using a non-official client... what else did you code in there mister? Well offical or not, he asked me if it was okey, before posting, and I said it was. I expect him not to modify anything compared to the original source (new version numbers have a git sha id as reference which makes it easy to track alpha to a specific commit btw) without explicitly telling about it. BD has only been helpful and polite to me (for years) so I have no reason to mistrust him. EDIT: As for changes there are major internal changes, a lot of stuff is rewritten using a SDL2 layer making it possible to reuse code for several platforms. Basically Windows was #1 platform earlier and had "the biggest and best" features which the other platforms lacked. It's mostly OSX and Linux client that has been brought up to speed to the Windows version, but there are som new stuff. Showing AFK in scoreboard is a favourite. I have an incomplete changelog somewhere, I'll see if I can find it.
Member 1435 posts
Registered: Jan 2006
What IDE do you guys use nowadays, if any? Does it support breakpoints? Or even hot code replace?
Member 188 posts
Registered: Feb 2008
While we're at it:
Trivial diff to make 3.0 compile on OpenBSD:
--- q_shared.h.orig Thu May 1 11:44:56 2014 +++ q_shared.h Thu May 1 11:07:56 2014 @@ -157,6 +157,19 @@ #endif +//======================= OpenBSD DEFINES ==================================== +#ifdef __OpenBSD__ + +#include <machine/endian.h> +#if BYTE_ORDER == BIG_ENDIAN +#define __BIG_ENDIAN__ +#elif BYTE_ORDER == LITTLE_ENDIAN +#define __LITTLE_ENDIAN__ +#elif BYTE_ORDER == PDP_ENDIAN +#define __PDP_ENDIAN__ +#endif + +#endif //======================= BYTE SWAPS ========================================= #if defined __BIG_ENDIAN__ #define BigShort(x) (x) --- ioapi.c.orig Thu May 1 11:44:37 2014 +++ ioapi.c Thu May 1 11:18:31 2014 @@ -14,7 +14,7 @@ #define _CRT_SECURE_NO_WARNINGS #endif -#if defined(__APPLE__) || defined(IOAPI_NO_64) +#if defined(__APPLE__) || defined(IOAPI_NO_64) || defined(__OpenBSD__) // In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions #define FOPEN_FUNC(filename, mode) fopen(filename, mode) #define FTELLO_FUNC(stream) ftello(stream) --- Makefile.orig Thu May 1 11:44:24 2014 +++ Makefile Thu May 1 11:14:13 2014 @@ -306,7 +306,9 @@ endif ifneq ($(SYS),FreeBSD) - LIBS_c += -ldl + ifneq ($(SYS), OpenBSD) + LIBS_c += -ldl + endif endif endif
News Writer 912 posts
Registered: Jan 2006
Well offical or not, he asked me if it was okey, before posting, and I said it was. Relax dimman, it was a friendly joke ![](/images/smileys/emoticon_smile.png)
Member 188 posts
Registered: Feb 2008
However, to get working gamma/contrast I had to revert to XF86VidModeSetGammaRamp and friends which kind of defeats the purpose of SDL2. That is because X11 and SDL are awesome - or maybe not. https://bugzilla.libsdl.org/show_bug.cgi?id=971
Member 216 posts
Registered: Feb 2011
Well offical or not, he asked me if it was okey, before posting, and I said it was. Relax dimman, it was a friendly joke ![](/images/smileys/emoticon_smile.png) ![](/images/smileys/emoticon_smile.png) I actually live in Sweden but have been hacking the client to show 100+ ping to get everyone's sympathy! But seriously, the only change I ever made was to support the new player model from this thread. Even I don't use the build that I posted there, but I know bps/carapace do (for mixes, not officials) because it still shows the "modified player.mdl" warning when you connect and has a custom response when you do f_version. I don't think they've had any problems with that build. I forgot to list the minor things to be aware of if you use 3.0 alpha: 1- change FOV: If, for example, you used to use a fov of 120 for 4:3 monitors, but changed it proportionally to 133 for widescreen monitors, you need to go back to 120 with ezquake 3.0. It takes care of the fov adjustment automatically. 2- On my system, I get some occasional "popping" or "cracking" of the sound, most likely due to the switch to SDL2. I might have to slightly increase my s_mixahead value to get rid of it. 3- Some of my teambind colors disappeared even though cl_sayfilter_coloredtext was set to 0. Changing that to 1 and back to 0 fixed it for me. (Don't know if this is due to ezq 3). Has any body experienced these or other issues? Let's get a list going!
Administrator 2058 posts
Registered: Jan 2006
Member 11 posts
Registered: Dec 2012
What IDE do you guys use nowadays, if any? Does it support breakpoints? Or even hot code replace? I don't think us Linux devs really use any IDEs when doing C. I use gdb to debug crashes to get a simple backtrace and that's about it. The new unified Makefile also works on Windows as demonstrated so it's more maintainable than having separate VS project files even though it's harder to setup. The way it was done here is probably more complex than it needs to be, but at least it works. As dimman previously said, we cross-compile Windows binaries on Linux directly so there's no pressing need for any Windows development environment for us. There are Windows IDEs that support Makefiles that could be used together with 3.0 I presume but haven't tried as I don't use Windows. ezQuake development isn't completely dead. I'm working on some patch sets that I'm going to ask (force) dimman to pull in. It includes some SDL2 fixes and missing implementations that were not completed during our last "sprint" and new features as well.
Member 216 posts
Registered: Feb 2011
ezQuake development isn't completely dead. I'm working on some patch sets that I'm going to ask (force) dimman to pull in. It includes some SDL2 fixes and missing implementations that were not completed during our last "sprint" and new features as well. Cool! Any chance you can take a quick look at the patch in post #15 here and include it? It has solved my problem, and it may also solve problems like the one I just found on this thread (see latest post for link to bug). Thanks, BD
Administrator 1025 posts
Registered: Apr 2006
ezQuake development isn't completely dead. I'm working on some patch sets that I'm going to ask (force) dimman to pull in. It includes some SDL2 fixes and missing implementations that were not completed during our last "sprint" and new features as well. Cool! Any chance you can take a quick look at the patch in post #15 here and include it? It has solved my problem, and it may also solve problems like the one I just found on this thread (see latest post for link to bug). Thanks, BD Looks like it makes sense BD. I'll look into it. Would you be interested in being more close to the development? Feel free to PM me. QW needs developers and to go forward, and 3.0 is a new major version where we don't have to care so much about backwards compatibility but focus on simplifying and moving forward.
Member 3 posts
Registered: Jun 2014
Thanks Dimman ![](/images/smileys/emoticon_smile.png) For those who would like to try the latest build (ezquake 3.0 Alpha r666), you can find it here. Would be cool to have people try it out and report if there are any issues! I only see mouse settings to turn raw input on/off? Where is the direct input ![](/images/smileys/emoticon_unhappy.png)
Administrator 1025 posts
Registered: Apr 2006
Thanks Dimman ![](/images/smileys/emoticon_smile.png) For those who would like to try the latest build (ezquake 3.0 Alpha r666), you can find it here. Would be cool to have people try it out and report if there are any issues! I only see mouse settings to turn raw input on/off? Where is the direct input ![](/images/smileys/emoticon_unhappy.png) There is raw input or no raw input on all platforms, nothing else. Direct input is basically, IIRC, raw input being handled in a separate thread.
Member 216 posts
Registered: Feb 2011
Looks like it makes sense BD. I'll look into it. Would you be interested in being more close to the development? Feel free to PM me. QW needs developers and to go forward, and 3.0 is a new major version where we don't have to care so much about backwards compatibility but focus on simplifying and moving forward. It's definitely something that interests me, but 1- I'm afraid I don't have enough free time (if I'm lucky I can play an hour or so per day), and 2- I'm really not that good of a developer, so I'll probably waste more of your time than actually help. That said, I'm happy to "unofficially" help here and there with some testing/debugging, and maybe the occasional simple patch if it's an issue that bothers me enough ![](/images/smileys/emoticon_grin.png)
Member 73 posts
Registered: Oct 2010
tryed to play ezquake 3.0: Sound is different from older versions, now it writes something about sdl, and gives hi frequency noise when i jump. tryed all s_khz - 11 22 44, all of them give that noise in different portions. Thought my soundcard is broken :-) s_mixahead didn't help
Member 202 posts
Registered: Dec 2006
I'm using 1920x1080. Why is fov 90 higher than 100? Also +1 to the sound issue.
Member 232 posts
Registered: Feb 2006
FOV maybe determined by height not width. Rough guess
Member 133 posts
Registered: Dec 2008
I'm using 1920x1080. Why is fov 90 higher than 100? Also +1 to the sound issue. Here is my guess. Are you just typing "fov 90"? 90 has special meaning. Actually it is fov @default_fov. default_fov is a special variable. To developers. Please do not fix it. This fuctionality is used by TeamFortress.
Administrator 1025 posts
Registered: Apr 2006
I'm using 1920x1080. Why is fov 90 higher than 100? Also +1 to the sound issue. Here is my guess. Are you just typing "fov 90"? 90 has special meaning. Actually it is fov @default_fov. default_fov is a special variable. To developers. Please do not fix it. This fuctionality is used by TeamFortress. Most likely it is like that. Someone apparantly thought it was brilliant to make fov 90 something else than fov 90. Try changing your value for "default_fov" and typing fov 90 will set that. For the sound part: First try if s_linearresample 0/1 changes anything. If not. try increasing the s_mixahead a little bit. If that doesn't help, feel free to bug hifi on Quakenet to fix it ![](/images/smileys/emoticon_smile.png)
Member 245 posts
Registered: Jan 2006
my screen just go black when trying to execute the binary. I think there's something wrong with my gfx card and/or dist. going to try it in openbsd later.
Member 73 posts
Registered: Oct 2010
s_linearresample 1 helped! thx
Member 1 post
Registered: Mar 2015
great client,
But my sensitivity is changed and its a bit more darker. The command gamma isnt working? how can i change the gamma and contrast? Great work! Thanks a lot
Greetings Rasta
Administrator 1265 posts
Registered: Jan 2006
maybe r_gamma and r_contrast ? search in the menus
one thing i missed in 3.0 is tcl_exec comand. its not a big deal never argue with an idiot. they'll bring you back to their level and then beat you with experience.
Administrator 1025 posts
Registered: Apr 2006
maybe r_gamma and r_contrast ? search in the menus
one thing i missed in 3.0 is tcl_exec comand. its not a big deal Some things will get removed at first unfortunately due to very low implementation quality. However if there's a big enough demand for something it will be re-implemented more properly. (Next thing to get lost is probably re_trigger stuff since that is not even remotely thread safe and I don't know if I can see a reason to put a lot of effort in to fixing it if it's merely used. I will look into if I can save the $lastip functionality since I know that part is used atleast) I will look into making compilation on Windows easier, but for now the easiest thing is to compile on Linux with mingw32 to produce Windows binaries. The gamma stuff sounds interesting. I know there's some gamma issues with SDL2 and Xorg (on Linux), but not on Windows? Note that you should use your old CRT(4:3) fov, it wil be same for all resolutions, no need to change it if you switch monitor/resolution. Second thing; Use vid_width/vid_height 0 to get desktop resolution ingame, otherwise specify your own resolution manually. Third thing: in_mouse is gone, theres now only in_raw 0/1 which will give raw input (1) or regular "quake input" (0, same as old in_mouse 1) Oh and the new player model is supported, Blood_Dog's cl_weaponforgetorder is implemented, afk showing on scoreboard to mention a few more things. New feature: /qtv [gameserver:port], almost like the old /observeqtv command but actually works ![](/images/smileys/emoticon_smile.png) Use /qtv when connected to a gameserver to get to the connected QTV, or use /qtv qw.foppa.dk:27501 for instance to watch from the QTV connected to that server. /join also works now when watching through QTV, it will connect you to the game server. Gamma will hopefully be handled by OpenGL shaders, but I need an OpenGL dev to help out with that to be able to finish it EDIT: Oh and for the latest master to compile you need the jansson library for JSON support (XML will eventually be completely replaced).
Member 188 posts
Registered: Feb 2008
... Gamma will hopefully be handled by OpenGL shaders, but I need an OpenGL dev to help out with that to be able to finish it ![](/images/smileys/emoticon_unhappy.png) ... No idea about that, but the latest quakespasm is running on SDL2 now and has a working gamma (windowed or not) if you want to look at it.
![](/images/forum/corners-inner-bottom.png)
|
![](/images/forum/corner-3.png) |
![](/images/forum/corner-4.png) |
|