MetaUML: Installation HOWTOs
Installing MetaUML on Windows XP with MikTeX
Prerequisits: You need to have Windows XP installed. These instructions might work with other versions of Windows (and I actually expect them to work), but I haven't tested it. You also need the MikTeX distribution, which you can get from here. If you haven't installed it yet: You should be fine with the basic MixTeX, since it is capable of downloading missing packages automatically. Note: If you install MikTeX for the first time, make sure to remember in which directory you are installing it, since you need that information below.
- Find the texmf directory MikTeX is installed in. On my system, this is C:\texmf. Don't mix this up with the localtexmf directory (which is located at C:\localtexmf on my system).
- Find the metapost directory within the texmf directory. On my system, this is C:\texmf\metapost.
- Create a directory MetaUML within the metapost directory.
- Download the latest MetaUML library and unpack it.
- Copy all files within the thrunk directory to the MetaUML directory you created in step 3.
- Start the "MikTeX options" tool (on my system, it can be accessed via Start/MikTeX).
- Refresh the file name database by clicking on "Refresh now".
- Update all format files by clicking on "Update now".
- You're done.
Compiling MetaUML files on windows
This is pretty simple: Just enter "mptopdf {filename}" on the console, and you'll get a pdf file named {filename}.pdf. If you need an eps file, it gets a little bit more complicated: I have installed ghostscript and GSView from here, but for some reason, GSView doesn't like the ps files created by MetaUML (I'm even not sure if MetaUML is the problem :-) ). Fortunately, there is an easy solution for this: Download the xpdf tools from here, and use the pdftops tool with option -eps to convert the dfp file created above to an eps file with a perfectly set bounding box, i.e., type "pdftops -eps {filename}.pdf {filename}.eps" on the console. Note that the pdf2ps tool delivered with Ghostscript does not create a proper bounding box!
Compiling MetaUML files with Eclipse and Ant
Since I usually develop within Eclipse, I have created an easy Ant build file, which I provide for your convenience. You can download it here. Just copy it to the directory in the Eclipse workspace where you store your mp files. Afterwards, drag and drop it on the Ant view. The file contains some instructions on how to use it.
Feedback
If you have any comments, problems or whatever with the instructions presented above, please use the MetaUML forum to discuss them! Any feedback is greatly appreciated...