A few rewrites, but got through the day

Wasn’t as easy as I thought yesterday. I guess I underestimated the simplicity of threads on SWT. It never really turned out as well as I’d hoped, so I ended up with a single thread doing all the tasks, rather than a set of workers running one after another parallel to the GUI thread. That means you won’t be able to cancel in the middle of launching, but hell, why would you?

At least one good thing came out of today’s programming adventure. Apprently Java’s process class can properly wait for a process to finish. I’m actually not sure whether its the p.waitFor(), or me listening to the StdOut. Either way it works, and that simplifies the process for you guys. As you’d expect from single threaded waiting, Minecrafter will basically be frozen once it launches Minecraft, but as long as Minecraft quits normally, Minecrafter will be kicked back into gear and do it’s cleanup.

Thats basically it for the major functionalities. Now I’ll need to go through and test it with a various set of texture packs, and a few mods here and there. I’m pretty sure its stable so far (much more stable than the C# version surprisingly), so the next few days will be fixing up the UI and adding in all the non-critical bits I’ve missed. i.e. spit shine and polish, filtering on the Mod Package Editor, quick mod launching, etc etc. Had a quick test on Ubuntu 10.10, and the UI seems to be in tact without any changes required :D. lets hope my code holds well once I finish everything.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: