Commit Graph

484 Commits (ba3160c4c3d9dbccf79114e11b599ce48ff8d7e2)

Author SHA1 Message Date
Günther Brammer 4b4b8781a0 Make GTK+ and SDL2 work together
If the gamepad code initialized the SDL video subsystem, GTK+ crashed in
libX11. Or something along those lines.

Making the optional subsystems using SDL for gamepads and audio use
SDL_InitSubSystem and only the SDL Application port do the full SDL_Init
is the proper way to do things in any case.
2016-02-06 21:12:56 +01:00
Günther Brammer 934b519bb4 Update the SDL port to SDL2
SDL2 is a much closer match to the other platform code, and
allows the creation of OpenGL 3 core contexts, which is
now required.
2016-02-06 16:48:21 +01:00
Günther Brammer 70d25b0b91 gtk: Fold contents of C4AppGTKImpl.h into C4AppGTK.cpp
C4WindowGTK.cpp no longer needs anything from it.
2016-02-03 03:17:16 +01:00
Günther Brammer 8425169dd6 Rename C4Script.h to C4GameScript.h 2016-01-24 12:27:23 +01:00
Günther Brammer 4c01592196 Move C4AulScriptFunc into its own source file 2016-01-24 12:27:23 +01:00
Günther Brammer e790d2c327 Remove duplicated stubs for the scriptengine from mape 2016-01-24 02:09:14 +01:00
Günther Brammer 78e3457ff7 MSVC: Remove support and workarounds for versions older than 2015
We require that version for its C++14 support anyway.
2016-01-23 23:10:02 +01:00
Günther Brammer 93f12150c4 CMake: Remove obsolete USE_X11 option and add USE_WIN32_WINDOWS
USE_WIN32_WINDOWS was previously defined in PlatformAbstraction.h. Move it
to CMakeLists.txt and config.h like its peers. Replace USE_X11 with USE_GTK
or GDK_WINDOWING_X11 as appropriate.
2016-01-23 20:36:34 +01:00
Günther Brammer 11bbeb2a5b Rename WITH_DEVELOPER_MODE to USE_GTK
This mirrors USE_WIN32_WINDOWS, USE_SDL_MAINLOOP and USE_COCOA.
2016-01-23 20:36:33 +01:00
Nicolas Hake 8136edb45a Pull tests into main CMake project 2016-01-23 13:49:05 +01:00
Nicolas Hake 8579c0d522 MSVC: Sort individual projects into folders 2016-01-23 13:49:04 +01:00
Nicolas Hake c2dbd319bb VS 2015: Enable Edit-and-Continue for 64 bit builds
Visual Studio 2015 supports Edit-and-Continue for 64 bit builds, so we
can enable it.
2016-01-21 23:18:10 +01:00
Günther Brammer aa2e660094 Merge branch 'cmake' 2016-01-18 01:12:59 +01:00
Günther Brammer debc559bc7 CMake: Fix building mape on systems with more than one GTK+ CPP flag 2016-01-18 01:12:41 +01:00
Günther Brammer e4b96c49d4 CMake: Remove unmaintained list of dependency packages 2016-01-17 23:34:29 +01:00
Günther Brammer bc3754b871 Merge branch 'editor' 2016-01-16 16:00:57 +01:00
Günther Brammer 30c579b846 CMake: Link to freetype even if it is not in the default directory 2016-01-11 11:10:53 +01:00
Günther Brammer 0f94dd2249 Remove obsolete IFT icons
This probably breaks the macosx editor even more.
2016-01-11 01:52:50 +01:00
Günther Brammer 39c2a0e18c gtk: Use glib-compile-resources instead of gdk-pixbuf-csource
Yet another deprecated feature replacement. At least this one makes our
code more concise.
2016-01-11 01:52:49 +01:00
Martin Plicht 1a3b47dcbb CMakeLists.txt: Stop setting CMAKE_XCODE_ATTRIBUTE_GCC_PREFIX_HEADER in case of Xcode 2016-01-10 18:01:29 +01:00
Günther Brammer 7b7f6023b8 CMake: Bump minimum version requirement to the version in Debian stable 2015-12-29 18:35:55 +01:00
Günther Brammer 7400c7e20e CMake: Remove -std=gnu++0x-removal code 2015-12-29 18:35:55 +01:00
Nicolas Hake c0befc6ba0 Remove C4RTF
The only use of C4RTF in its final moments was parsing out plain text
from RTF files anyway, so why even go to all the trouble instead of just
storing plain text in the beginning?
2015-12-29 17:51:43 +01:00
Günther Brammer 77a71c39d3 Require some C++14 support (make_unique, index_sequence) 2015-12-29 15:47:55 +01:00
Günther Brammer b8953d8a09 CMake: Simplify precompiled header support for MSVC
Instead of conditionally adding src/C4Include.cpp, simply add it always. It
doesn't do anything with other compilers, but the tiny speedup from not
compiling it isn't worth the additional complexity.
2015-12-29 15:47:55 +01:00
Günther Brammer 16ef28e05f Drop unused C4VERSIONBUILDNAME and C4ENGINEINFO
This was used to name snapshot releases of the Network2 branch, and has
seen almost no use since.

