Skip to content

Commit

Permalink
enabled simulator to be started in server mode without gui
Browse files Browse the repository at this point in the history
  • Loading branch information
xLPMG committed Jan 16, 2024
1 parent ce29b9f commit 4b37175
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ vars.AddVariables(
'yes',
allowed_values=('yes', 'no')
),
EnumVariable( 'server-mode',
'starts the simulator in server mode',
'yes',
allowed_values=('yes', 'no')
),
EnumVariable( 'use_filesystem',
'enables or disabled the filesystem usage',
'yes',
Expand Down Expand Up @@ -236,8 +241,10 @@ if 'yes' in env['gui']:
# add other OS specific flags
if OS == "Darwin":
env.AppendUnique(FRAMEWORKS=Split('OpenGL Cocoa IOKit CoreVideo'))
else:
env.Append( CXXFLAGS = [ '-DNOGUI' ] )

if 'no' in env['server-mode']:
env.Append( CXXFLAGS = [ '-DNOSERVER' ] )

#####################
# GET SOURCE FILES #
#####################
Expand Down
2 changes: 1 addition & 1 deletion src/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ int main(int i_argc, char *i_argv[])
int exitCode = 0;
simulator = new tsunami_lab::Simulator;

#ifndef NOGUI
#ifndef DNOSERVER
if (i_argc > 2)
{
m_PORT = atoi(i_argv[1]);
Expand Down

0 comments on commit 4b37175

Please sign in to comment.