Reply
Thread Tools
Guest | Posts: n/a | Thanked: 0 times | Joined on
#51
Originally Posted by noobmonkey View Post
p.s. jaem - you deserve a huuuuge pat on the back for all of your help. You have really given me a great boost so far.
No problem - I'm just glad to help you get going. Programming can be a really rewarding hobby, but it can be a bit overwhelming to dive into alone, especially when the platform is all new as well. I wish I'd had someone to give me a kickstart when I was learning, so I'm happy to do the same for you. (But that's why we have the big happy community of the Internet, right?)
To be honest, you've gotten a heck of a lot further than most people I know would have in this time. Pat yourself on the back for that.
 
Posts: 219 | Thanked: 94 times | Joined on Nov 2009 @ Helsinki, Finland
#52
Maybe it would be a good idea to start an own thread for Qt on Maemo, but I'll ask here. How can I controll the backlight with Qt? Also what audio formats should I prefer for playing simple notification sounds?
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#53
Originally Posted by naabi View Post
Maybe it would be a good idea to start an own thread for Qt on Maemo, but I'll ask here. How can I controll the backlight with Qt? Also what audio formats should I prefer for playing simple notification sounds?
The how do i control things i'm going to assume it's API calls? (Just a guess!)

Not a bad idea, would be a good idea once i'm done to do another sticky thread for getting started. Using venomrush's post as one example, another starting from an Ubuntu install from scratch

Then once people have it up - pointing at either a python/QT/C thread to get people going
 
Posts: 219 | Thanked: 94 times | Joined on Nov 2009 @ Helsinki, Finland
#54
Originally Posted by noobmonkey View Post
The how do i control things i'm going to assume it's API calls? (Just a guess!)
Correct. Here's more thoughts about the issues mentioned. I guess the backlight has multiple (couple of hundred?) different brightness levels. My guess is also that you need to give this brightness value to the function call. How do I fetch the default brightness set by the user and what functions do I need to use to light up the screen? Also about the Qt's QSound class... What audio types are supported on Maemo?
 
pixelgeek's Avatar
Posts: 41 | Thanked: 8 times | Joined on Nov 2009 @ Zürich, Switzerland
#55
as my "hello world" is still not working, I created a new thread for this problem: http://talk.maemo.org/showthread.php?p=430601
(@noobmonkey: keep me posted if this example works for you...)
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#56
Originally Posted by pixelgeek View Post
as my "hello world" is still not working, I created a new thread for this problem: http://talk.maemo.org/showthread.php?p=430601
(@noobmonkey: keep me posted if this example works for you...)
Will do - going to try it tonight - heading home in 20 mins
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#57
Right.... i've gone off in a whole different direction! Wasn't enjoying the nokia C++ walk-through.... So i've banished myself to the world of python....

Right..... I have the sexy maemo displaying like an n900. yay!

I have used some example code to load a widget - as thats essentially what i want to try first (Probably a hard choice i know)....
Got my .py and .desktop files - yayness!

I've finished my first set of coding (Using Eric4 - again bad choice? not sure) - but was simple enough to type up some code!

How do i compile my code and put it in my shiny scratchboxy maemo N900
Again, is that a stupidly hard question to ask to be explained?!!)

Last edited by noobmonkey; 2009-12-16 at 19:40.
 
Guest | Posts: n/a | Thanked: 0 times | Joined on
#58
Originally Posted by noobmonkey View Post
I've finished my first set of coding (Using Eric4 - again bad choice? not sure) - but was simple enough to type up some code!
How do i compile my code and put it in my shiny scratchboxy maemo N900
Python doesn't get compiled - it's an interpreted language (which is why there were comments about it sometimes being slower and more resource-hungry). To put it in scratchbox, that depends on where you want it. From outside sbox, your sbox home directory is actually at /scratchbox/users/[username]/home/[username]. Once logged into sbox, that is mapped to /home/[username]. After that, you'll have to copy your two files to somewhere Maemo expects them to be. To be honest, I can't remember where that is, but I think it's in /usr/lib. Be aware, however, that sbox has a different /usr/lib for each target, so you'll have to put it in /targets/[targetname]/usr/lib/whatever.
...and I just woke up, so that's about all I can tell you right now :P
 

The Following User Says Thank You to For This Useful Post:
Posts: 219 | Thanked: 94 times | Joined on Nov 2009 @ Helsinki, Finland
#59
Originally Posted by noobmonkey View Post
How do i compile my code and put it in my shiny scratchboxy maemo N900
Again, is that a stupidly hard question to ask to be explained?!!)
I think the best thing would be to build a deb package from it. I'm trying to find out the best practices here, but interest seems to moderate Especially if you have lots of different kind of resources, i.e. executable, images, config items etc., it would be nice to have the package.

On the other hand, just execute it. You need to see some results to keep the motivation alive...
 
Guest | Posts: n/a | Thanked: 0 times | Joined on
#60
Originally Posted by naabi View Post
I think the best thing would be to build a deb package from it. I'm trying to find out the best practices here, but interest seems to moderate Especially if you have lots of different kind of resources, i.e. executable, images, config items etc., it would be nice to have the package.

On the other hand, just execute it. You need to see some results to keep the motivation alive...
Your completely right about best-practices, as well as less chance of messing things up with more complicated apps. My point was just that if noobmonkey is doing simple "Hello World!" - or even a more complicated single-binary app - it would probably be more simple to learn that part first, and then learn packaging once it is needed.
One note about that, because it probably isn't obvious: if you just type "foo" into the shell, the shell will interpret that as an executable program, and try to run it. It will look for that program in one or more places, in a specific order. By default on most Linux systems, those places (in some order) are usually /bin, /sbin, /usr/bin, /usr/sbin. That's all great, but if you're just wanting to run an app from your home directory, it's not going to look there, and it will give you some error about not being able to find it. There are two ways to deal with this:
1) If you want to be lazy: cd into the directory containing the binary, and run it with "./foo" or "/path/to/foo". This qualifies the path to the binary (relative or absolute, respectively), so it doesn't need to search for it.
2) If you are using a non-standard path long-term, or if you aren't running it manually: export PATH=foo will set the PATH environment variable in your shell to "foo". (You don't want to do this - it's just an example.) What PATH normally contains is the paths listed previously, separated by colons. If you want to add your custom binary path to the list, use "export PATH=$PATH:/path/to/custom/bindir". $PATH evaluates to the current value of the variable. You should probably append your custom path to the end unless you have a reason not to (see comments about order). This change will last only for the current shell session, in the current shell. You can make it permanent (or rather, autorun on login) by putting that line in your shell's rc file (e.g. /home/$user/.bashrc, .ashrc (on the N900), etc.)
 
Reply


 
Forum Jump


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