C4ENGINEINFO(LONG) was a duplicate of C4ENGINENAME and C4ENGINECAPTION.
2015-12-29 15:47:55 +01:00
Nicolas Hake 0ef4e71363 MSVC 2015: Add natvis file to solution
This employs a rather ugly hack to make CMake do what we want. CMake
doesn't allow us to add items directly to the solution (as opposed to
one of the projects inside it), and thus requires us to abuse its lack
of parameter validation to manually add the file.
2015-12-29 13:58:15 +01:00
Günther Brammer 475ec23ef5 OS X: Use the same compiler flags code as the other stuff
Also remove redundant and inconsistent setting of the
XCODE_ATTRIBUTE_GCC_PFE_FILE_C_DIALECTS property, and a dead variable.
2015-12-29 01:48:41 +01:00
Günther Brammer 78f806f03c CMake: Fix check for getopt.h 2015-12-29 01:48:41 +01:00
Günther Brammer 4f64d13fc0 CMake: Remove broken addition of GLEW_DEFINITIONS to openclonk
This only didn't break earlier because this code was located before
find_package(GLEW). The add_definitions(${GLEW_DEFINITIONS}) call that
actually adds the macro is a bit broad, but the macro doesn't harm the
targets that do not use GLEW.
2015-12-29 01:48:41 +01:00
Nicolas Hake 6051c3e171 OS X: Stop overriding C++ version 2015-12-28 21:45:22 +01:00
Günther Brammer 3d00540311 CMake: Check that getopt.h works without additional libraries
Since there's already a getopt library in thirdparty/, there's no need to
guess about ways to make it work with a system header without support in
the C library itself.
2015-12-28 20:12:35 +01:00
Günther Brammer bb5f4c9440 Switch gcc to C++14, if supported
Keep the check for C++0x/C++11 for now. Remove that flag instead of not
adding it, because it most likely still is in the CMAKE_CXX_FLAGS, which
are cached.
2015-12-28 18:50:32 +01:00
Günther Brammer f07038d3ac CMake: Move Mac OS bundle contents near the generated header commands
Both contain resources for the editor GUI, so they fit together.
2015-12-28 18:50:31 +01:00
Günther Brammer 715cdd009f CMake: Move the headers and libraries checks before source lists
This way, the source lists are nearer to the executable definitions, which
also contain source lists.
2015-12-28 18:50:31 +01:00
Günther Brammer 9c241f507e CMake: Move commands to generate headers from bitmaps into a section 2015-12-28 18:50:31 +01:00
Günther Brammer c3f67cae5a CMake: Arrange the CMakeLists.txt a bit more clearly 2015-12-28 18:50:29 +01:00
Günther Brammer 4b672c3518 CMake: Move vasprintf check to the other compiler checks 2015-12-28 18:48:46 +01:00
Günther Brammer 1ae9343c46 CMake: Silence warnings from GTK+ header files 2015-12-28 18:48:46 +01:00
Günther Brammer 5271b038db CMake: Remove remnants of USE_CONSOLE option
It wasn't set anymore, except as a C++ macro, so checking it doesn't do
anything.
2015-12-28 18:48:46 +01:00
Günther Brammer 30e0cdb418 CMake: Re-enable readline support for openclonk-server 2015-12-28 18:48:45 +01:00
Nicolas Hake d737dc1b05 Remove C4Video, StdVideo
Video recording and playback only worked on Windows, and recording only
handled video, not game audio. As such, it was of fairly limited use,
and there's lots of software available these days that handle both.
2015-12-28 11:43:41 +01:00
Armin Burgmeier d7a5ac373d Fix the console build on Mac
cmake still does not create a nice bundle for it, but at least
the build does not fail anymore.
2015-12-23 16:31:19 -08:00
Günther Brammer 576f461ea5 CMake: Set compiler flags before checking compiler features
Moving the flags from CMAKE_CXX_FLAGS to OC_CXX_FLAGS, adding flags and
removing duplicates keeps CMAKS_CXX_FLAGS from growing. Unfortunately,
-std=gnu++0x needs to be in CMAKE_CXX_FLAGS before compiler features get
tested, but CMAKE_CXX_FLAGS is filled from OC_CXX_FLAGS further down.

