Beta Gpnd - A Simple Gui-Tool For Creating Pnds


slaeshjag

¯\_(ツ)_/¯
Joined
Apr 8, 2010
Messages
2,687
Location
~Stockholm, Sweden
I'm currently working on a graphical tool for creating PNDs. I have now come to the point of early alpha, it *should* be able to create a working PND if you know what you're doing. However, I don't have a pandora, so it would be great if anyone who has one can test it, or anybody who just likes to break things.

Features:
· Creates a ISO-image from a folder and adds a PXML file to it (also saved in the source folder).
· Generates a PXML from values entered in a set of forms.


Todo:
· Add input checking
· Re-implement the working-directory fieĺd.
· Implement more optional options and implement version number inputs (defaults to 1.1.1.1 atm).
· Rework GUI for better usability.
· Add support for multiple file systems (eg. cramfs)


Dependencies:
· GTK development headers and libs
· genisoimage

Source - obsolete, see this post for beta 1

Source is ugly, so if you like being sane, don't look at it.

Feedback? If there alredy is a simlar tool out there, tell me _now_, so I don't waste anymore time on this. Couldn't fine one though.
 
Last edited by a moderator:
I'll probably create a tool too, but with Qt... So if you think we need two tools (or tools that focus on different things), feel free to continue; and if you're lazy, don't bother :p

I could actually create a version of my own *today* if the interest is high enough.
 
Well, if we use similar function calls etc, we could use the same base, and only the GUI-part different. I'm pretty sure people in the GTK-camp would hate using a QT-app and vise verse :p
 
Yes, there is already a similar tool, but don't let that stop you.

Included with libpnd are several scripts, which you can download through the git web interface. One of these, genpxml.sh, makes a barebones PXML.xml file that needs to be manually edited for your application. Another, pnd_make.sh, takes any directory with a PXML.xml in it and creates a PND. Also, there was a PXML validator floating around once, but it might be out of date now.

But I say to not let that stop you because a good GUI can really lower the barrier of entry for a lot of people. Also, making a good PXML.xml can be tedious (I tried once, but don't yet know how hard I failed).

Some notes: I think icons also need to be appended to the end of the PND file, or maybe that's just optional, or maybe that's changed. Also, SquashFS is apparently supported; using it or CramFS should just be a matter of replacing "genisoimage" with "mksquashfs" or "mkcramfs" (and whatever command-line options, I guess).
 
Adding support for other image types is a quick fix, I just needs to regain sanity after several hours of writing GTK-code :p

Edit: Oh, and I don't really consider a set of CLI-tools to be similar, they're used by a totally different user base... I think x]
 
Those scripts are more like a set of hacks used for creating test files during the development of libpnd. I don't think that they actually should be used for production-ready PNDs.
 
Yep, I'm only using the pnd_make.sh script and an editor to edit the PXMLs manually (I'm using a basic skeleton one which I'll change for each file).

I'm also working on some Windows GUI, however, every other GUI is very welcome (especially on Linux).

If anyone has questions regarding the PXMLs or want me to check the output of some PXMLs, let me know.

It's also a good thing to include the freedesktop-categories into the GUI as dropdown menu instead of allowing custom categories.
 
Multiple tools are fine; options for folks are good. I'll keep using pnd-make.sh myself (I build it into my makefiles, works fine), but as mkisofs and mksquashfs are widely availale for every platform, its easy to make GUI wrappers. (I put links to those tools up in the wiki somewhere, if you happen to need them.)

I used the DOS (cmd) shell in Windows to make a few pnds, just to make sure they work, too :)

GUIs are good; people will want and need them.

Check the rules in the 'libpnd hub' wiki; ie: I don't consider it a PND if the PXML.xml file is not included both in the iso, and appended to it; an icon, if appended, should also be inside the iso. (Reason -- theres no reason people shouldn't just unpack the pnd (ie: the iso) into a dir, and repack it into a pnd again. As such, all the 'source' (icon and PXML.xml and the app itself) should be in the iso, and the icon/PXML.xml should merely be copied onto the end.

