Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Web GUI from Klas Eskilson (three new modules: webgui, webbrowser and cefwebgui) Parallel connection refactorization Wormhole server added to the main repository Transfer function editor work from Cristoffer Särevall Update ghoul
- Loading branch information
Showing
340 changed files
with
26,399 additions
and
1,623 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
########################################################################################## | ||
# # | ||
# OpenSpace # | ||
# # | ||
# Copyright (c) 2014-2018 # | ||
# # | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy of this # | ||
# software and associated documentation files (the "Software"), to deal in the Software # | ||
# without restriction, including without limitation the rights to use, copy, modify, # | ||
# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to # | ||
# permit persons to whom the Software is furnished to do so, subject to the following # | ||
# conditions: # | ||
# # | ||
# The above copyright notice and this permission notice shall be included in all copies # | ||
# or substantial portions of the Software. # | ||
# # | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # | ||
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # | ||
# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT # | ||
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF # | ||
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE # | ||
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # | ||
########################################################################################## | ||
|
||
include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake) | ||
|
||
set_source_files_properties( | ||
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns | ||
PROPERTIES MACOSX_PACKAGE_LOCATION "Resources" | ||
) | ||
|
||
set(MACOSX_BUNDLE_ICON_FILE openspace.icns) | ||
|
||
create_new_application( | ||
Wormhole | ||
MACOSX_BUNDLE | ||
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc | ||
${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns | ||
) | ||
|
||
target_link_libraries( | ||
Wormhole | ||
libOpenSpace | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
set(DEFAULT_APPLICATION ON) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
/***************************************************************************************** | ||
* * | ||
* OpenSpace * | ||
* * | ||
* Copyright (c) 2014-2018 * | ||
* * | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this * | ||
* software and associated documentation files (the "Software"), to deal in the Software * | ||
* without restriction, including without limitation the rights to use, copy, modify, * | ||
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * | ||
* permit persons to whom the Software is furnished to do so, subject to the following * | ||
* conditions: * | ||
* * | ||
* The above copyright notice and this permission notice shall be included in all copies * | ||
* or substantial portions of the Software. * | ||
* * | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * | ||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * | ||
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * | ||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * | ||
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * | ||
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * | ||
****************************************************************************************/ | ||
|
||
|
||
#include <ghoul/opengl/ghoul_gl.h> | ||
|
||
#include <ghoul/filesystem/filesystem.h> | ||
#include <ghoul/filesystem/directory.h> | ||
#include <ghoul/logging/logmanager.h> | ||
#include <ghoul/logging/consolelog.h> | ||
#include <ghoul/ghoul.h> | ||
#include <ghoul/cmdparser/commandlineparser.h> | ||
#include <ghoul/cmdparser/singlecommand.h> | ||
|
||
#include <openspace/engine/wrapper/windowwrapper.h> | ||
#include <openspace/scripting/scriptengine.h> | ||
#include <openspace/rendering/renderable.h> | ||
|
||
#include <openspace/network/parallelserver.h> | ||
|
||
#include <iostream> | ||
#include <string> | ||
#include <ghoul/glm.h> | ||
#include <functional> | ||
#include <sstream> | ||
#include <iomanip> | ||
#include <ios> | ||
|
||
namespace { | ||
const std::string _loggerCat = "Wormhole"; | ||
} | ||
|
||
int main(int argc, char** argv) { | ||
using namespace openspace; | ||
|
||
std::vector<std::string> arguments(argv, argv + argc); | ||
|
||
ghoul::cmdparser::CommandlineParser commandlineParser( | ||
"Wormhole", | ||
ghoul::cmdparser::CommandlineParser::AllowUnknownCommands::Yes | ||
); | ||
|
||
std::stringstream defaultPassword; | ||
defaultPassword << std::hex << std::setfill('0') << std::setw(6) << | ||
(std::hash<size_t>{}( | ||
std::chrono::system_clock::now().time_since_epoch().count() | ||
) % 0xffffff); | ||
|
||
std::stringstream defaultChangeHostPassword; | ||
defaultChangeHostPassword << std::hex << std::setfill('0') << std::setw(6) << | ||
(std::hash<size_t>{}( | ||
std::chrono::system_clock::now().time_since_epoch().count() + 1 | ||
) % 0xffffff); | ||
|
||
std::string portString = ""; | ||
commandlineParser.addCommand( | ||
std::make_unique<ghoul::cmdparser::SingleCommand<std::string>>( | ||
portString, | ||
"--port", | ||
"-p", | ||
"Sets the port to listen on" | ||
) | ||
); | ||
|
||
std::string password = ""; | ||
commandlineParser.addCommand( | ||
std::make_unique<ghoul::cmdparser::SingleCommand<std::string>>( | ||
password, | ||
"--password", | ||
"-l", | ||
"Sets the password to use" | ||
) | ||
); | ||
|
||
if (password == "") { | ||
password = defaultPassword.str(); | ||
LINFO(fmt::format("Connection password: {}", password)); | ||
} | ||
|
||
std::string changeHostPassword = ""; | ||
commandlineParser.addCommand( | ||
std::make_unique<ghoul::cmdparser::SingleCommand<std::string>>( | ||
password, | ||
"--hostpassword", | ||
"-h", | ||
"Sets the host password to use" | ||
) | ||
); | ||
|
||
if (changeHostPassword == "") { | ||
changeHostPassword = defaultChangeHostPassword.str(); | ||
LINFO(fmt::format("Host password: {}", changeHostPassword)); | ||
} | ||
|
||
commandlineParser.setCommandLine(arguments); | ||
commandlineParser.execute(); | ||
|
||
int port = 25001; | ||
|
||
if (portString != "") { | ||
try { | ||
port = std::stoi(portString); | ||
} | ||
catch (...) { | ||
LERROR(fmt::format("Invalid port: {}", portString)); | ||
} | ||
} | ||
|
||
ParallelServer server; | ||
server.start(port, password, changeHostPassword); | ||
server.setDefaultHostAddress("127.0.0.1"); | ||
LINFO(fmt::format("Server listening to port {}", port)); | ||
|
||
while (std::cin.get() != 'q') {} | ||
|
||
server.stop(); | ||
LINFO("Server stopped"); | ||
|
||
return 0; | ||
}; |
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
IDI_ICON1 ICON DISCARDABLE "openspace.ico" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
return { | ||
"kameleonmetadatatojson" | ||
} | ||
return {} |
Submodule ghoul
updated
11 files
+3 −29 | include/ghoul/io/socket/socket.h | |
+48 −22 | include/ghoul/io/socket/tcpsocket.h | |
+4 −4 | include/ghoul/io/socket/tcpsocket.inl | |
+27 −30 | include/ghoul/io/socket/websocket.h | |
+8 −24 | include/ghoul/io/socket/websocketserver.h | |
+23 −20 | include/ghoul/misc/easing.inl | |
+1 −1 | src/CMakeLists.txt | |
+110 −74 | src/io/socket/tcpsocket.cpp | |
+0 −1 | src/io/socket/tcpsocketserver.cpp | |
+59 −206 | src/io/socket/websocket.cpp | |
+22 −275 | src/io/socket/websocketserver.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.