Commit Graph

199 Commits (1929e8d7796f644d17e6251ff505a5d7fd6c78ce)

Author SHA1 Message Date
Günther Brammer dfea0914a9 Merge the functions pointer branch 2012-03-09 17:42:48 +01:00
Sven-Hendrik Haase 7d8e1428c4 Enable support for DESTDIR (important for Linux packagers) 2012-03-06 10:06:59 +01:00
Günther Brammer 71e108f16a Start of a C4Script API third party programs could use
This is very experimental, subject to change, and the single function not
at all useful yet.
2012-03-04 21:23:11 +01:00
Julius Michaelis cb6eb060cc Add a dialogue for windows which can be displayed when the graphics engine initialisation failed
The dialogue has fields for resolution and a checkbox for fullscreen mode
2012-02-28 18:28:16 +01:00
Günther Brammer 00a4002711 unix: cmake also links with librt 2012-02-12 22:11:32 +01:00
Günther Brammer 1e7f32af48 Move C4AulFunc to its own header file
This is necessary since C4Value.h will call a function from C4AulFunc.
2012-02-13 18:00:35 +01:00
Armin Burgmeier 139184c540 Set system data path to exepath for binaries with automatic updates
Updates work only when the game data is at the same location as the binary.
If this is not the case then the game was probably installed differently,
for example via the distribution or with make install. In this case we
cannot do automatic updates but we also want to use a different system path.

This fixes the linux development snapshots and release tarballs. They were
broken in the sense that they didn't find their game data.
2012-02-03 23:43:18 +01:00
Armin Burgmeier 6da98a26b5 Generate packed groups only at make install or make setup
But not for regular make when just compiling the source code.
2012-02-03 22:22:25 +01:00
Armin Burgmeier 0749dcdb9d Replace std::sort by timsort for Face ordering
The usage of timsort instead of std::sort at this point is twofold.  First,
it's faster in our case where the array is already sorted in many cases
(remember this is called at least once a frame). And it's not just a bit
faster either but a lot. I have measured a factor of 7 on my system.

Second, in our Windows autobuilds there is a crash within std::sort which is
very hard to debug because it's hardly reproducible with anything other than
the autobuilds (I tried hard). If the crash goes away with timsort then
great, if not then maybe it's easier to debug since the code is in our tree.
2012-02-01 22:11:46 +01:00
Armin Burgmeier a1370c2954 Rename our custom gz* functions to avoid conflicts with zlib.dll
This fixes the build with native mingw for me.
2012-01-28 17:02:37 +01:00
Armin Burgmeier 23d54ea2c9 Implement UPnP for Linux using libupnp 2012-01-21 02:04:14 +01:00
Nicolas Hake 683800c33c win32: Add UPnP port mapping support 2012-01-15 21:27:16 +01:00
Armin Burgmeier 7e532c2bd6 Split math functions into StdMeshMath.{h,cpp} 2011-12-29 15:41:52 +01:00
Nicolas Hake 0dcfe72148 MSVC: Build all binaries directly in build dir
With this change, MSVC will build binaries in ${CMAKE_CURRENT_BINARY_DIR}
without adding any more subdirectories. It will also expect its data in a
directory called "planet" immediately below the binary directory.
Since MSVC allows building multiple configurations from the same input file,
the resulting binaries will be suffixed by the configuration type. An exception
is RelWithDebInfo, which will have no suffix; this was chosen over plain Release
to aid in debugging.

Building OpenClonk will work out of the box for in-source builds, but
out-of-source builds will have to create a symlink or a directory junction.
We consider this an acceptable drawback; it was proposed that if you use the
non-default option of an out-of-tree build, you will also know how to create a
link or a junction to, or copy the planet directory.

This changeset also revives looking for game data in the same directory as the
binary, which was part of c3fc1ee1ec8c [Peter Wortmann].
2011-11-10 02:01:21 +01:00
Nicolas Hake 74620be240 Backed out changeset: c3fc1ee1ec8c 2011-11-10 02:17:00 +01:00
Peter Wortmann d5c075ade8 Yet another variant on how to find data files
This time, the relocation code checks for a "System.c4g" in either
the executable path or a "data" folder directly below. CMake makes
sure that this points somewhere sensible for normal builds.

TODO:
* Check whether this actually works under Unixes. Can "ln -sf"
  delete important stuff? Is there a safe alternative?
* Further unify with the Mac Os solution. Other platforms might
  auto-pack for release builds too, for example - and it might
  be a good idea to have a proper data subdirectory in Mac bundles
  as well.
