View Single Post
Posts: 434 | Thanked: 325 times | Joined on Sep 2009
#5
Originally Posted by danielwilms View Post
You have to create a desktop-file and place it correctly. Have a look here how to do it. On the same page you will find a Qt packaging guide as well.
OK, the this seems a bit too complicated for my limited brain capacity.

This is what I did now (with no success so far):

I created the CountdownTimer.desktop file in the /src directory (I also tried without the Icon line, since I don't have any icons yet):
Code:
[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Name=Countdown Timer
Exec=/usr/bin/timer
Icon=myapp
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable
This is how my pro looks:
Code:
TARGET = timer
HEADERS += src/form.h \
    src/settings.h
SOURCES += qtmain.cpp \
    src/form.cpp \
    src/settings.cpp
FORMS += src/form.ui \
    src/settings.ui

# LEXS#
LEXSOURCES += 

# YACCS#
YACCSOURCES += 
INCLUDEPATH += 
LIBS += 
DEFINES += 

# All generated files goes same directory
OBJECTS_DIR = build
MOC_DIR = build
UI_DIR = build
DESTDIR = build
TEMPLATE = app
DEPENDPATH += 
VPATH += src \
    uis
CONFIG -= 
CONFIG += debug
QT = core \
    gui
MY_BIN_PATH = /usr/bin/

# Default installation overwritten because qmake and debian both
# uses DESTDIR in different purposes
install.commands = -$(INSTALL_PROGRAM) \
    $(TARGET) \
    \"$(DESTDIR)\"$$MY_BIN_PATH$(QMAKE_TARGET)
install.depends = $(TARGET)
desktop.path = $$DATADIR/applications/hildon
  desktop.files += $${TARGET}.desktop

iconxpm.path = $$DATADIR/pixmap
  iconxpm.files += ../data/maemo/$${TARGET}.xpm

  icon26.path = $$DATADIR/icons/hicolor/26x26/apps
  icon26.files += ../data/26x26/$${TARGET}.png

  icon40.path = $$DATADIR/icons/hicolor/40x40/apps
  icon40.files += ../data/40x40/$${TARGET}.png

  icon64.path = $$DATADIR/icons/hicolor/64x64/apps
  icon64.files += ../data/64x64/$${TARGET}.png

# Targets for debian source and binary package creation
debian-src.commands = dpkg-buildpackage \
    -S \
    -r \
    -us \
    -uc \
    -d
debian-bin.commands = dpkg-buildpackage \
    -b \
    -r \
    -uc \
    -d
debian-all.depends = debian-src \
    debian-bin

# Clean all but Makefile
compiler_clean.commands = -$(DEL_FILE) \
    $(TARGET)
QMAKE_EXTRA_TARGETS += debian-all \
    debian-src \
    debian-bin \
    install \
    compiler_clean
RESOURCES =
I use the following command in MADDE to make the package:
Code:
mad dpkg-buildpackage
I can install it, but it won't create the shortcut. Writing timer in the terminal runs the app just fine. I included the package here if someone wants to test it out.
Attached Files
File Type: deb timer_0.1_armel.deb (262.1 KB, 207 views)