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
 
(Simplify punctuation)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=Create and deploy an app for Symbian N8 and Maemo N900=
{{Outdated|reason=The Symbian platform is no longer supported.}}
{{Cleanup | reason=Auto-imported from ExpressionEngine.}}


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:
[[Category:HowTo]]


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.
= Create and deploy an app for Symbian N8 and Maemo N900 =


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>.
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:


When launching Qt Creator, I launched the one located on my C:\NokiaQtSDK\QtCreator\bin. This had version 2.0.1.
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.


==Project Creation and Build==
I had also installed the Qt SDK (version 4.7 for Windows. File is "qt-sdk-win-opensource-2010.05.exe) from [http://qt.nokia.com/downloads 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
* Launch QtCreator
* Select '''File-&gt;New File or Project'''
* Select '''File->New File or Project'''
* Select '''Mobile Qt Application'''
* 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 '''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.)
Line 19: Line 24:
* Press '''finish''' (no changes to project management section)
* Press '''finish''' (no changes to project management section)
* Ensuring the Qt Simulator project is selected as the target, build the project
* 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.
* 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)
* 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:


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'''
* 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><span class="caps">CONFIG</span> += mobility</code> and <code><span class="caps">MOBILITY</span></code> lines
* 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>CONFIG += mobility</code> and <code>MOBILITY</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.
* 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.
* 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 [http://developer.qt.nokia.com/forums/viewthread/1806 here] ''[developer.qt.nokia.com]'' 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


* '''<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 && 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==
== 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!
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:
<code>[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</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 (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
* 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]]

Latest revision as of 13:21, 23 August 2015

IMPORTANT: The content of this page is outdated. Reason: The Symbian platform is no longer supported.
If you have checked or updated this page and found the content to be suitable, please remove this notice.
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.

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 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)