farbrausch / fr_public

Farbrausch demo tools 2001-2011
3.37k stars 344 forks source link

Linux build - Missing classes #37

Closed ltodoto closed 12 years ago

ltodoto commented 12 years ago

Hello! I just tried to build altona framework for linux using bootstrap makefiles provided, but I'm experiencing some issues when trying to compile system.cpp and system_linux.cpp Compiler says that it can't find (and neither can I in the whole build tree) any definition of classes sMouseInput, sInputEvent and sJoypad. Where I can get these or, at least, instructions on how they should look like?

rygorous commented 12 years ago

Probably code rot. As far as I can tell, the Linux port was last compiled by me over two years ago. I'll see what I can do...

rygorous commented 12 years ago

Okay, I fixed up the most important stuff. The Linux port of Altona should now compile for both command-line (blank_shell) and non-3D GUI (blank) builds, albeit with some warnings.

The basic UI samples (examples/gui/*) compile, run and accept keyboard/mouse input, so it's reasonably functional now. Note the build sequence is somewhat tricky:

  1. Set up altona_config.hpp. Start with altona_config_sample.hpp. In my case, I have sCONFIG_CODEROOT_LINUX = L"~/fr_public/altona_wz4", sCONFIG_MP_MAKE_LINUX = 1, and all other numeric config flags set to 0.
  2. Add the altona/bin directory to your $PATH
  3. Run "make -f Makefile.linux.boot" in the Altona root. This does a small bootstrap process that builds makeproject (which generates VS project files/Makefiles), then builds a "real" version of ASC (the shader compiler) and makeproject using the thus-generated Makefiles, and copies everything to bin.
  4. You now have Makefiles everywhere. If you need them regenerated (e.g. because you added files to a project or changed compiler settings), just run makeproject again.
  5. By default, these Makefiles will build command-line executables (CONFIG=release_linux_blank_shell). You can change this by passing an appropriate CONFIG flag to make, e.g. "make CONFIG=release_linux_blank" to get a Linux build with X11 support, "CONFIG=release_linux_ogl2" for X11+GL 2 (untested and most likely broken!). Instead of "release" (optimized, but with assertions enabled and debug symbols) there's also "debug" (unoptimized and with debug symbols), "profile" (for profiling; what exactly this does is platform-dependent) and "stripped" (optimized, symbols and assertions stripped).

The Linux port used to be reasonably clean but has been poorly (if at all?) maintained for quite a while now. No promises :). And the graphics_ogl2 is likely to be a complete disaster area at this point, because it was less than half-finished to begin with, and there were serious changes in the graphics subsystem architecture since then. No promises.

ltodoto commented 12 years ago

Thank you very much! Now I have at least planpad compiled and kind of working... I'll try to port unfinished X11 stuff like message boxes, open/save file dialogs and so on... Thanks again!