| Prev |   1     2   3   4     5   | Next
maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900) (https://talk.maemo.org/showthread.php?t=44576)

casper27 2010-02-21 14:52

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Be easier for people to help if they have a copy. I say get it in dev and let everyone have a look. Im sure qwerty12 will have some great suggestions once he has a go.

noobmonkey 2010-02-21 14:58

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Quote:

Originally Posted by casper27 (Post 539713)
qwerty12 will have some great suggestions once he has a go.

Thats what I'm worried about lol.....

Don't want to release something half finished though and still need to deign an icon for it :)
will sort the tabs out now and remove the randoms......
Then look into how to get it into dev....

noobmonkey 2010-02-21 15:27

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
2 Attachment(s)
ok! v0.4.1 will be released to extras dev hopefully v soon.
cut put the extras that i will release at another time.

change the screen cam image so not to bore you all! hehehe

noobmonkey 2010-02-21 15:33

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Quote:

Maemo Extras Assistant
Request sent

Your request has been mailed to the garage admins. You should receive an invitation when an admin approves your request.

Go back to the main page.
w000p will get working on the icon :D

noobmonkey 2010-02-21 16:10

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Need a hand from anyone who's built an app please!

Stuck with this example line in the build_myapp.py code
p.depends = "python2.5, PyQt4, python-osso, python-dbus, python2.5-gtk2"

The imports in my code are:
import PyQt4
from PyQt4 import QtCore, QtGui
import sys
import os
import subprocess
import location
import gobject
import gn_cellinfo
import gtk
import hildon

from threading import Thread
import time


Can someone let me know what i need to add to that line please?

aspidites 2010-02-21 16:46

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
I had an example on my N900 with stackable windows working with PyQt/PySide, but my N900 is in for repair and I didn't back up the information.

At any rate, I thought you might find the documentation helpful. (note the URL). This includes all of the maemo-specific classes of Qt 4.6, and a lot of them should easily translate to python. For Stacked Windows in particular, see this example.

In summary, I believe that the stacked window (the one that should have an arrow instead of an x) should be a child of the main window, and all should set the stacked window property.

noobmonkey 2010-02-21 16:53

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
heya, thanks i think, but that just confused me?!!?

i know what modules/classes i need, as the application works, but i don't understand the build_app.py
p.depends = "python2.5, PyQt4, python-osso, python-dbus, python2.5-gtk2"

QT ones are all covered under the PyQt4 line i think

i added python-location, hope that covers all of them, struggling to build it at the moment.
Kind of annoyed that once again things aren't simple! :) - would much rather a simple compile method :D (or maybe a gui step-by-step?)

aspidites 2010-02-21 16:54

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Quote:

Originally Posted by noobmonkey (Post 539761)
Need a hand from anyone who's built an app please!

Stuck with this example line in the build_myapp.py code
p.depends = "python2.5, PyQt4, python-osso, python-dbus, python2.5-gtk2"

The imports in my code are:
import PyQt4
from PyQt4 import QtCore, QtGui
import sys
import os
import subprocess
import location
import gobject
import gn_cellinfo
import gtk
import hildon

from threading import Thread
import time


Can someone let me know what i need to add to that line please?

Why are you importing gtk and hildon? I'm mildly curious about gobject as well...

edit:
Unless I've missed something Import PyQt is redundant considering you have PyQt.QtGui and PyQt.QtCore

noobmonkey 2010-02-21 17:00

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Quote:

Originally Posted by aspidites (Post 539800)
Why are you importing gtk and hildon? I'm mildly curious about gobject as well...

edit:
Unless I've missed something Import PyQt is redundant considering you have PyQt.QtGui and PyQt.QtCore


Meh - can you query my code after it has built lol!

That was all done by the QT Designer...

The GTK lot is for the multi-threading, gobject is for the GPS ... but again that's within the code, and should not affect the build, because i can run it fine on my device? - or am i heading in the wrong way?
(GTK Was for messageboxes that i currently have removed, also)

noobmonkey 2010-02-21 17:04

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
ok, build complete :)
Gotta go out in 30 mins though - so until i get access to dev area, can't use autobuilder :P

aspidites 2010-02-21 17:18

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Good point about waiting until you are able to build your package. :-). Mind posting your build_myapp.py please? I assume your previous post details all of your import statements, so I won't need that. BTW, to keep posts, short, you can use http://pastie.org or similar services. Looks like you figured this out already :-)

