A better way of handling initialization and updates
Still need to incorporate pigui handling into GuiApplication so we don't have to duplicate all of the pigui code
* Fixup projects after many changes
* Use GetProcessMemoryInfo to get memory details
* Moved bracket, spaced the header includes to preserver order, added psapi libs to cmake build
* Buggered up the CMake file
src/lua/Lua.h and contrib/lua/lua.h were conflicting on case-insensitive
filesystems like Windows and OSX (with non-portable include path support)
Ideally we want contrib/lua to have a different name, as we include lua
via #include <lua.hpp> and not #include <lua/lua.hpp>
This will be used only when compiling under MinGW, since MinGW's GLEW
config script seems to be really broken.
Fixes#4662.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Enable multithreaded compilation for VS, prevent it Optimizing the models per-build, fix up the pioneer-thirdparty paths, GLOB the header files, copy the DLLs needed for visual studio, Changed the appveyor MSVC prepare script
Use CMake to detect the availability of feclearexcept, feenableexcept,
fedisableexcept.
Fixes#4645.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
On all platforms (Windows, Linux, OSX), the automated builds and build
instructions don't use the pioneer-thirdparty repo. It's only ever
useful on Windows when building with Visual Studio.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Add a few defines and make 'main' functions extern "C" (see SDL_main.h)
to fix the build under Visual Studio 2017.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Libpng is a dependency of SDL2_image, not a direct dependency, so we
don't need to link against it.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
* Fix last formatting errors
Obtained by running clang-format on all *.cpp *.h files present in the
src/ directory and its subfolders.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
* CMake: Replace src/buildopts.h with a generated version
This has two benefits:
- The options WITH_OBJECTVIEWER and WITH_DEVKEYS are no more hardcoded,
and can be deselected in the configuration of CMake;
- The PIONEER_VERSION and PIONEER_EXTRAVERSION are no more passed inside
CPPFLAGS. Before, commiting changes meant that PIONEER_EXTRAVERSION
was updated to the new git tag, which meant that the whole sources had
to be recompiled again.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
* Don't include buildopts.h fom libs.h
Virtually all sources files include libs.h. If libs.h includes
buildopts.h, all the sources will be recompiled if one macro changes in
buildopts.h, and we don't want that.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
* Avoid including buildopts.h in headers
Without it, a lot of source files will be recompiled when buildopts.h
is updated.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
This prevents the following error when git is found and the source
directory is not a git repo.
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
target_link_libraries() cannot be given more than one target.
Also, all binaries must be linked to shlwapi, including savegamedump.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
This script can be used to generate an executable package file that will
install Pioneer into the users' system.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
The meta-data will give information about the program, such as its
license, version, and description.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
The PIONEER_DATA_DIR option, which was already in use in the CMake
script, is now present in the CMake UI like it should.
CMake will now install the data files inside the path specified
by PIONEER_DATA_DIR, instead of a hardcoded path.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
The Windows build of Pioneer is linked dynamically to the DLLs of its
dependencies. For Pioneer to work correctly, these DLLs need to be
present in the system. We then make sure that when Pioneer is installed,
these DLLs are copied to the executable's directory.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
The bin/etc/share/var etc. separation is a UNIX thing, we don't need to
do that when building for Windows.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>