Commit Graph

200 Commits (644f97efd376f01925e53ea583e0fbf8855d95f5)

Author SHA1 Message Date
Armin Burgmeier 644f97efd3 GObectify MapeTextureMap; add functions to get texture mapping entry 2012-02-18 21:10:07 +01:00
Armin Burgmeier 81e04899dc Merge default into mape 2012-02-12 19:41:48 +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
Armin Burgmeier bc980ebc12 GObject-ified MapeMaterialMap 2009-09-30 22:54:10 -04:00
Armin Burgmeier 45e79a3299 Removed mape/ include path, include by "mape/foo.h" instead 2009-09-26 22:43:09 -04:00
Armin Burgmeier 52464df1c0 GObject-ified MapeGroup 2009-09-26 21:54:47 -04:00
Armin Burgmeier 14bc6a0c5c Merged default into mape 2009-09-22 22:24:47 -04:00
Armin Burgmeier 2ef403728e Added initial mape code, and added it to the CMake build system
The code is not yet working properly, but it compiles
TODO: autotools build, material colors, Material&Texture overload,
relicensing, maybe algo=script
2009-09-21 00:04:52 -04:00
Armin Burgmeier c18b11fbc6 Fixed CMake build on Unix 2009-09-20 16:03:44 -04:00
Günther Brammer 1b17ad1808 Build fixes 2009-08-16 18:27:44 +02:00
Nicolas Hake 68b3b46381 cmake: Rename findlib vars to be more in line with package-provided library vars 2009-08-16 14:17:27 +02:00
Günther Brammer 179097d389 Build fixes
glew needs opengl32 on windows, and c4group needs zlib.
2009-08-15 21:55:26 +02:00
Günther Brammer a28a6621da shuffle the #includes around a bit
This reduces the dependencies from src/lib to the rest of the code a bit.
2009-08-12 22:03:50 +02:00
Günther Brammer b46f4696e9 Split C4Rect out to its own source file
Because much more depends on C4Rect than only C4Shape, and C4Shape uses
lots of other stuff.

Also move some other files which depend on C4Group to src/c4group, because
I'm editing the build files anyway.
2009-08-14 01:46:32 +02:00
Nicolas Hake 921c174841 cmake: Disable test for DX SDK if USE_DIRECTX is false 2009-08-13 18:09:00 +02:00
Nicolas Hake 276a5abfed Removed default-this object parameter from a lot of functions 2009-08-12 22:44:09 +02:00
Nicolas Hake 1286f8d3ce msvc: Use source folders in project 2009-08-12 15:15:05 +02:00
Nicolas Hake 7b83f7a8fc Use lists for platform-specific source files instead of string interpolation 2009-08-12 15:01:14 +02:00
Günther Brammer 572d00c32e Move all source files
This might make stuff easier to find.
2009-08-10 17:59:18 +02:00
Günther Brammer b73009e65b Cleanup 2009-08-05 00:53:38 +02:00
Nicolas Hake 07028f7bf2 CMake: Find WinSDK dir automatically
A lot of people don't seem to have their platform SDK include and lib
directories in their environment, so cmake doesn't find the required
libs. Read the location from the registry and make it known to cmake.
2009-07-25 22:56:06 +02:00
Nicolas Hake b0a7d4ed0d Fix problem where the DirectX SDK was not found in some circumstances 2009-07-24 00:48:41 +02:00
Günther Brammer f6b8d88a66 Update CMake build
The proplist branch predates the CMakeLists.txt.
If I had changed the Makefile.am today, I would have remembered to test a cmake build, honest!
2009-07-21 17:53:30 +02:00
Nicolas Hake 0d08565059 [MSVC9] Enable minimal rebuild and edit-and-continue 2009-07-12 18:46:54 +02:00
Nicolas Hake 532e58c2ff Remove unknown parameter warning from MSVC build 2009-07-11 19:44:14 +02:00