Reply
Thread Tools
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#1
Can someone explain to me, what are the differences
between the QtCreator target "Maemo" and "Qt Simulator"
I now the technical difference one is for the device and
the other one is for a simulated envirionment.

My problem is, why I can not use QDocumentGallery in
the Maemo target (include file qtdocumentgallery.h isn't found)
but the same project can be compiled for the
Qt Simulator environment.

Nicolai
 
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#2
The Qt Simulator uses your PC's architecture and apps compiled in it are built using your PC's includes/libs, and linked against the simulator (I think), so it's basically just a wrapped binary.
Code:
mohammad@mohammad-i5laptop:~/mediaplayer-build-simulator$ file mediaplayer 
mediaplayer: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped
QDocumentLibrary is part of Mobility, are you sure you have the correct CONFIG and MOBILITY lines in the .pro file?
Remember if you're using 1.1 or 1.2 you have to use libqtm-11/12
 

The Following 2 Users Say Thank You to MohammadAG For This Useful Post:
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#3
Yes it uses PC architecture, but not necessarily the PCs Qt-Libs.
On my setup it uses the libs provided by QtCreator.
The point is, why can I compile the same project
(with the same .pro file with
CONFIG += mobility
MOBILITY += gallery)
for the Qt Simulator target
but not for the Maemo target?

For example, both envirionments have the qmobilityglobal.h header file:
./Simulator/QtMobility/gcc/include/QtMobility/qmobilityglobal.h
./Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/include/qmobilityglobal.h
But qdocumentgallery.h is only in the Simulator envirionment:
./Simulator/QtMobility/gcc/include/QtGallery/qdocumentgallery.h

What is the point in having a "simulator" environment without
a matching "real" environment?
 
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#4
IMO, the simulator is the worst part in the SDK, I'd rather test in scratchbox than use it.

./Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/opt/qtm12/include/QtGallery/qdocumentgallery.h

qdocumentgallery.h seems to be part of mobility 1.2 (or 1.1, but I don't have that installed atm)

In both cases, you need to use different lines in the .pro file

Here's what I'm using in my BT Messenger project:
Code:
maemo5 {
    CONFIG += mobility12
} else {
    CONFIG += mobility
}
MOBILITY = connectivity
 

The Following User Says Thank You to MohammadAG For This Useful Post:
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#5
Yes, I don't want to use the simulator, as I have a working
scratchbox environment.
But I would like to write the application with QtCreator
and I don't know if QtCreator can work with my scratchbox
envirionment.

How did you get qtm12 as part of your maemo sysroot?
(apt-get install libqtm12 with madde?)
This is exactly what I need.

Nicolai
 
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#6
You can test directly from Qt Creator in scratchbox with this tutorial:
http://blogs.forum.nokia.com/blog/ka...and-scratchbox

As for installation of packages, that was kinda messed up and I spent some time figuring it out.
Download the debs you need with scratchbox (apt-get -d --reinstall install packages).
You'll find them in /scratchbox/users/$USER/targets/FREMANTLE_ARMEL/var/cache/apt/archives/
cd into ~/QtSDK/Maemo/4.6.2/bin

then use xdpkg:
Code:
Usage: mad ../madlib/ma-cmds/xdpkg <command> ...

 Commands
    -i|--install <package>.deb  Install extra package
    -P|--purge <package>        Remove/Purge extra package
    -l|--list                   List available extra packages
    -L|--listfiles <package>    List files of an extra package
    -p|--print-avail <package>  Display some details about package
Quick script:
Code:
cd ~/QtSDK/Maemo/4.6.2/bin && for files in /scratchbox/users/$USER/targets/FREMANTLE_ARMEL/var/cache/apt/archives/libqtm-12*.deb; do mad ../madlib/ma-cmds/xdpkg -i $files; done
 

The Following User Says Thank You to MohammadAG For This Useful Post:
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#7
Originally Posted by MohammadAG View Post
As for installation of packages, that was kinda messed up and I spent some time figuring it out.
Just as I feared.
Thank you for this instructions.

Nicolai
 

The Following User Says Thank You to nicolai For This Useful Post:
Posts: 466 | Thanked: 661 times | Joined on Jan 2009
#8
I recommend installing QtCreator in Scratchbox itself per theoriginalgri's comments on the link provided by Mohammad. This has actually been the first and only way I have started tinkering around with Qt and Maemo SDK as it runs much better than simulator or madde. It works well enough and simple enough for a first-time dev like me (for N900 anyway). I do have Linux experience enough to follow what was going on in the post related to X, scripts, etc.

I had an issue with QtCreator building packages this way, but resolved it with:
http://focuskill.blogspot.com/2011/0...nt-locate.html

I actually just use dpkg inside of scratchbox against my source after using QtCreator inside scratchbox instead of relying on QtCreator's packaging, however.
 
Reply


 
Forum Jump


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