Trouble getting ported program to work.


Silent-Hunter

Hardcore Member
Joined
May 29, 2010
Messages
3,485
It works fine when run from the folder I compiled it in, but once I package it with gpnd, it has errors.

Here's the PXML:


<!-- Generator: gPND Beta 1 -->

<PXML xmlns="http://openpandora.org/namespaces/PXML">
<application id="3636" appdata="senet">
<title lang="en_US">Senet</title>
<description lang="en_US">Ancient Egyptian board game.</description>
<title lang="en_GB">Senet</title>
<description lang="en_GB">Ancient Egyptian board game.</description>
<exec background="true" startdir="./" standalone="true" command="senet.sh" x11="stop" />
<icon src="images/icon.png" />
<author name="Silent-Hunter" />
<version major="0" minor="9" release="8" build="0" />


<categories>
<category name="Game">
<subcategory name="LogicGame" />
</category>
</categories>

</application>

</PXML>


And here is the pnd output file:


=======================================================================================
PND : /media/2/pandora/menu/senet.pnd
PND_FSTYPE : Squashfs
APPDATADIR : /media/2/pandora/appdata/senet
APPDD_FSTYPE : ext3
PND_CPUSPEED : <unset>
EXENAME : senet.sh
ARGUMENTS : <unset>
=======================================================================================
[ START ]--- Mount the PND ----------
Mounting : mount -t squashfs -o ro "/dev/loop0" "/mnt/utmp/senet"
Mounting the Union FS : mount -t aufs -o exec,dirs="/media/2/pandora/appdata/senet=rw+nolwh":"/mnt/pnd/senet=rr" none "/mnt/utmp/senet"
[SUCCESS]--- Mount the PND ----------
[ START ]--- Starting the application (senet.sh ) ----------
Warning: Tried to connect to session manager, Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
Warning: Cannot convert string "nil2" to type FontStruct
Warning: Unable to load any usable ISO8859 font
Warning: Unable to load any usable ISO8859 font
[SUCCESS]--- Starting the application (senet.sh ) ----------
[ START ]--- Restoring the frame buffer status ----------
[SUCCESS]--- Restoring the frame buffer status ----------
[ START ]--- uMount the PND ----------
[ START ]--- Waiting the Union to be available ----------
[SUCCESS]--- Waiting the Union to be available ----------
auplink:plink.c:223: AUFS_CTL_PLINK_MAINT: Inappropriate ioctl for device
rmdir: failed to remove `/mnt/utmp/senet': Device or resource busy
[ START ]--- Waiting the PND mount dir to be free ----------
[SUCCESS]--- Waiting the PND mount dir to be free ----------
cleanup done
[SUCCESS]--- uMount the PND ----------
=======================================================================================
Return code is : 2



Does gpnd just suck or something? I don't really know of any other programs for making PNDs.
 
Well it mounted the PND and that's half the battle. 

I think your start-up script may be the culprit, sometimes there may be a PATH conflict or something. 

It most likely won't prevent you from running it on the Pandora, but the repo will complain about your PXML file, it lacks the Package tags and such.. More info here

I never use gpnd, actually never heard of it until now. I use Sebt3's cross-compiler environment and he has command line tools that handle PND packaging, although it doesn't 100% create a valid PXML file as well.  
 
Last edited by a moderator:
Well it mounted the PND and that's half the battle. 


I think your start-up script may be the culprit, sometimes there may be a PATH conflict or something. 


It most likely won't prevent you from running it on the Pandora, but the repo will complain about your PXML file, it lacks the Package tags and such.. More info here


I never use gpnd, actually never heard of it until now. I use Sebt3's cross-compiler environment and he has command line tools that handle PND packaging, although it doesn't 100% create a valid PXML file as well.  
Thanks for the help, but sod the whole project anyway. The game doesn't work right, on the Pandora or otherwise. It just plays against itself till the game ends, then quits. I'm not a good enough programmer to fix it.
 
Last edited by a moderator:
Is this option correct ?


x11="stop"
Because it means that X must be not running, or temporarily shut down, for the app.
 
Last edited by a moderator:
yeah thats my first thought too.. do you really want to kill X for your app? ie: you probably don't :)

jeff

Don't give up; no one is a master over night. The common rule is.. for any given skill (guitar playing, painting, coding) it takes 10,000 hours to master. When you see a magician shuffling a deck of cards and pulling tricks you might think he's spend 10 hours perfecting it.. but as Penn and Teller would suggest,m they've likely spent thousands of hours at it. Coding is an art, and it takes much time to get any good at it. So, keep at it.. if your enjoying it, and are strugglgin.. keep at it. Or ask for some guidance. Sure, give up if you want to, byu all means, but .. if you want to learn to code, and enjoy it.. you can!
 
Last edited by a moderator:
Is this option correct ?


x11="stop"
Because it means that X must be not running, or temporarily shut down, for the app.
Yeah, I thought that was for if you don't need X11 for your app, like apps that run in a terminal. I didn't know it would kill X as the menu option in gpnd was poorly labeled.
 
yeah thats my first thought too.. do you really want to kill X for your app? ie: you probably don't :)

jeff

Don't give up; no one is a master over night. The common rule is.. for any given skill (guitar playing, painting, coding) it takes 10,000 hours to master. When you see a magician shuffling a deck of cards and pulling tricks you might think he's spend 10 hours perfecting it.. but as Penn and Teller would suggest,m they've likely spent thousands of hours at it. Coding is an art, and it takes much time to get any good at it. So, keep at it.. if your enjoying it, and are strugglgin.. keep at it. Or ask for some guidance. Sure, give up if you want to, byu all means, but .. if you want to learn to code, and enjoy it.. you can!
Well, I didn't code the program myself, I was attempting to port it. I have dyscalculia(sp?) so I'm very bad at math. That's a huge barrier for learning to program. I will keep the program, and may fix it in the future.
 
It works fine when run from the folder I compiled it in, but once I package it with gpnd, it has errors.

Here's the PXML:


<!-- Generator: gPND Beta 1 -->

<PXML xmlns="http://openpandora.org/namespaces/PXML">
<application id="3636" appdata="senet">
<title lang="en_US">Senet</title>
<description lang="en_US">Ancient Egyptian board game.</description>
<title lang="en_GB">Senet</title>
<description lang="en_GB">Ancient Egyptian board game.</description>
<exec background="true" startdir="./" standalone="true" command="senet.sh" x11="stop" />
<icon src="images/icon.png" />
<author name="Silent-Hunter" />
<version major="0" minor="9" release="8" build="0" />


<categories>
<category name="Game">
<subcategory name="LogicGame" />
</category>
</categories>

</application>

</PXML>


And here is the pnd output file:


=======================================================================================
PND : /media/2/pandora/menu/senet.pnd
PND_FSTYPE : Squashfs
APPDATADIR : /media/2/pandora/appdata/senet
APPDD_FSTYPE : ext3
PND_CPUSPEED : <unset>
EXENAME : senet.sh
ARGUMENTS : <unset>
=======================================================================================
[ START ]--- Mount the PND ----------
Mounting : mount -t squashfs -o ro "/dev/loop0" "/mnt/utmp/senet"
Mounting the Union FS : mount -t aufs -o exec,dirs="/media/2/pandora/appdata/senet=rw+nolwh":"/mnt/pnd/senet=rr" none "/mnt/utmp/senet"
[SUCCESS]--- Mount the PND ----------
[ START ]--- Starting the application (senet.sh ) ----------
Warning: Tried to connect to session manager, Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
Warning: Cannot convert string "nil2" to type FontStruct
Warning: Unable to load any usable ISO8859 font
Warning: Unable to load any usable ISO8859 font
[SUCCESS]--- Starting the application (senet.sh ) ----------
[ START ]--- Restoring the frame buffer status ----------
[SUCCESS]--- Restoring the frame buffer status ----------
[ START ]--- uMount the PND ----------
[ START ]--- Waiting the Union to be available ----------
[SUCCESS]--- Waiting the Union to be available ----------
auplink:plink.c:223: AUFS_CTL_PLINK_MAINT: Inappropriate ioctl for device
rmdir: failed to remove `/mnt/utmp/senet': Device or resource busy
[ START ]--- Waiting the PND mount dir to be free ----------
[SUCCESS]--- Waiting the PND mount dir to be free ----------
cleanup done
[SUCCESS]--- uMount the PND ----------
=======================================================================================
Return code is : 2