Qt can handle multiple threads:
As for gps, you are probably fine using gobject until qtmobility becomes stable.

noobmonkey 2010-02-21 17:28

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Quote:

Originally Posted by aspidites (Post 539827)
Good point about waiting until you are able to build your package. :-). Mind posting your build_myapp.py please? I assume your previous post details all of your import statements, so I won't need that. BTW, to keep posts, short, you can use http://pastie.org or similar services. Looks like you figured this out already :-)

Qt can handle multiple threads:
As for gps, you are probably fine using gobject until qtmobility becomes stable.

Thanks aspidites :)

Is there any issues with me using GTK etc... other then it being messy? - or is it good practice not to mix and match when needed?

:D - off out for a nice sunday dinner, back in a few hours :)

aspidites 2010-02-21 19:15

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
If this app is only meant to run on the N900, and older tablets then it probably won't matter, considering they all come with GTK preinstalled, but sticking to one makes things easier to port. I would imagine that sticking to one toolkit would make things run slightly faster (less modules to import).

noobmonkey 2010-02-21 19:27

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
thanks again asp. will look at changing newer versions when i learn more.
happy so far with a week or so's experience in this!!

still waiting on dev registration..... s prob wont go in tonight.

fatalsaint 2010-02-21 19:27

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
I use QT Threading in my app in the sig.

You're free to download it and review the code if you are interested in how to make that works.

It's heavily based on emitting signals from within child threads.

fatalsaint 2010-02-21 19:29

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
For your build_myapp.py

I'm not sure what all PyQt4 brings down... but I used specifically the modules I needed to make space.. so for example:

python2.5-qt4-gui
python2.5-qt4-webkit
python2.5-qt4-core
python2.5-qt4-network
etc.

ETA: This should save some space for users downloading your app since they only grab what they need.. not the whole PyQt4 bindings.

noobmonkey 2010-02-21 19:49

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Quote:

Originally Posted by fatalsaint (Post 539972)
For your build_myapp.py

I'm not sure what all PyQt4 brings down... but I used specifically the modules I needed to make space.. so for example:

python2.5-qt4-gui
python2.5-qt4-webkit
python2.5-qt4-core
python2.5-qt4-network
etc.

ETA: This should save some space for users downloading your app since they only grab what they need.. not the whole PyQt4 bindings.

thanks fatal! heading home in an hour or so :) will go through and check it out.

really could do with a list of imports and next to each, state whic file is needed. would help newbies like me!

noobmonkey 2010-02-21 20:22

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
awww i just wanna get it in to extras dev now :) - the wait is painful :P

hartti 2010-02-21 20:34

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
I am pretty sure the approval will come on Monday. The same wait over the weekend happened to me as well...

Hartti

noobmonkey 2010-02-21 20:36

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Quote:

Originally Posted by hartti (Post 540051)
I am pretty sure the approval will come on Monday. The same wait over the weekend happened to me as well...

Hartti

