Reply
Thread Tools
eitama's Avatar
Posts: 702 | Thanked: 334 times | Joined on Feb 2010 @ Israel.
#11
Originally Posted by postformac View Post
I'm also just starting to try writing programs for the N900, personally I have managed to get simple things working on the device with Qt and MADDE through following the MADDE/QtCreator integration tutorial and following the example program at the end of the Nokia Getting started with Maemo 5 introduction.

I can run programs I write on the device but only through the Qt interface, I am still trying to work out the next bit of getting programs loaded to the device etc.

I would agree that trying to get started in this development is a jungle, there is definately a lot of information out there but it is spread across a wide range of tools, methods and platforms and takes a massive amount of researching to get anywhere. Not that I don't expect to do some amount of reading and learning to get started but its taken days of digging and installing / uninstalling various bits of downloaded software just to get to managing a "Hello World" app...

All of the information out there is very useful and I'm sure will be necessary as I get further into developing but I can see how it can put people off at the start, beginners just need a single step by step spoon fed example document that takes you from nothing to having a simple working app installed on the device!
The thing is, I've got esbox up, and ran the helloworld application inside the scratchbox, it was there! even the button was working.
When I tried looking for the executable to copy into my N900, I could not find it. Not even after switching to ARMEL compilation mode, hitting build all.
Where is it? Where should I look for it, How should I connect to my phone directly to run it from esbox?

The python area does seem much more simple, and for what I want to do, Python performance will probably be more then enough.
I just rather stick to one good dev env, and run with it.
 
w00t's Avatar
Posts: 1,055 | Thanked: 4,107 times | Joined on Oct 2009 @ Norway
#12
This does make me think that perhaps a simple, practical tutorial on building a 'hello world' with Creator + MADDE and deploying on n900 might be a good idea. I'll see if I get some time to work on this soon, if I get my laptop back from Sony repair anytime soon.
__________________
i'm a Qt expert and former Jolla sailor (forever sailing, in spirit).
if you like, read more about me.
if you find me entertaining, or useful, thank me. if you don't, then tell me why.
 

The Following 5 Users Say Thank You to w00t For This Useful Post:
Posts: 24 | Thanked: 12 times | Joined on Mar 2010
#13
I mean run them on the N900 from within Qt on my PC over the USB connection rather than having them actually installed on the device to be able to run once the USB is disconnected.
 
eitama's Avatar
Posts: 702 | Thanked: 334 times | Joined on Feb 2010 @ Israel.
#14
Originally Posted by postformac View Post
I mean run them on the N900 from within Qt on my PC over the USB connection rather than having them actually installed on the device to be able to run once the USB is disconnected.
You can always open a terminal and run you .py file.
But I think the steps you are talking about are 2 or 3 commnad line commands with MADDE, that will create the .deb file, which you then just install on your n900.

What will be the ICON? who knows (:
 
w00t's Avatar
Posts: 1,055 | Thanked: 4,107 times | Joined on Oct 2009 @ Norway
#15
Originally Posted by postformac View Post
I mean run them on the N900 from within Qt on my PC over the USB connection rather than having them actually installed on the device to be able to run once the USB is disconnected.
Right. Way I do that (bearing in mind I use Linux here, you could do this with Windows, if you used WinSCP + Putty or something)...

In the terminal, on my desktop, in my application's folder..

mad make # tell MADDE to build my project
scp bin/myapp 192.168.0.5:/home/user/myapp # copy myapp executable to my n900
ssh root@192.168.0.5 # connect to my n900 via SSH, so I have a terminal on there
chmod u+x /home/user/myapp # mark myapp executable
/home/user/myapp

You can also just open the terminal on your n900, and run '/home/user/myapp' manually.

--

If you were using Windows, you'd open WinSCP, connect to 192.168.0.5, copy myapp executable to /home/user, mark it executable (by right clicking the n900 copy, and properties, or something - I haven't done this in forever, so I forget how), then use PuTTY to connect to your n900 and run it as above.

--

There's probably a million ways to do it - this is mine. Hope this helps.
__________________
i'm a Qt expert and former Jolla sailor (forever sailing, in spirit).
if you like, read more about me.
if you find me entertaining, or useful, thank me. if you don't, then tell me why.
 
eitama's Avatar
Posts: 702 | Thanked: 334 times | Joined on Feb 2010 @ Israel.
#16
@wOOt
Does this also pop the application into the applications menu?
 
JohnLF's Avatar
Posts: 551 | Thanked: 507 times | Joined on Feb 2010 @ North West England
#17
Originally Posted by w00t View Post
This does make me think that perhaps a simple, practical tutorial on building a 'hello world' with Creator + MADDE and deploying on n900 might be a good idea. I'll see if I get some time to work on this soon, if I get my laptop back from Sony repair anytime soon.
MADDE sounds like the way to go. A beginner's guide sounds great, in the meantime I will download and experiment.
Thanks!
 
Posts: 328 | Thanked: 101 times | Joined on Dec 2009
#18
try this:

May not be perfect. But hopefully will be able to help you.

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
make

./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


--> Misc
1. How to include netwok in the compilation
qmake -project
then change the .pro result and add the following:

QT += network

To remove the GUI
QT -= gui --> to support GUI
QT += xml --> to add xml support

to add all support
QT += gui network support xml opengl sql



how to transfer the file back to your maemo

do it from the "scratchbox screen"
1. install openssh in your nokia n900 (nokia n900 device)
dont forget to set your password

scratchbox screen
-------------------
2. Set your compilation to ARM platform
sb-conf select FREMANTLE_ARMEL --> for compile to your internet tablet
sb-conf select FREMANTLE_X86 --> for normal compilation

3. qmake -project
4. qmake
5. make
6. the final file assuming the "demoapp" is the executable ARM binary.
7. scp demoapp root@192.168.2.168:/home/user
8. ssh root@192.168.2.168
9. cd /home/user
10. ./demoapp

then you should see the application appears in your nokia n900


If you could not run the applicaiton, maybe the qt is not yet installed in your nokia n900
1. do this from your device as root
apt-get install libqt4-gui
apt-get install libqt4-webkit libqt4-opengl libqt4-dbus




FAQ:
1. What if you can not change your Configuration from X86 to ARM?
sb-conf killall --signal=9

2. How to see what is the device available in your Sb-conf?
sb-conf ls -T

Last edited by tirtawn; 2010-03-13 at 17:31.
 

The Following 5 Users Say Thank You to tirtawn For This Useful Post:
Posts: 455 | Thanked: 278 times | Joined on Dec 2009 @ Oregon, USA
#19
Umm, why not download and run the Maemo SDK virtual machine?
 

The Following User Says Thank You to craftyguy For This Useful Post:
Posts: 113 | Thanked: 26 times | Joined on Feb 2010 @ Port of Spain, Trinidad & Tobago
#20
Originally Posted by tirtawn View Post
Install QT (one time only)
4. Scratchbox Screen
I started yesterday installing all the tools before reading this (I wish I had!) but I haven't started using them.

My question is, when you say install QT, is it in Ubuntu or the scratchbox? (Hope is the first, I did it there...)

Originally Posted by craftyguy View Post
Umm, why not download and run the Maemo SDK virtual machine?
I think that is what he said in step 0.

Cheers,
 
Reply


 
Forum Jump


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