2011-11-09 00:45:07 +00:00
Günther Brammer cd93daf8b9 cmake: Replace redundant custom targets with a DEPENDS on the groups target
For some reason, add_dependencies didn't work for making the groups target
depend on the custom_commands, but specifying them via DEPENDS works.
2011-11-05 23:07:11 +01:00
Günther Brammer d709de7e73 cmake: Always pack groups during build
This fixes make install, which previously tried to install nonexistant
packed groups from the source directory. Make it use the ones from
the build directory and build them during make all.
2011-11-02 01:43:36 +01:00
Günther Brammer ccbf4d1d45 Consolidate duplicated simple Log functions
The various small utilities do not use the engine Log implementation but
one that simply prints to stdout. Instead of duplicating that one, link a
common one into the utilities.
2011-11-02 21:36:39 +01:00
Günther Brammer b911630578 Replace OpenSSL SHA1 implementation with one copied from boost/uuid
Although the code already uses boost, boost/uuid hides the sha1
implementation in a deeply nested namespace, which is just too bizarre to
use. Also the name of that namespace suggests that it is just an
implementation detail that could go away without notice.
2011-01-10 21:30:40 +01:00
Günther Brammer 3c41310fa3 Remove C4ConfigShareware to reduce OpenSSL dependency 2011-11-02 00:07:29 +01:00
Nicolas Hake f9f01bef9a cmake: Search for FMOD headers and add to include path 2011-10-28 23:49:11 +02:00
Nicolas Hake d5669964b8 tests: Fix on linux-gcc 2011-10-16 14:17:43 +02:00
Günther Brammer 7b325561f0 CMake: Remove now redundant code to pack c4groups during installation 2011-10-12 20:59:28 +02:00
Günther Brammer f1cedd5420 Look in the planet folder for game data, too
This replaces the BUILD_TO_PLANET option and makes in-tree Makefile builds
run without further work. Out-of-tree builds need a symlink to planet from
the build directory.
2011-10-11 15:15:41 +02:00
Julius Michaelis b7d67bd143 make install a predefined set of c4groups instead of everything in the planet directory 2011-10-11 18:59:58 +02:00
Peter Wortmann ad79ece074 Mac: Put game data into bundle
This makes it possible to ship the bundle stand-alone. Also
note that CMake will automatically pack the game data for
release builds, but sym-link the game data for debug builds.

Note this means you will only see the parts of planet/ that
are mentioned in OC_C4GROUPS in CMakeList.txt! This is equivalent
to the behaviour of the shipped build, so I don't see this as
a problem.
2011-10-09 17:09:48 +01:00
Günther Brammer 1cafba4be8 Rename files implementing C4AbstractApp and C4Window 2011-10-03 17:19:24 +02:00
Günther Brammer 55f6bc8d0f Replace CSurface and C4Surface with just C4Surface
The methods that previously were on C4Surface still are in a separate
file.
2011-10-03 16:06:41 +02:00
Günther Brammer efed250aa7 Rename CMarkup to C4Markup 2011-08-27 21:13:15 +02:00
Günther Brammer 6700bff4de Replace CFacet with C4Facet
The latter is almost a superset of the former.
2011-08-27 17:47:49 +02:00
Günther Brammer 19ce704ae5 CMake: Change project name to openclonk to avoid conflict with the binary
Apparently, Eclipse has problems with projects created by CMake that
have a binary with the name of the project.
2011-08-27 22:04:33 +02:00
Günther Brammer 562816cfe5 Clean up some unused variables and obsolete FIXMEs 2011-09-28 01:09:56 +02:00
Nicolas Hake 8073e1cb47 win32: Remove DirectX config option 2011-10-03 13:12:55 +02:00
Nicolas Hake cc672bbd00 win32: Automatically check for DbgHelp availability 2011-10-03 13:09:51 +02:00
Nicolas Hake 14f81d7eef Move cmake modules to separate directory 2011-10-03 13:03:22 +02:00
Tobias Zwick 461a8594c8 removed Tests.ocf from "setup" build configuration 2011-09-29 22:22:42 +02:00
Günther Brammer bfee2c5b81 Version 5.1.91 (5.2 Beta) 2011-09-27 01:15:00 +02:00
Günther Brammer 26ff41185e win32: Uninstaller correctly removes the user settings 2011-09-22 22:26:06 +02:00
Günther Brammer 1cea606c41 win32: Installer creation works with MSVC
CMake even reads the makensis path from the registry.
2011-09-21 22:25:33 +02:00
Günther Brammer 89e15ec212 win32: Installer gets the product name from the Version.txt 2011-09-22 22:37:18 +02:00
Günther Brammer c02354f56c win32: Add build rules for the installer to CMakeLists.txt and Makefile.am 2011-09-20 19:43:22 +02:00
Günther Brammer c46c2cfa5e cmake: Make switching to GTK3 after first run of cmake work
For some reason, the result of a pkg-config run is cached indefinitely,
even if the arguments change.
2011-08-31 19:40:22 +02:00
Nicolas Hake fe747db554 Clean up copyright notices
Use real names for copyright attribution wherever they are known,
drop duplicates
2011-09-01 12:47:54 +02:00
Nicolas Hake 021f464365 Add copyright header to CMakeLists.txt 2011-08-31 23:20:17 +02:00
Nicolas Hake fc194d62e1 msvc: Don't link release CRT in debug builds
This will prevent the linker from automatically linking to the release CRT
even if some library import libs suggest it.
2011-08-19 15:50:40 +02:00
Armin Burgmeier 771163be4b Correctly reload mesh materials on definition reload
This does not fix #76 yet, but it's a first step.
2011-08-17 23:50:33 +02:00
Günther Brammer 46ed387fef CMake: Use CMAKE_CURRENT_BINARY_DIR instead of CMAKE_CACHEFILE_DIR
For some reason, the latter is empty on the first CMake run.
2011-08-04 19:24:39 +02:00
Nicolas Hake 351896c921 Drop netpuncher from the default build, add script shell 2011-06-03 21:47:12 +02:00
Nicolas Hake b7244f8ca3 #589: Make c4script target compile on MSVC 2011-06-02 22:10:52 +02:00