Release PNDTools


Thanks.


I agree, project files are a good idea and on my todo list (though not top-priority).


For now though you can just open an old PND and replace the files you want to update (but keep in mind that the integrated file browser does not actually support replacing yet, instead you will have to delete the files first and then add the new versions - that's not optimal and I am also working on it ;) ).
 
Hi,


for testing purposes I created a dummy PXML with all the default data and put it with a program on a SD card. When I launched PNDManager I saw that this program was recognized as http://repo.openpand...package.id.here. Maybe it could be useful to warn the user if some essential data was not changed when creating a PND.
Oh jeez, thanks for notifying me about that.


The PXMLcreator was made for "expert" and complete modification of the PXML file, so it would accept anything and even output broken PXMLs (if it was forced to). Validation of the PXML is on my todo list and not done yet.


Additionally I was planning to create a wizard for PXML creation, informing the user of problems, providing templates and in general being much easier to use. Sadly I have not gotten around to finish it yet.


In the meantime I will take your advice and add some hard checks for default values in the current PXMLcreator (well for important things like the package and application id at least).


Also I have contacted the author of that PND.
 
Last edited by a moderator:
issues with v. 0.3.9 built 22.01.2012


- empty folders don't seem to be added to the .pnd


- When I add files, they get folders' icons (just cosmetic I believe)


- I cleared a project, added a list of files/folders, got the question about the PXML.xml, confirmed, PXML.xml was shown in the box, but missing from the .pnd (I'll try to reproduce that one, because it's weird)


Nice tool, thank you! b.
 
- empty folders don't seem to be added to the .pnd
Empty folders seem to be strapped from the PND by squashFS, there is nothing I can do about that (maybe there is a flag to prevent that, you would have to check that and add it to the launch options which you can set via File->Options. To retrieve the flags call "mksquashfs.exe -help" located in the tools directory via cmd.exe).


Besides, I don't see a point in adding empty folders, it might actually be harmful as a PND cannot write to a folder in appdata if the same folder exists in the PND itself (it will try to write to that mounted folder and fail). If you want your PND to write files to sub-folders you will have to create those folders from the packed application (use mkdir in C/C++ for example).

- When I add files, they get folders' icons (just cosmetic I believe)
That's a bug, icons should be retrieved from Windows itself and I never had any problems with that actually. What OS (Version of Windows) are you using?

- I cleared a project, added a list of files/folders, got the question about the PXML.xml, confirmed, PXML.xml was shown in the box, but missing from the .pnd (I'll try to reproduce that one, because it's weird)
That's actually intended as the PXML.xml file does not need to be inside the PND file, but will be appended in binary form behind the data (just like the icon).


It has been proven to be a quite confusing behaviour however so I will change it in the next version (which might take a while to be released as I am very short on time).


Thanks for the feedback :)
 
Empty folders seem to be strapped from the PND by squashFS, there is nothing I can do about that (maybe there is a flag to prevent that, you would have to check that and add it to the launch options which you can set via File->Options. To retrieve the flags call "mksquashfs.exe -help" located in the tools directory via cmd.exe).

Yeah, found that out, too. There doesn't seem to be an option, though.

Besides, I don't see a point in adding empty folders, it might actually be harmful as a PND cannot write to a folder in appdata if the same folder exists in the PND itself (it will try to write to that mounted folder and fail).

Well, I wouldn't :) It only came to my attention since Dosbox74.pnd makes use of this. This gives following thoughts:


