There are three versions of Hugo to choose from, all of which are available from the Hugo home page. There is a text-only console interpreter, a version for X that uses Glk, and a wxWindows-based interpreter which supports sound and graphics.
Fortunately, the console version of Hugo comes pre-compiled. On the Download page of the Hugo site, scroll down to the Linux section and look for the "binaries package for the ncurses-based (text-only) Linux port". Download that file. tar -xzf the file you downloaded, then copy the program he to a new directory. Tah-dah! All done!
The Hugo interpreter for X makes use of Andrew Plotkin's Glk, a portable I/O library. To compile this version of the interpreter, you'll need three things:
- The Unix Hugo source. On the Downloads page you'll find it near the bottom. Note that it is not in the Linux section.
- The Glk Hugo source. Under the Linux section of the downloads page is the "source code to compile an X windows version".
- The Glk library. You can get it from the Glk home page. Look for the XGlk library under the "Liberation" heading.
Download and unpack the Unix Hugo source. This will create a base source directory. At the time of this writing that directory is hugov2.5.03; if it is different for you, in what follows just replace hugov2.5.03 with whatever your directory is.
Copy the Glk Hugo source to the hugov2.5.03/heglk directory. This source code archive is in zip format, so unzip it with the unzip command. Also copy the XGlk archive you downloaded to the hugov2.5.03 directory and unpack it with the tar -xzf command. This will create an xglk directory.
Now you're ready to start compiling the different pieces. Go to the hugov2.5.03/xglk directory and type make. This should compile the XGlk library; if it doesn't, you'll have to fiddle with the Makefile.
Then go to the hugov2.5.03/heglk directory and type make. There's a reasonable chance that you'll get errors. First, if you get undefined reference to `png_...' errors, then you do not have a PNG library. You can either install such a library or you can go back to the hugov2.5.03/xglk directory, open the Makefile in a text editor, and uncomment the line which reads
# PNGFLAG = -DNO_PNG_AVAILABLE
Note that you'll need to delete both the # and the space -- PNGFLAG must be all the way to the left. Once you've done that, do a make clean to get rid of the old compiled library and then a make to re-compile the library.
Second, if you get undefined reference to `jpeg_...' errors, then you do not have a JPEG library. Either install one or go back to the hugov2.5.03/xglk directory, open the Makefile in a text editor, and uncomment the line which reads
# JPEGFLAG = -DNO_JPEG_AVAILABLE
Again note that you'll need to delete the # and the space. Once that's done, do a make clean followed by a make.
If you have to make changes to the XGlk library, once you're done, go back to the hugov2.5.03/heglk directory and run make. The end result is a program called heglk. Copy that program to wherever you want it to live and then do the usual cleaning up after yourself.wxWindows is a library for making cross-platform applications for Windows, MacOS, and Unix. It has many benefits for developers. However, you are unlikely to have it installed on your system, so at the least you'll need to get the wxWindows libraries. The required items to get the wxWindows Hugo interpreter up and running are:
- The Hugo wxWindows binary. You can get it from the Hugo download page.
- libwx_gtk-2.2. This is the wxWindows library for GTK. You can get this library package from the wxGTK home page.
- libgtk-1.2. The library for the GIMP toolkit. With any luck, you'll have it installed already; if not, get it from the GTK page.
- libgdk-1.2. Again, hopefully you already have this installed.
- libmikmod-3.1.9. According to Kent Tessman, earlier versions of the MikMod library were buggy. You can get the latest version from the MikMod home page.
You'll need root access for installing the libraries, as well as familiarity with installing libraries, either from RPMs or from tar-gzip files. At this point I'm going to wave my hands furiously and recommend that you not bother with the wxWindows interpreter if you'd rather not deal with installing all of these libraries. However, once you've installed all of these libraries, the Hugo wxWindows interpreter should run just fine.