XCos: custom menu entries

classic Classic list List threaded Threaded
8 messages Options
maarten.meijer maarten.meijer
Reply | Threaded
Open this post in threaded view
|

XCos: custom menu entries

Hello,

I am currently working on C-code generation for embedded hardware purposes. For convenient user-interaction, it would be nice to include an additional menu-entrie for the specific code generation.

I found this post http://mailinglists.scilab.org/XCOS-custom-menu-entries-td2611325.html#a2611329, where a developer experienced the same problem. Here, it turns out that you could either redirect the original code generation or add an additional menu-entry within the Xcos java project.

I have choosen for the latter solution, and I tried to compile the XCos jar-file by means of the guide found on http://wiki.scilab.org/ScilabWithinEclipse. However, it seems that Eclipse is missing multiple variables used in the build.incl.xml file. Is it possible that, before compiling the java-source files, it is necessary to compile the complete Scilab project?

As an alternative, I have in the past been able to generate the Xcos library (scilab 5.2.2) by customizing the build.incl.xml file. Here, I manually added the thirdparty libraries as well as the Scilab Gui modules libraries to the Xcos project.

In order to be compatible to the different (new) Xcos versions, I will chose that java compilation method which will save me the most time (in the future). Given that background information, what would you propose?

Any help would be very welcome.

Best regards,

Maarten Meijer
Controllab Products B.V.


--
Clément DAVID Clément DAVID
Reply | Threaded
Open this post in threaded view
|

Re: XCos: custom menu entries

Hello,

To develop some feature into the platform you should first compile the
whole sources using one of the supported compilers
[http://wiki.scilab.org/Compilation%20of%20Scilab].

Then you just need to import the xcos ant build file as a new project
into Eclipse. If your dev. only impact the editor, you can only add
compiled jars as dependencies (not as projects).

Eclipse is not mandatory, you can use any Java editor and use the
compilation tools (ant) to build the jars.

Adding some specific features into the editor is not trivial. If you
find an elegant way to solve it, please ping us ; we will then integrate
it upstream.

Do not hesitate to contact us on this list or join #scilab (on OFTC) to
get some help.

Regards,

--
Clément

Le mardi 26 juillet 2011 à 15:05 +0200, Maarten Meijer a écrit :

> Hello,
>
> I am currently working on C-code generation for embedded hardware
> purposes. For convenient user-interaction, it would be nice to include
> an additional menu-entrie for the specific code generation.
>
> I found this post
> http://mailinglists.scilab.org/XCOS-custom-menu-entries-td2611325.html#a2611329, where a developer experienced the same problem. Here, it turns out that you could either redirect the original code generation or add an additional menu-entry within the Xcos java project.
>
> I have choosen for the latter solution, and I tried to compile the
> XCos jar-file by means of the guide found on
> http://wiki.scilab.org/ScilabWithinEclipse. However, it seems that
> Eclipse is missing multiple variables used in the build.incl.xml file.
> Is it possible that, before compiling the java-source files, it is
> necessary to compile the complete Scilab project?
>
> As an alternative, I have in the past been able to generate the Xcos
> library (scilab 5.2.2) by customizing the build.incl.xml file. Here, I
> manually added the thirdparty libraries as well as the Scilab Gui
> modules libraries to the Xcos project.
>
> In order to be compatible to the different (new) Xcos versions, I will
> chose that java compilation method which will save me the most time
> (in the future). Given that background information, what would you
> propose?
>
> Any help would be very welcome.
>
> Best regards,
>
> Maarten Meijer
> Controllab Products B.V.
>
>
> --
>

--
Clément David <[hidden email]>

maarten.meijer maarten.meijer
Reply | Threaded
Open this post in threaded view
|

Re: XCos: custom menu entries

This post was updated on .
First of all, thank you very much for your quick response.

As for the compiling of XCos, I will use a customized ant-file.

We have some idea's for an elegant feature for multiple code-generation solutions. We will of course give notice of that. The idea is to make an extra wizard after clicking 'Code generation', in which the user can select the desired code-generation tool.

Maarten
maarten.meijer maarten.meijer
Reply | Threaded
Open this post in threaded view
|

Re: XCos: custom menu entries

Hi all,

As promised, here a little update. I added a new link to the tools submenu, which will lead to this dialog.

The new code generation dialog

The list with a target selection is fed from XML-files stored in subdirectories within SCI/contrib/codegeneration. In this files, the location of the codegeneration library/macro is stored. In the future, I would like to expand the dialog by showing descriptions of the selected codegeneration method.
Right now, after selecting the default codegeneration, still a scicos menu comes up:

Default scicos parameters input

I would like to integrate this scicos menu into the code generation dialog. I think it convenient to pass additional parameters from the dialog to the scicos macro by expanding the superblock object with the parameter attributes. Then this superblock is passed to scicos by means of the temporary input- and outputfile.

My question is, is it possible to access those newly attributes with scicos code.

Besides, it is possibly possible passing this parameters using asynchronousScilabExec and buildCall, what about that?

Any advice is appreciated,

Maarten
maarten.meijer maarten.meijer
Reply | Threaded
Open this post in threaded view
|

Re: XCos: custom menu entries

Here a small update. This is the functionality the new dialog (actually a Jpanel) provides.



I'm currently optimizing my java-code, thereafter, how can I proceed to contribute this to Xcos?

Maarten
sylvestre sylvestre
Reply | Threaded
Open this post in threaded view
|

Re: XCos: custom menu entries

Hello,

Le lundi 08 août 2011 à 05:04 -0700, maarten.meijer a écrit :
> Here a small update. This is the functionality the new dialog (actually a
> Jpanel) provides.
>
> http://mailinglists.scilab.org/file/n3235355/Screenshot-2.png 
Looks like the Target menu as a rendering problem ;)

> I'm currently optimizing my java-code, thereafter, how can I proceed to
> contribute this to Xcos?
If you want your work distributed with Scilab, you have to write a SEP.
See:
http://gitweb.scilab.org/?p=scilab.git;a=blob;f=SEP/SEP_001_SEP_definition.odt;hb=HEAD
It has to provide an added value for most users to be included into the
distribution. Otherwise, we are trying to provide them as external
modules (usually packaged under ATOMS).

Thanks,
Sylvestre



maarten.meijer maarten.meijer
Reply | Threaded
Open this post in threaded view
|

Re: XCos: custom menu entries

Hello,

I'm currently working on the SEP, but I need write permission to git.repository/SEP/ to place the SEP.

Furthermore, I'm struggling with the detailed reference implementation section of the SEP. Where should I put the the reference implementation of the proposal and how should such a reference implementation look like?

kind regards,
Maarten
sylvestre sylvestre
Reply | Threaded
Open this post in threaded view
|

Re: XCos: custom menu entries

Le samedi 20 août 2011 à 05:59 -0700, maarten.meijer a écrit :
> Hello,
>
> I'm currently working on the SEP, but I need write permission to
> git.repository/SEP/ to place the SEP.
Please send it on the dev mailing list.


> Furthermore, I'm struggling with the detailed reference implementation
> section of the SEP. Where should I put the the reference implementation of
> the proposal and how should such a reference implementation look like?
See:
http://wiki.scilab.org/How%20to%20contribute%20to%20Scilab
"Not a Scilab Contributor? Send us your modifications"

Thanks,
Sylvestre