Reply
Thread Tools
Posts: 8 | Thanked: 1 time | Joined on Jan 2010 @ Sudbury, ON Canada
#1
So I've finished a small app, and can't seem to package it properly.

I've been following along using some tutorials:
http://wiki.forum.nokia.com/index.ph...plication_menu
http://wiki.maemo.org/Packaging_a_Qt_application

I've tried mimicing this file:
http://wiki.forum.nokia.com/index.ph...mple-0.0.1.zip

So it packages without error and I get my files, including the .deb. I can see the app in the application manager in the "Unistall" section (even the icon works), but the app doesn't appear in the menu. When I navigate to usr/bin in the terminal, the program isn't there either.

Can someone please help me?!

todolist-1.0/todolist.pro
Code:
QMAKEVERSION = $$[QMAKE_VERSION]
ISQT4 = $$find(QMAKEVERSION, ^[2-9])
isEmpty( ISQT4 ) {
error("Use the qmake include with Qt4.4 or greater, on Debian that is qmake-qt4");
}

TEMPLATE = subdirs
SUBDIRS  = src
todolist-1.0/src/src.pro
Code:
TEMPLATE = app
SOURCES = todolistwidget.cpp main.cpp
HEADERS = todolistwidget.h todoitem.h

QT += maemo5

unix {
  #VARIABLES
  isEmpty(PREFIX) {
    PREFIX = /usr
  }
  BINDIR = $$PREFIX/bin
  DATADIR =$$PREFIX/share

  DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"

  #MAKE INSTALL

  INSTALLS += target desktop service iconxpm icon48

  target.path =$$BINDIR

  desktop.path = $$DATADIR/applications/hildon
  desktop.files += $${TARGET}.desktop

  service.path = $$DATADIR/dbus-1/services
  service.files += $${TARGET}.service

  icon48.path = $$DATADIR/icons/hicolor/48x48/apps
  icon48.files += ../data/48x48/$${TARGET}.png
}
todolist-1.0/debian/control
Code:
Source: todolist
Section: user/utilities
Priority: extra
Maintainer: David Clarke <davidjclarke@gmail.com>
Build-Depends: debhelper (>> 5), libqt4-dev | libqt4-maemo5-dev
Standards-Version: 3.7.2

Package: todolist
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: A basic To-Do List app made for Maemo5 using Qt
XSBC-Bugtracker: https://garage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fr2sI9d6wov2WBxSbXLpRHlgcWG7QK5WQkAZ4cGbQH
 btpxoFgzI6uhExagEEK9cz4zfoGqAkwOpuzbr2D5LpmXPNjYjj328kPPHXpx
 6kH33Ydb+xJxS2tLejTydZWS7IuPHx4QhHOilDMkviefjxgb87lKxduiRc5C
 UHpsLKVMph74nMEijQ8jVd/W1jKlnJggD8SGjidSOpfLNTvnwpEoShgYqGza
 RAKUYagEDJ9JmWjWSufz6VyxmEqy2dhCcFapqK6+XrFZD9Kn5dwKRfHFQIeM
 ZZKazawMHM9mMqcncBvgBMHMFOdyGYC60VFjyRIkmbxPUqXS2NDQUAkonQ8A
 39jZmauUSqk4lztlSBmbrfDo+6ArgdRECDkkZ2Zj41bEfAhdXlpqpuVOdCOt
 k+SD2ZiZnVCuLpudyvwdcRzXR1H2oyQpMjg4cj4emFHK0m4L4cdCmSDF3syH
 oFgi7RQicCuddIuXvw9oQmSnDskEFedc5XwoxWwAJMP79hXI59NxoZBOstnI
 QnBmprpsVhXn3j2xUZMDSQOETyofeO8dpj5BymSxmaVkZEzyGO8G5wYnvy+O
 jtoEcTkRQh+dJYQ0l0k8CWxynlOlr1ddNiuKRUa9T5z3iYui4EZGTiQxkEw8
 YTalb87L6JRzVWVyYqe9LwAl+ljmR/4HDpMOsZK8z3EAAAAASUVORK5CYII=
 ====
