Jump to content

GemRB Launcher


myownlittlworld

Recommended Posts

Thanks to a couple comments (and a diff!) from Nick of Install Script fame (njw), I have released an updated Autorun, v0.0.0.7 ("A little sturdier.").

 

Notable changes:

* Doesn't crash when $PATH includes non-existent directories (thanks to njw).

* Informs user if their config file's "gemrbpath=" variable is invalid (also thanks to njw).

* Correctly loads and unloads disc images even with very strange combinations of mount, image, etc (This could result in a disc not being unmounted in certain circumstances).

* The executable file is set read-only after it is written to prevent accidental changing whenever possible.

* COPYING and TODO files now included. TODO includes known issues.

 

In an effort to be more open about the launcher's development and provide more reliable access to the launcher's files, would it be possible to include the launcher in the GemRB source tree or should I apply for a project on SF.net?

Link to comment

Sure, it is perfectly possible. I'll include it right now [done]. You just have to convince one of the project admins to give you commit access or the work will continue in patches. :)

 

I didn't include the pst image, as it looks original. There's now a homebrew replacement there instead.

Link to comment

Version 0.8.5 of the launcher GUI has been released. This release will be the last one for a bit while I completely refactor everything based on what I've learned so far for the v0.9 release.

 

v0.9 will come with unit-tests and will be driven almost entirely by the configuration file; basically a complete rewrite of the current system to be smarter, simpler, and more extensible in the future.

 

As far as the changes from v0.7 to v0.8.5 go:

* Error handling code corrected and modularized.

* More flexible when reading the config file.

* Supports launching an arbitrary number of GemRB processes at one time (real multi-threading!).

* Smarter UI file reading (adding new games no longer requires editing the python file).

* Passes GemRB the -c option to pick a config file, no more copying and overwriting!

 

If you guys would be interested in incorporating the v0.8.5 release into the GemRB tree, or at least directing users to the program's home page, that'd be great!

Link to comment

What about writing a launcher in Python? GemRB already needs it, and this would be cross-platform. It has built-in graphics/windowing binding too.

 

EDIT: Thanks to fuzzie, I now know that I should have looked before talking... Still, using tk bindings of python would permit windows and OSX users to use it. Anyway, don't bother to learn Tkinter just for me :(

Link to comment

Both the GTK and PyGTK libraries are available for Windows and OSX. If the libraries are installed, the launcher runs flawlessly, as it does under Linux:

 

Windows All in One Installer (exe)

 

 

OSX GTK Libraries (dmg)

 

PyGTK FAQ - Mac Help

PyGTK Mac DMG

 

Would someone with a Mac mind actually working out what's necessary to install the PyGTK libs on a Mac? Will just installing the DMG work?

 

 

That's a good point though, I'll include directions to these files in the next release of the launcher.

Link to comment
Would someone with a Mac mind actually working out what's necessary to install the PyGTK libs on a Mac? Will just installing the DMG work?

 

With a bit of struggle putting the DMG contents in the right places and making your app use the bundled Python environment and etc, it is enough to make PyGTK apps run, although the native GTK+ is pretty buggy - I would imagine it works well enough for the launcher, I'll try it sometime.

 

Asking people to install hundreds of MB of packages including a whole new Python just for the GemRB launcher is maybe a bit much, though! (Edit: Mind, I don't have a better alternative.)

Link to comment

Wow, I really assumed that PyGTK on Mac was a simpler process, especially considering the priority that platform gives toward straightforward end user experience. MacPorts seems to have a working port of Python, Gtk, and PyGTK for the Mac, with only the Mac X11 User Package and XCode SDK as prerequisites. I say "only," as those prerequisites are still a few GB of data...

 

I know for a fact that the code's internals are *nix-bound, at least as far as the CD auto-mounting functionality is concerned (though the CD mounting functionality isn't required if you're using Nick's Installer scripts) because I haven't written anything for a Windows-based CD mounting system (does one exist?). At this point, the launcher wouldn't even produce a mounting script executable by a Windows system (that's another issue I'll work on for the 0.9 release - that should be easy to fix). Also, the game terminating code is also Linux/Unix bound if run in Python < v2.6... That too will be resolved in 0.9.

 

I think it might actually be possible to use setup_tools and easy_install to simply:

easy_install pygtk

 

After installing the GTK libraries.

Link to comment

Believe it or not, I'm actually working on updating the launcher. Currently the launcher sets itself up properly and reads ``gemrb.cfg`` files. There's no gui yet, but it will be relatively simple to write one for any UI library (at this point it looks like writing a new UI involves implementing four functions). The gui I'm currently developing will also be much less pretty than the last (or at least much less pretty than the other one could have been), but I believe you'll be able to see the same quality result as you saw in v0.8.5 of the launcher.

 

I'm not foolish enough to give a completion date, but I'm hoping for sometime before GemRB v2.0 :)

Link to comment

It's taken long enough, but I finally have a mostly complete rewrite of the launcher!

 

Major Changes:

  • Root Mounting Method (and other similarly stupid design decisions) removed.
     
  • Dynamic list of GemRB Installations and Running Games available.
     
  • Much cleaner internal structure allowing easy extension in several ways:
    • Additional guis (beyond the standard GTK gui) can be added by implementing only 4 functions (last time I counted).
       
       
    • Additional disk image mounting methods (beyond the FuseISO method already included) can also be added by implementing only 2 functions.

Both of those changes require only very simple code changes and are driven by config file options.

 

Requirement Changes:

  • Searches ``~/.gemrb/installations.ini`` for list of GemRB installations. This file is created by NJW's latest installer.

If you list your installations in that file, the launcher will automatically locate your installations and present you with configurations you could use to play the game.

 

TODOs (before 1.0):

  1. Increase unit test and doc-test coverage.
  2. Write documentation.
  3. Fix the strange "lingering process" issue - GemRB processes that are quit manually sometimes hang around as stopped but "defunct" processes, which didn't happen with the old launcher.

Please test it and leave any feedback you might have!

Link to comment

Well, it's finally finished. I still have to complete the documentation and add a few unit tests, but the launcher is feature complete. Just short of two years of on-and-off effort, and I think it's pretty decent.

 

Things to remember:

  • Configure the ``gemrb_launcher.ini`` file as necessary before starting. Everything should be self-explanatory and need only a little configuration. You'll need to set ``[GemRB].executable`` to the GemRB executable.
     
  • The launcher searches ``~/.gemrb/installations.ini`` to find installs. Just put one installation directory per line and it'll find the appropriate config files. For example, if you've installed BG1 to ``~/bg1`` and BG2 to ``~/bg2``, your installations.ini file should look like:
     
    ~/bg1
    ~/bg2


     

  • Try running it in a console if things don't work as they should.

 

Changes since last time:

  • Users are notified about errors.
     
  • The GUI interface was simplified, making things easier for writers of other UI libraries.
     
  • The Refresh button reloads the entire launcher. Just change the config files and refresh the launcher, no restart necessary.
     
  • The GTK Gui is less ugly. I finally opened it outside of StumpWM and noticed a few changes that needed to be made.
     
  • The "lingering process" issue has been fixed.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...