Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: WMCoolmon on June 01, 2007, 09:42:55 pm

Title: RELEASE: Maja (VP Editor)
Post by: WMCoolmon on June 01, 2007, 09:42:55 pm
Screenshot (http://fs2source.warpcore.org/temp/wmc/Maja.png)

I've been working on this for awhile. It's Java-based, so it runs fairly seamlessly on Windows, Linux, and Mac OS X. The only functional difference is that there's a bug under Windows, which prevents Java from registering the right-click properly (I'm pretty sure this is easily fixable, unlike with wxWidgets).

Interface
At the top of the page are the tabs for the currently opened projects.

Each component window has five buttons. The first four allow you to choose what the component is. 1 is the files tree, 2 is the editor, 3 is the output component (Shows status, warning, and error messages), and 4 will be the list of all files that the current project depends on. "M" allows you to swap a smaller component with the large component on the right.

All components can be resized. (That's what the two little circles are - Mac OS X's way of telling you where to drag.)

The file/folder editor is fairly self-explanatory. You can import C/VPs as subdirectories, or entire folder trees, or just a batch of files into any directory. You can also export any directory or set of files. There's also a "Details" dialog, where you can dig up all the information about a VP entry that's stored in the project.

The editor supports text files as well as JPEG, PNG, BMP, WBMP, GIF, PCX, and (to some extent) TGA. You can't actually edit image files right now, though you can edit and save text files in the active project. I'm unclear on how feasible DDS support is. I've done some cursory searching and haven't been able to find any example source on decompressing DDS files. Sound support hasn't been started yet.

I've been considering redesigning the interface to use multiple windows. This has been a bit of a holdup for me. I'm pretty attached to the current design, because it's almost exactly what I planned since day one, but having multiple windows with only one component in each (No 1234 switching) seems like it would be much cleaner.

Under the hood
I've completely rewritten the VP loader I used for VPMage and Polonius, and been as careful as I could about writing VP files. Generally, it should either write a completely good VP file, or fail and erase the partial file with an error. (There are some special partial cases where it's unable to write a file, and will go on to write the rest of the file with a warning...but I think I'm going to remove that functionality)

Importing and exporting "package files" is done modularly. Adding new package types is pretty easy, mostly just a matter of deriving a new class and filling out the functions.

VP file support is complete. CVP read support is about 90% complete (But untested). Unfortunately, neither supports decryption of FS1-encrypted files at this point. Given that the algorithm is protected by licensing, it's unlikely that I'll end up including it in Maja.

I've done my best to keep the GUI separated from the underlying library, so a command line tool should be fairly straightforward to write.

One thing that's incomplete right now is better "Sync" and "disconnected" status support. Files that get removed are considered "disconnected", while files that are modified (outside of Maja) are considered to have gone out of sync. The interface doesn't have a good way of letting you reconnect moved files right now, for example.

Odds and ends

This is actually the program I've started going to whenever I need to consult a TBL file in a VP file. I haven't had to install VPView yet.

