Aster examples (ast*) still need to be fixed.
Paco examples (paco*) do not work and will be probably removed.
$(FC) -c code1.f -fPIC -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions
clean:
- rm -rf *.o *.so install install.bak traceExec_proc appli appli.bak pycompos_SRC pycompos_SRC.bak
+ rm -rf *.o *.so install install.bak traceExec_proc appli appli.bak pycompos_SRC pycompos_SRC.bak pycompos_build pycompos_build.bak
#import context from ..
execfile("../context.py")
from module_generator import Generator,Module,Service,PYComponent,CPPComponent,F77Component
+from module_generator import Library
# C++ component
],
),
],
- libs="-L%s -lcode1" % cwd,
- rlibs="-Wl,--rpath -Wl,%s" % cwd,
+ libs=[Library(name="code1", path=cwd)],
+ rlibs=cwd,
)
-g=Generator(Module("pycompos",components=[c1,c2,c3],prefix="./install",layout="multidir"),context)
+g=Generator(Module("pycompos",components=[c1,c2,c3],prefix="./install"),context)
g.generate()
-g.bootstrap()
g.configure()
g.make()
g.install()
$(FC) -c code1.f -fPIC -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions
clean:
- rm -rf *.o *.so install install.bak traceExec_proc appli appli.bak pycompos_SRC pycompos_SRC.bak
+ rm -rf *.o *.so install install.bak traceExec_proc appli appli.bak pycompos_SRC pycompos_SRC.bak pycompos_build pycompos_build.bak
#import context from ..
execfile("../context.py")
from module_generator import Generator,Module,Service,PYComponent,CPPComponent,F77Component
+from module_generator import Library
# C++ component
],
),
],
- libs="-L%s -lcode1" % cwd,
- rlibs="-Wl,--rpath -Wl,%s" % cwd,
+ libs=[Library(name="code1", path=cwd)],
+ rlibs=cwd,
)
-g=Generator(Module("pycompos",components=[c1,c2,c3],prefix="./install",layout="multidir"),context)
+g=Generator(Module("pycompos",components=[c1,c2,c3],prefix="./install"),context)
g.generate()
-g.bootstrap()
g.configure()
g.make()
g.install()
#
import os,sys
-sys.path.insert(0,"../..")
-SALOME_ROOT=os.path.expanduser("~/Salome/Install")
-SALOME_PREREQ=os.path.expanduser("~/.packages.d/envSalome6main")
+SALOME_ROOT=os.getenv("SALOME_DIR")
+SALOME_PREREQ=os.path.join(SALOME_ROOT, "salome_prerequisites.sh")
+#SALOME_PREREQ=os.path.join(SALOME_ROOT, "salome_prerequisites_appli.sh")
-KERNEL_ROOT_DIR=os.getenv("KERNEL_ROOT_DIR",os.path.join(SALOME_ROOT,"KERNEL_V6"))
-GUI_ROOT_DIR=os.getenv("GUI_ROOT_DIR",os.path.join(SALOME_ROOT,"GUI_V6"))
-YACS_ROOT_DIR=os.getenv("YACS_ROOT_DIR",os.path.join(SALOME_ROOT,"YACS_V6"))
-GEOM_ROOT_DIR=os.getenv("GEOM_ROOT_DIR",os.path.join(SALOME_ROOT,"GEOM_V6"))
+KERNEL_ROOT_DIR=os.getenv("KERNEL_ROOT_DIR","")
+GUI_ROOT_DIR=os.getenv("GUI_ROOT_DIR","")
+YACS_ROOT_DIR=os.getenv("YACS_ROOT_DIR","")
+GEOM_ROOT_DIR=os.getenv("GEOM_ROOT_DIR","")
context={'update':1,
"makeflags":"",
#
clean:
- rm -rf *.o *.so cppcompos_SRC cppcompos_SRC.bak appli appli.bak install install.bak traceExec_proc
+ rm -rf *.o *.so cppcompos_SRC cppcompos_SRC.bak appli appli.bak install install.bak traceExec_proc cppcompos_build.bak cppcompos_build
defs="//def1",body=body,
),
],
- includes="-I/usr/include",
calciumextendedinterface=1,
)
g=Generator(Module("cppcompos",components=[c1],prefix="./install"),context)
g.generate()
-g.bootstrap()
g.configure()
g.make()
g.install()
include ../makefile.inc
prog:prog.cxx
- g++ -o prog prog.cxx -L./install/lib/salome -lcompo1Exelib
+ g++ -o prog prog.cxx -L./install/lib/salome -lcompo1Exelib -lSalomeIDLcppcompos
clean:
- rm -rf *.o prog install install.bak appli appli.bak cppcompos_SRC cppcompos_SRC.bak compo1_inst_1 traceExec_proc
+ rm -rf *.o prog install install.bak appli appli.bak cppcompos_SRC cppcompos_SRC.bak compo1_inst_1 traceExec_proc cppcompos_build cppcompos_build.bak
defs="//def1",body=body,
),
],
- includes="-I/usr/include",
kind="exe",
exe_path=os.path.join(cwd,"prog"),
)
g=Generator(Module("cppcompos",components=[c1],prefix="./install"),context)
g.generate()
-g.bootstrap()
g.configure()
g.make()
g.install()
#
clean:
- rm -rf *.o *.so cppcompos_SRC cppcompos_SRC.bak appli appli.bak install install.bak traceExec_proc
+ rm -rf *.o *.so cppcompos_SRC cppcompos_SRC.bak appli appli.bak install install.bak traceExec_proc cppcompos_build.bak cppcompos_build
defs="//def1",body=body,
),
],
- includes="-I/usr/include",
idls=["*.idl"],
interfacedefs=idldefs,
inheritedinterface="Idl_A",
g=Generator(modul,context)
g.generate()
-g.bootstrap()
g.configure()
g.make()
g.install()
--- /dev/null
+#/bin/bash
+# execute a command within SALOME environment
+
+com=$*
+
+# Modify to your SALOME installation
+export SALOME_DIR=/local00/home/I35256/salome/install/V7_main_git
+
+source $SALOME_DIR/salome_prerequisites.sh
+source $SALOME_DIR/salome_modules.sh
+
+echo execution: $com
+$com
+
$(FC) -shared -fPIC -o libcode1.so code1.o
code1.o:code1.f
$(FC) -c code1.f -fPIC -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions
-libcode2.so:code2.o
- $(FC) -shared -fPIC -o libcode2.so code2.o
+libcode2.so:code2.o bidul.o
+ $(FC) -shared -fPIC -o libcode2.so code2.o bidul.o
code2.o:code2.f
$(FC) -c code2.f -fPIC -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions
+bidul.o:bidul.f
+ $(FC) -c bidul.f -fPIC -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions
+
clean:
- rm -rf *.o *.so fcompos_SRC install fcompos_SRC.bak traceExec_proc appli appli.bak install.bak
+ rm -rf *.o *.so fcompos_SRC install fcompos_SRC.bak traceExec_proc appli appli.bak install.bak fcompos_build fcompos_build.bak
#import context from ..
execfile("../context.py")
from module_generator import Generator,Module,Service,F77Component
+from module_generator import Library
cwd=os.getcwd()
c1=F77Component("fcode1", services=[Service("serv1",inport=[("a","double"),("b","double")],
outport=[("c","double")],
outstream=[("PARAM","CALCIUM_double","I")],), ],
- libs="-L%s -lcode1" % cwd,
- rlibs="-Wl,--rpath -Wl,%s" % cwd,
+ libs = [Library(name="code1", path=cwd)],
+ rlibs = cwd,
)
c2=F77Component("fcode2", services=[Service("serv1",inport=[("a","double"),("b","double")],
g=Generator(Module("fcompos",components=[c1,c2],prefix="./install"),context)
g.generate()
-g.bootstrap()
g.configure()
g.make()
g.install()
include ../makefile.inc
+OPT_RPATH=-Wl,-rpath-link,$(KERNEL_ROOT_DIR)/lib/salome -Wl,-rpath-link,install/lib/salome
+
all:prog1 prog2
prog1:code1.o
- $(FC) -o prog1 code1.o -L./install/lib/salome -lfcode1Exelib -L$(KERNEL_ROOT_DIR)/lib/salome -lCalciumC
+ $(FC) -o prog1 code1.o -L./install/lib/salome -lfcode1Exelib -L$(KERNEL_ROOT_DIR)/lib/salome -lCalciumC $(OPT_RPATH)
code1.o:code1.f
$(FC) -c code1.f -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions
prog2:code2.o
- $(FC) -o prog2 code2.o -L./install/lib/salome -lfcode2Exelib -L$(KERNEL_ROOT_DIR)/lib/salome -lCalciumC
+ $(FC) -o prog2 code2.o -L./install/lib/salome -lfcode2Exelib -L$(KERNEL_ROOT_DIR)/lib/salome -lCalciumC $(OPT_RPATH)
code2.o:code2.f
$(FC) -c code2.f -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions
clean:
- rm -rf *.o prog1 prog2 fcode1_inst_1 fcode2_inst_1 fcompos_SRC install traceExec_proc install.bak fcompos_SRC.bak appli appli.bak
+ rm -rf *.o prog1 prog2 fcode1_inst_1 fcode2_inst_1 fcompos_SRC install traceExec_proc install.bak fcompos_SRC.bak appli appli.bak fcompos_build.bak fcompos_build
g=Generator(Module("fcompos",components=[c1,c2],prefix="./install"),context)
g.generate()
-g.bootstrap()
g.configure()
g.make()
g.install()
#
clean:
- rm -rf *.o *.so hxxcompos_SRC hxxcompos_SRC.bak appli appli.bak install install.bak traceExec_proc COMPONENTCPP_INSTALL COMPONENTCPP_SRC COMPONENTCPP_BUILD parse_result parse_type_result
+ rm -rf parse_* appli install hxxcompos_* COMPONENTCPP_*
--- /dev/null
+
+# build COMPONENTCPP lib
+tar -xzvf cpp_component.tgz
+mkdir COMPONENTCPP_BUILD
+export HXXTESTPATH=`pwd`
+cd COMPONENTCPP_SRC
+../../exec.sh ./build_configure
+cd ../COMPONENTCPP_BUILD
+../../exec.sh ../COMPONENTCPP_SRC/configure --prefix=$HXXTESTPATH/COMPONENTCPP_INSTALL
+../../exec.sh make
+../../exec.sh make install
+cd ..
+# build & test SALOME component
+../exec.sh python component.py
+
+appli/salome start -t
+sleep 2
+appli/salome shell python test_compohxx.py
+appli/salome killall
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):
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 ICOCOCPP_ROOT_DIR=%(cpppath)s """ % {"cpppath" : cpppath}
cppenvfile=open("appli/env.d/cppEnv.sh","w")
cppenvfile.write(cppenv)
cppenvfile.close()
-
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-KERNEL_ROOT_DIR=$(HOME)/Salome/Install/KERNEL_V6
-MED2HOME=/temp
+#MED2HOME=/temp
ASTER_ROOT=$(HOME)/Aster/V10.3/aster
ASTER_VERSION=STA10.3
#
clean:
- rm -rf *.pyc pycompos_SRC pycompos_SRC.bak appli appli.bak install install.bak traceExec_proc
+ rm -rf *.pyc pycompos_* appli appli.bak install install.bak traceExec_proc
g=Generator(modul,context)
g.generate()
-g.bootstrap()
g.configure()
g.make()
g.install()
#
clean:
- rm -rf *.pyc pycompos_SRC pycompos_SRC.bak appli appli.bak install install.bak traceExec_proc
+ rm -rf *.pyc pycompos_SRC pycompos_SRC.bak appli appli.bak install install.bak traceExec_proc pycompos_build.bak pycompos_build
g=Generator(modul,context)
g.generate()
-g.bootstrap()
g.configure()
g.make()
g.install()
#
clean:
- rm -rf *.o *.so *.pyc pycompos_SRC pycompos_SRC.bak appli appli.bak install install.bak traceExec_proc
+ rm -rf *.o *.so *.pyc pycompos_SRC pycompos_SRC.bak appli appli.bak install install.bak traceExec_proc pycompos_build.bak pycompos_build
g=Generator(Module("pycompos",components=[c1],prefix="./install"),context)
g.generate()
-g.bootstrap()
g.configure()
g.make()
g.install()
#
clean:
- rm -rf *.o *.so *.pyc pycompos_SRC pycompos_SRC.bak appli appli.bak install install.bak traceExec_proc compo2_inst_1
+ rm -rf *.o *.so *.pyc pycompos_SRC pycompos_SRC.bak appli appli.bak install install.bak traceExec_proc compo2_inst_1 pycompos_build.bak pycompos_build
g=Generator(Module("pycompos",components=[c1],prefix="./install"),context)
g.generate()
-g.bootstrap()
g.configure()
g.make()
g.install()
#
clean:
- rm -rf *.o *.so mymodule_SRC mymodule_SRC.bak appli appli.bak install install.bak traceExec_*
+ rm -rf *.o *.so *.bak mymodule_SRC mymodule_build appli install traceExec_*
from module_generator import Generator,Module,Service,CPPComponent,PYComponent,add_type,add_module
-#overload module GEOM definition
-idldefs="""
-#include "GEOM_Gen.idl"
-"""
-makefiledefs="""
-#module GEOM
-GEOM_IDL_INCLUDES = -I$(GEOM_ROOT_DIR)/idl/salome
-GEOM_INCLUDES= -I$(GEOM_ROOT_DIR)/include/salome
-GEOM_IDL_LIBS= -L$(GEOM_ROOT_DIR)/lib/salome -lSalomeIDLGEOM
-GEOM_LIBS= -L$(GEOM_ROOT_DIR)/lib/salome
-SALOME_LIBS += ${GEOM_LIBS}
-SALOME_IDL_LIBS += ${GEOM_IDL_LIBS}
-SALOME_INCLUDES += ${GEOM_INCLUDES}
-IDL_INCLUDES += ${GEOM_IDL_INCLUDES}
-"""
-configdefs="""
-if test "x${GEOM_ROOT_DIR}" != "x" && test -d ${GEOM_ROOT_DIR} ; then
- AC_MSG_RESULT(Using GEOM installation in ${GEOM_ROOT_DIR})
-else
- AC_MSG_ERROR([Cannot find module GEOM. Have you set GEOM_ROOT_DIR ?],1)
-fi
-"""
-add_module("GEOM",idldefs,makefiledefs,configdefs)
-
#overload GEOM_Object definition
add_type("GEOM_Object", "GEOM::GEOM_Object_ptr", "GEOM::GEOM_Object_out", "GEOM", "GEOM::GEOM_Object","GEOM::GEOM_Object_ptr")
g=Generator(Module("mymodule",components=[c1,c2],prefix="./install"),context)
g.generate()
-g.bootstrap()
g.configure()
g.make()
g.install()