Reply
Thread Tools
shep's Avatar
Posts: 85 | Thanked: 65 times | Joined on Jan 2010 @ Ireland
#1
Hi All,

I hope you can help. I felt I was spamming the Technology Preview thread with dev type questions, so I have started a new thread.

Anyhoo, I've got my first Qt app working, it deploys and I can run it from X-Terminal, but I can't get it to deploy to the N900 and display as an Icon to run it directly.

Here's what I have done.

I followed DanielWilm's instructions on this page: http://talk.maemo.org/showpost.php?p...4&postcount=28 and also Too's instructions in this post http://talk.maemo.org/showpost.php?p...&postcount=117

My source code is attached.

When I compile I do the following -

Code:
mad dh_make --createorig --single -e s.l@gmail.com -c gpl
mad qmake
mad dpkg-buildpackage
mad remote -r wwcalc send ../wwcalc_0.1-1_armel.deb
mad remote -r wwcalc install wwcalc_0.1-1_armel.deb 
mad remote -r wwcalc run dpkg -L wwcalc
All commands execute without errors (so far as I can see).

After that last command I get the following -

Code:
/usr
/usr/bin
/usr/bin/wwcalc
/usr/sbin
/usr/share
/usr/share/doc
/usr/share/doc/wwcalc
/usr/share/doc/wwcalc/changelog.Debian.gz
/usr/share/doc/wwcalc/copyright
/usr/share/doc/wwcalc/README.Debian
/usr/share/icons
/usr/share/icons/hicolor
/usr/share/icons/hicolor/64x64
/usr/share/icons/hicolor/64x64/apps
/usr/share/icons/hicolor/64x64/apps/wwcalc.png
But still....no icon on the N900


I know little of nothing about MAKEFILEs and I suspect that may be my downfall.

Fingers crossed that someone can help.

Also - sorry to be a pain, but if you think you can help please don't assume I know anything Sorry, but idiot proof steps would be a great help!

I'd be more than happy to put together a guide for the Madde wiki FAQ once I get my head around this....

Thanks,

Shep
Attached Files
File Type: zip wwcalc-0.1.zip (358.3 KB, 106 views)

Last edited by shep; 2010-01-17 at 08:32.
 
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#2
Originally Posted by shep View Post
Hi All,

After that last command I get the following -

Code:
/usr
/usr/bin
/usr/bin/wwcalc
/usr/sbin
/usr/share
/usr/share/doc
/usr/share/doc/wwcalc
/usr/share/doc/wwcalc/changelog.Debian.gz
/usr/share/doc/wwcalc/copyright
/usr/share/doc/wwcalc/README.Debian
/usr/share/icons
/usr/share/icons/hicolor
/usr/share/icons/hicolor/64x64
/usr/share/icons/hicolor/64x64/apps
/usr/share/icons/hicolor/64x64/apps/wwcalc.png
But still....no icon on the N900

...

Shep
Havent used the MADDE env before, im old school , so still rely on debian packaging commands.
I didnt see any debian config files likes debian/rules or debian/control.
the problem seems like either nothing is getting built or they are not getting installed.
sorry for the vague answer, but can you try to make this a little more clear.
 

The Following User Says Thank You to krk969 For This Useful Post:
Posts: 1,208 | Thanked: 1,028 times | Joined on Oct 2007
#3
 

The Following 2 Users Say Thank You to mikkov For This Useful Post:
shep's Avatar
Posts: 85 | Thanked: 65 times | Joined on Jan 2010 @ Ireland
#4
Originally Posted by mikkov View Post
you are missing the .desktop file, see http://wiki.maemo.org/Desktop_file_format and http://wiki.maemo.org/Packaging_a_Qt...n_.26_position
Hi, thanks for the hint.

I did have a .desktop file though, maybe in the wrong place?
 
shep's Avatar
Posts: 85 | Thanked: 65 times | Joined on Jan 2010 @ Ireland
#5
OK, I've gone back to basics and started from scratch.

- Created project through Madde

- Edited, tested etc. with QT Creator

- (once tested) Created clean empty top level folder "wwcalc-0.2"

- Added my "src" folder to the "wwcalc-0.2" folder

- Added a "data" folder to the project with 2 subfolders, "48x48" and "64x64", each of these has a png called "wwcalc.png" inside (see folders.jpg attached for structure)

- Inside the new top level folder created a file called "wwcalc.pro"
Code:
TEMPLATE = subdirs
SUBDIRS  = src
- Inside the "src" folder added a file called "scr.pro"
Code:
TARGET = wwcalc
TEMPLATE = app
SOURCES += qtmain.cpp \
    mainwindow.cpp 
