Hi Tangi,

the bundle generator certainly has some limitations. I would really like to have an advanced graphical tool which can generate code using different templates. Unfortunately, we lack man power for this kind of project.

I am not in my office this week, so I can not look at the code of the bundle generator right now, but I hope my comments below are still correct.

Am 15.02.2010 17:26, schrieb Tangi Meyer:
Hi Sascha,

Thank you for your answer.
I have some questions regarding bundles generation:

- when I'm creating my mainApp bundle, I cannot uncheck the use GUI_SUPPORT option and this creates a view class in another repository/bundle ... If I uncheck the GUI_SUPPORT option then, the generated CMAKE files still embed references to Qt which causes CMAKE to not work. I will try to post some snapshots.
It is important to understand that the code for the executable (e.g. for ExtApp.exe or your own) which is generated by the bundle generator does not belong to any bundle. It is something "external" to the set of bundles, which should just be a really small wrapper which calls the berry::Starter::Start method.

The generator is not able to generate code for an executable only. I don't know right now why you can't switch off GUI_SUPPORT, but once enabled and you run CMake configure, the files are generated. Turning it off afterwards does not delete the already generated files. However, you can just delete the generated bundle.

You may still include the executable code in a bundle directory and merge the bundles CMakeLists.txt file and the one for the executable. This is done for example in the org.blueberry.osgi bundle, which also defines an executable (see its CMakeLists.txt file). But this is just some CMake stuff.
- how are the dependencies in the bundle generator handled? I'm trying to use the required plugins option but I do not see the impact of it. In particular, my mainApp requires every include and dependencies repositories to be set by hand ...
The dependencies you can declare in the bundle generator are dependencies between bundles only. They do not apply to the executable. Those dependencies are written into the bundles MANIFEST.MF file and the build system uses them to set up the include paths and linker dependencies properly. The OSGi runtime also uses the dependencies when loading a bundle - it ensures that all the bundles it depends on are loaded before.

You should not need to add additional dependencies (in CMake) to your executable. It should only depend on org.blueberry.osgi, which takes care of the rest. All other dependencies to other bundles or external libraries should ideally be handled be some of your own bundles.
- concerning the workbench, I will basically have to generate a bundle and then modify by hand the CMAKE files and C++ files?
Basically, yes. You should not need to touch the CMakeLists.txt file of the generated bundle. Just add the source files to the files.cmake file and add your own implementation of IApplication as an extension in your plugin.xml file (and in the manifest.cpp file).

I will come back to you if I have other questions that pop to my mind.
Please do so :-)

Best,
Sascha


Best regards,

Tangi

-------------------------------------
Tangi MEYER
Virtual and Augmented Reality
System and Software Engineer
Leuvensesteenweg 325
B-1932 Zaventem - Belgium
Telephone:  +32 (0) 2 721 54 84
Fax:             +32 (0) 2 721 54 44
-------------------------------------

----- Original Message -----
From: "Zelzer Sascha" <[email protected]>
To: "Tangi Meyer" <[email protected]>, "mitk-users" <[email protected]> Sent: Thursday, 11 February, 2010 17:43:05 GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
Subject: AW: [mitk-users]  Creating my own app using the bundle generator.

Hi Tangi,

the link you cited should actually fit your workflow exactly. What the BundleGenerator cannot generate for you is a bundle containing ready to use Workbench advisor classes (as contained for example in org.mitk.gui.qt.application and org.mitk.gui.qt.extapplication). You would have to copy and paste these classes or write them on your one.

You may find the documentation of the class WorkbenchAdvisor helpful:

http://docs.mitk.org/nightly-qt4/BlueBerry/reference/api/html/classberry_1_1WorkbenchAdvisor.html

Don’t forget to add an extension to the org.blueberry.osgi.applications extension point in your plugin.xml file.

Unfortunately, the documentation in the detailed description of the link above is not 100% up-to-date (we have some troubles with the nightly generation of the documentation right now). It misses the creation of a Display instance (see QmitkExtApplication for reference).

I hope this helps,

Sascha

*Von:* Tangi Meyer [mailto:[email protected]]
*Gesendet:* Donnerstag, 11. Februar 2010 16:11
*An:* mitk-users
*Betreff:* [mitk-users] Creating my own app using the bundle generator.

Dear All,

I would like to create my own application using my own workbench, e.g. having my own /MyApp/ project relying on my own /whatever.qt.myAppApplication/.
The same as ExtApp using org.mitk.qt.extapplication:

extConfig->setString(berry::Platform::ARG_APPLICATION, "org.mitk.qt.extapplication");

I want this in a separate directory from MITK with my own bundles.
I'm trying to use the bundle generator but without success so far (http://docs.mitk.org/nightly-qt4/NewPluginPage.html).

Is there a page/tutorial where I can get more info?

Best regards,

Tangi





------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to