maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Packaging qt (https://talk.maemo.org/showthread.php?t=45686)

Figa 2010-02-24 10:59

Packaging qt
 
Hi i need some help with packaging of qt app. I made deb package but after install i dont see any icon and i cant find app, This is my src.pro file:
Code:


 TARGET = fsudoku
 TEMPLATE = app
 SOURCES += main.cpp \
    window.cpp
 HEADERS += window.h
 PREFIX = ../debian/fsudoku/usr
 
 unix {
 BINDIR = $$PREFIX/bin
 DATADIR =$$PREFIX/share
 
 DEFINES += DATADIR=\"$$DATADIR\" PKGDATADIR=\"$$PKGDATADIR\"
 
 #MAKE INSTALL
 
 INSTALLS += target desktop icon64
 
  target.path =$$BINDIR
 
  desktop.path = $$DATADIR/applications/hildon
  desktop.files += fsudoku.desktop
 
  icon64.path = $$DATADIR/icons/hicolor/64x64/apps
  icon64.files += fsudoku.png
 }

Icon is in src/. What is next step? THX for your replies.

danielwilms 2010-02-24 12:02

Re: Packaging qt
 
Hi,

it looks quite ok. Do you have a fsudoku.pro file in the folder where the src and debian folders are in, which points to this? Example for that file:

Code:

TEMPLATE = subdirs
SUBDIRS = src

how do you build the package? Do you have the sources somewhere?

Daniel

Figa 2010-02-24 12:26

Re: Packaging qt
 
Yes, I have. Here is source http://uploadfile.org/download.php?i...zV0hvq4HiOClbt

Figa 2010-02-25 12:50

Re: Packaging qt
 
I have next problem. I create a new project in eclipse Qt maemo helloworld. I dont change anything. I get this error. Description
make: *** [build/window.o] Error 1 What is it?

shep 2010-02-25 14:05

Re: Packaging qt
 
Quote:

Originally Posted by Figa (Post 544056)
Hi i need some help with packaging of qt app. Icon is in src/. What is next step? THX for your replies.

Go to x-term and "sudo gainroot" then do a "find / -name 'fsudoku*'".

That should show you where everything installed. Check if the program, desktop and png all wound up in the right places.

shep

Figa 2010-02-25 15:20

Re: Packaging qt
 
THX I found this but only bin file. I cant run it. :confused: Do you have any idea about my make/build problem?

shep 2010-02-25 15:24

Re: Packaging qt
 
Quote:

Originally Posted by Figa (Post 545962)
THX I found this but only bin file. I cant run it. :confused: Do you have any idea about my make/build problem?

I'm in work at the moment, but I'll d/load and have a look later.

shep 2010-02-25 22:09

Re: Packaging qt
 
1 Attachment(s)
Hi,

OK, I've got this working now.

I loaded into Qt Creator and I found there are several issues.

1. The src.pro file is missing files
Code:

TARGET = fsudoku
TEMPLATE = app
SOURCES += main.cpp \
    window.cpp \
    sudoku.cpp
HEADERS += window.h \
    perm.h \
    sudoku.hpp

PREFIX = ../debian/fsudoku/usr
unix {
    BINDIR = $$PREFIX/bin
    DATADIR = $$PREFIX/share
    DEFINES += DATADIR=\"$$DATADIR\" \
        PKGDATADIR=\"$$PKGDATADIR\"
   
    # MAKE INSTALL
    INSTALLS += target \
        desktop \
        icon64
    target.path = $$BINDIR
    desktop.path = $$DATADIR/applications/hildon
    desktop.files += fsudoku.desktop
    icon64.path = $$DATADIR/icons/hicolor/64x64/apps
    icon64.files += fsudoku.png

2. The call to random() does not work...changed everywhere to rand()

3. There is a call to a function called "nice" in sudoku.cpp which seems to be missing. I have simply commented out to get compiling.

4. in Window.cpp, the call to slave->setAttribute(Qt::WA_Maemo5StackedWindow); does not work. I have simply commented out to get compiling.


Once I had this working in Qt Creator I cleaned down the MakeFiles etc and compiled using Madde
Code:

#  -- first time only
mad-admin create org.maemo.fsudoku -a 192.168.2.4
#  -- every time
mad dh_make --createorig --single -e foo.bar@gmail.com -c gpl
mad qmake
mad dpkg-buildpackage
mad remote -r org.maemo.fsudoku send ../fsudoku_0.1-1_armel.deb
mad remote -r org.maemo.fsudoku install fsudoku_0.1-1_armel.deb

Installs to N900 now and runs, but crashes :)

My modified files are attached.

Hope this helps,

Shep

Figa 2010-02-25 23:52

Re: Packaging qt
 
Thank you very much.
1. slave->setAttribute(Qt::WA_Maemo5StackedWindow); is Qt 4.6 parameter
2. sorry for random(); I uploaded old version
3. I have still one problem with df_shlibdeps
C:\MADDE\0.6.14\madbin\dpkg-shlibdeps: failure: no dependency information found for /sysroots/fremantle-arm-sysroot-2.2009-51-1-qt453/opt/qt4-maemo5/lib/libQtCore.so.4 (used by debian/fsudoku/usr/bin/fsudoku).
dh_shlibdeps: command returned error code 512

Onemore thank you

Figa 2010-02-26 14:39

Re: Packaging qt
 
Where install other files of app like save file resources file etc. ?


All times are GMT. The time now is 18:08.

vBulletin® Version 3.8.8