Well, whaddayaknow...

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Chaky
Deadly
Deadly
Posts: 213
Joined: Sat Aug 15, 2009 6:15 am

Well, whaddayaknow...

Post 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).
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

8)
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Selezen
---- E L I T E ----
---- E L I T E ----
Posts: 2530
Joined: Tue Mar 29, 2005 9:14 am
Location: Tionisla
Contact:

Post by Selezen »

Nice one. That WILL be useful!

Can't wait to see it.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post 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: ).
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post 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.)
Chaky
Deadly
Deadly
Posts: 213
Joined: Sat Aug 15, 2009 6:15 am

Post 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.
Last edited by Chaky on Thu Sep 17, 2009 9:41 am, edited 2 times in total.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post 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.
Chaky
Deadly
Deadly
Posts: 213
Joined: Sat Aug 15, 2009 6:15 am

Post 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!
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post 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).
Chaky
Deadly
Deadly
Posts: 213
Joined: Sat Aug 15, 2009 6:15 am

Post 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).
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Fairy snuff, just trying to make sure you aren't reinventing the (dark) wheel... ;)
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post 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 )
Chaky
Deadly
Deadly
Posts: 213
Joined: Sat Aug 15, 2009 6:15 am

Post 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)
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post 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...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Chaky
Deadly
Deadly
Posts: 213
Joined: Sat Aug 15, 2009 6:15 am

Post by Chaky »

If the window pops up, my script will shut it down immediately.

It might slow down batch-verifying, though.
Post Reply