From ac946660dcfdd5dc2cd2231809e31a79d420f91e Mon Sep 17 00:00:00 2001 From: "C. J. Howard" Date: Sat, 16 Mar 2019 16:51:34 +0800 Subject: [PATCH] Make Windows build copy DLLs to output directory --- .gitignore | 0 CMakeLists.txt | 16 +++++++++++++++- COPYING | 0 src/dpi-aware.manifest | 0 src/entity/systems/particle-system.cpp | 0 src/entity/systems/particle-system.hpp | 0 src/game.cpp | 12 +++++++----- src/game.hpp | 6 ++---- src/game/brush.cpp | 0 src/game/brush.hpp | 0 src/game/camera-rig.cpp | 0 src/game/camera-rig.hpp | 0 src/game/curl-noise.cpp | 0 src/game/curl-noise.hpp | 0 src/game/forceps.cpp | 0 src/game/forceps.hpp | 0 src/game/lens.cpp | 0 src/game/lens.hpp | 0 src/game/tool.cpp | 0 src/game/tool.hpp | 0 src/graphics/clear-render-pass.cpp | 0 src/graphics/clear-render-pass.hpp | 0 src/graphics/final-render-pass.cpp | 0 src/graphics/final-render-pass.hpp | 0 src/graphics/lighting-render-pass.cpp | 0 src/graphics/lighting-render-pass.hpp | 0 src/graphics/shadow-map-render-pass.cpp | 0 src/graphics/shadow-map-render-pass.hpp | 0 src/graphics/silhouette-render-pass.cpp | 0 src/graphics/silhouette-render-pass.hpp | 0 src/graphics/sky-render-pass.cpp | 0 src/graphics/sky-render-pass.hpp | 0 src/graphics/ui-render-pass.cpp | 0 src/graphics/ui-render-pass.hpp | 0 src/main.cpp | 0 src/resources/material-loader.cpp | 0 src/resources/model-loader.cpp | 0 src/states/game-state.cpp | 0 src/states/game-state.hpp | 0 src/states/sandbox-state.cpp | 0 src/states/sandbox-state.hpp | 0 src/ui/ui.cpp | 0 src/ui/ui.hpp | 0 43 files changed, 24 insertions(+), 10 deletions(-) mode change 100755 => 100644 .gitignore mode change 100755 => 100644 COPYING mode change 100755 => 100644 src/dpi-aware.manifest mode change 100755 => 100644 src/entity/systems/particle-system.cpp mode change 100755 => 100644 src/entity/systems/particle-system.hpp mode change 100755 => 100644 src/game/brush.cpp mode change 100755 => 100644 src/game/brush.hpp mode change 100755 => 100644 src/game/camera-rig.cpp mode change 100755 => 100644 src/game/camera-rig.hpp mode change 100755 => 100644 src/game/curl-noise.cpp mode change 100755 => 100644 src/game/curl-noise.hpp mode change 100755 => 100644 src/game/forceps.cpp mode change 100755 => 100644 src/game/forceps.hpp mode change 100755 => 100644 src/game/lens.cpp mode change 100755 => 100644 src/game/lens.hpp mode change 100755 => 100644 src/game/tool.cpp mode change 100755 => 100644 src/game/tool.hpp mode change 100755 => 100644 src/graphics/clear-render-pass.cpp mode change 100755 => 100644 src/graphics/clear-render-pass.hpp mode change 100755 => 100644 src/graphics/final-render-pass.cpp mode change 100755 => 100644 src/graphics/final-render-pass.hpp mode change 100755 => 100644 src/graphics/lighting-render-pass.cpp mode change 100755 => 100644 src/graphics/lighting-render-pass.hpp mode change 100755 => 100644 src/graphics/shadow-map-render-pass.cpp mode change 100755 => 100644 src/graphics/shadow-map-render-pass.hpp mode change 100755 => 100644 src/graphics/silhouette-render-pass.cpp mode change 100755 => 100644 src/graphics/silhouette-render-pass.hpp mode change 100755 => 100644 src/graphics/sky-render-pass.cpp mode change 100755 => 100644 src/graphics/sky-render-pass.hpp mode change 100755 => 100644 src/graphics/ui-render-pass.cpp mode change 100755 => 100644 src/graphics/ui-render-pass.hpp mode change 100755 => 100644 src/main.cpp mode change 100755 => 100644 src/resources/material-loader.cpp mode change 100755 => 100644 src/resources/model-loader.cpp mode change 100755 => 100644 src/states/game-state.cpp mode change 100755 => 100644 src/states/game-state.hpp mode change 100755 => 100644 src/states/sandbox-state.cpp mode change 100755 => 100644 src/states/sandbox-state.hpp mode change 100755 => 100644 src/ui/ui.cpp mode change 100755 => 100644 src/ui/ui.hpp diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 diff --git a/CMakeLists.txt b/CMakeLists.txt index 3bb7ec4..c0bf953 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,4 +65,18 @@ target_include_directories(${EXECUTABLE_TARGET} target_link_libraries(${EXECUTABLE_TARGET} ${STATIC_LIBS} ${SHARED_LIBS}) # Install executable -install(TARGETS ${EXECUTABLE_TARGET} DESTINATION bin) +if(PACKAGE_PLATFORM MATCHES "linux") + install(TARGETS ${EXECUTABLE_TARGET} DESTINATION bin) +elseif(PACKAGE_PLATFORM MATCHES "win") + # Install executable + install(TARGETS ${EXECUTABLE_TARGET} DESTINATION .) + + # Install OpenAL DLL + if(CMAKE_BUILD_TYPE STREQUAL "Debug") + get_target_property(OPENAL_DLL OpenAL::OpenAL IMPORTED_LOCATION_DEBUG) + else() + get_target_property(OPENAL_DLL OpenAL::OpenAL IMPORTED_LOCATION_RELEASE) + endif() + + install(FILES ${OPENAL_DLL} DESTINATION .) +endif() diff --git a/COPYING b/COPYING old mode 100755 new mode 100644 diff --git a/src/dpi-aware.manifest b/src/dpi-aware.manifest old mode 100755 new mode 100644 diff --git a/src/entity/systems/particle-system.cpp b/src/entity/systems/particle-system.cpp old mode 100755 new mode 100644 diff --git a/src/entity/systems/particle-system.hpp b/src/entity/systems/particle-system.hpp old mode 100755 new mode 100644 diff --git a/src/game.cpp b/src/game.cpp index 033c5ab..f5cd813 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -18,7 +18,6 @@ */ #include "game.hpp" -#include "game-states.hpp" #include "resources/csv-table.hpp" #include "states/game-state.hpp" #include "states/sandbox-state.hpp" @@ -1814,7 +1813,7 @@ void Game::setupControls() // Setup input mapper inputMapper = new InputMapper(&eventDispatcher); - inputMapper->setCallback(std::bind(&Game::mapInput, this, std::placeholders::_1)); + inputMapper->setCallback(std::bind(&Game::inputMapped, this, std::placeholders::_1)); inputMapper->setControl(nullptr); inputMapper->setEnabled(false); } @@ -1870,6 +1869,7 @@ void Game::loadSettings() resetSettings(); // Load settings table + /* try { settingsTable = resourceManager->load("settings.csv"); @@ -1878,6 +1878,8 @@ void Game::loadSettings() { settingsTable = new CSVTable(); } + */ + settingsTable = new CSVTable(); // Build settings map for (std::size_t i = 0; i < settingsTable->size(); ++i) @@ -2759,7 +2761,7 @@ void Game::restringUI() // Settings menu strings settingsMenuControlsItem->setName(getString("controls")); - settingsMenuControlsItem->setValue(getString("dotdotdot")); + settingsMenuControlsItem->setValue(getString("ellipsis")); settingsMenuFullscreenItem->setName(getString("fullscreen")); settingsMenuFullscreenItem->setValue((fullscreen) ? onString : offString); settingsMenuVSyncItem->setName(getString("v-sync")); @@ -2923,7 +2925,7 @@ void Game::screenshot() glClear(GL_COLOR_BUFFER_BIT); } -void Game::mapInput(const InputMapping& mapping) +void Game::inputMapped(const InputMapping& mapping) { // Skip mouse motion events if (mapping.getType() == InputMappingType::MOUSE_MOTION) @@ -3032,7 +3034,7 @@ void Game::enterTitleState() menuFadeAnimation.rewind(); menuFadeAnimation.play(); - // Select the first menu item + // Open the main menu and select the first menu item openMenu(mainMenu, 0); } diff --git a/src/game.hpp b/src/game.hpp index e640f45..202b90d 100644 --- a/src/game.hpp +++ b/src/game.hpp @@ -173,6 +173,8 @@ private: std::array getInputMappingStrings(const InputMapping* mapping); void remapControl(Control* control); void resetControls(); + // Callback for the input mapper + void inputMapped(const InputMapping& mapping); void resizeUI(int w, int h); void restringUI(); @@ -184,10 +186,6 @@ private: void queueScreenshot(); void screenshot(); - - // Callback for the input mapper - void mapInput(const InputMapping& mapping); - // State functions void enterSplashState(); void exitSplashState(); diff --git a/src/game/brush.cpp b/src/game/brush.cpp old mode 100755 new mode 100644 diff --git a/src/game/brush.hpp b/src/game/brush.hpp old mode 100755 new mode 100644 diff --git a/src/game/camera-rig.cpp b/src/game/camera-rig.cpp old mode 100755 new mode 100644 diff --git a/src/game/camera-rig.hpp b/src/game/camera-rig.hpp old mode 100755 new mode 100644 diff --git a/src/game/curl-noise.cpp b/src/game/curl-noise.cpp old mode 100755 new mode 100644 diff --git a/src/game/curl-noise.hpp b/src/game/curl-noise.hpp old mode 100755 new mode 100644 diff --git a/src/game/forceps.cpp b/src/game/forceps.cpp old mode 100755 new mode 100644 diff --git a/src/game/forceps.hpp b/src/game/forceps.hpp old mode 100755 new mode 100644 diff --git a/src/game/lens.cpp b/src/game/lens.cpp old mode 100755 new mode 100644 diff --git a/src/game/lens.hpp b/src/game/lens.hpp old mode 100755 new mode 100644 diff --git a/src/game/tool.cpp b/src/game/tool.cpp old mode 100755 new mode 100644 diff --git a/src/game/tool.hpp b/src/game/tool.hpp old mode 100755 new mode 100644 diff --git a/src/graphics/clear-render-pass.cpp b/src/graphics/clear-render-pass.cpp old mode 100755 new mode 100644 diff --git a/src/graphics/clear-render-pass.hpp b/src/graphics/clear-render-pass.hpp old mode 100755 new mode 100644 diff --git a/src/graphics/final-render-pass.cpp b/src/graphics/final-render-pass.cpp old mode 100755 new mode 100644 diff --git a/src/graphics/final-render-pass.hpp b/src/graphics/final-render-pass.hpp old mode 100755 new mode 100644 diff --git a/src/graphics/lighting-render-pass.cpp b/src/graphics/lighting-render-pass.cpp old mode 100755 new mode 100644 diff --git a/src/graphics/lighting-render-pass.hpp b/src/graphics/lighting-render-pass.hpp old mode 100755 new mode 100644 diff --git a/src/graphics/shadow-map-render-pass.cpp b/src/graphics/shadow-map-render-pass.cpp old mode 100755 new mode 100644 diff --git a/src/graphics/shadow-map-render-pass.hpp b/src/graphics/shadow-map-render-pass.hpp old mode 100755 new mode 100644 diff --git a/src/graphics/silhouette-render-pass.cpp b/src/graphics/silhouette-render-pass.cpp old mode 100755 new mode 100644 diff --git a/src/graphics/silhouette-render-pass.hpp b/src/graphics/silhouette-render-pass.hpp old mode 100755 new mode 100644 diff --git a/src/graphics/sky-render-pass.cpp b/src/graphics/sky-render-pass.cpp old mode 100755 new mode 100644 diff --git a/src/graphics/sky-render-pass.hpp b/src/graphics/sky-render-pass.hpp old mode 100755 new mode 100644 diff --git a/src/graphics/ui-render-pass.cpp b/src/graphics/ui-render-pass.cpp old mode 100755 new mode 100644 diff --git a/src/graphics/ui-render-pass.hpp b/src/graphics/ui-render-pass.hpp old mode 100755 new mode 100644 diff --git a/src/main.cpp b/src/main.cpp old mode 100755 new mode 100644 diff --git a/src/resources/material-loader.cpp b/src/resources/material-loader.cpp old mode 100755 new mode 100644 diff --git a/src/resources/model-loader.cpp b/src/resources/model-loader.cpp old mode 100755 new mode 100644 diff --git a/src/states/game-state.cpp b/src/states/game-state.cpp old mode 100755 new mode 100644 diff --git a/src/states/game-state.hpp b/src/states/game-state.hpp old mode 100755 new mode 100644 diff --git a/src/states/sandbox-state.cpp b/src/states/sandbox-state.cpp old mode 100755 new mode 100644 diff --git a/src/states/sandbox-state.hpp b/src/states/sandbox-state.hpp old mode 100755 new mode 100644 diff --git a/src/ui/ui.cpp b/src/ui/ui.cpp old mode 100755 new mode 100644 diff --git a/src/ui/ui.hpp b/src/ui/ui.hpp old mode 100755 new mode 100644