2 # -*- coding: utf-8 -*-
4 # Copyright (C) 2008-2019 EDF R&D
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2.1 of the License.
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Lesser General Public License for more details.
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 # Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
25 Launching the standalone EFICAS/ADAO interface
30 # ==============================================================================
31 # Chemin pour l'installation (ordre important)
32 if "EFICAS_ROOT" in os.environ:
33 EFICAS_ROOT = os.environ["EFICAS_ROOT"]
36 print("\nKeyError:\n"+\
37 " the required environment variable EFICAS_ROOT is unknown.\n"+\
38 " You have either to be in SALOME environment, or to set this\n"+\
39 " variable in your environment to the right path \"<...>\" to find\n"+\
40 " an installed EFICAS application. For example:\n"+\
41 " EFICAS_ROOT=\"<...>\" %s"%__file__
48 print("\nImportError:\n"+\
49 " the required ADAO library can not be found to be imported.\n"+\
50 " You have either to be in ADAO environment, or to be in SALOME\n"+\
51 " environment, or to set manually in your Python 3 environment the\n"+\
52 " right path \"<...>\" to find an installed ADAO application. For\n"+\
54 " PYTHONPATH=\"<...>:${PYTHONPATH}\" %s"%__file__
61 print("\nImportError:\n"+\
62 " the required PyQt5 library can not be found to be imported.\n"+\
63 " You have either to have a raisonable up-to-date Python 3\n"+\
64 " installation (less than 5 years), or to be in SALOME environment."
68 print("\nWarning:\n"+\
69 " It seems you have some troubles with your installation. It may\n"+\
70 " exists other errors than are not explained as above, like some\n"+\
71 " incomplete or obsolete Python 3 and module installation.\n"+\
73 " Please correct the above error(s) before launching the\n"+\
74 " standalone EFICAS/ADAO interface \"%s\"\n"%__file__
78 print("Launching the standalone EFICAS/ADAO interface...")
79 sys.path.insert(0,EFICAS_ROOT)
80 sys.path.insert(0,os.path.join(adao.adao_py_dir,"daEficas"))
82 # ==============================================================================
83 # Préférences et module EFICAS
84 from daEficas import prefs
85 from InterfaceQT4 import eficas_go
87 eficas_go.lanceEficas(code=prefs.code)
88 # ==============================================================================