Page 1 of 3

Well, whaddayaknow...

Posted: Mon Sep 14, 2009 12:14 pm
by Chaky
I actually managed to produce a tool that checks integrity (basic check) of plist files in XML format, and cuts all the unneeded "garbage" out of it...


(still testing it before it meets the world).

Posted: Mon Sep 14, 2009 1:58 pm
by DaddyHoggy
8)

Posted: Wed Sep 16, 2009 7:34 am
by Selezen
Nice one. That WILL be useful!

Can't wait to see it.

Posted: Wed Sep 16, 2009 8:08 am
by Commander McLane
For Mac OS it's called PlistEdit Pro (and I'm running its free trial version for over 750 days now; the only thing I have to endure since the expiry of the trial period is a 45 second countdown after I started the program; okay, perhaps after having made half a dozen OXPs or so and having fiddled with countless others I should consider spending $24,95 for it :oops: ).

Posted: Wed Sep 16, 2009 6:27 pm
by JensAyton
Commander McLane wrote:
For Mac OS it's called PlistEdit Pro (and I'm running its free trial version for over 750 days now; the only thing I have to endure since the expiry of the trial period is a 45 second countdown after I started the program; okay, perhaps after having made half a dozen OXPs or so and having fiddled with countless others I should consider spending $24,95 for it :oops: ).
Y’know, Apple’s Property List Editor is free with your operating system – it’s part of the optional developer tools. (There are also two command line tools, plutil and PlistBuddy. plutil --lint will point out syntax errors in the property list – but then, so will Oolite’s log.)

Posted: Thu Sep 17, 2009 7:52 am
by Chaky
Here's little update on the thing:

I've done so far:

- size reduction: as in removing all the trailing empty spaces, tabs, comments, etc, newlines.. all modular.
- formatting: I call it beautification. What it does is track the <dict> and <array> and adds tabs infront of them, making the structure obvious.
- crude error checking: not too precise, but indicative, and if it says "error found" then it is most definitely there.
- pretty much everything that handles and catalogs files.
- awareness of multiple oolite installs
- (I know this sounds minute, but I'm proud of it) tracking down where oolite is installed. For the kicks of it, I made it look for oolite shortcuts and use the links in them to locate oolite path.


I'm doing right now:
- dialog boxes. Damn buttons, and drop down thingies...

... and what I haven't done 'coz I did the above first:
- find a way to make updates online and seamless (long shot, but I'm looking into it)
- file checks: for missing texture files from both plists and dat files and missing meshes, sounds, js files, images...
- player ship checks: to determine if ships from shipyard.plist exist in shipdata.plist (an make the checks cross-oxp)
- find a sucker that will port the script to C or something and make it cross-platform, 'coz I'm making this in winbatch.

Posted: Thu Sep 17, 2009 9:26 am
by Thargoid
Without wishing to ask a silly question, you do know of the -verify-oxp flag you can use with the executable to check the functionality (or not) of an OXP don't you?

It only partially overlaps what you've got above, but may be worth considering to possibly save some workload and duplication.

Posted: Thu Sep 17, 2009 9:36 am
by Chaky
verify oxp?

Verify oxp?!

VERIFY OXP?!?!?!! :oops:

P.S. Does that answer your question?
A qoute for the day: There are no stupid questions. Only stupid answers.. or in this case ME.

P.P.S. Less things to do, yay!

Posted: Thu Sep 17, 2009 9:54 am
by Thargoid
Ah, I see.

For 1.73.x, and from the command line (in Windows, not sure about Mac/Linux) and from the oolite.app directory, you type "oolite -verify-oxp ../AddOns/<insert your OXP name here>.oxp" and it goes away and runs the OXP verifier on the given OXP (whose name can't have a space in it, for semi-obvious reasons).

It then generates a log file in the logs directory detailing what it's checked and any warnings or errors it has found. Try it on a few of your OXPs and see if it covers any of the mileage you want to do.

I'm sure I've seen documentation or more details on this either on here or the wiki, but can't find it quickly. I'm sure some else can point you at it if I'm not imagining it, and also perhaps comment on how you run it on Mac/Linux (although I would guess Linux will be similar, possibly with an extra - before -verify-oxp).

Posted: Thu Sep 17, 2009 10:01 am
by Chaky
Tell you what...

I'll look into using that feature directly from the script. If I could run Oolite to do the checking and logging only, it would be perfect.

.. right now I'm making ridiculously powerful subroutine that can strip 200000000 plists off their comments... (I'm not joking.. would probably take months to complete the stripping, but it can do that).

Posted: Thu Sep 17, 2009 10:03 am
by Thargoid
Fairy snuff, just trying to make sure you aren't reinventing the (dark) wheel... ;)

Posted: Thu Sep 17, 2009 10:14 am
by Eric Walch
Thargoid wrote:
I'm not imagining it, and also perhaps comment on how you run it on Mac/Linux (although I would guess Linux will be similar, possibly with an extra - before -verify-oxp).
In order to use it under Mac OS X:
• Open Terminal (in Utilities in the Applications folder)
• Drag Oolite to the terminal window. The path to it should appear, followed by a space.
• Delete the trailing space, then type “Contents/MacOS/Oolite -verify-oxp ”
• Drag your OXP to the terminal window.
• Click in the terminal window, and press return.

(Note the space behind verify-oxp )

Posted: Sat Sep 19, 2009 3:33 am
by Chaky
OK, here's little update on the thing:

I've included the OXP verify feature. It turns out to be extremely usable by the script I'm making.

Now one can simply select the oxp to verify and the log will pop out. (instead of typing the path and all that...)


I might just as well write a code to pharse the log and open the problematic file... (that will be added later on)

Right now I'm almost done with the "lite" version. I must say that it is growing really fast from simple trimming the tabs and stuff tool...

And it is ugly, but it delivers.


Expect the early beta within a day or two. (Edit: unless I get more ideas)



Edit:
Feel free to post suggestions on features... I just thought of few (Running Oolite temporarly with one selected OXP, editing settings, editing saves...nah.. I'm not pro-cheating)

Posted: Sat Sep 19, 2009 12:55 pm
by Kaks
Oops, I just made a minor change to -verify-oxp in trunk: nothing internal, but now when it's finished it pops a dos terminal in windows saying "Verify complete. Please see 'Logs\oxpname.log',Press any key...". Once you press any key, it closes that popup.

It shouldn't interfere with your parser, though...

Posted: Sat Sep 19, 2009 6:06 pm
by Chaky
If the window pops up, my script will shut it down immediately.

It might slow down batch-verifying, though.