Pandora [SOLVED]Trouble creating pnd for Java game


T.Willey

Still Fresh
Joined
Oct 23, 2009
Messages
27
The final for school was a battleship game, and I thought since it could be a nice game to have on the panda I would try and pnd it up.  The .jar file works fine with WizardStan's Java.pnd installed.  The problem I'm having is trying to create the .pnd.  I have tried in Windows 7 with PndTools, and then in Linux with the pnd_make.sh, and neither created a working file.  I would preferr a linux solution, so here is my setup.

I copy the .jar, .xml, icon.png, screenshots.png, and the run.sh file into a directory. I then run the pnd_make.sh like ( the sh prefix is because its on a NTFS formated external hard-drive )

sh ./pnd_make.sh -d test -i ./test/Icon.png -x ./test/PXML.xml -p Battleshipv14.pnd -c

which reports that it made a valid pnd, but none have worked when transferred to my panda.

I have tried the suggestions from this site

http://www.pandoralive.info/?p=787

without success also.

The contents of my run.sh is

java -jar GameBattleshipPandora.jar

which works when called from my home comp.

The PXML.xml was created by PndTools.

Any help is appreciated, as its been a couple days fighting with this, and as you can see at least 14 versions of a non-working pnd.  Thanks in advance.  If I forgot to state anything let me know.
 
Last edited by a moderator:
Please share the results of the pndout file in your /tmp folder. 

That's the best thing you can do when you have an issue and want help :)

A couple of other things...

1. Did your run.sh get the right permissions? 

2. Please share your PXML file too

3. Did you try java -jar GameBattleshipPandora.jar on the Pandora as well, from the terminal ? If it did not run there, it will never run either as a PND. That's the first thing you should check, actually. There may be libraries in the Pandora java that are not included. 
 
Last edited by a moderator:
I do not see anything pnd* in my /tmp folder.  I see an output( with some numbers trailing) that I am not able to open.

1. Was not set correctly, as I cannot set it to execute on my external.  Coppied to my local drive and made executable, still pnd did not work.

2.

<?xml version="1.0" encoding="UTF-8"?>
<PXML xmlns="http://openpandora.org/namespaces/PXML">
  <package id="battleship.t.willey">
    <author name="t.willey"/>
    <version major="0" minor="0" release="1" build="0"/>
    <titles>
      <title lang="en_US">Battleship</title>
    </titles>
    <descriptions>
      <description lang="en_US">An old school battleship game done in Java.</description>
    </descriptions>
    <icon src="Icon.png"/>
  </package>
  <application id="battleship.t.willey">
    <exec command="run.sh"/>
    <author name="t.willey"/>
    <version major="0" minor="0" release="1" build="0"/>
    <titles>
      <title lang="en_US">Battleship</title>
    </titles>
    <descriptions>
      <description lang="en_US">An old school battleship game done in Java.</description>
    </descriptions>
    <!--Extra block for compatibility with OS versions before HF6-->
    <title lang="en_US">Battleship</title>
    <description lang="en_US">An old school battleship game done in Java.</description>
    <!--END Extra block-->
    <icon src="Icon.png"/>
    <licenses>
      <license name="none"/>
    </licenses>
    <icon src="Icon.png"/>
    <previewpics>
      <pic src="SS01.png"/>
      <pic src="SS02.png"/>
      <pic src="SS03.png"/>
    </previewpics>
    <categories>
      <category name="Game">
        <subcategory name="StrategyGame"/>
      </category>
    </categories>
  </application>
  <!--Created with the PXMLCreator of PNDTools v.0.7.0-->
</PXML>
3. The program runs on the panda, tested before I thought about making a pnd of it.

Thanks for you help.
 
firstly does:

java -jar GameBattleshipPandora.jar
work on your pandora if directly ran off the SD card and not in a PND?
never mind I see you did say it did..

I looked at Jcloisterzone that I did.. this is my startup script, outside of some java version detection it just runs the jar file as normal...

#!/bin/bash
if [[ "`java -version 2>&1`" =~ .*OpenJDK.* ]]
then
    zenity --warning --text='OpenJDK Java Detected!!\n Oracle Java JDK Recommended for Speed and Stability.\n Check this PNDs Repo Comments for Details.' --ok-label='Continue(Unstable!)'
    echo "Running Game without Oracle Java.. will be Buggy!"
fi

java -jar JCloisterZone.jar

How are you generating the PND? what tools are you making it with? the PXML looks clean to me. So I'm wondering if it's an issue of it making the image..

Does it work if you run it from command line?

pnd_run /media/YOURSDCARD/pandora/SOMEDIR/YOURPNDNAME.pndIt should output some error information.
the next thing you can do is mount the PND and try to run it from the /mnt/utmp/YOURAPPNAME directory ----**Note: pnd_run and pnd_run.sh are two separate commands.

