Skip to content
Snippets Groups Projects
Commit 7189d62f authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

moved gmshLocalNetworkClient to Common/ so that we can compile ONELAB1 support without FLTK

parent 51570457
No related branches found
No related tags found
No related merge requests found
......@@ -26,5 +26,12 @@ set(SRC
GamePad.cpp
)
if(NOT ENABLE_ONELAB2)
set(SRC
${SRC}
gmshLocalNetworkClient.cpp
)
endif(NOT ENABLE_ONELAB2)
file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h)
append_gmsh_src(Common "${SRC};${HDR}")
......@@ -277,11 +277,8 @@ int GmshBatch()
CreateOutputFile(name, CTX::instance()->mesh.fileFormat);
}
#if defined(HAVE_FLTK) // FIXME this actually does not require the GUI
// launch solver (if requested)
solver_batch_cb(0, (void*)CTX::instance()->launchSolverAtStartup);
#endif
solver_batch_cb((void*)CTX::instance()->launchSolverAtStartup);
time_t now;
time(&now);
......
......@@ -28,9 +28,7 @@
#ifndef _GMSH_SOCKET_H_
#define _GMSH_SOCKET_H_
#if !defined(ONELAB_LOADER)
#include "GmshConfig.h"
#endif
#include <string>
#include <stdio.h>
......
This diff is collapsed.
......@@ -69,4 +69,16 @@ class gmshLocalNetworkClient : public onelab::localNetworkClient{
#endif
};
// FIXME: move this to onelabUtils
void initializeLoops();
bool incrementLoops();
void updateGraphs();
std::string timeStamp();
void saveDb(const std::string &fileName);
void archiveOutputFiles(const std::string &fileName);
void archiveSolutionFiles(const std::string &fileName);
void loadDb(const std::string &name);
void resetDb(bool runGmshClient);
void solver_batch_cb(void *data);
#endif
......@@ -26,24 +26,21 @@ set(SRC
projectionEditor.cpp
classificationEditor.cpp
partitionDialog.cpp
inputValue.cpp inputRegion.cpp
viewButton.cpp solverButton.cpp
Navigator.cpp
)
if(ENABLE_ONELAB2)
set(SRC
${SRC}
onelab2Group.cpp
)
else(ENALBE_ONELAB2)
else(ENABLE_ONELAB2)
set(SRC
${SRC}
onelabGroup.cpp
)
endif(ENABLE_ONELAB2)
set(SRC
${SRC}
inputValue.cpp inputRegion.cpp
viewButton.cpp solverButton.cpp
Navigator.cpp
)
file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h)
append_gmsh_src(Fltk "${SRC};${HDR}")
......@@ -83,7 +83,7 @@ void onelab_cb(Fl_Widget *w, void *data)
Msg::Info("I'm busy! Ask me that later...");
return;
}
if(action == "reset"){
OnelabDatabase::instance()->clear(); // TODO keep persitant
return;
......@@ -151,20 +151,6 @@ void solver_cb(Fl_Widget *w, void *data)
}
FlGui::instance()->onelab->updateGearMenu();
}
void solver_batch_cb(Fl_Widget *w, void *data)
{
int num = (intptr_t)data;
if(num >= 0) {
std::string name = opt_solver_name(num, GMSH_GET, "");
std::string exe = opt_solver_executable(num, GMSH_GET, "");
if(exe.empty()){
Msg::Error("Solver executable name not provided");
return;
}
}
Msg::Warning("solver_batch_cb TODO");
// TODO
}
static bool getFlColor(const std::string &str, Fl_Color &c)
{
......
......@@ -89,6 +89,6 @@ public:
void connect_cb(Fl_Widget *w, void *arg);
void onelab_cb(Fl_Widget *w, void *data);
inline void onelab_cb(void *data) {onelab_cb(0, data);}
void solver_cb(Fl_Widget *w, void *data);
void solver_batch_cb(Fl_Widget *w, void *data);
void solver_cb(void *data);
#endif
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment