<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=93.82.13.28</id>
	<title>Maemo Wiki Mirror - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=93.82.13.28"/>
	<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php/Special:Contributions/93.82.13.28"/>
	<updated>2026-04-22T06:00:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=MADDE/Packaging&amp;diff=14808</id>
		<title>MADDE/Packaging</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=MADDE/Packaging&amp;diff=14808"/>
		<updated>2010-06-03T19:02:27Z</updated>

		<summary type="html">&lt;p&gt;93.82.13.28: set PREFIX in install section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MADDE}}&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
This guide explains how to take a simple [[Qt-Maemo|Qt]] application and compile it so that it deploys to the [[Nokia N900|N900]] with an Icon. It is supposed to be step by step guide on how to take a (simple) Qt app and package and deploy it with an Icon using [[MADDE]].&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
The project I have is simple, 1 window called mainwindow.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; As a convention I like to keep all my code together, so I have created any extra files in the &amp;quot;src&amp;quot; folder.&lt;br /&gt;
&lt;br /&gt;
=== Steps ===&lt;br /&gt;
1. Create simple project through MADDE.&lt;br /&gt;
  mad pscreate -t qt_simple projectname&lt;br /&gt;
&lt;br /&gt;
2. Edit and test with QT Creator (or whatever your favorite tool is).&lt;br /&gt;
&lt;br /&gt;
3. Once ready to deploy create a clean empty top level folder &amp;quot;&amp;lt;projectname&amp;gt;-0.x&amp;quot; where x is your revision number e.g. &amp;quot;c:\Madde\0.5\home\shep\wwcalc-0.1&amp;quot;...In the OS &lt;br /&gt;
&#039;&#039;&#039;Note: the following 3 steps apply each time you go to build.&#039;&#039;&#039;&lt;br /&gt;
  3.1 ensure there is no &amp;quot;debian&amp;quot; folder at the same level as &amp;quot;src&amp;quot; &lt;br /&gt;
  3.2 ensure there is no folder structure called &amp;quot;&amp;lt;projectname&amp;gt;-0.x-orig&amp;quot; left over from a failed compile&lt;br /&gt;
  3.3 remove old compiles from the Madde\home\user (e.g. C:\Madde\0.5\home\Shep) folder.&lt;br /&gt;
&lt;br /&gt;
4. Copy the &amp;quot;src&amp;quot; folder from the tested Qt project into the &amp;quot;&amp;lt;projectname-0.x&amp;quot; folder&lt;br /&gt;
&lt;br /&gt;
5. Create (or obtain) an application Icon. This should be a 64x64 PNG. Call it &amp;lt;projectname&amp;gt;.png and place it in the &amp;quot;src&amp;quot; folder.&lt;br /&gt;
&lt;br /&gt;
6. Again inside the &amp;quot;src&amp;quot; folder create a new file called &amp;quot;&amp;lt;projectname&amp;gt;.desktop&amp;quot;&lt;br /&gt;
Code:&lt;br /&gt;
  [Desktop Entry]&lt;br /&gt;
  Encoding=UTF-8&lt;br /&gt;
  Version=0.x&lt;br /&gt;
  Type=Application&lt;br /&gt;
  Name=&amp;lt;Long Descriptive Project Name&amp;gt;&lt;br /&gt;
  Exec=/usr/bin/&amp;lt;projectname&amp;gt;&lt;br /&gt;
  Icon=&amp;lt;projectname&amp;gt;&lt;br /&gt;
  X-HildonDesk-ShowInToolbar=true&lt;br /&gt;
  X-Osso-Type=application/x-executable&lt;br /&gt;
&lt;br /&gt;
7. Inside the &amp;quot;src&amp;quot; folder added a file called &amp;quot;src.pro&amp;quot;. Getting this right is the key to getting the Makefile correct and hence the install working. At the end of this file there is a section called &amp;quot;INSTALLS += &amp;quot;...for every file you want installed in a location you need an entry here. In the example here we install the target, icon and desktop files.&lt;br /&gt;
Code:&lt;br /&gt;
  TARGET = wwcalc&lt;br /&gt;
  TEMPLATE = app&lt;br /&gt;
  SOURCES += qtmain.cpp \&lt;br /&gt;
      mainwindow.cpp &lt;br /&gt;
  HEADERS += mainwindow.h &lt;br /&gt;
  FORMS += mainwindow.ui &lt;br /&gt;
  PREFIX = ../debian/wwcalc/usr&lt;br /&gt;
  &lt;br /&gt;
  unix {&lt;br /&gt;
  PREFIX = /usr&lt;br /&gt;
  BINDIR = $$PREFIX/bin&lt;br /&gt;
  DATADIR =$$PREFIX/share&lt;br /&gt;
  &lt;br /&gt;
  DEFINES += DATADIR=\&amp;quot;$$DATADIR\&amp;quot; PKGDATADIR=\&amp;quot;$$PKGDATADIR\&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  #MAKE INSTALL&lt;br /&gt;
  &lt;br /&gt;
  INSTALLS += target desktop icon64 &lt;br /&gt;
  &lt;br /&gt;
    target.path =$$BINDIR&lt;br /&gt;
  &lt;br /&gt;
    desktop.path = $$DATADIR/applications/hildon&lt;br /&gt;
    desktop.files += wwcalc.desktop&lt;br /&gt;
  &lt;br /&gt;
    icon64.path = $$DATADIR/icons/hicolor/64x64/apps&lt;br /&gt;
    icon64.files += wwcalc.png&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
8. Up one level and inside the top level folder (i.e. &amp;quot;c:\Madde\0.5\home\&amp;lt;YOU!&amp;gt;\&amp;lt;projectname&amp;gt;-0.x&amp;quot; ) create a file called &amp;quot;&amp;lt;projectname&amp;gt;.pro&amp;quot; with the following exact contents.&lt;br /&gt;
Code:&lt;br /&gt;
  TEMPLATE = subdirs&lt;br /&gt;
  SUBDIRS  = src&lt;br /&gt;
&lt;br /&gt;
10. In Madde make sure the [[MADDE/Device runtime|runtime is up and connectible]] and then execute.&lt;br /&gt;
Code:&lt;br /&gt;
  mad dh_make --createorig --single -e foo.bar@gmail.com -c gpl&lt;br /&gt;
  *** Several people have commented that mad qmake is not required, but I find there are times that it is, igonre this next line if you wish ***&lt;br /&gt;
  mad qmake&lt;br /&gt;
  mad dpkg-buildpackage&lt;br /&gt;
  mad remote -r org.maemo.&amp;lt;projectname&amp;gt; send ../&amp;lt;projectname&amp;gt;_0.x-1_armel.deb&lt;br /&gt;
  mad remote -r org.maemo.&amp;lt;projectname&amp;gt; install &amp;lt;projectname&amp;gt;_0.x-1_armel.deb&lt;br /&gt;
&lt;br /&gt;
11. Uninstalling - from an X_Terminal.&lt;br /&gt;
Code:&lt;br /&gt;
  sudo gainroot&lt;br /&gt;
  dpkg -r &amp;lt;projectname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Additional information ==&lt;br /&gt;
&lt;br /&gt;
* [[Packaging a Qt application]]&lt;br /&gt;
* [[Packaging]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Qt]]&lt;/div&gt;</summary>
		<author><name>93.82.13.28</name></author>
	</entry>
</feed>