In my projectsw, I usually have something like..

project/
project/Makefile
project/src
project/build
project/pnd/ <- contains icon and PXML.xml

"make pnd" will then copy build/awesomeapp into pnd, and prepare any data etc there, and then run pnd_make.sh to produce awesomeapp.pnd (say)

That way awesomeapp.pnd includes the icon, the app, the PXML.xml, etc.

If you make a GUI tool, hopefulyl people can just put links into their build tree, or perhaps copy their build into a distribution-dir, etc, and go from there.

Anyway, I'm babbling; good look, have fun, awesome days are coming.

jeff
 
=== New release: gPND Beta 1 ===

After a few days more work, I have something much more usable.

New features:
· Basic input checking
. Support for multiple applications, descriptions and category entries.
· You can now specify version number
· Does now append the PND with the PXML
· Also supports exporting to CramFS and SquashFS

EvilDragon has also syntax checked a output file, so hopefully, syntax is correct. I have also spent a lot of time on eliminating segfaults, so hopefully it's pretty stable.
I'm trying to keep the step-by-step GUI, so that it's always clear what to fill in next. Here's a screenshot of the main window:
Screenshot-gPND%20maker-1.png


Todo for RC:
· Support for preview pictures
· Support for info sheet
· Support loading existing PXMLs
· Make code readable (2 klocs of GTK-mess is NOT readable)

Source code

Feedback?

EDIT: Hey, why didn't anyone tell me that the URL was borken? o_O
 

Attachments

  • Screenshot-gPND%20maker-1.png
    Screenshot-gPND%20maker-1.png
    14.4 KB · Views: 202
Nice :)
I'll try to compile it on my Linux machine tonight and see if it spits out working PNDs :)
 
Woops, I now see I forgot to add the code that appends the PXML in the first upload, I'll upload the fixed source.

EDIT: Uploaded
 
slaeshjag said:
Woops, I now see I forgot to add the code that appends the PXML in the first upload, I'll upload the fixed source.

EDIT: Uploaded
This could be cool. Will it allow a non linux noob like me to do things like select which catagory it shows up in, change the icon, and change the preview image for existing PNDs?
 
Last edited by a moderator:
That code was for appending the PND with the PXML. But with the RC, there will be support for loading an existing PXML and just modify it, and maybe even extracting it from a existing PND.

I'll also making the code more modular, to make it easier to port it. So if there is interest for a windows port, it should only be a day of work or so.
 
I noticed that the link was broken, but thought the one in the first post would be the same ;)


I tried it and its nice, but it doesn't like spaces in filenames or wherever - at least I can't export a PND file for one of my games.

Code:
Request about category #5
I: -input-charset not specified, using utf-8 (detected in locale settings)
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 288
Path table size(bytes): 10
Max brk space used 0
111 extents written (0 MB)
cat: [b][Part 2 of the filename][/b]: No such file or directory
cat: [b][Part 3 after the space][/b].pnd: No such file or directory
Now: 1,0,0,0
Now: 0,0,0
Herro!
Herro!
Updated general data
Updated appinfo data

Besides that the locale thing with modify / add / delete buttons didn't really work. Modify didn't like me at times and I kept overwriting useful entries. I think it should also show the available locales after finding out that the current one is not allowed.

The /5 in the category menu also seemed confusing and cryptic to me.

Additional explanation for some things would be better too like the Menu Icon file for example - why not state which dimensions it needs? and why no file browser for that?

However, one thing I was really missing was the ability to create "Launch with" entries to link the application to file types AND to have the ability to create multiple applications in one package. Wait.. thats actually possible I think, just not clear enough. The "select directory" should be called "Select virtual PND path". To me it always looked like its the path where all generated PNDs will be, however this will be picked in the end so that would mean that you could generate multiple apps into one PND. So far I thought each app would get its own PND.. :huh:


