Salome HOME
Merge branch 'master' into omu/pleiade8084 (cmake support)
[tools/yacsgen.git] / Examples / hxx1 / component.py
index 34a812722244720c9b46384a5e8672fc7d70ac54..dfac34f9c45b1a80259b8fa6f4eb816f6cdfc960 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2009-2013  EDF R&D
+# Copyright (C) 2009-2014  EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -28,7 +28,9 @@ gui_root_dir=os.environ["GUI_ROOT_DIR"]
 yacs_root_dir=os.environ["YACS_ROOT_DIR"]
 med_root_dir=os.environ["MED_ROOT_DIR"]
 geom_root_dir=os.environ["GEOM_ROOT_DIR"]
-prereq_file=os.path.join(kernel_root_dir,"..","env_products.sh")
+SALOME_ROOT=os.getenv("SALOME_DIR")
+prereq_file=os.path.join(SALOME_ROOT, "salome_prerequisites.sh")
+
 if not os.path.exists(prereq_file):
     prereq_file=os.path.join(kernel_root_dir,"..","..","env_products.sh")
 if not os.path.exists(prereq_file):
@@ -53,36 +55,26 @@ cpppath=os.path.join(cwd,"COMPONENTCPP_INSTALL")
 
 
 os.environ["CALCULCPP_ROOT_DIR"]=cpppath
-os.environ["MEDCALCCPP_ROOT_DIR"]=cpppath
-os.environ["TESTMEDCPP_ROOT_DIR"]=cpppath
 os.environ["ICOCOCPP_ROOT_DIR"]=cpppath
-os.environ["TESTMEMCPP_ROOT_DIR"]=cpppath
 c1=HXX2SALOMEComponent("CALCUL.hxx","libCALCULCXX.so" , cpppath )
-c2=HXX2SALOMEComponent("MEDCALC.hxx","libMEDCALCCXX.so" , cpppath )
-c3=HXX2SALOMEComponent("TESTMED.hxx","libTESTMEDCXX.so" , cpppath )
 c4=HXX2SALOMEComponent("ICOCO.hxx","libICOCOCXX.so" , cpppath )
-c5=HXX2SALOMEComponent("TESTMEM.hxx","libTESTMEMCXX.so" , cpppath )
 
 
-g=Generator(Module("hxxcompos",components=[c4,c1,c2,c3,c5],prefix="./install"),context)
+g=Generator(Module("hxxcompos",components=[c4,c1],prefix="./install"),context)
 g.generate()
-g.bootstrap()
 g.configure()
 g.make()
 g.install()
 g.make_appli("appli",
-             restrict=["KERNEL","GUI","YACS"],
-             altmodules={"GUI":gui_root_dir,
-                         "MED":med_root_dir,
-                         "YACS":yacs_root_dir,
-                         "GEOM":geom_root_dir})
+             restrict=["KERNEL","GUI","YACS","MED","GEOM"],
+#             altmodules={"GUI":gui_root_dir,
+#                         "MED":med_root_dir,
+#                         "YACS":yacs_root_dir,
+#                         "GEOM":geom_root_dir})
+            )
 cppenv=""" export CALCULCPP_ROOT_DIR=%(cpppath)s
-export MEDCALCCPP_ROOT_DIR=%(cpppath)s
-export TESTMEDCPP_ROOT_DIR=%(cpppath)s
-export ICOCOCPP_ROOT_DIR=%(cpppath)s
-export TESTMEMCPP_ROOT_DIR=%(cpppath)s"""  % {"cpppath" : cpppath}
+export ICOCOCPP_ROOT_DIR=%(cpppath)s """  % {"cpppath" : cpppath}
 
 cppenvfile=open("appli/env.d/cppEnv.sh","w")
 cppenvfile.write(cppenv)
 cppenvfile.close()
-