Add fixes for gui overlay

This commit is contained in:
gsfcospaceW1
2018-07-17 09:52:05 -04:00
committed by Matthias Berg
parent 37cd632aaf
commit 87a08d0c12
6 changed files with 17 additions and 14 deletions

View File

@@ -45,7 +45,7 @@ CefWebGuiModule::CefWebGuiModule()
{}
void CefWebGuiModule::internalInitialize(const ghoul::Dictionary&) {
_guiInstance = std::make_shared<BrowserInstance>(new GUIRenderHandler);
_guiInstance = std::make_shared<BrowserInstance>(new GUIRenderHandler());
_guiLocation = OsEng.configuration().cefWebGuiUrl;
OsEng.registerModuleCallback(

View File

@@ -26,6 +26,9 @@
#define __OPENSPACE_MODULE_CEFWEBGUI___CEFWEBGUIMODULE___H__
#include <openspace/util/openspacemodule.h>
#include <include/openspace/engine/configuration.h>
#include "modules/webbrowser/include/browserinstance.h"
#include "modules/cefwebgui/include/guirenderhandler.h"
namespace openspace {

View File

@@ -52,10 +52,6 @@
#include <chrono>
#include <ghoul/glm.h>
#ifdef _WIN32
#include <windows.h>
#endif
using Directory = ghoul::filesystem::Directory;
using File = ghoul::filesystem::File;
using RawPath = ghoul::filesystem::Directory::RawPath;
@@ -390,7 +386,7 @@ void Loader::processCurrentlySelectedUploadData(const std::string& dictionaryStr
std::mutex m;
std::function<void(float)> cb = [&](float progress) {
std::lock_guard g(m);
std::lock_guard<std::mutex> g(m);
_volumeConversionProgress = progress;
};

View File

@@ -66,12 +66,11 @@ void WebBrowserModule::internalDeinitialize() {
std::string WebBrowserModule::findHelperExecutable() {
if (!OsEng.configuration().webHelperLocation.empty()) {
std::string execLocation = absPath(
OsEng.configuration().webHelperLocation + SUBPROCESS_ENDING
);
auto execLocation = absPath(
OsEng.configuration().webHelperLocation + SUBPROCESS_ENDING);
if (!FileSys.fileExists(execLocation)) {
LERROR(fmt::format(
"Could not find web helper executable at location: {}" , execLocation
"Could not find web helper executable at location: {}", execLocation
));
}
return execLocation;

View File

@@ -26,8 +26,13 @@
#define __OPENSPACE_MODULE_WEBBROWSER___WEBBROWSERMODULE___H__
#include <openspace/util/openspacemodule.h>
#include <modules/webbrowser/include/eventhandler.h>
#include <ghoul/filesystem/directory.h>
#include <include/openspace/engine/configuration.h>
#include <include/wrapper/cef_helpers.h>
#include <include/cef_browser.h>
#include "include/eventhandler.h"
#include "include/browserinstance.h"
#include "include/cefhost.h"
namespace openspace {

View File

@@ -29,8 +29,8 @@ function(build_webgui_source target_name)
TARGET ${target_name} POST_BUILD
COMMAND ${NPM_COMMAND} install
# COMMAND ${NPM_COMMAND} run lint
# COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBGUI_MODULE_PATH}/web/dist "$<TARGET_FILE_DIR:${CEF_TARGET}>/gui"
# COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBGUI_MODULE_PATH}/web/dist/static "$<TARGET_FILE_DIR:${CEF_TARGET}>/gui/static"
COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBGUI_MODULE_PATH}/web/dist "$<TARGET_FILE_DIR:${CEF_TARGET}>/gui"
COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBGUI_MODULE_PATH}/web/dist/static "$<TARGET_FILE_DIR:${CEF_TARGET}>/gui/static"
WORKING_DIRECTORY ${WEBGUI_MODULE_PATH}/web
VERBATIM
)