HEADERS += mainwindow.h 
FORMS += mainwindow.ui 
PREFIX = ../debian/wwcalc/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 += wwcalc.desktop

  icon64.path = $$DATADIR/icons/hicolor/64x64/apps
  icon64.files += ../data/64x64/wwcalc.png
  
}
- Inside "src" folder created another file called "wwcalc.desktop"
Code:
[Desktop Entry]
Encoding=UTF-8
Version=0.2
Type=Application
Name=WW Calc
Exec=/usr/bin/wwcalc
Icon=wwcalc
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable
- In the OS ensure there is no "debian" folder at the same level as "src" and ensure there is no folder structure called "wwcalc-0.2-orig" left over from a failed compile

- In madde execute
Code:
mad dh_make --createorig --single -e foo.bar@gmail.com -c gpl

mad qmake
- I then edited the "Makefile" in the "src" folder - I don't know if this is right??? I added this just before the "install:" section
Code:
...
install_icon64: first FORCE
	@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/share/icons/hicolor/64x64/apps/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/share/icons/hicolor/64x64/apps/ 
	-$(INSTALL_FILE) c:\MADDE\0.5\home\Stephen\wwcalc-0.2\data\64x64\wwcalc.png $(INSTALL_ROOT)/usr/local/share/icons/hicolor/64x64/apps/


uninstall_icon64:  FORCE
	-$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/share/icons/hicolor/64x64/apps/c:/MADDE/0.5/home/Stephen/wwcalc-0.2/data/64x64/wwcalc.png
	-$(DEL_DIR) $(INSTALL_ROOT)/usr/local/share/icons/hicolor/64x64/apps/ 
...
- Again in Madde
Code:
mad dpkg-buildpackage
mad remote -r org.maemo.wwcalc send ../wwcalc_0.2-1_armel.deb
mad remote -r org.maemo.wwcalc install wwcalc_0.2-1_armel.deb
mad remote -r org.maemo.wwcalc run dpkg -L wwcalc
So...the result....partial success - I have a WWCalc app icon showing, but it's a bare blue box.

Any ideas what's wrong with the setup now?

Thanks,

Shep
Attached Images
 
Attached Files
File Type: zip wwcalc-0.2.zip (215.2 KB, 100 views)
 

The Following User Says Thank You to shep For This Useful Post:
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#6
Originally Posted by shep View Post

Any ideas what's wrong with the setup now?

Thanks,

Shep
this is a known issue
please refer the wiki here

basically you need to run this I think

gtk-update-icon-cache /usr/share/icons/hicolor
check the wiki as the info might be updated

or alternatively try restarting your device and the icons might appear, had worked like that for me, but the wiki has info to make it work right first time.

Last edited by krk969; 2010-01-17 at 13:43.
 
Posts: 60 | Thanked: 23 times | Joined on Jan 2010
#7
I just followd your example and i get no icon at all, not even a blue one.
What i did was the following:

Downloaded your source, extracted it.
Executed these commands:
mad dh_make --createorig --single -e foo.bar@gmail.com -c gpl

mad qmake

mad dpkg-buildpackage

Then transfered the file to device and installed it..

No icon at all..
And no way to uninstall it..

Can some please please please make a tutorial on how to create an icon for this example:

http://wiki.maemo.org/MADDE/Qt_Example

I bet that will help many, if someone can tell me the exact steps to take here i can make a wiki on how to do it. No problem.

Please, someone must know this.
 
shep's Avatar
Posts: 85 | Thanked: 65 times | Joined on Jan 2010 @ Ireland
#8
Originally Posted by tmsha View Post
...

Then transfered the file to device and installed it..

No icon at all..
And no way to uninstall it..
How did you transfer & install it?

I have no option to uninstall either, which surprised me when the (blank) icon finally installed.

The is a mad command to remove a target, I wonder does that to an uninstall??? anyhow I guess you can always "sudo gainroot" and remove the folders.

Originally Posted by tmsha View Post
Can some please please please make a tutorial on how to create an icon for this example:

http://wiki.maemo.org/MADDE/Qt_Example

I bet that will help many, if someone can tell me the exact steps to take here i can make a wiki on how to do it. No problem.

Please, someone must know this.
Agreed, that's why I listed my steps so explicitly...I figure I'm a fair way towards getting a simple package over with icon.

Shep
 
shep's Avatar
Posts: 85 | Thanked: 65 times | Joined on Jan 2010 @ Ireland
#9
Originally Posted by krk969 View Post
this is a known issue
please refer the wiki here

basically you need to run this I think

gtk-update-icon-cache /usr/share/icons/hicolor
check the wiki as the info might be updated

or alternatively try restarting your device and the icons might appear, had worked like that for me, but the wiki has info to make it work right first time.
I tried both and I still have the blue square

I guess it's a problem with the package still.

Shep
 
Posts: 60 | Thanked: 23 times | Joined on Jan 2010
#10
shep: i transfered it with usb and installed with dpkg -i with root access.
 
Reply


 
Forum Jump


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