Pandora platform independent code for automatic packaging of pnds


x1212

Member
Joined
Apr 1, 2013
Messages
134
Hello,

I'm currently looking into creating a pnd-exporter for the Godot-engine. (http://boards.openpandora.org/topic/16214-unnamed-game-with-a-mole/?p=333010/URL])

I have already a rough idea where to put in my changes to do this (how to register the exporter and how to create one).

For the Android-exporter it looks like Godot uses an included zlib to modify (add the configuration and the data.pck) an APK-file.

In order to do something similar for the Pandora I want to include functions to automatically generate an PND from my ported binary and the generated data.pck (+icon etc. ...).

Did anyone do something like that already? (Are there any OpenSource libraries that could be used to do this?)

I think the biggest problem is to make it work on both Linux and Windows, thats why I don't think using something like squashfs by systemcall would be a good idea ...
 
Last edited by a moderator:
Ah thanks, last time I checked I must have missed the link to the sources.

Maybe I can get this to work on Linux as well (at least the command-line part) by building it with gpc ...
 
Well, for Linux, all I use to create PNDs ist a simple command line:


./pnd_make.sh -p ./output/paganitzu.pnd -d ./paganitzu/ -x ./paganitzu/PXML.xml -i ./paganitzu/icon.png -c

So basically, I've got for each game a directory and have the icon and PXML in there, always the same structure.

Then all you need is the pnd_make.sh script and mkisofs or mksquashfs, which are available for every Linux distro.

The remaining commands are standard Linux commands as well.

I've attached pnd_make.sh (though I think there's a newer version available as well).

All you need to do is create a PXML creator - but you could easily create a small script that lets the user enter the name, description, choose an icon and a category and then the script would create the PXML file based on a generic template.

pnd_make.sh.zip
 

Attachments

  • pnd_make.sh.zip
    1 KB · Views: 181
Well, for Linux, all I use to create PNDs ist a simple command line:


./pnd_make.sh -p ./output/paganitzu.pnd -d ./paganitzu/ -x ./paganitzu/PXML.xml -i ./paganitzu/icon.png -c

So basically, I've got for each game a directory and have the icon and PXML in there, always the same structure.

Then all you need is the pnd_make.sh script and mkisofs or mksquashfs, which are available for every Linux distro.

The remaining commands are standard Linux commands as well.

I've attached pnd_make.sh (though I think there's a newer version available as well).

All you need to do is create a PXML creator - but you could easily create a small script that lets the user enter the name, description, choose an icon and a category and then the script would create the PXML file based on a generic template.
I use that too for my packagings.
 
Yes that .sh is really usefull (for my own pnds I used that too).

In order to get it to work on Windows as well I was looking for a tool that works on both Linux and Windows out of the box.

But maybe the fastest/easiest way for me to make that exporter, will be to use some #ifdef blocks and then let it use different external tools depending on what platform godot is build for.

The downside would be that the users will have to go different ways depending on the platform they are on ... but that difference should then only be the difference of them providing a pnd_make.sh vs. providing the path to PNDTools.

And since the Android-exporter uses external tools as well I think that shouldn't be to much of a problem.
 
Well, anyone able to code a game with Godot shoud be able to package or into a PND as well if he likes to. It's not that complicated.

And if a better solution is found at sometime, it could easily be included later on.
 
Back
Top