Does gpnd just suck or something? I don't really know of any other programs for making PNDs.
Uhm... Why are you using gPND? I wrote that thing back in 2010 before I had even touched a pandora. It won't follow the spec as it is today even the slightest o_O
 
Uhm... Why are you using gPND? I wrote that thing back in 2010 before I had even touched a pandora. It won't follow the spec as it is today even the slightest o_O
Well, my boyfriend gave it to me, he found it online. No chance of an update? It's quite user friendly.
 
Last edited by a moderator:
If there ever would be an update, it would be a complete rewrite. I don't even know why that code is still online, I'm quite a bit ashamed of it :p

Maybe, maybe not. 
 
I don't recommend using a special tool to build PNDs.

Just write your own PXML.  Copy it from some other PND and change what you need to.

I don't recommend using the newer over-complexified PXML format.

It's bad enough using XML let alone over-complexified XML.

Stick with the simpler format like what you have there, and let the repo complain if it will.

Then run a one-line script (in linux, e.g. direct on the Pandora) to build your PND:


PND=../myapp.pnd ; /usr/sbin/mksquashfs . $PND -noappend -all-root -e .git ; cat PXML.xml icon.png >>$PND

It's a good idea to include source in the PND, squashes down nicely.  No point making a special effort to exclude it, anyhow.
 
I don't recommend using a special tool to build PNDs.

Just write your own PXML.  Copy it from some other PND and change what you need to.

I don't recommend using the newer over-complexified PXML format.

It's bad enough using XML let alone over-complexified XML.

Stick with the simpler format like what you have there, and let the repo complain if it will.

Then run a one-line script (in linux, e.g. direct on the Pandora) to build your PND:


PND=../myapp.pnd ; /usr/sbin/mksquashfs . $PND -noappend -all-root -e .git ; cat PXML.xml icon.png >>$PND

It's a good idea to include source in the PND, squashes down nicely.  No point making a special effort to exclude it, anyhow.
Except when the repo complains, it won't let you upload your app.

However, I will take the rest of your advice, and use another PND's PXML file as a base.
 
Back
Top