From 5b3770d15abda21be56bb8e87a4e4439ccd4c6a2 Mon Sep 17 00:00:00 2001 From: "Penn, John M 047828115" Date: Mon, 18 Oct 2021 11:32:33 -0500 Subject: [PATCH] Fix civetweb header inclusion problem. #1188 --- include/trick/WebSocketSession.hh | 2 +- share/trick/makefiles/Makefile.common | 4 ++-- .../Cannon/SIM_cannon_webserver/RUN_graphics/input.py | 7 +++---- trick_sims/Cannon/models/httpMethods/TimeSession.hh | 2 +- .../Cannon/models/httpMethods/handle_HTTP_GET_hello.c | 6 +++--- .../web/CivetServer/include/VariableServerVariable.hh | 2 +- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/include/trick/WebSocketSession.hh b/include/trick/WebSocketSession.hh index e1b1b15d..0c643365 100644 --- a/include/trick/WebSocketSession.hh +++ b/include/trick/WebSocketSession.hh @@ -6,7 +6,7 @@ PURPOSE: (Represent Websocket connection.) #include #ifndef SWIG -#include "civet/CivetServer.h" +#include "CivetServer.h" #endif class WebSocketSession { diff --git a/share/trick/makefiles/Makefile.common b/share/trick/makefiles/Makefile.common index c7a32e5a..5e3ea318 100644 --- a/share/trick/makefiles/Makefile.common +++ b/share/trick/makefiles/Makefile.common @@ -174,9 +174,9 @@ ifneq ($(GSL_HOME),) endif ifeq (${USE_CIVETWEB},1) - TRICK_LIBS += -ltrickCivet + TRICK_LIBS += -ltrickCivet TRICK_EXEC_LINK_LIBS += -L${CIVETWEB_HOME}/lib -lcivetweb -lz - TRICK_SWIG_FLAGS += -DUSE_CIVETWEB + TRICK_SYSTEM_CXXFLAGS += -I$(CIVETWEB_HOME)/include TRICK_SYSTEM_CXXFLAGS += -DUSE_CIVETWEB TRICK_SYSTEM_ICG_EXCLUDE += ${CIVETWEB_HOME} endif diff --git a/trick_sims/Cannon/SIM_cannon_webserver/RUN_graphics/input.py b/trick_sims/Cannon/SIM_cannon_webserver/RUN_graphics/input.py index 4cfafb49..8a874ffd 100644 --- a/trick_sims/Cannon/SIM_cannon_webserver/RUN_graphics/input.py +++ b/trick_sims/Cannon/SIM_cannon_webserver/RUN_graphics/input.py @@ -4,11 +4,10 @@ exec(open("Modified_data/realtime.py").read()) # Start the Cannonball Graphics Client #========================================== web.server.enable = True -# web.server.debug = True -# web.server.port = 8888 -# web.server.document_root = "www" +web.server.debug = True +web.server.port = 8888 +web.server.document_root = "www" -trick.var_server_set_port(5001); varServerPort = trick.var_server_get_port(); CannonDisplay_path = "../models/graphics/dist/CannonDisplay.jar" diff --git a/trick_sims/Cannon/models/httpMethods/TimeSession.hh b/trick_sims/Cannon/models/httpMethods/TimeSession.hh index fc8fa94e..dee11bc2 100644 --- a/trick_sims/Cannon/models/httpMethods/TimeSession.hh +++ b/trick_sims/Cannon/models/httpMethods/TimeSession.hh @@ -22,4 +22,4 @@ class TimeSession : public WebSocketSession { }; WebSocketSession* makeTimeSession( struct mg_connection *nc ); -#endif \ No newline at end of file +#endif diff --git a/trick_sims/Cannon/models/httpMethods/handle_HTTP_GET_hello.c b/trick_sims/Cannon/models/httpMethods/handle_HTTP_GET_hello.c index 4ae22aa2..26e15688 100644 --- a/trick_sims/Cannon/models/httpMethods/handle_HTTP_GET_hello.c +++ b/trick_sims/Cannon/models/httpMethods/handle_HTTP_GET_hello.c @@ -1,5 +1,5 @@ -#include "civet/CivetServer.h" -#include "civet/civetweb.h" +#include "CivetServer.h" +#include "civetweb.h" #include void handle_HTTP_GET_hello(struct mg_connection *nc, void *hm) { @@ -8,4 +8,4 @@ void handle_HTTP_GET_hello(struct mg_connection *nc, void *hm) { "{ \"greeting\" : \"Hello Trick Sim Developer!\" }"; mg_send_chunk(nc, json_text, strlen(json_text)); mg_send_chunk(nc, "", 0); -} \ No newline at end of file +} diff --git a/trick_source/web/CivetServer/include/VariableServerVariable.hh b/trick_source/web/CivetServer/include/VariableServerVariable.hh index 49de147d..0a2ac982 100644 --- a/trick_source/web/CivetServer/include/VariableServerVariable.hh +++ b/trick_source/web/CivetServer/include/VariableServerVariable.hh @@ -10,7 +10,7 @@ LIBRARY DEPENDENCIES: #include #ifndef SWIG -#include "civet/CivetServer.h" +#include "CivetServer.h" #endif #include