Click me for the release (http://www.hard-light.net/forums/index.php/topic,47412.msg971629.html#msg971629)
Title: Re: Maja (VP Editor) - Large screenshot
Post by: asyikarea51 on June 01, 2007, 10:47:14 pm
Quote
Odds and ends
This is actually the program I've started going to whenever I need to consult a TBL file in a VP file. I haven't had to install VPView yet.

I could use something like this. Extracting files is bothersome, besides, sometimes the TEMP doesn't get cleared out...
Title: Re: Maja (VP Editor) - Large screenshot
Post by: Dark Hunter on June 01, 2007, 11:01:01 pm
As could I. I've been doing a lot of VP breaking and building for my mod, and this would make things much easier.
Title: Re: Maja (VP Editor) - Large screenshot
Post by: TrashMan on June 02, 2007, 05:05:45 am
 :yes:
Title: Re: Maja (VP Editor) - Large screenshot
Post by: Devrous on June 02, 2007, 02:39:40 pm
 :D :yes:

When will it be ready for the rest of us? *dizzy with anticipation*
Title: Re: Maja (VP Editor) - Large screenshot
Post by: Nuke on June 03, 2007, 03:14:01 am
cool.
Title: Re: Maja (VP Editor) - Large screenshot
Post by: Tempest on June 03, 2007, 10:21:59 pm
I'd love a VP editor like this. VPmage is...irritating in some ways. Release a beta!

I'd also like to be able to edit .fs2 and .fc2 files in a .vp. It'd be great if we didn't even have to extract the .vp to do any raw data editing. Plus, default save/load directories and a temp file for last load location are a must. I hate programs that don't have that, because I have to find everything again. Although it has trained me to be able to get to my fs2 directory REALLY quickly...
Title: Re: Maja (VP Editor) - Large screenshot
Post by: WMCoolmon on June 04, 2007, 11:17:29 pm
:D :yes:

When will it be ready for the rest of us? *dizzy with anticipation*

Summer 2007 seems like a good guess. :p

I'd also like to be able to edit .fs2 and .fc2 files in a .vp. It'd be great if we didn't even have to extract the .vp to do any raw data editing. Plus, default save/load directories and a temp file for last load location are a must. I hate programs that don't have that, because I have to find everything again. Although it has trained me to be able to get to my fs2 directory REALLY quickly...

Ehg, that's a good point, but it'd require the addition of a config file, unless Java has a built-in registry/config file library. Right now you can just double-click on the .jar and go, no extra files required. (Besides Java, of course)

You will have to rebuild VPs after they're edited. Right now, what happens is that you set an output path for the project. Maja treats this like an on-disk repository of all the changed files. The nice thing about this is that if you import the 'data' directory of a mod directory, and then set the output path to the aforementioned mod directory, you can make any last-minute changes and they'll still be reflected in the original mod.

Or you can set the output path to a temp directory and the mod files will remain untouched.

However you still have to export the VP, because the idea of 'fragmented VP files' is iffy for me. If you're writing a VP file, you should already be past the stage of frequently editing it and be planning on either using or distributing it. In either case I don't see a good reason to spend all the time it would take to save barely any time in finishing the VP, or writing a VP with unused parts and so is larger than necessary.
Title: Re: Maja (VP Editor) - Large screenshot
Post by: Colonol Dekker on June 05, 2007, 03:37:21 am
Yay, evolution / improvement is always good.
SNazzy, i'm assuming theres a drag/drop system in place too. ? (zip style)
Title: Re: Maja (VP Editor) - Large screenshot
Post by: WMCoolmon on June 05, 2007, 05:05:20 am
Not yet. I have a bookmark to a good code sample which covers it.
Title: Re: Maja (VP Editor) - Large screenshot
Post by: Topgun on June 05, 2007, 08:27:29 am
ok, how do you pronounce it? (maya?) :wtf:
Title: Re: Maja (VP Editor) - Large screenshot
Post by: Bobboau on June 06, 2007, 07:30:50 pm
so we have a new vp editor, nice!
and it's in java... eh, er.... a new VP editor! yay!
Title: Re: Maja (VP Editor) - Large screenshot
Post by: WMCoolmon on June 11, 2007, 04:56:43 am
Bumping this up. Drag and drop is now supported for:
1) Dragging within the same content tree
2) Dragging between two content trees, eg from the left pane to the main pane
3) Dragging outside files into Maja

Still todo/considering:
4) Dragging files out of Maja.
5) Dragging files between two instances of Maja.
6) Dragging files between projects.

I assume everybody is happy with the GUI, as opposed to a multi-window setup?
Title: Re: Maja (VP Editor) - Large screenshot
Post by: Colonol Dekker on June 11, 2007, 06:56:22 am
This is now my VP Suite of chice.