Code:
/usr/pandora/scripts/pnd_run.sh -p YOURPNDPATH.pnd -m
To unmount:
Code:
/usr/pandora/scripts/pnd_run.sh -p YOURPNDPATH.pnd -u
 
Last edited by a moderator:
Thanks, I saw that and edited it before you responded.
 
Last edited by a moderator:
The pnd does not show anywhere in the menu.  I can post the latest pnd when I get home.

I create the pnd withe the pnd_make.sh when I boot into Linux, and tried PndTools.exe when in Windows, but neither one worked.  I will try to run it from the command line, and the other ways you posted TrashyMG when I get home again.

I'll post back after I've tried everything.  Thanks again.
 
Does it work if you run it from command line?

pnd_run /media/YOURSDCARD/pandora/SOMEDIR/YOURPNDNAME.pnd
It ran from the command line just fine, using the line above, and seemed to do the correct unmounting after the game was exited.  Attached is the one used to test that worked from the command line.

Now I'm really stumped as to what is wrong.

The version number on the pnd is how many times I've tried to get a working pnd, not the version number of the program.

Battleshipv17.pnd
 

Attachments

  • Battleshipv17.pnd
    2.5 MB · Views: 303
Last edited by a moderator:
Try this ...

eject the SD card that has this PND.

go to the /mnt/utmp/ directory and see if your PND directory is still there..  If it is, try deleting it and then reinsert the SD card and see if it works.
 
Last edited by a moderator:
The PND directory was not there.  Once inserted again, the PND did not show up in any menus still.
 
Contents of the pnd_run_battleship_out file.  I noticed that there is an error listed, thinking this may help.

Edit: The error appears to be a Java one, not the pnd, because I get the same error when running just the .jar from the command line.

=======================================================================================

PND             : /media/Pandora01/Java/Battleshipv17.pnd

PND_FSTYPE      : Squashfs

APPDATADIR      : /media/Pandora01/pandora/appdata/battleship.t.willey

APPDD_FSTYPE    : fuseblk

PND_CPUSPEED    : <unset>

EXENAME         : ./run.sh

ARGUMENTS       : <unset>

=======================================================================================

[ START ]--- Mount the PND ----------

Mounting : mount -t squashfs -o ro "/dev/loop1" "/mnt/utmp/battleship.t.willey"

Mounting the Union FS : mount -t aufs -o exec,dirs="/media/Pandora01/pandora/appdata/battleship.t.willey=rw+nolwh":"/mnt/pnd/battleship.t.willey=rr" none "/mnt/utmp/battleship.t.willey"

[sUCCESS]--- Mount the PND ----------

[ START ]--- Starting the application (./run.sh ) ----------

Found java.pnd at /media/Pandora02/pandora/menu/java.pnd

Attempting to execute jvm at /mnt/utmp/java/jdk/bin/java

Args are: -jar GameBattleshipPandora.jar

Error parsing gtk-icon-sizes string: ''

auplink:plink.c:223: AUFS_CTL_PLINK_MAINT: Inappropriate ioctl for device

rmdir: failed to remove `/mnt/utmp/java': Device or resource busy

[sUCCESS]--- Starting the application (./run.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/battleship.t.willey': 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 : 3
 
Last edited by a moderator:
sounds dumb, but try changing periods to underscores.. could be a quirk with the pnd system.. 


battleship.t.willey

to
battleship_t_willey
 
Last edited by a moderator:
<icon src="Icon.png"/>
<licenses>
<license name="none"/>
</licenses>
<icon src="Icon.png"/>

Not sure if it's the smoking gun, but it seems you have two icon tags declared..
 
It works for me!  lol

Nice waves. The game works well. I won :)

You spelled "carrier" wongly as "carries" in the instructions.

Are you using Oracle Java?

I also got this same message:  Error parsing gtk-icon-sizes string: ''

but it works anyway.

Your problem might be only occuring on FAT32 filesystem SD cards, java is writing some font config thing, and many problems with appdata happen only on FAT32 filesystem.

I don't see why it would happen in this case, though.  I'll try on a FAT SD card (shudder) and get back to you.

edit: it works on the FAT32 card also.

Were you using the newest java PND with Oracle java?

OH I SEE (maybe).  It looks like you put your PND at  /media/Pandora01/Java/Battleshipv17.pnd .  The menu does not look in that location.

If you want it to show on the desktop and in the menu "Games -> Simulation and Strategy", put it at /media/Pandora01/pandora/apps/Battleshipv17.pnd

For the menu only, put it at  /media/Pandora01/pandora/menu
 
Last edited by a moderator:
I totally missed what directory the PND was in... It not being in one of the Pandora specific folders will do that..
 
Back
Top