maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Qt Project: Countdown timer (https://talk.maemo.org/showthread.php?t=39202)

Sasler 2010-01-05 06:53

Re: Qt Project: Countdown timer
 
Quote:

Originally Posted by marionegroponzi (Post 453185)
Funny, I've made the same kind of app with Qt and I've managed to package it with the instructions described here:
http://wiki.forum.nokia.com/index.ph...plication_menu

Thanks. :) You probably meant this link. Unfortunately there are instructions that seem to apply only to ScratchBox. I'm trying to use Windows only without a virtual Linux box. But I'm starting to wonder if this is even possible yet. :confused:

Quote:

Originally Posted by marionegroponzi (Post 453185)
Now I would like to upload my package to the extras repository and I've found some instructions here:
http://wiki.maemo.org/Uploading_to_Extras

However it seems to require files I don't have (.changes and others).

Let me know how that goes, because as soon as I get the other things working, I want to upload my project too. :)

Quote:

Originally Posted by marionegroponzi (Post 453185)
I've managed to have the sound working (although with a little hack) using Phonon, so if you still need help let me know.

Yeah, I tried Phonon, but I seem to be missing that from my Windows 7 PC. I still haven't figured out how to set it up. All the instructions talk about Microsoft SDK v6.1 but I have the v7.0A and it won't install the older, because it already sees the newer one. So if anyone knows how to set it up in a 64 bit Windows 7, I would appreciate the help. :)

danielwilms 2010-01-05 08:51

Re: Qt Project: Countdown timer
 
Quote:

Originally Posted by Sasler (Post 452461)
No, that did not change anything. Same result.

Hi,

do you have your latest sources anywhere, that I could have a look, what's going wrong?!?

Quote:

Originally Posted by Sasler (Post 453557)
Unfortunately there are instructions that seem to apply only to ScratchBox. I'm trying to use Windows only without a virtual Linux box. But I'm starting to wonder if this is even possible yet.

You are using MADDE right?!? Sure it is possible. Maybe I should add a more complex example to the wiki there.

@marionegroponzi:
Have a look in the maemo.org wiki. There is a guide how to make a debian package of a Qt application.

Daniel

Sasler 2010-01-05 10:03

Re: Qt Project: Countdown timer
 
1 Attachment(s)
Quote:

Originally Posted by danielwilms (Post 453646)
Hi,

do you have your latest sources anywhere, that I could have a look, what's going wrong?!?



You are using MADDE right?!? Sure it is possible. Maybe I should add a more complex example to the wiki there.

Here are the latest sources. Thank you for your help. :)

juxxxer 2010-01-05 11:18

Re: Qt Project: Countdown timer
 
1 Attachment(s)
Hi,

New 64x64 version (sorry my way of working is quite iterative) - but some colors added (+ transparency for 64x64). Opinions? comments? I think it would be nice to see those in action in N900 when you are getting there.

Sasler 2010-01-05 13:09

Re: Qt Project: Countdown timer
 
1 Attachment(s)
Quote:

Originally Posted by juxxxer (Post 453766)
Hi,

New 64x64 version (sorry my way of working is quite iterative) - but some colors added (+ transparency for 64x64). Opinions? comments? I think it would be nice to see those in action in N900 when you are getting there.

Thanks. Now I just need to figure out how to make a Debian package which includes the shortcut with MADDE... ;) Here is a package which does not include it:

Sasler 2010-01-06 06:35

Re: Qt Project: Countdown timer
 
For this shortcut issue, I wonder if I could manually edit the makefile? I noticed the following section in it:

Code:

install: $(TARGET)
        -$(INSTALL_PROGRAM) $(TARGET) "$(DESTDIR)"/usr/bin/$(QMAKE_TARGET)

If I got it right, I should have all the files I want to install listed in this section, including the .desktop and icon files. Am I correct? Could I add those lines manually and how should they look like? :confused:

I also wonder if I could manually change the install path here to /opt?

Sasler 2010-01-06 13:56

Re: Qt Project: Countdown timer
 
5 Attachment(s)
I got a strange new problem. After I install the Debian package, it looks like this and I get these errors. But when I reboot my device, it looks normal and I get no errors. Any idea why it's doing this? :confused:

I've attached the Debian package and the source files here.

danielwilms 2010-01-07 11:02

Re: Qt Project: Countdown timer
 
Quote:

Originally Posted by Sasler (Post 455531)
I got a strange new problem. After I install the Debian package, it looks like this and I get these errors. But when I reboot my device, it looks normal and I get no errors. Any idea why it's doing this?

You are running it as root I guess?!? You should run it as normal user and then it should work. I haven't looked at your latest sources, but the one you have posted here follow these steps and it should work:

1. create a folder <package-name>-<version-number> like countdowntimer-0.1

2. copy the sources into that folder

3. create in the folder a file named countdowntimer.pro with this content:
Code:

TEMPLATE = subdirs
SUBDIRS  = src

4. go into the src folder and create a file called src.pro with the following content:

Code:

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/bin
DATADIR =$$PREFIX/share

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

#MAKE INSTALL

INSTALLS += target desktop

  target.path =$$BINDIR

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

}

5. go back to the main-folder and run:

Code:

mad dh_make --createorig --single -e <your email> -c gpl
press enter. This command creates the basic files in a new folder called debian. To find out more about the meaning of the different files, please read the documentation about debian packages.

6. run:

Code:

mad qmake
7. run:

Code:

mad dpkg-buildpackage
That should do it to get a really basic package done for testing, which includes the entry in the task launcher. I don't know, which editor you used for the .desktop file, but there was a special character in the first line, which avoid reading it correctly. After rewriting it, it worked perfectly fine.

hope this helped and sorry for the delay.

Daniel

Sasler 2010-01-07 14:07

Re: Qt Project: Countdown timer
 
1 Attachment(s)
Quote:

Originally Posted by danielwilms (Post 457064)
hope this helped and sorry for the delay.

Daniel

Thanks a lot. I finally got a shortcut! :D

Now if I only would get the icon working too.. ;)

Here is what I've done:
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/bin
DATADIR =$$PREFIX/share

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

#MAKE INSTALL

INSTALLS += target desktop

  target.path =$$BINDIR

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

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

}

I got the countdowntimer.png in <app root>\data\64x64\ directory. But I only get the default blue icon.

Anyway, here is the Debian package with the shortcut: :)

danielwilms 2010-01-07 14:44

Re: Qt Project: Countdown timer
 
Quote:

Originally Posted by Sasler (Post 457318)
I got the countdowntimer.png in <app root>\data\64x64\ directory. But I only get the default blue icon.

Hmmm...the icon is not in the package. try to add "icon64" under INSTALLS and write the name of the png instead of using the variable, which gives you more control. This should do it. At least it adds it to the package. I haven't tested it if it shows up or not. But anyway, here are the changes:

Code:

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

Further there is a bug, so that the icon-cache is not updated correctly. So try a restart as well if it does not show up ;)

Daniel


All times are GMT. The time now is 21:04.

vBulletin® Version 3.8.8