How to enable support for old SDKs in Carbide.c++ v1.3

ltomuta | 16 July, 2008 10:00


Let's start with a bit of a warning: the tool no longer supports the old SDKs and this decision is final. Applying the hack described here will at best restore the support for the old SDK to the 1.2 level but enhancements are not to be expected. You should not ask for support from the Carbide.c++ team ( nor from me Smile ) for any issues that might be a side effect of applying this hack.

 

OK, now that all this is clear let's start hacking.

 

Task 1 - Restore the S60 2nd Edition and Series 80 project templates

 

This is going to be quite easy since none of the needed files have been removed from the instillation, instead the templates have been commented out from the xml file that acts as a index in the templates collection. So, go to the installation folder (let's call it $(INSTALL)), and open the file .\plugins\com.nokia.cdt.templates_1.3.1.036\plugin.xml (you should make a copy of the file before modifying it).

 

The lines we're looking for are clearly marked

<!-- EKA1 templates not supported in Carbide.c++ v1.3+     
and its closing tag
-->

You can either remove these comment pair lines or neutralize them by closing the comments tags on the same line, with nothing in-between. That's it, now the project templates should be fully visible in the New -> Symbian C++ Project dialog. Start Carbide.c++ and check the templates.

Note: it may happen that the templates are not visible when you start Carbide, there seems to be some sort of a cache mechanism. Here's how you flush that cache: close Carbide.c++ then go to the installation directory and locate the file .\plugins\com.nokia.carbide.templatewizard_1.3.1.036.jar. Change its extension so that Carbide.c++ cannot recognize it anymore and then start Carbide.c++. There might be a error message and the entire templates dialog is gone but that is fine. Close Carbide.c++, restore the extension of the templatewizard file and then start Carbide.c++. If all goes as expected you should see the welcome screen again, sign that the cache was flushed, the templates dialog is back in and all the templates are visible (unless filtered out based on the available SDKs)

You can start creating projects and if you're going to use Carbide.c++ Express only then you're done hacking, the rest of the story is only relevant for commercial versions of the product.

If you start creating a GUI project using the UI Designed feature, you will pretty soon run into problems since, while the project compiles just fine the IDE reports some UI Designer validation errors (like toolbar member not found in the definition of com.nokia.sdt.series60.CAknView). So here comes the next task:

 

Task 2 - Troubleshoot the UI Designer

 

It has to be said from the start that I have not tested the entire set of GUI application types and components. I've only tried one empty container design and only fixed its problems.  Shoud you run into other problems, with other type of UI Designs, the fix for it must be similar and I'm sure you can manage it. Having a copy of the Carbide.c++ v1.2 plug-ins at hand would of course help you identify what is different and thus how to workaround the problem.

So, here we go: I've started from a reference to a toolbar missing from the definition of  com.nokia.sdt.series60.CAknView

A search for the above resource identifier led me to .\plugins\com.nokia.sdt.series60.componentlibrary_1.3.1.036\components\view, a promising looking directory with some files that appear to be holding the definition of the same resource, the CAknView.

The relevant files are: CAknView_2.8.component and CAknView_common.inc. As the file name suggests, one file contains the definition of the resource with 2.8 and later specific tags while the other includes the resource elements that are common to all the variants of that resource. The common file is included with a special tag in the specialized component description thus keeping together the resource description. It is in this CAknView_common.inc that I've found the toolbar resource and to fix my problem I  need to get rid of it.

The initial situation:

CAknView_2.8.component defines the component for S60 2.8 or later using the common elements from CAknView_common.inc

After the change the file structure should be:

CAknView_2.8.component defines the component for S60 2.8 using the common elements from CAknView_common_2x.inc
CAknView_3.0 component defines the component for S60 3.0 or later using the common components from CAknView_common.inc
 
To do that: make a copy of CAknView_2.8.component and name it CAknView_3.0.component. Make a copy of CAknView_common.inc and name it CAknView_common_2x.inc. Next, from CAknView_common_2x.inc remove the "toolbar" definition, the <select property="[com.nokia.sdt.series60.Toolbar]"> … </select> element.
 
Now, in the CAknView_2.8.component file, locate the include tag
<!ENTITY common_srcgenAndSourceMapping SYSTEM "CAknView_common.inc">
and make it point to CAknView_common_2x.inc
<!ENTITY common_srcgenAndSourceMapping SYSTEM "CAknView_common_2x.inc">
 
Finally review all the files containing the component definitions, make sure that the minimum and maximum SDK version values are appropriate (e.g. minSDKVersion="2.0" maxSDKVersion="2.7.9") and that they include the proper CAknView_common*.inc file.
 
Ok, that's it. Refresh the project in Carbide, build (hopefully without further errors) and enjoy the IDE.
 
S60 2nd Edition FP3 - Share on Ovi

 

RSSComments

That sounds good!!!

kiran10182 | 16/07/2008, 20:33

kiran10182

I played with other directory under Plugins but no luck. Meantime we also have Carbide.c++ 1.2.. version available on Forum Nokia Archive downloads as what promised.

http://www.forum.nokia.com/main/resources/tools_and_sdks/tools_archive.html

Very nice article

mousa_mk | 15/11/2008, 08:58

Thanks so much Lucian
Not supporting 2nd ed. on carbide.c++ v1.3 was a big problem for me but this post solved it.

I'm going to translate your writing to persian and put it on my blog

thanks agian and sorry for my bad english!

How to enable support for old sdks in Carbide.C++ 2.0?

Alex Lee | 19/12/2008, 10:37

I found a .jar file in plugins folder, and I modified the plugin.xml file in this jar file, but It couldn't work

Try this ...

ltomuta | 19/12/2008, 16:32

ltomuta

Make sure that the modified version of the plug-in is loaded and not a cached version of it. To clear the cache start Carbide.c++ with the /clean parameter.

it works!

esses | 25/12/2008, 23:31

Thanks a lot I tried it with the v2.0. I have the full template list now. :-)

