after deleting everyhting and trying again i got it to work.. its worth noting, libs were automatically picked up for me. I think where you got in trouble was pointing libs at a directly instead of the static .lib file cmake was wanting, alas here is what i did.
I have vs2015, 2017, 2019 and mingw installed. when building I opened solutions in 2019 and built with 2015 tools
- if you already installed cmake for windows, uninstall it
- install the LATEST CMake 3.14.5 (ya really), but not the RC from here, add to path when asked
if you want to build with mingw:
- download and run https://sourceforge.net/projects/mingw-w64/ - install x86_64 version of gcc 8.1.0.
- add
C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin
to your PATH (user path is fine). - restart any shells before continuing
- clone qfusion
- in root of qfusion repo run:
git submodule update --init --recursive
, this will get libsrc and third-party submodules for you. 3.generate projects:cmake -DQFUSION_GAME="Warsow" .
for me this found everything but openAL, and generated for VS2019 without issue. - Open qfusion solution, build ALL_BUILD debug/release you'll get everything out in
source\build\Debug
/release
The static mingw libs do not work as provided. all the *.a
that do not end in stat.a
are just text files with a filename,
so they're treated like a linker script. however this doesnt work on mingw-win32 (or likely at all?), can hack it by
deleting all non-stat.a
files, then removing stat
in the files so its just the actual libs in dir.
To build:
cmake -DQFUSION_GAME="Warsow" -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" .
mingw32-make -j4
where 4 is num of cores you got else its single process and slow- blam you got bins in
build\
- the angelscript target is done in a nonstandard way, nice work idiots! change line 198 in
<sdk>\source\source\CMakeLists.txt
toadd_custom_target(angelscript ${CMAKE_MAKE_PROGRAM} -C ${ANGELSCRIPT_PROJECT_DIR})
- in
sdk\source\source\
runcmake -DQFUSION_GAME="Warsow" -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" .
- run
mingw32-make -j4
- bins are in
build\
wip the libs are built from something older than VS2015:
.. todo, fix libs.. they are FUCKING ANCIENT https://docs.microsoft.com/en-us/cpp/porting/visual-cpp-change-history-2003-2015?view=vs-2019#BK_CRT
63 3A 5C 70 72 6F 67 72 61 6D 20 66 69 6C 65 73 20 28 78 38 36 29 5C 6D 69 63 72 6F 73 6F 66 74 20 76 69 73 75 61 6C 20 73 74 75 64 69 6F 20 31 32 2E 30 5C
c:\program files (x86)\microsoft visual studio 12.0\
C:\work\warsow_21_sdk\source\source\win32\x86\lib\debug>dumpbin /headers curllib_static.lib
Microsoft (R) COFF/PE Dumper Version 14.21.27702.2
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file curllib_static.lib
File Type: LIBRARY
Version : 0
Machine : 14C (x86)
TimeDateStamp: 5215549F Wed Aug 21 18:00:31 2013
SizeOfData : 00000016
DLL name : WS2_32.dll
Symbol name : _socket@12
Type : code
Name type : ordinal
Ordinal : 23
...
Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol __snprintf qfusion C:\work\warsow_21_sdk\source\source\client\curllib_static.lib(gzlib.obj) 1
Error LNK2001 unresolved external symbol ___iob_func qfusion C:\work\warsow_21_sdk\source\source\client\curllib_static.lib(formdata.obj) 1
Error LNK2001 unresolved external symbol ___iob_func qfusion C:\work\warsow_21_sdk\source\source\client\curllib_static.lib(mprintf.obj) 1
Error LNK2001 unresolved external symbol ___iob_func qfusion C:\work\warsow_21_sdk\source\source\client\curllib_static.lib(url.obj) 1
Error LNK2001 unresolved external symbol ___iob_func qfusion C:\work\warsow_21_sdk\source\source\client\curllib_static.lib(cookie.obj) 1
Error LNK2001 unresolved external symbol _wprintf qfusion C:\work\warsow_21_sdk\source\source\client\curllib_static.lib(idn_win32.obj) 1
- Unzip sdk
- Go to
source/source
- run
cmake -G "Visual Studio 14 2015"
- this should pick up everything again, eg
Dexter@HTwork MINGW64 /c/work/warsow_21_sdk/source/source
$ cmake -G "Visual Studio 14 2015"
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
-- Selecting Windows SDK version 10.0.10586.0 to target Windows 10.0.18362.
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OGG: C:/work/warsow_21_sdk/source/libsrcs/libogg/include
-- Found VORBIS: C:/work/warsow_21_sdk/source/libsrcs/libvorbis/include
-- Found THEORA: C:/work/warsow_21_sdk/source/libsrcs/libtheora/include
-- Found CURL: C:/work/warsow_21_sdk/source/source/win32/x86/lib/debug/curllib_static.lib (found version "7.32.0")
-- Found ZLIB: C:/work/warsow_21_sdk/source/source/win32/x86/lib/debug/zlib.lib (found version "1.2.8")
-- Found Freetype: C:/work/warsow_21_sdk/source/source/win32/x86/lib/debug/libfreetype.lib (found version "2.4.6")
-- Found JPEG: C:/work/warsow_21_sdk/source/source/win32/x86/lib/debug/jpeg.lib (found version "80")
-- Found PNG: C:/work/warsow_21_sdk/source/source/win32/x86/lib/debug/png.lib (found version "1.2.50")
-- Found ANGELSCRIPT: C:/work/warsow_21_sdk/source/libsrcs/angelscript/sdk/angelscript/include
-- Configuring done
-- Generating done
-- Build files have been written to: C:/work/warsow_21_sdk/source/source
- open qfusion solution, build ALL_BUILD, wait two shitass hours for librocket
- similar to above -
source\build\debug
andsource\build\release
are where bins end up when done