[dev] [long] Integrate an extension in the code at buildtime : what do with bitmaps ?
Hi, Happy New Year to all of you, and the best for 2011 ! :-) I'm currently working on integrate a nice and existing C++ extension, but directly in the code, means at buildtime. To summarize, if I integrate the lib (written in C++) in the scp2 .. and so on system, there is no problem at all, the packaging is ok and it works fine in the install set. In fact, everything works fine, but the icons are not seen, because simply not found :-/ To explain more, the first point is, after tracing a bit, that the NormalFileName property is used to retrieve the right bitmap (please correct me if I'm wrong). As example, looking at the original name, we have (in the .xcu) : node oor:name=Background prop oor:name=NormalFileName valuebitmaps/Background.png/value /prop And in the extension, it appears that the relative path is used, means the library is in : extension/random_name/libThing.${DLL_EXTENSION} ... while the .png are in : extension/random_name/bitmaps/*.png This happens to work ok, of course. Am I correct to suppose that the relative path is used, or did I miss something ? My tries now : using the other existing .xcu as example and trying to respect the schema ( .xcs file), I did the what follows: node oor:name=Background prop oor:name=NormalFileName value$(insturl)/share/config/bitmaps/Background.png/value /prop ... and so on It does not work, but the idea is 1) put the library using those icons in $(insturl)/program (like all the other libs in fact ...) 2) use the path above to retrieve the icons. I must say I tested absolute and relative paths, without success. For example : valuexlink:href=$(insturl)/share/config/bitmaps/Background.png/ value or : valuexlink:href=../share/config/bitmaps/Background.png/value Last, the documentation I have read is : http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ Extensions/Checklist_for_Writing_Extensions http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ Extensions/Example + a lot of .xcs / .xcu shipped in the OOO3.2.1 code base Feel free to ask me if I forgot some information, and thanks in advance for any help :-) Eric Bachard -- qɔᴉɹə Education Project: http://wiki.services.openoffice.org/wiki/Education_Project Projet OOo4Kids : http://wiki.ooo4kids.org/index.php/Main_Page L'association EducOOo : http://www.educoo.org Blog : http://eric.bachard.org/news
Re: [dev] [long] Integrate an extension in the code at buildtime : what do with bitmaps ?
Hi, mmh, if you want to use the extension as it is see http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Packaging_Notes If you prefer to integrate the extension as a fix part of OOo you probably have to tweak a little bit more. But keep in mind that the configuration changed and we don't have the many xcu/xcs files anymore. They are combined in *.xcd files, for example brand.xcd Images are often provided in a zip container but also as single image files, you should check the wizards in the extras module, they provide also images (e.g. .../basis-link/share/config/wizard/web/images) The remaining problem would be how to address such an image from a config file. $(insturl) is expanded some where in the framework. It seems that we are missing a macro that can be used here and that can be expanded with the macro expander. Or maybe a special UCP like the one for extensions (using the the extension identifier). But this UCP don't work in this case. Sorry i have no real solution for you at the moment or at least i don't know one. Juergen On 1/3/11 10:36 AM, eric b wrote: Hi, Happy New Year to all of you, and the best for 2011 ! :-) I'm currently working on integrate a nice and existing C++ extension, but directly in the code, means at buildtime. To summarize, if I integrate the lib (written in C++) in the scp2 .. and so on system, there is no problem at all, the packaging is ok and it works fine in the install set. In fact, everything works fine, but the icons are not seen, because simply not found :-/ To explain more, the first point is, after tracing a bit, that the NormalFileName property is used to retrieve the right bitmap (please correct me if I'm wrong). As example, looking at the original name, we have (in the .xcu) : node oor:name=Background prop oor:name=NormalFileName valuebitmaps/Background.png/value /prop And in the extension, it appears that the relative path is used, means the library is in : extension/random_name/libThing.${DLL_EXTENSION} ... while the .png are in : extension/random_name/bitmaps/*.png This happens to work ok, of course. Am I correct to suppose that the relative path is used, or did I miss something ? My tries now : using the other existing .xcu as example and trying to respect the schema ( .xcs file), I did the what follows: node oor:name=Background prop oor:name=NormalFileName value$(insturl)/share/config/bitmaps/Background.png/value /prop ... and so on It does not work, but the idea is 1) put the library using those icons in $(insturl)/program (like all the other libs in fact ...) 2) use the path above to retrieve the icons. I must say I tested absolute and relative paths, without success. For example : valuexlink:href=$(insturl)/share/config/bitmaps/Background.png/value or : valuexlink:href=../share/config/bitmaps/Background.png/value Last, the documentation I have read is : http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Checklist_for_Writing_Extensions http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Example + a lot of .xcs / .xcu shipped in the OOO3.2.1 code base Feel free to ask me if I forgot some information, and thanks in advance for any help :-) Eric Bachard - To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org
[dev] [SOLVED] Re: [dev] [long] Integrate an extension in the code at buildtime : what do with bitmaps ?
Hi Jürgen, Le 3 janv. 11 à 12:03, Jürgen Schmidt a écrit : Hi, mmh, if you want to use the extension as it is see http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ Extensions/Packaging_Notes If you prefer to integrate the extension as a fix part of OOo you probably have to tweak a little bit more. That's what I did. More precisely, I But keep in mind that the configuration changed and we don't have the many xcu/xcs files anymore. They are combined in *.xcd files, for example brand.xcd Ah, yes, I'll have a look at the new scheme. Images are often provided in a zip container but also as single image files, In this case as single image files (was my need). The remaining problem would be how to address such an image from a config file. $(insturl) is expanded some where in the framework. It was the case + a bad path (yes, a typo ) I solved the problem using Bootstrap. More precisely : #if defined( OOo4Kids ) || defined( OOoLight ) OUString aConfigPath( RTL_CONSTASCII_USTRINGPARAM ($OOO_BASE_DIR/share/config/) ); ::rtl::Bootstrap::expandMacros( aConfigPath ); And the expandMacros did it : the feature works now :-) It seems that we are missing a macro that can be used here and that can be expanded with the macro expander. Or maybe a special UCP like the one for extensions (using the the extension identifier). But this UCP don't work in this case. Yes, doing that, I discovered the UCP world, and I think I'll learn more in the future about this great idea. Sorry i have no real solution for you at the moment or at least i don't know one. Thanks anyway : I solved all the issues (the interation is done now), and I'm glad to see fast answers. Regards, Eric -- qɔᴉɹə Education Project: http://wiki.services.openoffice.org/wiki/Education_Project Projet OOo4Kids : http://wiki.ooo4kids.org/index.php/Main_Page L'association EducOOo : http://www.educoo.org Blog : http://eric.bachard.org/news