FWGS / xash3d

DEPRECATED in favor of https://github.com/FWGS/xash3d-fwgs. Only bugfixes are accepted.
https://xash.su
GNU General Public License v3.0
554 stars 107 forks source link

MinGW build fails to run due to missing menu.dll, vgui_support.dll #208

Closed minexew closed 6 years ago

minexew commented 7 years ago

The engine subdirectory contains Makefile.mingw, but mainui and vgui_support don't. I have looked at Makefile.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?

mittorn commented 7 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/

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:

a1batross commented 7 years ago

So... resolution is to write Makefile.mingw for menu?

I need to make work CMake build on Windows. =/

mittorn commented 7 years ago

Maybe just make mingw support in Makefile.linux and rename to Makefile.gcc?

minexew commented 7 years ago

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...

mittorn commented 7 years ago

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.

minexew commented 7 years ago

Emscripten doesn't support any kind of dynamic library loading. Would that be hard to work around and just link everything statically?

a1batross commented 7 years ago

@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.

a1batross commented 7 years ago

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.

mittorn commented 7 years ago

Makefile still not done!!!

mittorn commented 7 years ago

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.

a1batross commented 7 years ago

@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 .

a1batross commented 6 years ago

In 0.19.x branch Linux, OSX, Windows-MinGW(travis) Windows-MSVC(appveyor) autobuilds now uses CMake. Marking as resolved.