todolist-1.0/debian/rules
Code:
#!/usr/bin/make -f
APPNAME := todolist
builddir:
	mkdir -p builddir

builddir/Makefile: builddir
	cd builddir && qmake-qt4 PREFIX=/usr ../$(APPNAME).pro

build: build-stamp

build-stamp: builddir/Makefile
	dh_testdir
	# Add here commands to compile the package.
	cd builddir && $(MAKE)
	touch $@

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	# Add here commands to clean up after the build process.
	rm -rf builddir
	dh_clean
install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Add here commands to install the package into debian/your_appname
	cd builddir && $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/$(APPNAME) install
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installexamples
	dh_installman
	dh_link
	dh_strip --dbg-package=todolist-dbg
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
I am probably overlooking something really obvious.

Help me maemo.org, you're my only hope!
 
Posts: 2,014 | Thanked: 1,581 times | Joined on Sep 2009
#2
I would bet that it installed somewhere weird. Do a dpkg -L <package> and see where it installed to. There are a couple of threads on packaging QT apps in the forums. None of which I can bloody find right now - but I know they are there because I posted in one when I was having issues
__________________
Class .. : Power Poster, Potential Coder
Humor .. : [*********] Alignment: Chaotic Evil
Patience : [***-------] Weapon(s): +2 Logic Mace
Agro ... : |*****-----] Relic(s) : G1, N900

 

The Following User Says Thank You to Bratag For This Useful Post:
Posts: 8 | Thanked: 1 time | Joined on Jan 2010 @ Sudbury, ON Canada
#3
Ran a couple of commands, but they aren't of much help to me:

Code:
[sbox-FREMANTLE_X86: /usr/bin] > dpkg -L todolist
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/todolist
/usr/share/doc/todolist/todolist.pro
/usr/share/doc/todolist/README.Debian
/usr/share/doc/todolist/copyright
/usr/bin
/usr/bin/src
/usr/sbin

[sbox-FREMANTLE_X86: /usr/bin] > dpkg -l todolist
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name               Version            Description
+++-==================-==================-====================================================
ii  todolist           1.0-1              A basic To-Do List app made for Maemo5 using Qt
I've searched through the forum, but haven't found anything of help.

Any luck @Bratag?

EDIT: Also ran...

[sbox-FREMANTLE_X86: ~] > dpkg -c todolist.deb
drwxr-xr-x root/root 0 2011-04-07 17:37:26 ./
drwxr-xr-x root/root 0 2011-04-07 17:37:26 ./usr/
drwxr-xr-x root/root 0 2011-04-07 17:37:26 ./usr/share/
drwxr-xr-x root/root 0 2011-04-07 17:37:26 ./usr/share/doc/
drwxr-xr-x root/root 0 2011-04-07 17:37:26 ./usr/share/doc/todolist/
-rw-r--r-- root/root 211 2011-04-05 22:34:12 ./usr/share/doc/todolist/todolist.pro
-rw-r--r-- root/root 185 2011-04-06 21:57:15 ./usr/share/doc/todolist/README.Debian
-rw-r--r-- root/root 1397 2011-04-06 21:57:15 ./usr/share/doc/todolist/copyright
drwxr-xr-x root/root 0 2011-04-07 17:37:26 ./usr/bin/
-rwxr-xr-x root/root 39204 2011-04-07 17:37:26 ./usr/bin/src
drwxr-xr-x root/root 0 2011-04-07 17:37:26 ./usr/sbin/

Last edited by Xand0r; 2011-04-07 at 22:07.
 
Posts: 225 | Thanked: 105 times | Joined on May 2010
#4
Why dont you just use Qt SDK for packaging?
it also installs the .desktop file for the menu then.
 
Posts: 8 | Thanked: 1 time | Joined on Jan 2010 @ Sudbury, ON Canada
#5
Originally Posted by Pillum View Post
Why dont you just use Qt SDK for packaging?
it also installs the .desktop file for the menu then.
I don't know. I've just been using scratchbox to program this application.

