There's no point in splitting the audio library selection into multiple
CPP macros, since there can always only be one anyway. Merge all of them
into a single macro AUDIO_TK (for "toolkit") and have CMake select one
for the user, instead of making him choose (and potentially failing).
Recent MinGW releases ship a pthread implementation for Windows. So while
CMake is technically correct in finding pthread, we don't want it to, and
instead use the standard Win32 threading.
The -std=gnu++0x-Flag was removed from the compiler flags before
testing the <regex> header, and so just re-confirmed that <regex>
didn't work in previous C++ standards.
f897e95071 broke this by reusing the macro with the path to the binary
as the binary name, which doesn't work if the path contains directories.
Also, 0dcfe72148 moved the binaries, but the LOCATION property still
pointed to the old location. Luckily, CMake also has a non-broken option to
pass target file paths to custom commands.
The distinction between the "aul" and "non-aul" parts of
the script engine are mostly historical accident, and the
current organization of the source code does not use
sub-subdirectories. I'd like to keep it that way.
This reverts commit 69ba06b8d0.
This makes CMake use the dynamic library instead of the static library on
my system. The latter doesn't link on today's Debian unstable due to a
missing libmad.a.
Recent versions of MinGW do no longer declare vasprintf in <stdio.h>,
but they ship a compatible function called __mingw_vasprintf. Use this
function if vasprintf isn't available.
CheckFunctionExists only checks for the function to be linkable, it does
not require any declaration in a header. CheckSymbolExists requires a
declaration and also linking to succeed.
As discussed in http://forum.openclonk.org/topic_show.pl?tid=2917, I
have merged all copyright notices into a single file and referenced that
merged file from each source file.
For the updated source files, the timeline has been split into three
parts:
1. Pre-RWD code (before 2001)
2. RWD code (2001 through 2009)
3. OpenClonk code (2009 and later)
All pre-RWD copyright notices have been left intact, as have RWD-era
copyright notices where the file did not have a RedWolf design copyright
notice but only individual author ones. All copyright notices of the
OpenClonk era have been replaced by a single notice ranging from the
first recorded year to the current year (2013). Mape code did not get a
OpenClonk Team copyright notice because it is somewhat separate from the
main OpenClonk codebase and has only been touched by Armin Burgmeier.
The new type C4TimeMilliseconds behaves for the most part like a uint32_t but is overflow-proof in comparisons.
In some places, a 0-value (or uint_max) of the variable storing the time had the special meaning "not set yet". This has been resolved by having it as a pointer to C4TimeMilliseconds with NULL meaning that it has not been set yet.
Telling Windows that we support Windows 7 means it will stop catching
unhandled exceptions that occur in a callback from kernel mode, and
allow our own crash handler to catch then.
Direct3D hasn't worked for more than a year now, and there don't seem to
be any efforts to revive it. Remove it and concentrate on better OpenGL
support.
A large number of g++ versions ship a <regex> that declares all of the
required functions, but don't actually implement them, making using them
result in a linker error.
Fallback to Boost.Regex if the host C++11 <regex> implementation is
broken; the interface is the same anyway, only differing in the
containing namespace.
Unfortunately, Boost.Regex is not a header-only library, but this is not
a big deal because all major Linux distributions ship it, and Visual
Studio implements <regex> since 2010 (the oldest version we still
support).
ResTable (the main system string table) was a home-grown hashmap that
did not cope with collisions at all. Since we already have a proper
dictionary in C4LangStringTable, use that instead.
Since FindFreetype.cmake already extracts the version of freetype
from its header files, I have no idea why they're not automatically
using that info to look for the proper library name in lieu of
hardcoding a single version.
Previously, MSVC builds did only allow static linking of libogg,
libvorbis and libvorbisfile. If there was a reason to do so, I have no
idea what it was, because it isn't documented in either VCS or a
comment. So I'll allow both dynamic and static linking.
In practice, other libraries pulled pthread in, except for the USE_CONSOLE
build. But since there are direct calls to pthread in our code, we really
shouldn't rely on that.
Also, this should fix the USE_CONSOLE build on windows.
Metacity started to display bigger icons in the window list, so the higher
resolution is now actually useful for me. While at it, use gdk-pixbuf-csource
to generate the .h at build time from the .ico instead of duplicating the
data in the repository.
GTest does not ship precompiled binaries anymore. They are now compiled
using the CMakelists.txt from gtest.
Add basic unit tests for C4Value, DirectExec and C4StringTable.
Since the name of the game is OpenClonk, having the binary named
differently is at least confusing. At worst it conflicts with the
trademark license granted by RedWolf Design.
The Mac build will still have to be fixed because the installer
template .dmg file is not editable on non-Macintosh systems.
Ignoring CFLAGS/LDFLAGS makes GTK+ not work correctly
if the libraries are compiled with -mms-bitfields (as
is the case with the prebuilt binaries from gnome.org).
In practice, only the xrandr code path received any testing. Since Clonk
works fine without changing the resolution, this will not terribly
inconvenience anybody still stuck on old systems without xrandr.
Also only minimize the window when the resolution was changed.
The minimization is there to prevent accidental focus restoration
resulting in unwanted resolution switching.