Kudos + 10'000
Title: Re: Maja (VP Editor) - Large screenshot
Post by: MP-Ryan on June 17, 2007, 07:26:22 pm
Can the rest of us poor slobs download this yet, or are you just being a tease? =)
Title: Re: Maja (VP Editor) - Large screenshot
Post by: WMCoolmon on June 17, 2007, 11:51:45 pm
Sorry. :nervous:

I need to fix one more known bug before I do a final bugchecking pass and release.
Title: Re: Maja (VP Editor) - Large screenshot
Post by: jr2 on June 18, 2007, 04:03:51 am
*bites nails*
Title: Re: Maja (VP Editor) - Large screenshot
Post by: Turey on June 18, 2007, 04:12:37 am
I wouldn't mind looking through the VP/CVP code once you're done. I'm assuming the source will be available?
Title: Finally, it's released
Post by: WMCoolmon on June 25, 2007, 12:24:19 am
Probably at some point.

Here's a quick alpha release. I'm pretty sure you can't export VPs under OS X (Because there's no filename field :wtf:) and TGA reading still isn't fixed. However, I'd rather release it now and get some feedback, since I'm going to be even more busy over the next few weeks.

[attachment deleted by admin]
Title: Re: RELEASE: Maja (VP Editor)
Post by: WMCoolmon on June 25, 2007, 02:26:47 am
Oops, sorry:

Operating Instructions

You must have Java 1.5 or higher installed, regardless of which OS you are using

Windows - Download, unzip, and double-click on the .jar file.
Linux - Download and unzip the file. Then do "java -jar Maja.jar" from a console window
OS X - Download, unzip, and double-click on the .jar file.
Title: Re: RELEASE: Maja (VP Editor)
Post by: achtung on June 25, 2007, 02:39:29 am
Maja (http://www.nukelol.com/downloads/freespacefiles/utils/Maja.zip)

Figured I'd upload it, don't know how long attachments last.
Title: Re: RELEASE: Maja (VP Editor)
Post by: Water on June 25, 2007, 04:26:25 am
Operating Instructions
Very easy to use.
Title: Re: RELEASE: Maja (VP Editor)
Post by: achtung on June 25, 2007, 07:27:48 pm
I like cross-platformness.
Title: Re: RELEASE: Maja (VP Editor)
Post by: karajorma on June 26, 2007, 11:04:37 am
Looks good to me. A couple of minor gripes

1. When writing a VP file it doesn't append the .vp extension if you don't supply it yourself.
2. Although you can select multiple files you can't move them. It simply picked the last one I selected and moved that.


Apart from that it looks pretty good :yes: I found it much easier to use than VPmage (the UI on that one confused the hell out of me for a long time) but this one was much cleaner. I find the ability to edit files very useful.

Only major drawback I see is that this is going to give me all kind of support headaches from idiots altering the root VPs when they really shouldn't have since you've made it so easy to do that now. ;)

Do you have a permanent location in mind for downloads? I'd like to get this one into the FAQ when I update next.
Title: Re: RELEASE: Maja (VP Editor)
Post by: achtung on June 26, 2007, 02:32:26 pm
I posted a link above if you want to use that.  It's up to the author though.
Title: Re: RELEASE: Maja (VP Editor)
Post by: WMCoolmon on June 27, 2007, 03:03:44 am
Looks good to me. A couple of minor gripes

1. When writing a VP file it doesn't append the .vp extension if you don't supply it yourself.
2. Although you can select multiple files you can't move them. It simply picked the last one I selected and moved that.

1) Yup.
2) Yeah, that one was on my todo list, but I decided it wasn't vital enough to postpone release. Multi-selection isn't really supported by anything else, either.

Still, I'm surprised those are the only bugs that popped up. (Pleasantly surprised, that is.)

Apart from that it looks pretty good :yes: I found it much easier to use than VPmage (the UI on that one confused the hell out of me for a long time) but this one was much cleaner. I find the ability to edit files very useful.

Only major drawback I see is that this is going to give me all kind of support headaches from idiots altering the root VPs when they really shouldn't have since you've made it so easy to do that now. ;)