If you have some links that will describe how I use the Qt SDK, that would be appreciated! *starts looking*
 
Posts: 8 | Thanked: 1 time | Joined on Jan 2010 @ Sudbury, ON Canada
#6
Here are all the files I have been working with!

If anyone can help, please take a look at the files.

I never imaged that packaging the program would be the hardest part of programming my first app for Maemo.

Please help!
Attached Files
File Type: gz todolist-1.0.tar.gz (15.5 KB, 77 views)
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#7
Packaging isn't that hard. There are very good HOWTOs that'll take you through it step by step. If I managed to do it, so can you.

As soon as you understand how the staging is done, you can do every step by hand and compare that to what your automated build environment does and see where it differs.

http://tldp.org/HOWTO/html_single/De...uilding-HOWTO/ (a bit old but accurate as far as I can see)
http://www.debian.org/doc/maint-guide/ (all you could ever want to read about in detail, ever)

As for your package, I can't see your binary anywhere. So, perhaps no wonder you can't start it...
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#8
Originally Posted by Joorin View Post
Packaging isn't that hard. There are very good HOWTOs that'll take you through it step by step. If I managed to do it, so can you.
I find packaging terrible hard, especially with QtCreator,
as I never know how it auto generates debian/rules settings.

For example,
Xand0r uses a src.pro a src-subdirectory and a todolist.pro
in his src-subdirectory. For whatever reason QtCreator thinks
the binary should be named "src". And the whole packaging
goes wrong, as it never looks into todolist.pro for deployment
settings for the other files (icon, service, desktop).

I took a look at Xand0rs todolist-project and changed some parts.
I am sure there are better ways to do this but this is how
I got the program running:

I put the contents of the todolist.pro to
src.pro and renamed the src.pro to todolist.pro.
Qt now generates a binary, named todolist but
the other files aren't deployed because there were some errors
in the .pro file :

The todolist.pro file:
Code:
QMAKEVERSION = $$[QMAKE_VERSION]
ISQT4 = $$find(QMAKEVERSION, ^[2-9])
isEmpty( ISQT4 ) {
error("Use the qmake include with Qt4.4 or greater, on Debian that is qmake-qt4");
}

TEMPLATE = app
SOURCES = src/todolistwidget.cpp src/main.cpp
HEADERS = src/todolistwidget.h src/todoitem.h

QT += maemo5

unix {
  #VARIABLES
  isEmpty(PREFIX) {
    PREFIX = /usr
  }
  BINDIR = $$PREFIX/bin
  DATADIR =$$PREFIX/share

  DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"

  #MAKE INSTALL

  INSTALLS += target desktop service iconxpm icon48

  target.path =$$BINDIR

  desktop.path = $$DATADIR/applications/hildon
  desktop.files += data/$${TARGET}.desktop

  service.path = $$DATADIR/dbus-1/services
  service.files += data/org.indt.todolist.service

  icon48.path = $$DATADIR/icons/hicolor/48x48/apps
  icon48.files += data/48x48/$${TARGET}.png
}
And I renamed your todolist-1.0/data/sample.desktop to
todolist-1.0/data/todolist.desktop
 

The Following 3 Users Say Thank You to nicolai For This Useful Post:
Posts: 63 | Thanked: 139 times | Joined on Apr 2010
#9
When I compared the scr.pro in the first post with my app's working one I noticed it does not have this line:

TARGET = todolist

If I have understood right, that line tells what name to give to the executable and thus missing one would explain why it does not get installed.
 
Posts: 8 | Thanked: 1 time | Joined on Jan 2010 @ Sudbury, ON Canada
#10
@nicolai Thanks! That file did work. Nice catch on the desktop file too.

@helihyv Hrm, I tried this first, but as nocolai suggests, I think there must be other things that are wrong with my .pro file.

All that's left is to get the icon working! It didn't work in the menu, but works in the application manager.

Thanks guys! I will poke around with the icon issue.
 
Reply


 
Forum Jump


All times are GMT. The time now is 11:10.