maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Need guidelines for starting programming for maemo5 in C (https://talk.maemo.org/showthread.php?t=49624)

Jaso333 2010-04-09 17:58

Need guidelines for starting programming for maemo5 in C
 
I have already set up the maemo SDK on a virtual machine on my PC so I dont need any help there.

I have experience compiling under a Linux environment seeing as I used to program applications for my PSP in C.

I was wondering if there is a solid set of tutorials for getting started with the various libraries that are used in the creation of Maemo 5 apps.

I just ordered my n900 so it should be arriving soon, I want to be able to make additions to the already astounding application repository.

Thanks

wmarone 2010-04-09 18:06

Re: Need guidelines for starting programming for maemo5 in C
 
If you're looking to go from the C angle, Gtk is the toolkit you'll be using.

http://wiki.maemo.org/Documentation/...eveloper_Guide

The majority of libraries available on the N900 are similar, if not identical, to their counterparts on most standard Linux desktops. It's less a question of what libraries there are and more "what do you want to make." From there you can probably identify which libraries you need and what is available on the N900.

mmurfin87 2010-04-09 18:23

Re: Need guidelines for starting programming for maemo5 in C
 
Save yourself assloads of trouble and ditch both C and Gtk. They both suck. Go C++ and Qt.

ravioli156 2010-04-09 18:23

Re: Need guidelines for starting programming for maemo5 in C
 
Hum... If you want to start development, I suggest that you take a look at Qt instead of GTK, Qt is now the reference for writting apps (and your programs will be compatible with S60, MeeGo etc...)
OK it's in C++, but no big deal

bousch 2010-04-09 18:25

Re: Need guidelines for starting programming for maemo5 in C
 
I thought Qt would be the better choice for future (PR1.2 and onwards) compatibility.

See this post

Jaso333 2010-04-09 18:36

Re: Need guidelines for starting programming for maemo5 in C
 
can someone explain to me what QT actually IS and how it differs from gtk

mmurfin87 2010-04-12 14:41

Re: Need guidelines for starting programming for maemo5 in C
 
"Qt is a cross-platform application and UI framework. Using Qt, you can write web-enabled applications once and deploy them across desktop, mobile and embedded operating systems without rewriting the source code." - http://qt.nokia.com/products

All I know about gtk is that I hate it. Qt is object oriented, very easy to understand, comes with its own IDE and WYSIWYG UI editor.

Joorin 2010-04-14 08:55

Re: Need guidelines for starting programming for maemo5 in C
 
After some searching I've found several "How to develop?" threads so I'll use this one instead of creating a new one since I'm coming from a similar angle as OP.

I got an N900 a few days back and my geek love is true and pure. This device is pure gold. I spent two days just playing with it without even inserting a SIM card and try to make a call with it.

But, and this is where my enthusiasm died down 75%, the development environment is so Debian oriented that it's a rel chore to get something that works in my Fedora environment. I've googled a bit and found some notes about people using the SDK stand alone in Fedora environments but not much on how to go about setting it up.

So, my question is the following: Are there resources that I've missed describing how to set up the development environment on a Fedora box?

My plan B is to create my own RPM from what is needed (after figuring that out) and using that to maintain my Maemo development environment but it's a rather tedious way to get to do something that should be simple.

Which leads to my gripe: Why force me to install scratchbox (with a default path of "/scratchbox", which is ... less sane to me) just to be able to install the SDK? The scripts used to do these tasks are not too friendly.

I've done some developing for PalmOS and all I did there was to download the patched gcc source, compile it, install the result where I wanted it and give the location to make and it just works. No muss, no fuss. Is it possible to come close to this with Maemo development?

I know there is a VMware image to download but that forces me to give 1GByte of RAM to run Ubuntu that runs a window handler i don't like with a tool I don't know in a system I'm not familiar with. I want my emacs and Makefile!

As I've understood it, NOKIA has the binaries in safe keeping and I get them after I get a token (which is ok as long as I get something that works) but would it be ok to package these binaries in an RPM for later use? Are the tokens personal in some way?

I'm sure many of my questions are n00b level ones but I'd really like to get to develop, like, yesterday. The device is awesome and there is a very active community so the possibilities for lots of fun are good.

mikec 2010-04-14 10:31

Re: Need guidelines for starting programming for maemo5 in C
 
Quote:

Originally Posted by Joorin (Post 609881)
After some searching I've found several "How to develop?" threads so I'll use this one instead of creating a new one since I'm coming from a similar angle as OP.

I got an N900 a few days back and my geek love is true and pure. This device is pure gold. I spent two days just playing with it without even inserting a SIM card and try to make a call with it.

But, and this is where my enthusiasm died down 75%, the development environment is so Debian oriented that it's a rel chore to get something that works in my Fedora environment. I've googled a bit and found some notes about people using the SDK stand alone in Fedora environments but not much on how to go about setting it up.

So, my question is the following: Are there resources that I've missed describing how to set up the development environment on a Fedora box?

My plan B is to create my own RPM from what is needed (after figuring that out) and using that to maintain my Maemo development environment but it's a rather tedious way to get to do something that should be simple.

Which leads to my gripe: Why force me to install scratchbox (with a default path of "/scratchbox", which is ... less sane to me) just to be able to install the SDK? The scripts used to do these tasks are not too friendly.

I've done some developing for PalmOS and all I did there was to download the patched gcc source, compile it, install the result where I wanted it and give the location to make and it just works. No muss, no fuss. Is it possible to come close to this with Maemo development?

I know there is a VMware image to download but that forces me to give 1GByte of RAM to run Ubuntu that runs a window handler i don't like with a tool I don't know in a system I'm not familiar with. I want my emacs and Makefile!

As I've understood it, NOKIA has the binaries in safe keeping and I get them after I get a token (which is ok as long as I get something that works) but would it be ok to package these binaries in an RPM for later use? Are the tokens personal in some way?

I'm sure many of my questions are n00b level ones but I'd really like to get to develop, like, yesterday. The device is awesome and there is a very active community so the possibilities for lots of fun are good.

Dump scratchbox and go python and Qt in 30 mins.

http://talk.maemo.org/showthread.php...347#post461347

Joorin 2010-04-14 12:37

Re: Need guidelines for starting programming for maemo5 in C
 
@mikec
Since I'm not familiar with python, this would mean much more work just to get to the good stuff. I've done some GTK+ development earlier, I know C pretty well (and dislike C++ for different reasons) which leaves me wanting my trusty gcc.

But thank you for the link. I'll give it a spin whenever I feel adventurous.

lcuk 2010-04-14 12:39

Re: Need guidelines for starting programming for maemo5 in C
 
pygtk or pyqt are really easy to get into - if what you are designing does not need ultimate performance, you should find it simpler to get up and running using either of those.

the other benefit is you can do it mostly without needing scratchbox

Khertan 2010-04-14 12:54

Re: Need guidelines for starting programming for maemo5 in C
 
PHP Code:

___      _    _          _    _             
 
__|_  _(_)__| |___ ___ | |  (_)_ _  ___ ___
| (| || | / _` / -_|_-< | |__| | ' \/ -_|_-<
 \___|\_,_|_\__,_\___/__/ |____|_|_||_\___/__/ 


lcuk 2010-04-14 13:03

Re: Need guidelines for starting programming for maemo5 in C
 
khertan, embed your asciiart inside a code tag or fonts/spaces get screwed

Joorin 2010-04-14 13:06

Re: Need guidelines for starting programming for maemo5 in C
 
Quote:

Originally Posted by lcuk (Post 610171)
pygtk or pyqt are really easy to get into - if what you are designing does not need ultimate performance, you should find it simpler to get up and running using either of those.

the other benefit is you can do it mostly without needing scratchbox

I'm sure both pygtk and pyqt are excellent ways to get a head start with GUI design and the such but my background is in servers/services, databases, embedded systems, some Linux kernel module tinkering and other more low level things. This makes GUI creation a secondary thing (even though it seems easy enough to do nice things in Maemo5) and access to hardware and system resources a primary.

But I have to say that not having to ... handle scratchbox is a good selling point.

lcuk 2010-04-14 13:10

Re: Need guidelines for starting programming for maemo5 in C
 
most database work is done via the sql library of choice (and hence runs fast mostly) and im sure in your experience you have used scripting binding languages before.

python is extremely useful to bind together your non gui applications too ;)

Khertan 2010-04-14 13:25

Re: Need guidelines for starting programming for maemo5 in C
 
Quote:

Originally Posted by lcuk (Post 610206)
khertan, embed your asciiart inside a code tag or fonts/spaces get screwed

Thanks for the tips !!!

Khertan 2010-04-14 13:26

Re: Need guidelines for starting programming for maemo5 in C
 
And to be honest, doing Hildon/GTK Gui with python is really fast ...

lcuk 2010-04-14 13:26

Re: Need guidelines for starting programming for maemo5 in C
 
i still can't read it ;)

zimon 2010-04-14 13:35

Re: Need guidelines for starting programming for maemo5 in C
 
In the future (also already now with Java), Python and Java applications can be faster and use less battery energy than same applications (in certail family) written in C/C++. There is optimizations available for these higher level languages which are not possible for standard c/C++.

Read the study: http://trs-new.jpl.nasa.gov/dspace/handle/2014/18351
Also other studies and benchmark tests found with Google.

Joorin 2010-04-14 14:08

Re: Need guidelines for starting programming for maemo5 in C
 
Quote:

Originally Posted by lcuk (Post 610214)
most database work is done via the sql library of choice (and hence runs fast mostly) and im sure in your experience you have used scripting binding languages before.

python is extremely useful to bind together your non gui applications too ;)

My point is that I'm more interested in low level things than GUI creation.

But perhaps that changes if I try the python bindings. :)

lcuk 2010-04-14 16:34

Re: Need guidelines for starting programming for maemo5 in C
 
Joorin,
:) i too enjoy peeling back the layers on the system.
i've spent some time recently deep in the hearts of the linux bootup and stuff and its a complex and yet intriguing place :)

the suggestion of python was more for ease of starting, scratchbox is considered somewhat a right of passage and you have to add all that knowledge ontop of linux stuff too.
i didn't mean to put you off just merely tried to pass on some of the easy start tips.

by the way, i spent almost a year on my 810 and n900 compiling my entire system (in C) on device.

adding the sdk and tools repositories for maemo allows you to install build-essential
whilst theres no autotools (for ./configure scripts) nor dpkg-buildpackage available easily, it is certainly feasible to get most required -dev libraries installed and can build makefile type apps with ease.

Joorin 2010-04-14 16:53

Re: Need guidelines for starting programming for maemo5 in C
 
@lcuk
I'm guessing you're suggesting to compile on the device to get away from many of the problems with setting up a development environment on my Fedora box.

This is perhaps the best suggestion that solves the most problems. But it has some drawbacks (for me). My network "situation" is, at best, functioning letting me use the WIFI connection in the N900 as much as I want but I need to get new hardware to make the device show up to the rest of the network.

On top of that, a quick inspection of the file systems on the device suggests that I've only got something like 65MByte left on the root partition (and I got this device from the store three days ago, I've installed OpenSSH and htop, nothing more) making me feel a bit uncomfortable with installing all that is needed for local development. Unless it all behaves nicely and uses this opt-solution, which I don't know how to check with less than installing a package.

So, I feel a bit forced, still, to try to set something up outside of the device.

Thank you for the suggestion, though. If things turn into too much of a problem, I'll give that a go.

lcuk 2010-04-14 16:56

Re: Need guidelines for starting programming for maemo5 in C
 
yeah space is a problem
we haven't really considering optifying the include folders (tho its something i had in early optify discussions)

pr1.2 should bring some more space hopefully :)


All times are GMT. The time now is 22:24.

vBulletin® Version 3.8.8