View Single Post
Posts: 328 | Thanked: 101 times | Joined on Dec 2009
#8
yeap Agree. I have to create a separate partition for Linux ubuntu to install the maemo emulator. Took me quite a while to figure out all the problems.

For those that is interested: (just my own notes).

0. Install the GUI version (download from Nokia)
http://www.forum.nokia.com/Tools_Doc...atforms/Maemo/

after that follow this

I will assume you will use Ubuntu (I am using Ubuntu 9.04)

lets call these machines:
1. Ubuntu Normal Screen
2. ScratchBox Screen --> where its actually running from Ubuntu Normal PC


1. Ubuntu Normal Screen
/scratchbox/login --> this will launch Scratchbox Screen

2. Ubuntu Normal Screen
Run Another Terminal then run this
Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -kb

3. Scratchbox Screen
On Scratchbox
export DISPLAY=:2
af-sb-init.sh start




Install QT (one time only)
4. Scratchbox Screen
After login needs to install the following:
fakeroot echo "deb http://repository.maemo.org/extras/ fremantle free non-free" >> /etc/apt/sources.list
fakeroot echo "deb-src http://repository.maemo.org/extras/ fremantle free" >> /etc/apt/sources.list
fakeroot echo "deb http://repository.maemo.org/extras-devel fremantle free non-free" >> /etc/apt/sources.list
fakeroot echo "deb-src http://repository.maemo.org/extras-devel fremantle free" >> /etc/apt/sources.list


fakeroot apt-get update
fakeroot apt-get remove libqt4*
fakeroot apt-get install libqt4-maemo5-dev

fakeroot apt-get install libqt4-gui libqt4-dev

fakeroot apt-get install libqt4-webkit libqt4-opengl

4b ->
sb-conf select FREMANTLE_ARMEL
arch -> make sure its arm
go back to step 4 to install for the ARM platform (just do all the commands again)


5. logout
6. Execute Step 1 and 3 again (since we just install qt we need to make sure the path has been updated)
7.
Create a sample Qt Application
mkdir qt
cd qt
mkdir 1
cd 1

vi hello.cpp
#include <qapplication.h>
#include <qpushbutton.h>


int main( int argc, char **argv )
{
QApplication a( argc, argv );

QPushButton hello( "Hello world!", 0 );
hello.resize( 100, 30 );

//a.setMainWidget( &hello );
hello.show();
return a.exec();
}


8. Compile the program
qmake -project
qmake

./1
or
run-standalone.sh ./1 --> this will use the maemo theme

9. done ;-)

have fun

10.To Shutdown the screen

Scratchbox Screen
to shutdown
af-sb-init.sh stop
 

The Following User Says Thank You to tirtawn For This Useful Post: