Scilab: mudanças entre as edições
(→Hacking: hack journal) |
|||
Linha 107: | Linha 107: | ||
** a JVM gets started in C++ at scilab/modules/gui/src/jni/Jxgetmouse.cpp | ** a JVM gets started in C++ at scilab/modules/gui/src/jni/Jxgetmouse.cpp | ||
** developer writes the .java, as well as a .xml (scilab/modules/gui/src/jni/Jxgetmouse.giws.xml) to interface it with scilab (enabling a scilab language call xgetmouse to get java) | ** developer writes the .java, as well as a .xml (scilab/modules/gui/src/jni/Jxgetmouse.giws.xml) to interface it with scilab (enabling a scilab language call xgetmouse to get java) | ||
** the tool to get the xml and generate the .cpp is called GIWS | ** the tool to get the xml and generate the .cpp and is called GIWS | ||
** there are other files which Im not sure if they are automagically generated: | |||
*** /scilab/modules/graphics/sci_gateway/c/sci_xgetmouse.c and /scilab/modules/gui/includes/CallJxgetmouse.h | |||
== Collaborators within Lab Macambira == | == Collaborators within Lab Macambira == |
Edição das 04h28min de 20 de abril de 2012
Scilab is a programming language associated with a rich collection of numeric algorithms for covering most aspects of computational and scientific problems.
Cloning
Cloning the Scilab repository. It is a large project - you will be downloading over 300MB of code.
Git
$ git clone git://git.scilab.org/scilab
Compiling
After cloning the git repository, a good approach for installing the required dependencies is:
$ sudo apt-get build-dep scilab
or
$ sudo aptitude build-dep scilab
After that,
$ ./configure
Probably there will be a couple of dependencies which are required to be more recent than the installed one. Look around the internet for them.
For the master branch, I had problems with libjgraphx (latest one was not available in Ubuntu 11.10).
- Download it from official site.
- Extract and enter jgraphx/lib/
$ sudo cp jgraphx.jar /usr/share/java/jgraphx-1.9.2.5.jar $ sudo ln -sf /usr/share/java/jgraphx-1.9.2.5.jar /usr/share/java/jgraphx.jar
The master branch also asked for updated flexdock >= 0.5.3, jrosetta and jlatexmath. The graphic branch asked for scirenderer:
- Download them from
- The remaining steps are like those given above for jgraphx.
If configure complains of missing arpack, download from the link shown by configure, then compile and install it as usual. Type 'ldconfig' and then get back to compiling Scilab. If there is still any problems related to arpack/arpack-ng, try the dirty fixes in these bug reports:
- http://bugzilla.scilab.org/show_bug.cgi?id=10646
- http://forge.scilab.org/index.php/p/arpack-ng/issues/689/ (comment 1)
If configure complains of missing jogl2, this is a recently introduced problem in Scilab master branch. See
Finally,
$ make $ sudo make install
Build the documentation
$ make doc
Warning: this takes a long time! go sip a cup of acerola juice while you wait.
If the run scilab this error appears on the screen:
"Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap","
To fix, do this:
$ sudo apt-get install gtk2-engines-pixbuf
Warning!
If you switch branches, e.g. from 5.3 and master (6.0), and then type 'make', you will obtain some crazy random errors; do not forget to type 'make distclean' after every branch switch ans start it *all* again.
Examples
- The Scilab package Chaos
- SIP image processing toolbox
Hacking
- See the code organization at: http://doxygen.scilab.org/master_wg/
Branches
- We work at the master branch (future 5.4), but you can try YaSp (future 6.x)
- See a description of the branches [1]
Debugging e Profiling
See Debugging Scilab 5 at the Scilab wiki
They suggest KDbg as a graphical debugger, but it doesn't seem to be in synaptic. Therefore, ddd continues to be the best graphical debugger in our opinion.
Also see some useful kcachegrind tips in User:v1z's blog.
Hacking Journal - xgetmouse
- xgetmouse is written in Java. The file is in scilab/modules/gui/src/java/org/scilab/modules/gui/events/Jxgetmouse.java
- scilab core calls xgetmouse java from C++
- a JVM gets started in C++ at scilab/modules/gui/src/jni/Jxgetmouse.cpp
- developer writes the .java, as well as a .xml (scilab/modules/gui/src/jni/Jxgetmouse.giws.xml) to interface it with scilab (enabling a scilab language call xgetmouse to get java)
- the tool to get the xml and generate the .cpp and is called GIWS
- there are other files which Im not sure if they are automagically generated:
- /scilab/modules/graphics/sci_gateway/c/sci_xgetmouse.c and /scilab/modules/gui/includes/CallJxgetmouse.h