Pandora Making A Pnd


Rockthesmurf

Advanced Member
Joined
Jul 18, 2003
Messages
1,116
Age
41
Location
Manchester, UK
Website
Visit site
Has anyone made a PND in Windows 7? I spent a little while looking through the Wiki, created an XML based on the example one on there, and followed the instructions, but some of them didn't work (mainly the copy instructions that use copy file1+file2 file3, which fails on Windows 7). I got around the problematic bits as best as I could, but when I put my PND on an SD, it appears on the desktop, but there is no icon, and when I attempt to run it nothing happens. I tried then using an example package that has a PXML/icon file, and ended up with the same result, so I was wondering if the problem was more that the commands I am issuing on Windows7 are incorrect, rather than my XML/icon not being right.

Steve
 
1) Icon have to be PNG ( I would recomand 48*48...)
2) There are tons of "cat" utilities for windows ( but as you have your PND showing I guess you found this one alone)
3) What does say the log files in the /tmp ?
 
sebt3:

  1. My icon is a PNG, and also I tried using a template project (it was that Wesnoth one I think) which contained an icon, and that too didn't work for me, so I believe the issue is not with the icon itself.
  2. I actually used the copy file+file2 syntax, but I just didn't specify the destination file, as it appears that if you leave out the destination it just appends the second file to the first. At least that is what I think is happening, this could potentially a bad guess though.
  3. I am currently at work, but I will take a look in /tmp this evening - does the PND system itself write stuff to there, or would I expect the TTY of my program to appear there?

Many thanks,

Steve
 
The icon used is the one appended at the end of the PND ; the "icon src=" in the pxml file is not (yet) used.
Your guess seems correct, because without a PXML file appended at the end of the ISO/squashFS, the PND system cannot recognize the file as a valid PND. But as the icon is shown on your desktop...
And the STDOUT/STDERR is part of the log.
 
The icon used for a _pnd_ is the one that is appended to the iso; if you unpack a pnd into a directory, it shoudl stil be executable the same .. but then the icon used is as defined in the PXML (since there isn't one appended.) The functional difference is in an unpacked pnd, you can actually have an icon for each subapp, whereas with a pnd, you can of course only have one icon for the whole pnd in the current system. (in the future, if we append a zip to the iso instead, then we can do all sorts of madness.)

jeff
 
I was created [few months ago a sneek peek version of] a PXML Maker for windows. But due to changes in PXML itself , i think is obsolete right now.. if some of you will need this kind of tool a i'll start work on it again..

http://www.gp32x.de/board/index.php?/topic/46997-pxml-maker/
 
Last edited by a moderator:
If you got this running at some point, could you make a short guide describing the steps from having a Pandora compiled executable to turning it into a PND?
You would have my eternal gratitude, as I already got my cross-compiler set-up, but have no clue how to turn the result into a working PND using Windows.

We need a proper development guide for the Pandora (including cross-compiling and PND-ing) on Windows at some point. (I would do it, but I only butchered my compiler together with the help of others, so I am not really capable of).

foxblock out
 
A crappy very short guide I wrote before release was:
http://pandorawiki.org/PND_quickstart#Command-line

(ie: command line, trying to be similar to the command line one would use under linux)

A GUI tool sorely needs building; I know ED had built one as well a few months ago, but I think nothing ever got finished.

jeff
 
skeezix said:
A crappy very short guide I wrote before release was:
http://pandorawiki.o...rt#Command-line

(ie: command line, trying to be similar to the command line one would use under linux)

Ah good, did not know that before, I should search the wiki more often.
Still Rockthesmurf can elaborate on the problems he encountered (well he already did that) and how he solved them (which he hopefully will do ;) ).
I will try that out shortly and see if I run into anything similar.

foxblock out
 
Last edited by a moderator:
Getting the icon to appear is the big step really (and not too hard!) -- that means the PXML is 'valid enough' etc; if you run it and nothing happens, then you can check the /tmp/pndrun* log and see whats going on.

The libpnd junk, and the apps stdout, go there.

Its often a permissions issue in my experience.. forgetting to mark the executable as an executable, but in Windows not sure thats an issue or not. OR could be a lib issue, if building the app makes it depend on some library, but that is not in the firmware.. in which case the lib must be included within the pnd and the LD_LIBRARY_PATH (or linker -rpath) set right. The /tmp log will always tell you, though.

jeff
 
Sorry guys, I've had a crazily busy week and haven't been getting home early enough to test any further, and now I am away for a week, but certainly the next thing on my to do list is to get this PND working, so it will be a while I will give an update as soon as I get a chance with some more information as to what is going on.

Steve
 
Copying from Pandora screen to phone so forgive typos:

Code:
rm: cannot remove '/tmp/cpuspeed': No such file or directory
not mounted on loop yet, doing so
LoopMountedon:
/dev/loop0
Filetype is ISO
sudo mount /dev/loop0
mounting union!
Filesystem is vfat
/use/pandora/scripts/pnd_run.sh: line 32: cd /mnt/utmp/gamename: Permission denied
[....................]
{App start}
[....................]
/usr/pandora/scripts/pnd_run.sh: line 37: ./gamename: No such file or directory
[....................]
{App end}
[....................]
cleanup done

