Port And Dev Help


delete000

Still Fresh
Joined
Nov 4, 2010
Messages
24
Hello all,

I have recently installed and configured sebt3's 'Yactfeau' on my laptop. I've had some success in cross-compiling libraries, small programs etc. However, the whole thing is still a little bit too tricky for me, so I kindly ask you to excuse my noobness and help me out in my efforts to port / make apps for the Pandora. I use this thread for several questions instead of making a new thread for each topic. I hope the generality of the answers will make this thread worth reading in the end. Here goes:

Question 1: How to debug not working pnds?
I've built a couple of apps that compiled fine, but when trying to run them on the Pandora, nothing happens. Even when using pnd_run, I get nothing: no warnings, no errors, no new processes. Is there any way to find out what's going on?

Question 2: How should a PXML file look like?
The automatically generated PXML files from Yactfeau sometimes contain weird things, like pointers to non-existent .sh scripts, multiple pointers for the same app, wrong (sub)categories etc. Is there a specification of how a PXML file should look like? How can I put the app I'm porting in the right menu category? Also, is it possible to somehow extract the PXML file from a pnd? I'm more of a hacker than a programmer. Therefore, it'd be very helpful if someone could share a valid PXML file for a simple app.

Question 3: How to build command-line apps?
I've noticed that there are command-line apps ported to the Pandora, like mc, mutt, lynx etc. Since the pnds of GUI apps have to launch a new window, I'm guessing that the CLI apps have to launch a terminal. How can that be specified in the PXML file? My goal is to try and build jackd.

That's it for now, although more will follow I'm afraid. In any case, thanks in advance for any help.
 
delete000 said:
Question 1: How to debug not working pnds?
I've built a couple of apps that compiled fine, but when trying to run them on the Pandora, nothing happens. Even when using pnd_run, I get nothing: no warnings, no errors, no new processes. Is there any way to find out what's going on?
All PNDs have all terminal output redirected to a file, /tmp/pndrun_appid.out. But a better approach might be to not test PNDs until you know the compiled binaries work. Run those directly on a Pandora to see whether they work right, then put them in a PND.

delete000 said:
Question 2: How should a PXML file look like?
The automatically generated PXML files from Yactfeau sometimes contain weird things, like pointers to non-existent .sh scripts, multiple pointers for the same app, wrong (sub)categories etc. Is there a specification of how a PXML file should look like? How can I put the app I'm porting in the right menu category? Also, is it possible to somehow extract the PXML file from a pnd? I'm more of a hacker than a programmer. Therefore, it'd be very helpful if someone could share a valid PXML file for a simple app.
Continuing Magic Sam's suggestion, the wiki holds the full PXML specification, and there are several examples in the pandora-libraries git repo. There's also an XSD file for validating PXMLs in the git. Extracting PXMLs from working PNDs also isn't hard; simply mount the PND (or unpack with e.g. 7zip) and PXML.xml should be inside. But if that doesn't work, just open the PND in a hex editor, then jump to near the end; the PXML is appended, followed by an icon.

delete000 said:
Question 3: How to build command-line apps?
I've noticed that there are command-line apps ported to the Pandora, like mc, mutt, lynx etc. Since the pnds of GUI apps have to launch a new window, I'm guessing that the CLI apps have to launch a terminal. How can that be specified in the PXML file? My goal is to try and build jackd.
This is pretty easy. In the exec element of a PXML, first set the "command" attribute to "terminal", which is the command to launch XFCE's terminal emulator. Then set the "args" attribute to "--execute myapp" to tell the terminal to launch myapp on start. The terminal will close once myapp exits. Granted, I haven't tested this myself, but I feel confident. Check the PXMLs of the other apps you've seen if you want to be sure.
 
Last edited by a moderator:
Or have the PXML execute what I like to call a 'run script' -- a short shell script that does wjhatever needs doing (such as setting LD_LIBRARY_PATH or etc etc); it coudl in turn launch a terminal and launch your app, or check for missing files, etc etc.

Yactfreau has some magic PXML-generator stuff; you could roll your own PXML as well.. its not too hard and is msotly copy/pasta.

jeff
 
Back
Top