- There must be a way to include empty directories in squashfs. (Maybe the Gnu/Linux mksquashfs adds empty folders, maybe it's been done via zip.)


- I could imagine a scenario where the application tries to write into those folders without checking if they exist, so I couldn't build a working pnd with PNDtools for this app (I could probably work around this one with PRE-scripts resp. modifying the startup-scripts, but the cause might be hard to find).

- When I add files, they get folders' icons (just cosmetic I believe)
That's a bug, icons should be retrieved from Windows itself and I never had any problems with that actually. What OS (Version of Windows) are you using?

It's Windows 7 64bit. I attached a screenshot with 2 files, settings.ini and chmod.bat, added.

- I cleared a project, added a list of files/folders, got the question about the PXML.xml, confirmed, PXML.xml was shown in the box, but missing from the .pnd (I'll try to reproduce that one, because it's weird)
That's actually intended as the PXML.xml file does not need to be inside the PND file, but will be appended in binary form behind the data (just like the icon).

I was thinking about that being a possibility. (I'm very new to all this.) Could an included PXML.xml override an appended one?


Thanks again for this valuable tool. So much to learn. :)

PNDtools_01.png
 
Well, I wouldn't :) It only came to my attention since Dosbox74.pnd makes use of this. This gives following thoughts:


- There must be a way to include empty directories in squashfs. (Maybe the Gnu/Linux mksquashfs adds empty folders, maybe it's been done via zip.)
Interesting, you might be right in your assumption - apart from that it also could be another version of squashFS which does this.

- I could imagine a scenario where the application tries to write into those folders without checking if they exist, so I couldn't build a working pnd with PNDtools for this app (I could probably work around this one with PRE-scripts resp. modifying the startup-scripts, but the cause might be hard to find).
The thing is, the application CANNOT write to those folders as by default all read/write calls will be redirected to the appdata folder, while the folder is inside the PND/mounted directory. You would have to manually navigate to the temporary mounted folder and write there, which is kinda stupid (you cannot write to the PND file that way anyway and temporary data could just be stored on RAM).


So I really don't see the use of this, but maybe I am missing something here.

It's Windows 7 64bit. I attached a screenshot with 2 files, settings.ini and chmod.bat, added.
Interesting, I assume those files have the correct icon in Windows explorer. It seems like the icon lookup returns an invalid icon ID, so the application reverts to ID 0, which is the folder icon (with 1 being the blank file icon), maybe I can catch this and show the file icon instead on an error (since I assume this will mostly happen for files). Or just display no icon.

I was thinking about that being a possibility. (I'm very new to all this.) Could an included PXML.xml override an appended one?
Technically this is possible, but it has not been implemented anywhere and there has not popped up a useful scenario for it either (It could be used for supplying multiple configurations, but you can do that with multiple application tags now, too).


The PXML file and icon are appended because it's faster to read them that way as you don't have to mount the PND/squashFS (just search the PND file backwards for the PXML/icon file headers).


By default I only include the icon (and not the PXML), since the icon might also be used as an asset in the application (the PXML most likely is not, so it will only be appended, unless you manually add it, too).
 
Last edited by a moderator:
I had a hard time finding a tool which could put my executable and some used images together, but PNDTools did the job.


I could not find an easy howto on making a PND and by looking into other PND's with PNDTools, I got on the right path.


Great work! B)
 
Technically this is possible, but it has not been implemented anywhere and there has not popped up a useful scenario for it either (It could be used for supplying multiple configurations, but you can do that with multiple application tags now, too).


The PXML file and icon are appended because it's faster to read them that way as you don't have to mount the PND/squashFS (just search the PND file backwards for the PXML/icon file headers).


By default I only include the icon (and not the PXML), since the icon might also be used as an asset in the application (the PXML most likely is not, so it will only be appended, unless you manually add it, too).

I'm not imagining useful scenarios. I'm imagining mayhem. :)


I think I read somewhere the PXML should be included in the pnd to comply with demands for well-formed pnds established by some repositories. So there might be another reason to include them. (I can't find that now, it seems. It was in a discussion about the app shop application, I believe.) There's also the contradicting specification for the PXML.xml being singular in the pnd : ... there should only be one such file.
 
I wonder if PNDTools could be ported to the pandora...
With a little bit of code rewrite it certainly could.


Then again, what would be the purpose? Only a few people build stuff directly on the Pandora (since it's much slower).


A Linux version on the other hand would be much more helpful and actually would be a milestone on the way to the Pandora version. So far I sadly wasn't able to set-up Lazarus (the IDE) on Linux and compile the one external component needed :( Therefore I stopped looking into that and focussed (not really, since I have other projects) on getting the application done.


Thanks for your interest, the code is publicly available here: https://github.com/foxblock/PNDTools


I invite anyone to play with it and ask me questions about it :)
 
Oh, you can try with the Lazarus PND on the Pandora, and make the PNDTool on the Pandora a milestone to the Linux version :lol: .


By the way, I do a lot of compiling / packaging directly on the Pandora, even if it's slow. So I am interested in a cool packaging tool !
 
Oh, you can try with the Lazarus PND on the Pandora, and make the PNDTool on the Pandora a milestone to the Linux version :lol: .


By the way, I do a lot of compiling / packaging directly on the Pandora, even if it's slow. So I am interested in a cool packaging tool !
Fair point, I actually haven't tried that yet, might do.


I might try to get a new version out for the new compo - not to enter, but give people an easy too to package their submissions.


I will focus on getting a new feature, I have been working on for a while, ready first though.
 
Thanks for the info I still dont have a pandora but soon after I save some money for it I plan to devolp stuff directly in it and teach myself programming as I'm fairly good at drawing and (not so) good at coding in GML. Thats why I wanted to know if it was at least possible to port it. :)
 
Last edited by a moderator:
I'd be happy to include it in Slack (with your permission, ^^).
Go for it, if you manage to compile it. Don't forget to submit any patches to me though ;)


It might be a while until it is ported to Linux or the Pandora (since it's not top priority for me right now), but it's definitely possible.
 
HUGE UPDATE!

I just released Version 0.5.1, it does contain a few minor fixes and changes, but most importantly:

A simplified GUI, which guides you through the process of creating a PXML file for your application (fist introduced it in this post).

You won't have to deal with any XML structure or need to know about the PXML file format at all, you just have to enter some details about your app, add screenshots and stuff like that and PNDTools will handle the rest.

It does not support all functionality of the PXML specification (such as multiapp-pnds), but it should suffice for most use-cases (else there still is the advanced PXML editor in PNDTools).

The tool also is rather strict, in which it requires you to add an icon and screenshots (which is totally optional as far as the PXML spec is concerned), but I think those restrictions are sensible and lead to better PNDs in the end.

The bad news is, I haven't really tested the tool as my Pandora is broken at the moment, so please get back to me with any bug reports (I have compared the PXML files with working ones and they look fine, but you never know...).

Anyway, this addition makes PNDTools the tool for creating your PND completely from scratch and I hope I made it as user friendly as possible. Therefore, if you are confused by the program and still can't get a PND to work, please report back to me and I will try to improve the program.

Download and screenshots are in the first post, get your update now!
 
Last edited by a moderator:
Another small update:

File conflicts when adding stuff to the contents of a PND will now be handled properly (with a fancy popup dialogue and all).

Also the UI has been slightly improved and bugs have been fixed (you can set which types of messages will be logged or displayed as a popup to improve feedback on operations and errors).

The PXML schema and documentation has been updated to accommodate for the latest changes about the exec and associations elements.

Also I finally added proper licensing information to the source code: PNDTools is now officially licensed under the GPLv3

Download the latest version here.

Now only non-PNG images and ISO filesystem support is missing and we have a 1.0 release (also wine-less Linux support.... oh well, somebody willing to look into that? :p )
 
Back
Top