My Pandora has to be sent back for repairs but I will still have it at least tomorrow and will be home tomorrow, to try and rectify this. Is there anyway I can fix this from the Pandora itself?

Steve
 
I tried to use pnd_make.sh on my Pandora but I get an error:

/home/user/libpnd/pandora-libraries/testdata/scripts/genpxml.sh: No such file or directory

Steve

Edit: if I specify a PXML.xml file it says it can't find mkisofs I should point out I haven't installed anything to my Pandora except hotfixes. I have just put pnd files on the SD.
 
Okay, spent some time debugging this tonight, the problem is the mkisofs stage ends up giving rubbish default permissions/ownership to all the files. I started fixing this up via various command line switches, and then discovered a single switch that seems to sort everything out magically, the switch is '-r'. I've given the manual information about this switch in the spoiler below.

-r
This is like the -R option, but file ownership and modes are set to more useful values. The uid and gid are set to zero, because they are usually only useful on the author's system, and not useful to the client. All the file read bits are set true, so that files and directories are globally readable on the client. If any execute bit is set for a file, set all of the execute bits, so that executables are globally executable on the client. If any search bit is set for a directory, set all of the search bits, so that directories are globally searchable on the client. All write bits are cleared, because the CD-Rom will be mounted read-only in any case. If any of the special mode bits are set, clear them, because file locks are not useful on a read-only file system, and set-id bits are not desirable for uid 0 or gid 0. When used on Win32, the execute bit is set on all files. This is a result of the lack of file permissions on Win32 and the Cygwin POSIX emulation layer. See also -uid -gid, -dir-mode, -file-mode and -new-dir-mode.

With that switch in place, and an updated COPY command line (not sure why this is needed on Windows 7, but still) it works, the COPY command line is along the lines of:

Code:
copy mygame.iso /B + mygame\PXML.xml /B mygame.stage2 /B /Y

I made a batch file to package up everything up, which is in the spoiler below, for those that are interested, with this in place I can now create a PND file, with icon, that actually runs all from a Windows 7 PC (and all the code was actually compiled from a Windows 7 PC too, hurrah!). I run the batch file from a directory that contains a subdirectory 'mygame' which contains my game executable, PXML.xml file, icon file, and all my 'shared' libraries in a 'libs' folder (which is located thanks to linking with the -rpath set correctly).

@ECHO OFF
mkisofs -r -o mygame.iso -R mygame
IF NOT "%ERRORLEVEL%"=="0" ( ECHO mkisofs failed & EXIT /B 1 )

copy mygame.iso /B + mygame\PXML.xml /B mygame.stage2 /B /Y
IF NOT "%ERRORLEVEL%"=="0" ( ECHO Failed to copy mygame\PXML.xml into mygame.stage2 & EXIT /B 1 )

copy mygame.stage2 /B + mygame\kamiretro.png /B mygame.pnd /B /Y
IF NOT "%ERRORLEVEL%"=="0" ( ECHO Failed to copy mygame.png into mygame.pnd & EXIT /B 1 )

DEL mygame.stage2
DEL mygame.iso

ECHO.
ECHO --------------------------
ECHO mygame.pnd created!
ECHO --------------------------
ECHO.

Hopefully that'll help someone, but at least it solves my problem!

Steve
 
Rockthesmurf said:
I tried to use pnd_make.sh on my Pandora but I get an error:

/home/user/libpnd/pandora-libraries/testdata/scripts/genpxml.sh: No such file or directory

Steve

Edit: if I specify a PXML.xml file it says it can't find mkisofs I should point out I haven't installed anything to my Pandora except hotfixes. I have just put pnd files on the SD.
Use the -c switch to use squashfs instead, that's included on the Pandora.
 
Last edited by a moderator:
Rockthesmurf said:
With that switch in place, and an updated COPY command line (not sure why this is needed on Windows 7, but still) it works, the COPY command line is along the lines of:

Code:
copy mygame.iso /B + mygame\PXML.xml /B mygame.stage2 /B /Y

when I tried making a pnd I downloaded windows compatible squashfs-tools and did

Code:
mksquashfs ./directorywithappfiles nameofnew.pnd
then I used the dos command
Code:
copy /b nameofnew.pnd+PXML.xml
then again for icon.
Code:
copy /b nameofnew.pnd+icon.png

to append the icon and pxml
 
Last edited by a moderator:
milkshake said:
when I tried making a pnd I downloaded windows compatible squashfs-tools
Where did you find that? I've looked around and found references to compiling it on Windows, but never saw any downloads (or at least no recent ones; Pandora only accepts squashfs version 4.0 or later). I don't use Windows myself, but it would be nice to add to distPND's readme to make it useful to Window's users.
 
Last edited by a moderator:
Tempel said:
milkshake said:
when I tried making a pnd I downloaded windows compatible squashfs-tools
Where did you find that? I've looked around and found references to compiling it on Windows, but never saw any downloads (or at least no recent ones; Pandora only accepts squashfs version 4.0 or later). I don't use Windows myself, but it would be nice to add to distPND's readme to make it useful to Window's users.

got it from here.

clicked on SquashFS 4.0 Cygwin binaries (tar.gz)

and you can run the included exe from a cmd :)

i'm using windows 7 btw dont know if that makes a diff.
 
Last edited by a moderator:
Back
Top