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
(Add "cleanup" tag)
(Convert ExpressionEngine links)
Line 8: Line 8:
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’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.
These instructions were tested on Friday 26th November 2010 using the [http://www.forum.nokia.com/Develop/Qt/ Nokia Qt SDK (version 1.0.2)] 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":http://qt.nokia.com/downloads prior to installing the Nokia Qt SDK.
I had also installed the Qt SDK (version 4.7 for Windows. File is “qt-sdk-win-opensource-2010.05.exe) from ”Qt.com[http://qt.nokia.com/downloads 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] 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.
When launching Qt Creator, I launched the one located on my C:. This had version 2.0.1.
Line 36: Line 38:
* Now rebuild the project which will generate an updated sis file.
* 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.
* 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":http://developer.qt.nokia.com/forums/viewthread/1806 though
* 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] 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" 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 && 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.  

Revision as of 14:59, 4 March 2015

This article may require cleanup to meet the Qt Wiki's quality standards. Reason: Auto-imported from ExpressionEngine.
Please improve this article if you can. Remove the {{cleanup}} tag and add this page to Updated pages list after it's clean.

[toc align_right="yes" depth="3"]

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) 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[http://qt.nokia.com/downloads 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] 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
    CONFIG += mobility
    
    and
    MOBILITY
    
    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
    (0×2002AC89), 1, 0, 2, {QtMobility}
    
    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 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" 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]
Encoding=UTF-8
Version=1.0
Type=Application
Name=FirstMobileApp
Exec=/usr/local/bin/FirstMobileApp
Icon=firstmobileapp
StartupWMClass=
X-Window-Icon=firstmobileapp
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable
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 (drag and drop into Qt Creator)
  • 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)