View Single Post
Posts: 434 | Thanked: 325 times | Joined on Sep 2009
#49
Thanks a lot lads of all your invaluable help an patience. I'm progressing rather well with this app and I'm learning many things that are useful for further Maemo development.

Anyway, my current issue is Optification. This is what I've done:

src.pro
Code:
QT += phonon
TARGET = countdowntimer
TEMPLATE = app
SOURCES += qtmain.cpp \
    settings.cpp \
    form.cpp 
HEADERS += settings.h \
    form.h 
FORMS += settings.ui \
    form.ui 
PREFIX = ../debian/countdowntimer/usr

unix {
BINDIR = $$PREFIX/opt/maemo
DATADIR =$$PREFIX/share

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

#MAKE INSTALL

INSTALLS += target desktop icon64

  target.path =$$BINDIR

  desktop.path = $$DATADIR/applications/hildon
  desktop.files += countdowntimer.desktop

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

}
countdowntimer.desktop:
Code:
[Desktop Entry]
Encoding=UTF-8
Version=0.3
Type=Application
Name=Countdown Timer
Exec=/usr/opt/maemo/countdowntimer
Icon=countdowntimer
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable
This seems to install countdowntimer in the "correct" (I'm not at all sure if this is the place where it should be) location. But the shortcut won't work and when I try to run it from the terminal, I get the following error even when I'm in the same directory and I can see it there:

Code:
/bin/sh: countdowntimer: not found