Closed minexew closed 6 years ago
vgui_support is impossible to build with mingw because it must use same c++ abi with vgui.dll, but vgui.dll is build by MSVC++ 6 by Valve and it is not opensource. Use binary vgui_support.dll from https://github.com/FWGS/vgui_support_bin menu.dll is possible to build with https://github.com/FWGS/microndk/
TARGET_ARCH_ABI = x86
in xash3d-config.mkmake -f X: \path\to\microndk\Microndk.mk CC=gcc RM=
It should work also with all mods that contains Android.mk I was too lazy to write separate Makefile for menu. You also may use direct gcc call as menu is very simple:
gcc *.cpp -shared -o menu.dll -I. -I../pm_shared -I../common -I../engine
So... resolution is to write Makefile.mingw for menu?
I need to make work CMake build on Windows. =/
Maybe just make mingw support in Makefile.linux and rename to Makefile.gcc?
CMake on windows would definitely be nice. Anyways, how many non-portable functions does Xash rely on? I was thinking about Emscripten-ing it. Imagine Half-Life in your browser...
Xash3D uses dlopen/dlsym/dladdr (loading shared libraries, resolving function by name and address by function), so platform should support dynamic libraries. So it is possible to port it to emscripten if there is any way to implement server/client libraries loading and symbol resolving.
Emscripten doesn't support any kind of dynamic library loading. Would that be hard to work around and just link everything statically?
@minexew fully static game requires changes in engine-game interfaces. It's more hard than Quake I or Quake III port, as they use virtual machine for game logic.
BTW, I saw some dlfcn tests in emscripten repo:
Also, emscripten's libc have dlfcn.h header: https://github.com/kripken/emscripten/blob/07b87426f898d6e9c677db291d9088c839197291/system/include/libc/dlfcn.h
P.S. If problem with MinGW is gone, maybe close this issue and create new with Emscripten-related discussion? I think, there is more interested in emscripten port.
Also, Emscripten have even SDL1.3/SDL2 headers and GL headers. Xash3D on Linux can be built only using OpenGL, SDL2 and libc. Dedicated version requires only libc. Try port dedicated version at first, then connect Half-Life game library from HLSDK.
Makefile still not done!!!
I think, we need to make some convertor script and entity table generator. It will make port to Emscripten and iOS easier. Just link it staticly with hlsdk.
@mittorn check links. dlfcn is exists on Emscripten. 15.11.2016 21:13 пользователь "mittorn" notifications@github.com написал:
I think, we need to make some convertor script and entity table generator. It will make port to Emscripten and iOS easier. Just link it staticly with hlsdk.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/FWGS/xash3d/issues/208#issuecomment-260720315, or mute the thread https://github.com/notifications/unsubscribe-auth/ADEJgRDHj2LVc7VoysrHASGDVtru-V7Oks5q-fY-gaJpZM4KwbaL .
In 0.19.x branch Linux, OSX, Windows-MinGW(travis) Windows-MSVC(appveyor) autobuilds now uses CMake. Marking as resolved.
The
engine
subdirectory containsMakefile.mingw
, butmainui
andvgui_support
don't. I have looked atMakefile.linux
, but unsurprisingly, it uses a different naming convention for the output libraries.It seems impossible to build the full engine with MinGW using the provided Makefiles.
BTW, is Cmake supported on Windows?