Yeah. :blah: I had meant to add a CRC32 check lockout, but I didn't get that implemented - it's part of what I consider the CVP package, as I don't want to have more than one CRC check (eg the nonstandard fs2_open one) running around in the codebase.

Do you have a permanent location in mind for downloads? I'd like to get this one into the FAQ when I update next.

Not really. If I had some kind of webspace that I could upload it to and track the number of downloads I would use that. Unfortunately I don't; and everything decent I know of, you have to pay for. ('decent' = free, fast, no ads, no registration or similar BS)
Title: Re: RELEASE: Maja (VP Editor)
Post by: Turey on June 27, 2007, 03:31:08 am
Not really. If I had some kind of webspace that I could upload it to and track the number of downloads I would use that. Unfortunately I don't; and everything decent I know of, you have to pay for. ('decent' = free, fast, no ads, no registration or similar BS)

I'm sure someone around here has some webspace they can give you.
Title: Re: RELEASE: Maja (VP Editor)
Post by: achtung on June 27, 2007, 03:41:07 am
Not really. If I had some kind of webspace that I could upload it to and track the number of downloads I would use that. Unfortunately I don't; and everything decent I know of, you have to pay for. ('decent' = free, fast, no ads, no registration or similar BS)



I'm sure someone around here has some webspace they can give you.
I'm usually pretty open with hosting for projects/friends.
Title: Re: RELEASE: Maja (VP Editor)
Post by: nubbles526 on June 27, 2007, 06:32:07 am
User-friendly, looks proffesional! Great VP maker tool!
Title: Re: RELEASE: Maja (VP Editor)
Post by: WMCoolmon on June 28, 2007, 08:21:02 pm
Not really. If I had some kind of webspace that I could upload it to and track the number of downloads I would use that. Unfortunately I don't; and everything decent I know of, you have to pay for. ('decent' = free, fast, no ads, no registration or similar BS)



I'm sure someone around here has some webspace they can give you.
I'm usually pretty open with hosting for projects/friends.

Cool, check your PMs. ;)
Title: Re: RELEASE: Maja (VP Editor)
Post by: MP-Ryan on July 17, 2007, 02:57:26 pm
I'm resurrecting this from the dead because I think it should be stickied.  After using Maja for about 10 minutes, I've uninstalled VPView entirely.  Great program, WMC
Title: Re: RELEASE: Maja (VP Editor)
Post by: Mustang19 on July 17, 2007, 03:38:42 pm
Nice one, WP! Mind if I put this on Hades Combine, or are you getting to that?
Title: Re: RELEASE: Maja (VP Editor)
Post by: Kazan on February 12, 2008, 02:08:41 pm
so.. when can we expect a proper installer and something other than a .jar?
Title: Re: RELEASE: Maja (VP Editor)
Post by: Wanderer on February 12, 2008, 03:12:33 pm
hmm? jar is a proper executable
Title: Re: RELEASE: Maja (VP Editor)
Post by: Kazan on February 12, 2008, 04:21:29 pm
a JAR is a java container that holds compiled pcode classes.. it is not an executable - it still requires and external exec (the java interpreter) to run

in my experience windows has problems understanding this
Title: Re: RELEASE: Maja (VP Editor)
Post by: blowfish on February 12, 2008, 06:22:19 pm
Yes, in Windows I think you have to launch a JAR with something like Command Prompt (or whatever they call it now) and also an install of JAVA.  On a mac you don't get this problem because OSX can launch JAR files as applications.

Oh, and I can't open TGA files with Maja on a mac.  I get no error message, but the picture doesn't display.
Title: Re: RELEASE: Maja (VP Editor)
Post by: jr2 on February 14, 2008, 08:13:45 am
On Windows:

open command prompt:

start > run > type
cmd
and press enter (or command if you have windows 9x or ME)

then type this in (assuming you have Java installed, of course) and press enter

