Magic-7.5 for Windows XP (and maybe others?)


Magic-Cygwin compile and install:

Requirements: Windows, plenty of disk space. Nothing unusual. High bandwidth internet connection is definitely a plus.

Step 1: Install Cygwin and the Tcl and X11-based Tk Cygwin binary distribution

It is absolutely necessary that at least a base version of Cygwin be installed, as well as the precompiled distribution of X11-based Tcl/Tk, according to the instructions in the title link.

Step 2, Option 1: Magic Quick Install

This is the easiest way to get Magic running, but may be significantly out of date from the latest version, depending on when I last compiled Magic on a Windows machine.
  1. Download (use your browser and download to the root directory of the Cygwin distribution, which by default is C:\cygwin:
    File Revision Size Date
    magic-7.5.107v.tgz 7.5.107 (vista) (2.5MB) January 22, 2008
    magic-7.5.78.tgz 7.5.78 (2.5MB) April 7, 2007
    magic7_5_39.tgz 7.5.39 (2.5MB) September 19, 2006
    magic-7.4.30.tgz 7.4.30 (2.5MB) November 13, 2006
    magic_win.tgz 7.5.39 (2.4MB) October 18, 2005
  2. Bring up a Cygwin terminal on the Windows desktop.
  3. Type cd /
  4. This is where the file magic7_5_39.tgz should be.
  5. Type tar xfz magic7_5_39.tgz
  6. Run by typing magic. This should be all you need to do! In case the executable is not found, it may be necessary to use the full path to the executable, which is /usr/local/bin/magic.
  7. Note that as of this writing (April, 2007) "magic -d OGL" works with the standard XWin server (but too slow to be of practical use) but does not work with the OpenGL XWin_GL server (which is not the one placed on the desktop by default). Run "glxgears" to check if OpenGL itself is working.
  8. As of this comment (January 2008), all the comments above apply with equal validity to Windows Vista.

Step 2, Option 2: Magic Compile and Install from Source

Since I don't update the Cygwin distribution very often, it can get rather outdated compared to the latest source distribution of magic. However, if you follow the Cygwin and Tcl/Tk for X11 installation instructions, you should have everything you need to compile magic from source.
  1. I suggest creating a directory /usr/local/src with the command "mkdir /usr/local/src", then doing "cd /usr/local/src" before proceeding with the next item. However, the magic source may be downloaded into the default top directory without any problem.
  2. Use your web browser to download the latest magic source distribution. If default values are chosen during install, then the Cygwin top-level directory is rooted at "C:\cygwin", and the directory above is "C:\cygwin\usr\local\src" as viewed in the Windows environment.
  3. Download the latest .tgz file from the magic web page.
  4. Once the .tgz file is in the proper destination, you should be able to see the file from the Cygwin terminal prompt by typing the command "ls".
  5. At the Cygwin terminal prompt, type "tar xfz magic7.5.47.tgz" (of course, substitute the filename for the actual version and revision number of the magic source).
  6. Type "cd magic-7.5.47" (likewise, substitute the correct name).
  7. Type "./configure".
  8. Follow up with "make". Hopefully this runs without errors (although there are a handful of warnings, these may be ignored).
  9. Final step is "make install".
  10. You can test by typing "magic" at the Cygwin terminal prompt.
  11. Note that there is an executable of magic called "/usr/local/bin/magicexec.exe", and may be launched from a batch file, and thereby launched directly from the Windows desktop. This is left as an exercise unless someone wants to send me a working batch file.

Last updated: January 23, 2008 at 4:05pm