Re: [anjuta-devel] Selecting and storing AVR debug platform and target device
- From: Sébastien Granjoux <seb sfo free fr>
- To: Lucas van Dijk <info return1 net>
- Cc: anjuta-devel-list gnome org
- Subject: Re: [anjuta-devel] Selecting and storing AVR debug platform and target device
- Date: Thu, 16 Jun 2011 21:52:18 +0200
Le 16/06/2011 14:17, Lucas van Dijk a écrit :
Ah that combobox, I think it will be filled with too many options if
you're going to add all targets to that one. There are also four
different optimalization levels, so that will become quite a lot of entries.
1. Define a new interface called TargetsListInterface, I think in
libanjuta? Classes implementing that interface should have two methods:
- glist * getTargets()
- gchar * extraConfigureFlags(gchar * target) (or maybe it's better to
give the pointer to the modelrow of the selected item in the combobox as
You define new interface by describing it in the file
libanjuta/interfaces/libanjuta.idl. The syntax is quite simple, you can
take other interfaces as example.
I'm not sure you need to define a new interface for these functions, I
think you can add them in the already existing IAnjutaEnvironment interface.
Then, I have no solution but perhaps we could improve the following points:
- I would prefer to have something more general allowing to add more
than one additional combo box, and allowing perhaps a checkbox too.
- Perhaps we could plan a similar interface for adding entries to other
part in anjuta, like execute parameter dialog by example?
- What's happen when you have a makefile project, there is no configure
file so how do you select the target? Perhaps we could just display the
configure dialog in this case?
- It could be possible that the selected target require more than just
changing the configure flags. So perhaps the extraConfigureFlags method
could be rather seen as a SetTarget method which in addition return the
configure flags. So your plugin could know which flag is selected and do
some additional action if needed.
I have created the IAnjutaEnvironment interface to handle cross
compilation but I'm not really satisfy with the result. It's usable but
I would like something easier to use.
2. Modify build plugin, which adds a combobox when there's a plugin
which implements the TargetsListInterface.
Any idea how to check that? Any functions/files which I should
I'm currently working on this plugin and I have done some
reorganization, like using GFile* instead of gchar*. I think the file
plugin.c is too big and should be better split in smaller pieces. For
the configuration dialog, it is implemented in build-options.c
3. Let the AVR plugin implement the interface. Hardcode all supported
devices by avr-gcc?
I have no particular preference, you can use the output of avr-gcc or
install a .xml or .ini listing all targets. Parsing the output of
avr-gcc could be better but it could fail for a stupid reason.
] [Thread Prev