hehe :) - busy week this week :( pity :(

intrigued to know that there is a manual process, can't see any criteria though.....

aspidites 2010-02-22 06:27

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Quote:

Originally Posted by noobmonkey (Post 539994)
really could do with a list of imports and next to each, state whic file is needed. would help newbies like me!

The package names match up to the module names, so if you know which Qt modules you need, you know which packages you need. If your list in previous quotes is any indication, this means your package only requires the following:

python2.5-qt4-gui
python2.5-qt4-core

Another hint is that the module that a Qt class comes from is always listed at the top of that class's documentation page.

mackan1 2010-02-22 06:35

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
where would one get this app from. to test it out?

noobmonkey 2010-02-22 07:33

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Quote:

Originally Posted by mackan1 (Post 540617)
where would one get this app from. to test it out?

I have to wait before i am allowed to upload it to extras-dev (Manual acceptance) :( - so at the earliest it will be tonight, after work.

noobmonkey 2010-02-22 09:59

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Well.... i think i figured out the build process, and just got this in the garage!
Quote:

healthcheck 0.4.1-1 Fremantle Extras-devel free i386 Build succeeded System 2010-02-22 09:56 UTC
healthcheck 0.4.1-1 Fremantle Extras-devel free i386 Building System 2010-02-22 09:56 UTC
edit - should it say i386? lol!

:D :D

noobmonkey 2010-02-22 10:05

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
LOL! - its in extras dev - but it fails on install, because, i think.... i added the line PyQT4 to the dependencies... genius fail!!!

noobmonkey 2010-02-22 10:09

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
hmmm gonna try n repacakge one - but can't see how to remove it from dev, :D - oh the joys!

noobmonkey 2010-02-22 10:44

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Think i'm just going to confuse everyone now - assuming i need to log a bug to remove the old version (Aghhh, no bug account!)

Quote:

healthcheck 0.4.2-1 Fremantle Extras-devel free i386 Build succeeded System 2010-02-22 10:42 UTC
healthcheck 0.4.2-1 Fremantle Extras-devel free i386 Building System 2010-02-22 10:42 UTC

noobmonkey 2010-02-22 10:50

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
OMG - It's done it again!!! - what the hell.... I told you i didn't understand the whole dependencies things!!

Quote:

Unable to install HealthCheck
Application packages missing: python-2.5-qt4-gui
python-2.5-qt4-core

Any ideas, anyone?! :D :D

mackan1 2010-02-22 10:55

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Quote:

Originally Posted by noobmonkey (Post 540850)
OMG - It's done it again!!! - what the hell.... I told you i didn't understand the whole dependencies things!!


i just tryed it. get same error

noobmonkey 2010-02-22 10:56

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Quote:

Originally Posted by mackan1 (Post 540858)
i just tryed it. get same error

Sent another build in!
This time spelt
python2.5-qt4-core not python-2.5-qt4-core

Hoping thats the fix :D :D

noobmonkey 2010-02-22 11:06

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Oh well... back to the drawing board... it installs, but won't run - just crashes out after about 6 seconds.

edit - anyone else getting the same problems? - will have to look into the code tonight.... I know there are terminal warnings when i run it locally, but it does run.....

mackan1 2010-02-22 11:20

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
also just tryed it with a hard reboot and crashes out. hope u get this working man. looks like a nice tool

noobmonkey 2010-02-22 11:24

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
hehe thanks!
really not sure if i am just still missing dependencies.

For example, i import gobject, does that mean in the build_myapp file i need to have pygobject in there?
Really need qwerty and fatalsaint back in here :D :D

Or, as it installs, that may mean it is fine, and something in the code is bugging out.... Not sure how to run it directly from terminal after it is installed through app manager?

noobmonkey 2010-02-22 12:04

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Ok.. well i'm really just confused now, and not entirely sure what to do.
Is there a way to debug and find out why it won't run after installation? - when it runs fine locally?

noobmonkey 2010-02-22 12:24

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
If anyone is testing (After installing it from extras-dev, warnings apply! - especially as this is my first application!) this can you please try running it from terminal:

Quote:

cd /opt/healthcheck/
python healthcheck.py
It should throw up some warnings in terminal and then run - well, does on my N900! :D

noobmonkey 2010-02-22 12:54

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
No one fancy testing it? - dont fancy removing all the dbus stuff and possibly gtk stuff - just confused as to why it runs ok with warnings locally, but must be erroring out from the utilities menu...
Tis odd :( (It does save a file during the run though - so it could be that erroring out?

noobmonkey 2010-02-22 13:56

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Ok, removed all traces of threading code - will run alot slower, but... hopefully that will fix it.
Just sent 0.4.2-3 to the Autobuilder :D

noobmonkey 2010-02-22 14:04

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Nope, still kicking out... so it must be the Cell/GPS/Dbus Information then....
Will try removing that and seeing if it works!

mackan1 2010-02-22 14:08

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
0.4.2-3 still crashed for me. :(

noobmonkey 2010-02-22 14:09

Re: [Maemo 5] HealthCheck - Pymaemo/Qt - Learning to code (N900)
 
Quote:

Originally Posted by mackan1 (Post 541089)
0.4.2-3 still crashed for me. :(

just removed all of the cellular info functions (meh - worth a try)

Uploading to autobuilder in 2 mins...

if that doesnt work, the last think i can think off is when i save the front cam image - may need to rethink where i do that....


| Prev |   1     2   3   4     5   | Next
All times are GMT. The time now is 19:33.

vBulletin® Version 3.8.8