You should also design the software more strict - why have a textbox for the version number? Wouldn't it make more sense to have 4 seperate spinboxes and the labels for them? (major, minor, release, build)
//Edit: You can crash it if you cancel the "Select directory" btw
//Edit: Didn't offer me Cram- and SquashFS neither. Why not tell the user which components are missing? - It does only tell in the console so far.
 
JayFoxRox said:
I noticed that the link was broken, but thought the one in the first post would be the same ;)


I tried it and its nice, but it doesn't like spaces in filenames or wherever - at least I can't export a PND file for one of my games.

Code:
Request about category #5
I: -input-charset not specified, using utf-8 (detected in locale settings)
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 288
Path table size(bytes): 10
Max brk space used 0
111 extents written (0 MB)
cat: [b][Part 2 of the filename][/b]: No such file or directory
cat: [b][Part 3 after the space][/b].pnd: No such file or directory
Now: 1,0,0,0
Now: 0,0,0
Herro!
Herro!
Updated general data
Updated appinfo data

Besides that the locale thing with modify / add / delete buttons didn't really work. Modify didn't like me at times and I kept overwriting useful entries. I think it should also show the available locales after finding out that the current one is not allowed.

The /5 in the category menu also seemd confusing and cryptic to me.

Additional explanation for some things would be better too like the Menu Icon file for example - why not state which dimensions it needs? and why no file browser for that?

However, one thing I was really missing was the ability to create "Launch with" entries to link the application to file types AND to have the ability to create multiple applications in one package.


You should also design the software more strict - why have a textbox for the version number? Wouldn't it make more sense to have 4 seperate spinboxes and the labels for them? (major, minor, release, build)

Now THAT'S the sort of feedback I want!

The failure with spaces in file name is probably because I forgot to add quotation marks around filename in genisoimage call. The modify buttons seems to have gotten messed up when I copied the input checking from the add buttons, big error by me there x[

The locale selection was a tricky one. I first tried with a drop down box, but with > 200 locales, that became very messy, any suggestions there?

The number/subcategory was a quick hack, I needed a way to store both category and subcategory in the list view, and didn't like the idea of having two almost identical functions, one to get category by id and one to get id by category. But that will be fixed in the RC.

Reason to no browse dialog for menu icon was that I at that point didn't have a clear idea of how that button could have been placed in a way that does not look too messy. Will try to implement that. And additional information takes a lot of space in label, but I guess something similar like »(Max 48×48)« would be a good way of saying that without using too much space.

Associating file types with a application isn't supported yet by current implementation of PND-system so I didn't prioritize it, but that has been on my todo list since I started, just didn't know when I'd implement it. Maybe in RC.

Multiple applications however is already supported in the beta, that's what you have the list entry and add/mod/del buttons in the main window for.

Spinboxes for version number is a excellent idea, I've no idea of why I didn't think of that before.

EDIT: Atm. it only fails if no supported component is found, but I guess a information dialog at program startup isn't too annoying?
And I can't get it to crash by canceling select directory dialog. Alternative "Select directory" button suggestion noted.
 
Last edited by a moderator:
I've been thinking a little now... Writing gPND in C has been pretty time consuming and very frustrating. So, how would a web based version do? That is, you upload a zip/tarball/whatever, then through a web interface do all the selections and that then generates a PND for you. I reckon it'll save a lot of time and spare my sanity. even if I make a web app, I will still keep the offline version programmed in C, but I'll give it a lot lower priority of course. With a web app, it's a lot easier to cover all the platforms, so I guess it would be a better start, don't you think?


EDIT: But I guess that can wait until after I release the RC, my current beta release isn't perfect in any way...
 
If you can find a version of mkisofs/[insert other tool here] that can run in a strict web server environment, it might be an interesting idea to make a webapp for it. That's the problem I've been having when trying to add *exactly* that feature to my Box webapp.

(PS: writing your webapp in PHP and relying on hacks and shell scripts doesn't count ;))
 
Last edited by a moderator:
Is it just me, or does the category selection stuff not work? (mine keeps winding up in Other...)
 
Back
Top