Commit graph

94 commits

Author SHA1 Message Date
Yamagi Burmeister
48b8c199d9 We need to link libexecinfo for the backtrace() functions on FreeBSD. 2019-01-13 18:39:10 +01:00
Daniel Gibson
bd39f9ecf2 CMake: Make source files listing in VS usable
For some reason CMake thinks it's a great default to display all the source
files of a project in Visual Studio as a flat list (instead of in the
directory structure they're physically in).
source_group(TREE ...) *per project/"target"* helps.

Also, so far there was no reason to list or otherwise use header files
in CMakeLists.txt - but for them to turn up in VS they must be added to
the source lists. I've done that, but I'm sloppily globbing them instead
of adding each headder manually like it's done for the source files
(because it doesn't matter if a header that's not really used turns up
in those lists)
2019-01-07 15:06:59 +01:00
Daniel Gibson
f11c176f67 CMake: LINUX_RELEASE_BINS option that sets RPATH $ORIGIN/libs/
so we can bundle some libs with dhewm3 for Linux binaries
2018-12-15 05:49:19 +01:00
Daniel Gibson
3ca51bd73e Disable Assertions in Release builds
and handle the potential problem detected by one assert() that
apparently occurs (very rarely) with Ruiner/Riveness.
2018-11-11 23:21:23 +01:00
Daniel Gibson
4a94ec0ac0 Output --help text to Console window on Windows
(that Console thing they wrote for the dedicated server which is also used
by Sys_Error())
2018-11-10 20:28:02 +01:00
Daniel Gibson
6c1efd5a29 GCC/Clang: Don't use -ffast-math, Debug Build with -O0
I don't trust -ffast-math, not even with -fno-unsafe-math-optimizations
2018-11-05 04:33:57 +01:00
Yamagi Burmeister
043f0dfaa0 Lower release build optimizations from -O3 to -O2.
In the last few weeks I've played again through the game and kept an eye
on small oddities. And there're a lot of them. For example some GUIs and
videos getting stuck after the first frame (issue #192) or being unable
to protect the guy with the lamp in Alpha Labs 3. Some digging proved
that most - if not all - of these problems are caused by the compilers
optimization level. When build with -O2 both g++ 8.1 and clang 6.0.0 are
producing working code. g++ 8.1 with -O3 has some small, hard to notice
oddities, clang 6.0.0 with -O3 shows a lot of them. Since there's not
measurable difference between -O3 and -O2 just go down to the later:

x doom_o3.txt
+ doom_o2.txt
+----------------------------------------------------------------------+
|                                                               +      |
|                                      +                        *      |
|x                                     *           x            *      |
|                 |_____________________|___A______M__A_________M___|_||
+----------------------------------------------------------------------+

    N        Min           Max        Median           Avg        Stddev
x   5        173           178           177         176.4     2.0736441
+   5        176           178           178         177.2     1.0954451
2018-07-03 13:34:45 -01:00
Kalamatee
edf3b077ce use the correct extension for x86 2017-04-22 16:21:14 +02:00
Kalamatee
46279bf11f import AROS changes 2017-04-02 00:42:28 +01:00
David Carlier
09c1330a0e make it compilable under openbsd 2016-12-09 16:21:54 +00:00
svdijk
dd082b78de Win32: Add an icon to the dhewm3 executable 2015-10-03 09:17:30 +02:00
Daniel Gibson
d0e8f3bb55 Prepare for 1.4.0 release, make SDL2 default, update README
The version will be 1.4.0 because it's not compatible with
Doom3 1.3.1 mod DLLs.

(Note that this commit doesn't mean 1.4.0 is done, I might do some
 minor changes before tagging the Release!)
2015-09-27 03:08:30 +02:00
Daniel Gibson
657ad99bf1 Remove jpeg_memory_src hack that worked around old libjpeg versions
Because Debian Squeeze's libjpeg6 didn't have jpeg_mem_src(), we added
jpeg_memory_src() to provide the functionality.
This shouldn't be needed anymore and without it we can drop libjpeg code
from our repo.

Fixes #110
2015-03-22 16:49:26 +01:00
Daniel Gibson
2e47865234 Use updated minizip version for unzip
The implementation is now in framework/minizip/*
instead of framework/Unzip.cpp

This was version 0.15beta, now we use 1.1 from
zlib 1.2.7/contrib/minizip

Some code had to be adjusted for this, but it got
cleaner on the way
2013-06-12 00:07:09 +02:00
Kevin Doyon
6407881cff Fix SDL2 compile-errors, made it work on Win64
.. when compiled with MSVC2012
2013-05-02 21:13:06 +02:00
Daniel Gibson
cedc129a0e Silence "unknown pragma" warning in MSVC
Appeared quite often due to the #pragma GCC diagnostic ...
stuff in Str.h and List.h
2013-04-10 00:36:37 +02:00
Daniel Gibson
c193e0b98e Win32: Statically link libgcc and libstdc++
Else one needs to copy those files from mingw32.. and I see no reason
not to statically link them.
2012-11-13 23:12:42 +01:00
Daniel Gibson
105fdb0624 Fix dedicated server for Windows
* the OpenAL function definitions mustn't include __declspec(dllimport)
  => fixed by pretending to compile OpenAL statically
* glimp.cpp shouldn't be used in dedicated-only mode (as it was already
  the case on Linux and OSX)
  => No special handling for ID_DEDICATED needed in glimp.cpp, as it's not
   used anyway
* add APIENTRY to every gl function in stub_gl.cpp for compatibility
  with windows headers and MSVC
* remove GL/gl.h #include from win_local.h as it's not needed
* in qgl.h, when building dedicated server for windows, redefine WINGDIAPI
  to nothing for SDL_opengl.h #include to get rid off __declspec(dllimport)
  by using #pragma push_macro and pop_macro, because our stub is no dll.

Fixes https://github.com/dhewm/dhewm3/issues/39
2012-11-12 20:18:00 +01:00
dhewg
264fdfa10e Add SDL2 support for the build system
Defaults to off, tree doesn't yet compile with SDL2.
2012-07-20 17:34:32 +02:00
dhewg
826d0f7b7b cmake: set SDL_BUILDING_LIBRARY for win32 and osx
While that's a lie it makes FindSDL skip SDLmain, which we have
in tree and compile ourselves.
2012-07-20 16:43:38 +02:00
dhewg
e62e3870a3 Don't link against OpenGL
Dynamically load all symbols at runtime.
This in in preparation for SDL2/OpenGLES.
2012-07-20 16:43:37 +02:00
dhewg
f4de0ed8c1 Remove the deprecated arb renderer 2012-07-20 00:13:02 +02:00
dhewg
6aa9b3602e Remove the deprecated nv20 renderer 2012-07-20 00:13:01 +02:00
dhewg
3f67a28abe Remove the deprecated nv10 renderer 2012-07-20 00:13:00 +02:00
dhewg
138b7b1def Remove the ATI fragment shader emulation
This was only used by the r200 renderer on OSX.
2012-07-20 00:12:59 +02:00
dhewg
4b67aae8fe Remove the deprecated r200 renderer 2012-07-20 00:12:59 +02:00
dhewg
2cad07c38e Delete util_stub.cpp
Unused.
2012-07-20 00:12:57 +02:00
dhewg
020d1daf92 cmake: indent whitespace fixes 2012-07-10 10:10:35 +02:00
dhewg
f3ce725f8e cmake: Whitespace fixes for consistency 2012-07-09 23:31:35 +02:00
dhewg
28d127b230 cmake: default to build d3xp 2012-07-09 23:12:07 +02:00
dhewg
0b22c8e297 cmake: Remove fugly hack to compile 32bit binaries
This doesn't work on multiarch systems. A proper cmake toolchain file
has to be used instead.
2012-07-09 23:03:12 +02:00
dhewg
600a07e134 cmake: Fix error when curl is not found
Set the library name to an empty string to prevent this error:

CMake Error: The following variables are used in this project, but they
are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the
CMake files:
CURL_LIBRARY (ADVANCED)
2012-07-09 22:57:13 +02:00
dhewg
96e8b7b904 cmake: Use GNUInstallDirs
Provides configure style overwritable path settings.
Include a fallback for cmake versions without GNUInstallDirs.
2012-07-09 22:52:05 +02:00
dhewg
0bc457063f Get rid of the signal handler
SDL covers this via e.g. SDL_QUIT event on ctrl+c.
2012-07-06 01:31:27 +02:00
dhewg
1f9c88fc22 Correct the cpu type for 64bit msvc 2012-07-06 01:07:00 +02:00
dhewg
78822ac932 Disable warning 4267 for msvc
Spams the console due to 32bit data types on 64bit.
2012-07-06 01:07:00 +02:00
dhewg
68284f9a09 Get rid of empty sys/linux/dedicated.cpp 2012-07-06 01:06:56 +02:00
dhewg
9cbc9ff6db Get rid of win_cpu.cpp
All unused now.
2012-07-06 01:06:54 +02:00
dhewg
6179e855a9 Use system zlib 2012-07-04 18:56:29 +02:00
dhewg
764799c14f Initial make install target for *nix
cmake fails it, so *nix only.
2012-07-04 02:18:51 +02:00
dhewg
cac32559e7 Remove all gamepak FileSystem<->Async[Client|Server] code 2012-07-04 02:18:48 +02:00
dhewg
be37221024 Rename game libraries to the game name
Never use "game" as library name, use the game name instead. This
allows d3xp/mods to coexist in a single (installation-)directory.

This paves the way for future `make install` or binary installers.

Additionally, the "mods" menu entry works from within the game gui.
2012-07-04 02:18:43 +02:00
dhewg
1a5ddc01d0 Add TODO for OSX .dylib's for the bundle 2012-07-04 02:18:42 +02:00
dhewg
fecf720c75 Introduce CMAKE_INSTALL_PREFIX relative paths
configure style install dirs.
2012-07-04 02:18:42 +02:00
dhewg
262df52cdd Drop the CPU suffix from libraries on all platforms 2012-07-03 21:13:00 +02:00
dhewg
3256783af1 Get rid of ID_DEMO_BUILD
There are no demo pk4s compatible to this 1.3.1 codebase.
2012-07-03 21:12:55 +02:00
dhewg
e2ca3d1f84 Get rid of sys_stub.cpp
Unused.
2012-07-03 21:12:54 +02:00
dhewg
45a73e2dcd Add the build target "Profile" suitable for profiling 2012-01-19 00:53:16 +01:00
dhewg
898f690fc4 This is dhewm 3
Rename project, now at https://github.com/dhewm
2012-01-14 20:06:05 +01:00
dhewg
b7ce0ef149 CMake: Use config.h for BUILD_OS and BUILD_CPU
This fixes, among others, FreeBSD 64bit builds where the build
system used a "amd64" suffix and runtime "x86_64".
2012-01-14 15:19:12 +01:00