{"id":45,"date":"2011-07-25T22:38:39","date_gmt":"2011-07-25T22:38:39","guid":{"rendered":"http:\/\/cpscotti.com\/blog\/?p=45"},"modified":"2011-07-25T22:38:39","modified_gmt":"2011-07-25T22:38:39","slug":"how-to-install-new-harmattan-dev-packages-to-use-on-qtsdk","status":"publish","type":"post","link":"http:\/\/cpscotti.com\/blog\/?p=45","title":{"rendered":"How to install new harmattan dev packages to use on QtSDK"},"content":{"rendered":"<p>One thing I&#8217;ve been using a lot lately is Madde&#8217;s mad-admin to add development packages to the build tree that QtSDK uses to build armel applications and I pretty much figured that out alone &#8211; well, not completely alone but after seeing a how-to related to qtmobility installation for Maemo that used this without really explaining what was what).<\/p>\n<p>Preamble:<\/p>\n<blockquote><p>QtSdk comes with a full build environment (analogue to what one`s got on scratchbox) for armel applications. This is used every time you build a Qt project selecting a device (N9(|(0|5)0)). This whole mechanism stays quite hidden inside the sdk&#8217;s files.<\/p><\/blockquote>\n<p>Problem:<\/p>\n<blockquote><p>Your application may have dependencies (headers, shared libs) on packages that are not provided with QtSDK. Without proper installation of this dependencies on QtSDK&#8217;s environment, you&#8217;ll never get code-completion, compiling or linking using the default SDK.<\/p><\/blockquote>\n<p>In a normal desktop-only world, you&#8217;d normally install development packages for a given library to <em>then<\/em> be able to compile\/build applications that use such library. Only after installing those packages you&#8217;ll have the proper headers, shared libraries, etc needed to build your, &#8220;higher level&#8221;, application.<\/p>\n<p>Debian packages tagged by the -dev suffix usually carry what is needed (e.g. headers) for a developer to &#8220;develop&#8221; something that uses the homonimous library. While the package <strong>without<\/strong> the -dev suffix carry what is needed to RUN (e.g. shared library) an application that uses such package. (worth nothing that a <strong>foo-dev<\/strong> package will normally depend on the <strong>foo <\/strong>pkg).<\/p>\n<p>The question is: How to do this inside QtSDK&#8217;s own world.<\/p>\n<p>The secret (for Harmattan) is inside<\/p>\n<p>[sourcecode language=&#8221;shell&#8221;]<br \/>\n\/QtSDK\/Madde\/bin\/<br \/>\n[\/sourcecode]<\/p>\n<p>PS: for maemo it&#8217;s inside<\/p>\n<p>[sourcecode language=&#8221;shell&#8221;]<br \/>\n~\/QtSDK\/Maemo\/4.6.2\/bin<br \/>\n[\/sourcecode]<\/p>\n<p>but works pretty much the same way.<\/p>\n<p>There you&#8217;ll find to binaries that make handling this libraries\/dependencies business as easy as on a normal debian system.<\/p>\n<p>Say you have a library called libfoo and that you already have it built and packaged for harmattan\/armel (well, that&#8217;s what I use Scratchbox for&#8230;but that stays for another post). You&#8217;ll probably have files like<\/p>\n<p>[sourcecode language=&#8221;shell&#8221;]<br \/>\nlibfoo_1.0_armel.deb<br \/>\nlibfoo-dev_1.0_armel.deb<br \/>\n[\/sourcecode]<\/p>\n<p>Well, just do:<\/p>\n<p>[sourcecode language=&#8221;shell&#8221;]<br \/>\nyou@box:~\/QtSDK\/Madde\/bin$ .\/mad set harmattan-platform-api<br \/>\nyou@box:~\/QtSDK\/Madde\/bin$ .\/mad-admin xdpkg -i ..\/path-to-that-deb\/libfoo_1.0_armel.deb<br \/>\nPackage &#8216;libfoo&#8217; installed.<br \/>\nyou@box:~\/QtSDK\/Madde\/bin$ .\/mad-admin xdpkg -i ..\/path-to-that-deb\/libfoo-dev_1.0_armel.deb<br \/>\nPackage &#8216;libfoo-dev&#8217; installed.<br \/>\n[\/sourcecode]<\/p>\n<p>In line 1 you-re setting which target you are referring (you can select which target you are using in QtCreator&#8217;s project management window.<br \/>\nAfter that, on line 2 and 4 it&#8217;s pretty much the same thing as using dpkg -i. Voila! Now your QtCreator will recognize your new lib and all&#8217;s good.<br \/>\nRemember that you&#8217;ll need that foo_1.0_armel.deb package installed on the device but that should be automatic if you reference to it on your debian\/control file and if that package is in the same<br \/>\nrepository as your application.<\/p>\n<p>Well, gotta go back to something useful.<br \/>\nHope this helps someone.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One thing I&#8217;ve been using a lot lately is Madde&#8217;s mad-admin to add development packages to the build tree that QtSDK uses to build armel applications and I pretty much figured that out alone &#8211; well, not completely alone but after seeing a how-to related to qtmobility installation for Maemo that used this without really [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,14,19,15,18],"tags":[],"class_list":["post-45","post","type-post","status-publish","format-standard","hentry","category-harmattan","category-n9","category-n900","category-n950","category-qtsdk"],"_links":{"self":[{"href":"http:\/\/cpscotti.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/45","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/cpscotti.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/cpscotti.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/cpscotti.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/cpscotti.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=45"}],"version-history":[{"count":5,"href":"http:\/\/cpscotti.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/45\/revisions"}],"predecessor-version":[{"id":51,"href":"http:\/\/cpscotti.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/45\/revisions\/51"}],"wp:attachment":[{"href":"http:\/\/cpscotti.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=45"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/cpscotti.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=45"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/cpscotti.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=45"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}