OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

> Installing App In Qtopia
jeffbarish
post Apr 8 2005, 06:02 PM
Post #1





Group: Members
Posts: 25
Joined: 24-November 04
Member No.: 5,604



I found some information here about how to install an application in Qtopia, but I can't get it to work. It's possible that I misinterpreted some of the directions that I found, so I thought that perhaps someone could point to my error if I carefully describe what I did.

1. I put my app (myapp.py) in /home/QtPalmtop/bin (which is in my path).

2. I made myapp.py executable. The first line is

#! /usr/bin/env python

The line that calls QPEApplication is:

app = QPEApplication(['myapp.py'])

I do:

from qtpe import QPEApplication

3. I created a file in /home/QtPalmtop/apps/Applications called myapp.desktop. It contains the lines

[Desktop Entry]
Comment=What my program does
Exec=myapp.py
Type=Application
Name=MyApp

4. I rebooted

An icon appears on the Applications page. When I click on it, it changes to the clicked icon and I see an hourglass. Then the hourglass disappears and my app does not run. I presume that it crashed. When I run it from a command prompt (by typing myapp.py), it runs fine. I hope that someone can see what I did wrong -- or can at least suggest a diagnostic procedure. For example, does Qtopia log error messages somewhere? Is there a way to capture error messages emitted during program startup? Thanks.
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
jeffbarish
post Apr 12 2005, 07:42 AM
Post #2





Group: Members
Posts: 25
Joined: 24-November 04
Member No.: 5,604



I expected to be able to do what you described. To be precise, I put the name of the script in the Exec= line, and I put the script in /home/QtPalmtop/bin. However, when I tested this configuration from the command prompt, it would freeze, and from the icon it would fail. I did some more testing this morning and figured out that the problem arises when I specify the environment variable. That is, the program will run (from the command line) when the first line is:

#! /usr/bin/env python

but not when it is:

#! /usr/bin/env PYTHONPATH=/home/zaurus/lib/python python

For now, I will stick with the solution that works for me, but I would still be interested in any insights into what is going wrong here.

There is still an advantage to the configuration that I described (geojeff did, actually) in that one can specify redirection using that technique to capture output from your script.
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 27th August 2014 - 11:15 PM