Xm installation

This page describes what's going on during the installation process and why it differs from other mozilla components. Until Version 1.0, Xm will only be available for Windows, but the penguin version is on its way.

Automatic installation

When you click on the 'install Xm' link on the download page, a JavaScript event triggers a special installation function that is only available with Mozilla browsers and its relatives, like Firebird. What happens then is:

  1. An installation file xm.xpi is downloaded to a temporary directory provided by Mozilla
  2. In the xm.xpi file, there is a install.js script file that gets executed
  3. Now things get a little bit different from usual Mozilla component installations. Instead of installing a JAR file in the Mozilla/chrome/ directory and registering its contents, install.js tells Mozilla to create a xm/ subdirectory in the Mozilla/chrome/ directory and installs all the files there. This is because Xm is intended as a developers tool. You will need to access the files in the Mozilla/chrome/xm/ subdirectories to edit the sample machines or to create new ones. Also, the XPCOM component that reads the xyz.xml machine description files cannot deal with files residing inside a JAR archive. This may change in the future, but for now, this is the most practical way.
  4. xm.dll is copied into the Mozilla component directory. If you are anxious about security: this is the only critical component in the entire package (all the other files are simple XML text files, JavaScript files and image files). Someone could hack it or add a virus, so if you don't get it from the original source www.arxio.de/xm/ or a trusted mirror site, you might as well not install it. Of course, this applies to all other binary Mozilla extensions as well - as for Mozilla binaries itself. For future releases, it is planned to add an integrity check to this file.
  5. Setup is complete now. After restarting your browser, type chrome://xm/content/ in the location bar to open the Xm samples.

Manual installation

You must download one of the the xm.zip files on the download page. This file is in fact the same file than the xm.xpi file used for automatic installation. But if you like to be careful about things you install, you might as well take a look first ;-)

Step-by-step installation:

  1. Extract the contents in xm.zip
  2. Extract the files in the xm.jar file, preserving the subdirectories
  3. Create a xm/ subdirectory in the Mozilla/chrome/ folder
  4. Copy the contents, locale, skin directories to the new chrome/xm/ subdirectory
  5. Copy xm.dll to the Mozilla/components/ folder
  6. Open the chrome/installed-chrome.txt file and add the following lines:
    content,install,url,resource:/chrome/xm/content/
    skin,install,url,resource:/chrome/xm/skin/
    locale,install,url,resource:/chrome/xm/locale/en-US/
  7. After restarting Mozilla, setup is complete. You did the same thing that install.js could have done for you, but, well...

Running Xm in its own window

When you create your own simulation engines, e.g. for teaching, it can be nice to run them in an own window instead of the somewhat distracting browser window.

Doing this for the Xm samples is easy:

  1. Make a copy of a Mozilla (or, like in this example, a Firebird) shortcut shortcut on the desktop or the quick-launch bar and rename it (e.g. 'Xm')
  2. Right-click the icon and change the property settings in 'target'.
    Original settings:
    "C:\Program files\MozillaFirebird\MozillaFirebird.exe"
    (where the shown path stands for the path to the Mozilla binaries on your system).
    Append the -chrome option and chrome location of Xm:
    "C:\Program files\MozillaFirebird\MozillaFirebird.exe" -console -chrome chrome://xm/content/
  3. The -console switch is not neccesary, it opens an additional Mozilla console where you can see what's going on behind the scenes. If you want to use the [Dump] buttons in the samples, you must open the console.
  4. Click on the shortcut and discover one of the greatest features of Mozilla: you can customize it!

If you wonder about all the 'chrome' and 'xpi' stuff, I recommand a look at books.mozdev.org. Note that this is not necessary if you plan using Xm as a tool for developing machine simulations. Just install it - using the automatic installation for convenience - and investigate the samples in order to create your own XML and XUL description files for virtual machines.