-// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#include "SALOME_Launcher.hxx"
#include "SALOMESDS_DataServerManager.hxx"
+#include "SALOME_ExternalServerLauncher.hxx"
+#include "SALOME_CPythonHelper.hxx"
#include "utilities.h"
#include <sstream>
#include <iostream>
{
// setsig(SIGSEGV,&Handler);
std::set_terminate(&terminateHandler);
- std::set_unexpected(&unexpectedHandler);
+ //std::set_unexpected(&unexpectedHandler);
}
/* Init libxml
* To avoid memory leak, need to call xmlInitParser in the main thread
policies[0] = PortableServer::ThreadPolicy::_duplicate(threadPol);
PortableServer::POA_var safePOA = root_poa->create_POA("SingleThreadPOA",pman,policies);
threadPol->destroy();
-
+ SALOME_CPythonHelper cPyh;
+ cPyh.initializePython(argc,argv);
SALOME_Launcher *lServ(new SALOME_Launcher(orb,safePOA));
+ lServ->DeclareUsingSalomeSession();
lServ->_remove_ref();
//
- SALOMESDS::DataServerManager *dsm(new SALOMESDS::DataServerManager(argc,argv,orb,root_poa));
+ SALOMESDS::DataServerManager *dsm(new SALOMESDS::DataServerManager(&cPyh,orb,root_poa));
dsm->_remove_ref();
//
+ SALOME_ExternalServerLauncher *esm(new SALOME_ExternalServerLauncher(&cPyh,orb,safePOA));
+ esm->_remove_ref();
+ //
orb->run();
orb->destroy();
}