Fortunately, all tests for compiler flags are quite simple, so they can be
done at the beginning, and the feature tests after that. Reorder the code
accordingly.
2015-12-22 18:07:38 +01:00
Günther Brammer 29f37eb821 CMake: Remove duplicate compiler flags properly
In order to be able to remove duplicates from the list, each flags needs to
be a separate list item. Otherwise, the flags from the previous run in
CMAKE_CXX_FLAGS, which are now separate list items due to
separate_arguments(), will not be recognized as duplicates of the freshly
added flags. Fortunately, in the next round the two sets of flags in
CMAKE_CXX_FLAGS will be reduced to one set, so there were never more than
two copies of the warning flags.
2015-12-22 18:07:38 +01:00
Nicolas Hake da51a2d8af CMake: Have headless build as a project instead of a separate config
Hardly anyone ever tests the headless build, because it requires you to
run CMake a second time with -DUSE_CONSOLE=On. So now it's an included
project which you'll get whether you want it or not.

I'm well aware that this could be solved more nicely, and that we could
be splitting unchanged files out into a separate support library, but
that's left for a later date.
2015-12-16 00:50:09 +01:00
Nicolas Hake 72002cc366 Kill netpuncher
Another piece of code that hasn't been tested in ages, gone. The default
puncher address was still pointing to clonk.de, which I'm very certain
isn't providing UDP hole punching services anymore.

Instead of a bespoke hole punching implementation we should use a STUN
lib.
2015-12-13 16:11:08 +01:00
Nicolas Hake ff57c03295 CMake: Move pthread, rt deps to libmisc
libmisc is the support library that references thread code and timing.
So the dependencies on pthread and rt should be attached to libmisc
instead of every single binary.
2015-12-13 14:34:02 +01:00
Nicolas Hake b6327fdf93 CMake: make explicit that libc4script depends on libmisc
libc4script uses C4Group, so it has a dependency on libmisc. Make this
dependency explicit so all targets that use libc4script also
automatically pull in libmisc.
2015-12-13 14:23:52 +01:00
Sven Eberhardt bf63f2ef17 Gidl+Windmill moved to new "Defense.ocf" (title picture missing)
They aren't quite fitting at the moment and Clonko wants to share the buy menu.
2015-12-12 12:06:25 -05:00