java -jar <path to .jar file eg "c:\documents and settings\jr2\desktop\blah.jar" -- yes, quotes included>

type
exit
and enter to exit the command prompt after it is done.
Title: Re: RELEASE: Maja (VP Editor)
Post by: Kazan on February 14, 2008, 02:29:06 pm
i know how to do that.. my point was either make an installer that does the setup shortcut for us or compile it to machine language like decent languages do
Title: Re: RELEASE: Maja (VP Editor)
Post by: blowfish on February 14, 2008, 03:48:36 pm
i know how to do that.. my point was either make an installer that does the setup shortcut for us or compile it to machine language like decent languages do

I haven't seen anything that compiles Java into machine language.  Then again I haven't looked very hard.  But its just not generally done.
Title: Re: RELEASE: Maja (VP Editor)
Post by: karajorma on February 14, 2008, 04:09:54 pm
There are ways but frankly I'd rather he just stop *****ing about Java like anyone other than him gives a ****.
Title: Re: RELEASE: Maja (VP Editor)
Post by: Kazan on February 14, 2008, 05:54:17 pm
:P then he can download NSIS and make a NSIS installer in five minutes :D
Title: Re: RELEASE: Maja (VP Editor)
Post by: blowfish on February 14, 2008, 07:43:38 pm
:P then he can download NSIS and make a NSIS installer in five minutes :D

You do that then.
Title: Re: RELEASE: Maja (VP Editor)
Post by: WMCoolmon on February 16, 2008, 10:46:16 pm
It is what it is. I know you're capable of copying the .jar wherever you want it and making a shortcut to it, which is all the installer would do at this point. I'd rather just have the .jar to keep track of than have an EXE that ties it to a specific platform that I also have to support. Everyone else seems happy with the way that it is right now.

I'd ask, when will Windows, OS X, and Linux support .jar files properly? There's no ambiguity about what they are, and all three OSes support file associations - so there's no reason why you shouldn't simply be able to download the .jar and double-click on it to run it. Although I have noticed that at least one version of IE tries to rename it to a .zip for reasons unknown.
Title: Re: RELEASE: Maja (VP Editor)
Post by: Kazan on February 16, 2008, 11:48:46 pm
when <insert standard snipe at java here>
Title: Re: RELEASE: Maja (VP Editor)
Post by: karajorma on February 18, 2008, 05:09:28 pm
Although I have noticed that at least one version of IE tries to rename it to a .zip for reasons unknown.

Well it is really just a renamed zip file so I can understand why misidentification could easily occur. That said I'm not foolish enough to assume MS are unaware of this fact.
Title: Re: RELEASE: Maja (VP Editor)
Post by: MP-Ryan on February 18, 2008, 05:53:16 pm
On Windows:

open command prompt:

start > run > type
cmd
and press enter (or command if you have windows 9x or ME)

then type this in (assuming you have Java installed, of course) and press enter

java -jar <path to .jar file eg "c:\documents and settings\jr2\desktop\blah.jar" -- yes, quotes included>

type
exit
and enter to exit the command prompt after it is done.

Or ensure you have a proper Java installation and simply double-click on the jar file.

Windows (XP and Vista) supports .jar just fine if you've actually bothered to install Java properly.
Title: Re: RELEASE: Maja (VP Editor)
Post by: Topgun on March 24, 2008, 03:19:12 pm
mirror
http://www.megaupload.com/?d=G0I19ESR
Title: Re: RELEASE: Maja (VP Editor)
Post by: achtung on March 24, 2008, 03:46:58 pm
Protip:

http://wmc.freespacemods.net/
http://www.freespacemods.net/download.php?view.67

>_>
Title: Re: RELEASE: Maja (VP Editor)
Post by: WMCoolmon on March 24, 2008, 03:55:45 pm
Yeah, you might not be able to find a new date with those last two links, but they are the newest release (http://www.hard-light.net/forums/index.php/topic,52401.0.html). :D