New MacVice X11/Gtk+ Bundles

Today I finished a larger patch for the Mac port of VICE that overhauls the bundling process.

The major changes are:

  • Support of both X11 and Gtk+ Builds
  • A single application bundle contains all emulators.
  • The application bundle is “smart”
  • Command Line Usage is greatly improved

X11 and Gtk+ UI

The first notable difference in the new build is the support of both X11 and Gtk+ versions. Both are now built with the distributed source scripts and will be available as official binaries in the next release. The X11 release is smaller (8MB vs. 28MB gtk) and suitable for users that only need the emulation window and can live with the spartanic UI. The gtk+ is larger as all required libs are embedded and provides a much nicer UI with pull-down menus. This version will be more suitable for beginners.

Building GTK+ is required if you want to build your own version of VICE. This build process is quite complex. To simplify this, the VICE distribution will contain helper scripts that can build all the required external libraries out of the source archives. Simply grab the source tarballs and run the script. A few minutes/hours later and you have all the required libs (including cross-arch versions if you build a universal-binary version of VICE). Builder scripts are also available for the other external libs that are required for joystick (HID Utils) and networking support.

From now on the VICE distribution contains only a singe application bundle called “Oh, where are the nice emulator application bundles!” you might say. They were removed because they are too large, but the is “smart” and can emulate the old bundles.

Hows that? In the old release 1.20 each emualator had its own bundle. Thats nice for launching but it took quite a lot space in the distribution bundle, because each emulator needed some common ROMs and other stuff like docs in the bundle. The situation got really worse for the Gtk+ version as for this one the bundle needs to contain all Gtk+ libs. Cloning this bundle for each emulator led to a 250 MB distribution with mostly duplicated lib data…

The new now contains all emulators and opens a small dialog to select the emulator you want to launch if you click on its icon. Thats a cumbersome process if you want to quickly launch the same emulator again and again. Thats the reason why I made the bundle “smart”. This means the application bundle checks its current name and if its named after an emulator (e.g. “x64”) then it will launch this emulator directly without showing the menu. Nice, eh? So to emulate the old emulator bundles simply copy the small distribution bundle with to your hard disk and the clone copy for each emulator you want to access directly. Make sure each copy has the exact emulator name (e.g., otherwise it won’t work!

Comand Line Usage Improved

Power users of VICE (including myself) often launch an emulator from the command line and pass options there. In the old 1.20 release it was possible to directly launch the VICE emulator binaries from inside the application bundles. Thats not very convenient as the launch path inside the bundle is usually not in your shell’s PATH. Furthermore the console output of VICE was always written to a fresh xterm and not to your current shell’s console. Both issues are now fixed. The latter one is already described in my last post. So lets focus on the first one:

The new bundles contain a tools directory. There all command line applications are found. In 1.20 only cartconv and c1541 were placed there. Now a new script and links with the names of all emulators are placed there, too. You can now simply add the tools directory to your shell’s PATH variable and you have all emulators ready for launch! If you call an emulator (e.g. x64) this way then the script is executed with $0 set to the emulator. Now the magic takes place: the script searches the bundle in the parent directory of the tools directory. If its found then the corresponding emulator binary inside the bundle is launched with the given command line options. In between the is used to correctly set up X11 from any terminal. You can still move the distribution directory around and everything works well. You only have to make sure that the bundle is placed in the same directory where the tools directory is found.

Leave a Reply