More info pls

celly_ | 20/02/2009, 19:05

Alex Lee | 19/12/2008, 10:37

I found a .jar file in plugins folder, and I modified the plugin.xml file in this jar file, but It couldn't work

Can you be more specific, please...

Carbide.c++ runtime cleanup

ltomuta | 21/02/2009, 11:42

ltomuta

I think I was wrong in the previous comment, the argument to be passed to Carbide.c++ for a clean start should be -clean (try them both :). But if that trick does not work then you will have to check the XML file again and the template files it links to ...

Cant´t add UI design to any S60 2ed project

celly_ | 21/04/2009, 20:53

I´ve a big problem. I cant´t add UI design to any S60 2ed project(can´t click on next, finish do nothing http://celly.xf.cz/images/uiDesign.PNG). I also can´t create new S60 2ed project with UI designer. A have hacked Carbide.C++ 2.0 (only 1 task).

Here is picture of new project dialog
http://celly.xf.cz/images/newProject.PNG

THX for any suggestion

Thank your post

dengta_3 | 04/07/2009, 06:31

Thank your post.
I modify them in Carbide C++ 2.0 and SDK 2nd FP3 and the Cardbide can work well.
Thank you.

toolbar error !

shoraff | 08/12/2009, 10:25

I tried all the things which you have mentioned. And it does work fine with just frame work of UI (form or list). But when I insert any item inside, it fails.

I am using Carbide.C++ 2.0. I changed all component's min sdk version to 2.0. Still no go. Any other thing I need to take care of?

Re: toolbar error !

ltomuta | 08/12/2009, 12:26

ltomuta

Hi shoraff,

I'm afraid I haven't tried this on Carbide.c+ 2.0 so I can't really help. I'll update this should I ever find the time to do it.

You must login to post comments. Login
 
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2012 All rights reserved