Join Now

Don't expect miracles here, don't expect solutions to world's problems. It is more likely that I will ask [myself] questions looking for a always elusive answer.
And of course: "All opinions expressed in this blog are the author's own and do not necessarily represent the official view of Nokia". I mean it!

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

 

Comments

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!

You must login to post comments. Login
 
 
Powered by LifeType