Commit Graph

80 Commits (3032320d46f678a842b0593780373372ee03c05b)

Author SHA1 Message Date
Webster Sheets f08f00d334 Build with C++17, remove nonstd::string_view 2021-04-23 03:12:20 -04:00
Taylor Talkington 334990c70f Fix copying dlls to install folder for windows install target 2020-12-16 07:03:18 -05:00
Paul Cercueil 7ee5805c3f CMake: Fix modelcompiler not compiling anything
When models are installed on the system, the modelcompiler would use
these instead of the local ones found in the "data" folder. However,
the *.model files are not installed on the system, so the
modelcompiler would end up not compiling anything.

Fix this by returning only the local "data" folder files in
FileSystemPosix.cpp if the PIONEER_LOCAL_DATA_ONLY environment variable
is set, and set this environment variable in CMake when the
modelcompiler is called.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2020-12-10 15:24:07 -05:00
Webster Sheets 7506dcb849 It is the nature of all things to die...
and the reaper's due must be paid.

As we fly back to base after another successful mission, let us clear
comms in a moment of silence for the wingmates who no longer fly in
this squadron.

- To Robn, who wrote newUI in the first place. Without you, there would
  be no newUI or pigui, and I'd still be complaining about oldUI.
- To Johnbartholomew, who spearheaded the move of existing systems to
  newUI and implemented plenty of code we still use today.
- To ecraven, who did all of the work of adding ImGui to the code base
 and worked tirelessly to port existing screens.
- To vakhoir, who not only worked tirelessly to port the most
  recalcitrant of screens, but developed UI frameworks and paradigms
  that made working on the UI a pleasure instead of a pain.

This commit totally removes the newUI from the codebase. Everything that
made reference to it (save the LuaConsole) has been ported or struck
from the code. This has simplified some systems significantly, has
allowed us to drop 8,000+ lines of C++ code, cut our build times
significantly, and brings us one step closer to a modern rendering and
tools pipeline.
2020-12-01 13:02:34 -05:00
Andrew Copland 52b547f935
Merge pull request #5014 from The-EG/win-thirdparty-libs
Update pioneer-thirdparty Windows binaries
2020-11-27 20:57:54 +00:00
Webster Sheets a4bdcc1c02 Update COMPILING.txt regarding build methods
Also clean up the CMakeLists file and restore the thirdparty option for linux
2020-11-21 23:55:38 -05:00
taylor.talkington@gmail.com cdfe4a0fba Link against new VS2019 pioneer-thirdparty libs on Windows builds 2020-11-20 18:21:12 -05:00
Taylor Talkington 6598f7fada
MSVC CMake Updates (#5012)
* Silence C4506 Warnings on MSVC CMake builds

* Silence CMake 'installing' messages on AppVeyor builds
2020-11-15 17:54:56 -05:00
taylor.talkington@gmail.com 9aa6253ead Silence Inno Setup compressing messages 2020-11-12 12:49:16 -05:00
Webster Sheets 10006ebfc9
Merge pull request #4978 from Web-eWorks/input-frame-2.0
Input Frame 2.0
2020-11-11 19:27:31 -05:00
Webster Sheets f5d7038d69 Refactor to InputFrame 2.0
Significantly refactored the Input class, added Input::Manager to handle
most duties of the Input system.

Replaced the legacy KeyBindings system with the new InputBindings
(namespace subject to change) system for handling key state and key
chords - among other improvements, there is no longer a hardcoded
dependency on Pi::input anymore, as well as storing the binding state in
the binding itself, completely decoupling InputBindings from the input
system that handles input events and significantly reducing the
complexity of the binding system.

Input::Manager now is totally responsible for generating binding events,
removing the need for WorldView::HandleSDLEvent and its ilk - interested
parties can simply bind to the onPressed event and they will only be
notified when the binding in question is part of an active input frame
and nothing else has grabbed the input event, vastly simplifying control
flow.

Among other effects, this almost totally eradicates the need for
Pi::IsConsoleActive().

The lua Console widget is slightly broken as a result of this change,
it doesn't handle activation/deactivation state changes properly. The
solution to this seems to simply be a direct rewrite in PiGui, which
I don't expect to cause too many issues.

I've added a CMake option to use LLD to speed up incremental build link
times; this seems to be somewhat platform dependent and is not
implemented for windows at this time.

Serialization of key bindings to the config file is totally completed,
although support for a graphical method of binding multi-key chords is
not anticipated for this pull request.
2020-11-11 18:41:34 -05:00
Taylor Talkington 98c79f69b6
Update MSVC AppVeyor build and Installer generation (#4982)
Update the AppVeyor environment to Visual Studio 2019
Change the Appveyor cmake generator to Ninja (this is what VS now uses by default)
Un-hardcode some paths in pioneer.iss - manual creation of installer now much easier
Change output filename of installer to pioneer-(release)-win.exe
Add build target win-installer that can be used to build the installer
Build modelcompiler and savegamedump as console apps on Windows (AppVeyor)
Intall dlls from pioneer-thirdparty directly instead of using fixup_bundle
2020-11-11 15:17:01 -05:00
Paul Cercueil 9352dcbfd0
CMake: Avoid libGLU dependency
Set the GLEW_NO_GLU build flag to avoid pulling in <gl/glu.h> when
including <gl/glew.h>, as it otherwise adds a dependency we don't
actually need.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2020-11-03 15:16:27 +00:00
Webster Sheets 2d9531d3d7 Add more profiling points
Better profile the startup phase, add profiling to Sound.cpp
2020-08-31 21:06:04 -04:00
Webster Sheets 664f28ab25 Enable compilation with extra diagnostics 2020-08-16 00:58:57 -04:00
Taylor Talkington 5a823cd8ef Fix MSVC cmake build (#4658)
Update SIGCPP_LIBRARIES to use debug version for debug builds
Fix variable name reference in post_build command
Output executables to the root dir when doing MSVC build
2020-07-01 12:29:30 -04:00
Webster Sheets 6a1945874f Remove dependence on PngWriter
Now we don't need to link it into tool binaries!
Also removed unused MsgTimer functionality
2020-06-06 18:01:41 -04:00
Webster Sheets 36e1e5394b Add better logging framework
- Shim Error, Warning and Output to the new log framework
- Add multiple non-error log levels, and a non-fatal error log level
- Use fmt::fmt to format args instead of snprintf, avoid using variadics
- Remove the (no-op) OpenGLDebugMsg function
2020-05-15 16:39:37 -04:00
Webster Sheets 97ad693c9d Add fmt::fmt for better formatting
- Need to add to AUTHORS.txt, will do with string_view and argh
2020-05-15 16:39:22 -04:00
Webster Sheets 8076a7b767 Move several classes to core module
This is primarily to make tool development easier - right now the only
way to build a tool without linking all 90MB+ of pioneer binary into the
tool is to cherry-pick a set of cpp files and hope you have all the
symbols you need for what you're doing.

Over time, "generic" functionality like compression, math, etc. will be
moved to the core module so tools can link against one library without
incurring lengthy link and compile times.
2020-05-15 16:36:14 -04:00
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