-// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022 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
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+#include <ArgvKeeper.hxx>
#include <Container_init_python.hxx> // this include must be the first one as it includes Python.h
#include <Basics_Utils.hxx>
-#include <ConnectionManager_i.hxx>
#include <OpUtil.hxx>
#include <RegistryService.hxx>
#include <SALOME_LifeCycleCORBA.hxx>
#include <QTextStream>
#include <QWaitCondition>
+#ifdef WIN32
+extern "C" {
+// For DWORD (see end of file)
+#include "windef.h"
+// Force high-performance graphics on dual-GPU systems
+ // http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
+ __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
+ // https://community.amd.com/thread/169965
+ __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
+}
+#endif
+
//! CORBA server for SALOME GUI session
/*!
* SALOME_Session_Server launches a SALOME session servant.
{
using NamingServiceImplementation = typename GUI_APP_STYLE::NamingServiceImplementation;
setSSLMode(GUI_APP_STYLE::SSL_MODE);
+ setGUIMode(true);
GUI_APP_STYLE self;
// Set-up application settings configuration (as for QSettings)
// Note: these are default settings which can be customized (see below)
try
{
// ...create ORB, get RootPOA object, NamingService, etc.
- ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance();
- ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
int orbArgc = 1;
if (std::string(argv[1]).find("-ORBInitRef") != std::string::npos)
{
orbArgc = 3;
remoteLauncher = true;
}
- orb = init(orbArgc, argv);
+ SetArgcArgv(orbArgc, argv);
+ orb = KERNEL::GetRefToORB();
CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
poa = PortableServer::POA::_narrow(obj);