How to create and deploy a mobile app for Symbian N8 and Maemo N900: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
=Create and deploy an app for Symbian N8 and Maemo N900=
[[Category:HowTo]]<br />[toc align_right=&quot;yes&amp;quot; depth=&quot;3&amp;quot;]


I’ve written a small guide (based on Nokia Qt <span class="caps">SDK</span> V1.0.2) for building and installing an application in Qt Creator and deploying to both Symbian (N8) and Maemo (N900). Here are the instructions:
= Create and deploy an app for Symbian N8 and Maemo N900 =


These instructions were tested on Friday 26th November 2010 using the [http://www.forum.nokia.com/Develop/Qt/ Nokia Qt <span class="caps">SDK</span>] ''[forum.nokia.com]'' from Forum Nokia.
I’ve written a small guide (based on Nokia Qt SDK V1.0.2) for building and installing an application in Qt Creator and deploying to both Symbian (N8) and Maemo (N900). Here are the instructions:


I had also installed the Qt <span class="caps">SDK</span> (version 4.7 for Windows. File is “qt-sdk-win-opensource-2010.05.exe) from [http://qt.nokia.com/downloads Qt.com] ''[qt.nokia.com]'' prior to installing the Nokia Qt <span class="caps">SDK</span>.
These instructions were tested on Friday 26th November 2010 using the &quot;Nokia Qt SDK (version 1.0.2)&quot;:http://www.forum.nokia.com/Develop/Qt/ from Forum Nokia.


When launching Qt Creator, I launched the one located on my C:\NokiaQtSDK\QtCreator\bin. This had version 2.0.1.
I had also installed the Qt SDK (version 4.7 for Windows. File is “qt-sdk-win-opensource-2010.05.exe) from ”Qt.com&amp;quot;:http://qt.nokia.com/downloads prior to installing the Nokia Qt SDK.


==Project Creation and Build==
When launching Qt Creator, I launched the one located on my C:. This had version 2.0.1.
 
== Project Creation and Build ==


* Launch QtCreator
* Launch QtCreator
Line 22: Line 24:
* Now move onto the section below for your chosen deployment (e.g. Symbian or Maemo)
* Now move onto the section below for your chosen deployment (e.g. Symbian or Maemo)


==For Symbian==
== For Symbian ==
 
First make sure that your app builds and runs in the Qt Simulator. Do not proceed unless this is the case!<br /> Instructions:


* Select the Symbian project as a target and build it. This will generate a sis file '''firstmobileapp.sis'''
First make sure that your app builds and runs in the Qt Simulator. Do not proceed unless this is the case!<br />Instructions:<br />* Select the Symbian project as a target and build it. This will generate a sis file '''firstmobileapp.sis'''<br />* The wizard adds Qt Mobility to the .pro file. We don’t need this for this basic app. So, open your .pro file and remove the &lt;code&amp;gt;CONFIG += mobility&amp;lt;/code&amp;gt; and &lt;code&amp;gt;MOBILITY&amp;lt;/code&amp;gt; lines<br />* Perform a clean all. The clean all doesn’t clean everything though. Drag and drop '''FirstMobileApp_template.pkg''' into Qt Creator and remove the line &lt;code&amp;gt;(0×2002AC89), 1, 0, 2, {“QtMobility”}”&lt;/code&amp;gt; and the comment above it.<br />* Now rebuild the project which will generate an updated sis file.<br />* Install the sis file to your Symbian device. I tested this on Nokia N8 by copying the sis to the mass storage and installing via filemanager. You can install via Ovi Suite also.<br />* Run it. I don’t have instructions on how to do the icon here. There is a wiki &quot;here&amp;quot;:http://developer.qt.nokia.com/forums/viewthread/1806 though
* The wizard adds Qt Mobility to the .pro file. We don’t need this for this basic app. So, open your .pro file and remove the <code><span class="caps">CONFIG</span> += mobility</code> and <code><span class="caps">MOBILITY</span></code> lines
* Perform a clean all. The clean all doesn’t clean everything though. Drag and drop '''FirstMobileApp_template.pkg''' into Qt Creator and remove the line <code>(0×2002AC89), 1, 0, 2, {“QtMobility”}”</code> and the comment above it.
* Now rebuild the project which will generate an updated sis file.
* Install the sis file to your Symbian device. I tested this on Nokia N8 by copying the sis to the mass storage and installing via filemanager. You can install via Ovi Suite also.
* Run it. I don’t have instructions on how to do the icon here. There is a wiki [http://developer.qt.nokia.com/forums/viewthread/1806 here] ''[developer.qt.nokia.com]'' though


* '''<span class="caps">NOTE</span>:''' Quick update after just trying this against later Qt <span class="caps">SDK</span>. <span class="caps">SIS</span> wasn’t auto generated. I had to open up Qt command line via QtSDK programs list, navigate to .pro file and run qmake &amp;&amp; make release-gcce then make installer_sis. Read “Building Self-signed Smart Installer Packages” in Qt Reference Documentation for more information. Also, I didn’t both removing Qt Mobility.
* '''NOTE:''' Quick update after just trying this against later Qt SDK. SIS wasn't auto generated. I had to open up Qt command line via QtSDK programs list, navigate to .pro file and run qmake &amp;&amp; make release-gcce then make installer_sis. Read &quot;Building Self-signed Smart Installer Packages&amp;quot; in Qt Reference Documentation for more information. Also, I didn't both removing Qt Mobility.  


==For Maemo==
== For Maemo ==


First make sure that your app builds and runs in the Qt Simulator. Do not proceed unless this is the case!<br /> Instructions:
First make sure that your app builds and runs in the Qt Simulator. Do not proceed unless this is the case!<br />Instructions:


* Select the maemo project and build it. This will generate a deb file and create the “debian” directory
* Select the maemo project and build it. This will generate a deb file and create the “debian” directory
* Under FirstMobileApp\debian\firstmobileapp\usr create: share\icons and create a 64×64 png titled “firstmobileapp.png”
* Under FirstMobileApp\debian\firstmobileapp\usr create: share\icons and create a 64×64 png titled “firstmobileapp.png”
* Under FirstMobileApp\debian\firstmobileapp\usr create: share\applications\hildon and create a file titled firstmobileapp.desktop with contents:<br />
* Under FirstMobileApp\debian\firstmobileapp\usr create: share\applications\hildon and create a file titled firstmobileapp.desktop with contents:<br /><code>[Desktop Entry]<br />Encoding=UTF-8<br />Version=1.0<br />Type=Application<br />Name=FirstMobileApp<br />Exec=/usr/local/bin/FirstMobileApp<br />Icon=firstmobileapp<br />StartupWMClass=<br />X-Window-Icon=firstmobileapp<br />X-HildonDesk-ShowInToolbar=true<br />X-Osso-Type=application/x-executable<br />Terminal=false</code>


* Edit firstmobileapp.desktop and change “name” and “exec” appropriately
* Edit firstmobileapp.desktop and change “name” and “exec” appropriately
* Also change “Icon” and “X-Window-Icon” appropriately (e.g. “firstmobileapp” note: no need for “.png”)
* Also change “Icon” and “X-Window-Icon” appropriately (e.g. “firstmobileapp” note: no need for “.png”)
* Go to FirstMobileApp\debian\ and edit the control file (drag and drop into Qt Creator)
* Go to FirstMobileApp\debianand edit the control file &amp;#40;drag and drop into Qt Creator&amp;amp;#41;
* Change “Section: unknown” to something like “Section: user/development” (or appropriate). Keeping this as unknown will result in a “incompatible application package” on installation
* Change “Section: unknown” to something like “Section: user/development” (or appropriate). Keeping this as unknown will result in a “incompatible application package” on installation
* Now go back to FirstMobileApp and delete the “.deb” that was generated before
* Now go back to FirstMobileApp and delete the “.deb” that was generated before
* Rebuild your app in Qt Creator which should generate a new deb file
* Rebuild your app in Qt Creator which should generate a new deb file
* Copy this to the documents folder of your N900 then navigate to it on the N900 and double click the deb file to install via the UI (no need to install via xterminal)
* Copy this to the documents folder of your N900 then navigate to it on the N900 and double click the deb file to install via the UI (no need to install via xterminal)
===Categories:===
* [[:Category:HowTo|HowTo]]

Revision as of 09:46, 24 February 2015


[toc align_right="yes&quot; depth="3&quot;]

Create and deploy an app for Symbian N8 and Maemo N900

I’ve written a small guide (based on Nokia Qt SDK V1.0.2) for building and installing an application in Qt Creator and deploying to both Symbian (N8) and Maemo (N900). Here are the instructions:

These instructions were tested on Friday 26th November 2010 using the "Nokia Qt SDK (version 1.0.2)":http://www.forum.nokia.com/Develop/Qt/ from Forum Nokia.

I had also installed the Qt SDK (version 4.7 for Windows. File is “qt-sdk-win-opensource-2010.05.exe) from ”Qt.com&quot;:http://qt.nokia.com/downloads prior to installing the Nokia Qt SDK.

When launching Qt Creator, I launched the one located on my C:. This had version 2.0.1.

Project Creation and Build

  • Launch QtCreator
  • Select File->New File or Project
  • Select Mobile Qt Application
  • Select choose… and choose a folder for your app and a name. These instructions assume you choose name FirstMobileApp (you can change the name accordingly throughout.)
  • Select versions of Qt to build for. I chose Maemo, Simulator Qt for MinGW 4.4 and Qt for Symbian devices
  • I pressed next to the class information, leaving it as default
  • Press finish (no changes to project management section)
  • Ensuring the Qt Simulator project is selected as the target, build the project
  • Run it to test it launches. It doesn’t do much. Just displays an empty window and ability to close app. This is ok for these basics.
  • Now move onto the section below for your chosen deployment (e.g. Symbian or Maemo)

For Symbian

First make sure that your app builds and runs in the Qt Simulator. Do not proceed unless this is the case!
Instructions:
* Select the Symbian project as a target and build it. This will generate a sis file firstmobileapp.sis
* The wizard adds Qt Mobility to the .pro file. We don’t need this for this basic app. So, open your .pro file and remove the <code&gt;CONFIG += mobility&lt;/code&gt; and <code&gt;MOBILITY&lt;/code&gt; lines
* Perform a clean all. The clean all doesn’t clean everything though. Drag and drop FirstMobileApp_template.pkg into Qt Creator and remove the line <code&gt;(0×2002AC89), 1, 0, 2, {“QtMobility”}”</code&gt; and the comment above it.
* Now rebuild the project which will generate an updated sis file.
* Install the sis file to your Symbian device. I tested this on Nokia N8 by copying the sis to the mass storage and installing via filemanager. You can install via Ovi Suite also.
* Run it. I don’t have instructions on how to do the icon here. There is a wiki "here&quot;:http://developer.qt.nokia.com/forums/viewthread/1806 though

  • NOTE: Quick update after just trying this against later Qt SDK. SIS wasn't auto generated. I had to open up Qt command line via QtSDK programs list, navigate to .pro file and run qmake && make release-gcce then make installer_sis. Read "Building Self-signed Smart Installer Packages&quot; in Qt Reference Documentation for more information. Also, I didn't both removing Qt Mobility.

For Maemo

First make sure that your app builds and runs in the Qt Simulator. Do not proceed unless this is the case!
Instructions:

  • Select the maemo project and build it. This will generate a deb file and create the “debian” directory
  • Under FirstMobileApp\debian\firstmobileapp\usr create: share\icons and create a 64×64 png titled “firstmobileapp.png”
  • Under FirstMobileApp\debian\firstmobileapp\usr create: share\applications\hildon and create a file titled firstmobileapp.desktop with contents:
    [Desktop Entry]<br />Encoding=UTF-8<br />Version=1.0<br />Type=Application<br />Name=FirstMobileApp<br />Exec=/usr/local/bin/FirstMobileApp<br />Icon=firstmobileapp<br />StartupWMClass=<br />X-Window-Icon=firstmobileapp<br />X-HildonDesk-ShowInToolbar=true<br />X-Osso-Type=application/x-executable<br />Terminal=false
    
  • Edit firstmobileapp.desktop and change “name” and “exec” appropriately
  • Also change “Icon” and “X-Window-Icon” appropriately (e.g. “firstmobileapp” note: no need for “.png”)
  • Go to FirstMobileApp\debianand edit the control file &#40;drag and drop into Qt Creator&amp;#41;
  • Change “Section: unknown” to something like “Section: user/development” (or appropriate). Keeping this as unknown will result in a “incompatible application package” on installation
  • Now go back to FirstMobileApp and delete the “.deb” that was generated before
  • Rebuild your app in Qt Creator which should generate a new deb file
  • Copy this to the documents folder of your N900 then navigate to it on the N900 and double click the deb file to install via the UI (no need to install via xterminal)