Commit Graph

60 Commits (master)

Author SHA1 Message Date
Webster Sheets 027d485e51 Add Application / GuiApplication abstraction
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
2020-03-27 17:04:07 -04:00
Andrew Copland 859f052263
Perf counter Windows memory info (#4820)
* 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
2020-03-01 15:02:49 +00:00
Webster Sheets 9e0b52ec9a src/ takes precedence over contrib/
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>
2020-02-28 00:09:13 -05:00
Paul Cercueil 9164f1708e Re-introduce support for remote Lua console
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2020-02-23 15:44:58 +01:00
Webster Sheets 485643ce13 Merge branch 'ui-hot-reload-refactor' into master 2020-02-19 14:40:31 -05:00
Karl F e9540885c0 Add codedoc-buidling to CMake, using naturaldoc (v1.x) 2020-02-13 08:52:19 +01:00
Webster Sheets 491ab1f37f Restore the ImGui stack after a lua error throw 2020-02-01 21:18:39 -05:00
Webster Sheets ec789570ec Split LuaUtils.cpp into topical files 2020-01-21 16:25:38 -05:00
Webster Sheets ec410f31d8 Update includes to point to new lua/ directory 2020-01-20 18:13:45 -05:00
cwyss ebb01fcdbb CMake profiler build option: support older versions of cmake 2020-01-16 21:20:59 +01:00
orbea 9dc55ca3c4 cmake: Don't install .gitignore files. 2019-10-09 13:41:44 +02:00
Andrew Copland 5b20e2e08c
Merge pull request #4664 from pcercuei/fix-appveyor
CMake: Ship Debian's FindGLEW.cmake script
2019-08-10 14:47:01 +01:00
Paul Cercueil a3a932ac4d
CMake: Ship Debian's FindGLEW.cmake script
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>
2019-08-10 14:36:58 +02:00
Paul Cercueil 86ccb5cd7b
CMake: Fix indentation
No functional change, just code cleanup.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-08-05 13:51:43 +02:00
Andrew Copland 3b5bade43b
Fix VS CMake (#4649)
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
2019-07-29 11:05:42 +01:00
Paul Cercueil 74108bd0d8
Autodetect availability of FPE ops
Use CMake to detect the availability of feclearexcept, feenableexcept,
fedisableexcept.

Fixes #4645.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-07-20 12:15:09 -04:00
Webster Sheets a7da158e53
Merge branch 'master' into startup-time 2019-07-08 00:28:43 -04:00
Paul Cercueil 29dc6f8ca2 CMake: Support MSVC build using thirdparty repo
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-07-03 11:00:43 +02:00
Paul Cercueil 805ce73fdd CMake: Only use pioneer-thirdparty on MSVC
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>
2019-07-03 11:00:43 +02:00
Paul Cercueil 4b161eb3a6 Fix build under Visual Studio 2017
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>
2019-07-03 11:00:43 +02:00
Paul Cercueil 2cb2d2979e CMake: Remove useless dependency on libpng
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>
2019-06-26 10:59:41 +02:00
Webster Sheets 0a83956014 Finish refactoring Serializer, add LZ4 compression for SGM files. 2019-06-21 11:24:02 -04:00
Webster Sheets 09a84e6694 Better profiling, speedup model saving / loading. 2019-06-17 18:14:27 -04:00
vakhoir b722c1e9d7 PiGui PersonalInformation view
Allow passing flags to child windows
Add ImageButtons that don't stretch the icon
2019-05-20 20:52:03 +02:00
Paul Cercueil e2378eb94c CMake: Search libraries in their directories
Fixes the build on OSX.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-03-24 18:05:44 +01:00
Paul Cercueil a6bbfe3840 CMake: Fix GLEW headers not included
Fixes the build on OSX.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-03-24 18:04:21 +01:00
Webster Sheets c815e4aba9 Refactor sound code to it's own folder, delete Pi::BoinkNoise. 2019-03-10 16:45:34 -04:00
Webster Sheets 34e896550a Split view controller to it's own class, added InputFrame code.
This conforms better to the new Input paradigm, and fixes a number of bugs
relating to the ship view incorrectly rotating while in another view.
2019-03-10 21:42:11 +01:00
Webster Sheets f1d674342e Upgrade travis to Xenial, add OSX compilation. 2019-02-17 00:09:24 -05:00
Andrew Copland 04c698d41b
Also install DDS and PNG files 2019-02-08 13:17:10 +00:00
Paul Cercueil 942389d4ed CMake: only install precompiled models
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-02-08 10:24:11 +01:00
Paul Cercueil 405c53df88 CMake: Require external modelcompiler when cross-compiling
Fixes #4526.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-02-08 10:23:05 +01:00
Andrew Copland 9931b31968
Merge pull request #4512 from pcercuei/install-metadata
Install metadata (.desktop, appstream.xml, PNG icons)
2019-01-21 13:28:49 +00:00
Paul Cercueil c0f820fa52 Faster build after commit (#4514)
* 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>
2019-01-21 09:19:07 +00:00
orbea 74c152d830 Revert "cmake: Add missing DESTDIR."
This reverts commit b97fe61476.
2019-01-06 10:59:20 +01:00
Paul Cercueil 9d5ca5890e CMake: Install PNG icon files too
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-01-05 20:22:33 -03:00
Paul Cercueil 8d2447099d CMake: on UNIX, install .desktop and appdata files
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2019-01-05 20:21:49 -03:00
orbea b97fe61476 cmake: Add missing DESTDIR.
This will be installed directly to the file system even when DESTDIR
is used.
2019-01-03 17:29:17 -08:00
Webster Sheets b6538b1218 Use dummy videodriver for modelcompiler. 2019-01-03 20:23:50 +01:00
orbea bca9f6ec35 cmake: Test for a .git directory.
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).
2019-01-03 15:22:05 +01:00
Paul Cercueil f0e6efe4e3 CMake: Fix linking with shlwapi on Windows
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>
2018-12-12 10:23:19 +01:00
Paul Cercueil 9837786cea CMake: Optimize models after modelcompiler is built
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2018-12-12 10:23:19 +01:00
Paul Cercueil e8a4c9fddd Add script for creating installer with Inno Setup
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>
2018-12-12 10:23:19 +01:00
Paul Cercueil 9cdecc8283 CMake: Compile meta-data information and icon file on Windows
The meta-data will give information about the program, such as its
license, version, and description.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2018-12-12 10:23:19 +01:00
Paul Cercueil 5003ec214c CMake: Fix handling of PIONEER_DATA_DIR
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>
2018-12-12 10:23:06 +01:00
Paul Cercueil 70153621ab CMake: Install DLL dependencies on Windows
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>
2018-12-12 01:10:50 +01:00
Paul Cercueil fdc46b53ce CMake: Install binary not in "bin" folder on Windows
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>
2018-12-12 01:10:46 +01:00
Webster Sheets 2ae112ba48 Disable colored output on travis, use static libraries when using pioneer_thirdparty. 2018-11-05 20:06:09 -05:00
Webster Sheets 0846c0f6b3 Change the job name, remove git leftovers. 2018-11-05 19:32:05 -05:00
Webster Sheets 681ac6a709 Switch to CMake builds.
Maybe possibly fix linking errors?
2018-11-05 18:35:48 -05:00