Personal tools
You are here: Home Forum Extension of the platform New module by copying

New module by copying

Up to Extension of the platform

New module by copying

Posted by Damien BARBOSA at September 19. 2012

Hello,
I want to develop a new module.
To begin, I duplicated the module sources PYLIGHT (I want a python module without CORBA).

I used the function HXX2SALOME_6.5.0/bin/renameSalomeModule PYLIGHT NEWNAME NEWNAME_SRC_6.5.0

I changed the environment's files:
env_build.(c)sh
env_products.(c)sh
KERNEL_SRC_6.5.0/salome.(c)sh

by copying the rows for PYLIGHT

#------ NEWNAME ------
setenv NEWNAME_ROOT_DIR ${INST_ROOT}/NEWNAME_6.5.0
if ( ${?ENV_FOR_LAUNCH} ) then
  if ( "${ENV_FOR_LAUNCH}" == "1" ) then
    setenvp PATH ${NEWNAME_ROOT_DIR}/bin/salome
    setenvp PYTHONPATH ${NEWNAME_ROOT_DIR}/bin/salome
  endif
endif
##
#------ NEWNAME_src ------
setenv NEWNAME_SRC_DIR ${INST_ROOT}/NEWNAME_SRC_6.5.0
##


I compiled without error return:
./build.sh -o -p ~/salome_6.5.0 NEWNAME

and then change the file GUI_6.5.0/share/salome/resources/gui/SalomeApp.xm
, changing the line <parameter name="modules"    value="NEWNAME"/>

To start Salome:
cd ~/salome_6.5.0
./env_products.sh
cd KERNEL_6.5.0
source salome.sh
cd bin/salome
./runSalome



then I get the message:


runSalome running on xxxxxxxxxx
Searching for a free port for naming service: 2810 - OK
Searching Naming Service + found in 0.1 seconds
Searching /Containers/xxxx/FactoryServerPy in Naming Service +++++ found in 2.5 seconds
Searching /Kernel/Session in Naming Service ++++ found in 2.0 seconds
Start SALOME, elapsed time :   4.8 seconds
****************************************************************
*    Warning: NEWNAME GUI resources are not found.
*   
NEWNAME GUI will not be available.
****************************************************************
****************************************************************
*    Warning: modules list is empty.
****************************************************************



Do I miss something?

Re: New module by copying

Posted by Vadim SANDLER at September 19. 2012

Hello Damien,

This seems to be a problem of HXX2SALOME's renameSalomeModule tool. Indeed, it well replaces PYLIGHT by NEWNAME but does not properly replaces such things like:

  • pylight -> newname
  • PyLight -> NewName

To proceed further you can either run renameSalomeModule tool again to make above mentioned replacements. Or, at least, you can change manually 'pylight' by 'newname' in NEWNAME_SRC_6.5.0/configure.ac file. Than rebuild NEWNAME module and try running SALOME again - everything should work now.

Regards,
Vadim.

Re: New module by copying

Posted by Damien BARBOSA at September 19. 2012
Thank you!


I did:

then redo a compilation with:

But it did not start yet.
The execution of the compilation seemed too fast. I suddenly deleted the folder and restarted compiled command. But the file was not recreated.
I then compiled in several stages to identify potential errors:


cd NEWNAME_build
../
NEWNAME_SRC_6.5.0/build_configure
../
NEWNAME_SRC_6.5.0/configure --prefix=/home/user/salome_6.5.0/NEWNAME_6.5.0

 


make
make install



no error reassembled, the compiled file was created.
And this time to launch salome, no error. The module appeared.




It only remains for me the most work to do :)

Re: New module by copying

Posted by Damien BARBOSA at September 19. 2012

Correction:
compilation worked well, but had put the folder INSTALL

Re: New module by copying

Posted by Damien BARBOSA at September 21. 2012

Is there a doc specifically for the developement in python?

Powered by Ploneboard
Document Actions