Macaulay 2 for Microsoft Windows has been compiled under Cygwin, a system that provides Microsoft Windows with a high degree of compatibility with the GNU operating system (upon which GNU/Linux is based), which you will need in order to run Macaulay 2. Visit cygwin.com and install it, if you haven't done so already. Administrator privileges are not required, but up to 1GB of free disk space will be required.
Installation of Cygwin is done with a program called setup.exe. You may use it to install Macaulay 2 by telling it the location of our cygwin repository. It will download the needed file and install any prerequisite packages that you haven't yet installed. You may look in the repository to see what versions of Macaulay 2 are available.
Here is the way to tell Cygwin's setup.exe program the location of the Macaulay 2 repository. (You may tell it the first time you use it, or any subsequent time.) After it downloads the list of mirror sites from cygwin.com, it displays a dialogue box entitled Choose A Download Site. Add our site to the list of available sites by entering http://www.math.uiuc.edu/Macaulay2/Repositories/cygwin/ in the box labelled User URL and pressing the Add button. Once our site is on the list (with only the domain name displayed, sigh) highlight a cygwin mirror site (if one is not already highlighted) by clicking on it, and then highlight our site by clicking on it with the left button while holding down the control key, so that now you have two sites highlighted, ours and a cygwin mirror site. If you highlight both our site and your favorite mirror for the main repository, setup.exe will always be prepared to update software from both repositories. Warning: if you highlight just our site, then packages upon which Macaulay 2 depends may not be installed for you by the cygwin setup program, and our program will not run. (The next time you run the cygwin setup program, simply leave these two mirror sites highlighted, and all will be well.)
Now press the Next button and examine the Select Packages dialogue box. The Macaulay2 package will appear in the Math category, at the end of the list, perhaps because its name is capitalized. Press the spinning arrow symbol to select the appropriate action: Install. After you press the Next button Macaulay 2 will be automatically installed.
The best way to run Macaulay 2 is in emacs, and the best way to run emacs is under X11. So use cygwin's setup program to install emacs-X11. Then, in a cygwin shell, type "startx&" to start X Windows. If an Xterm window pops up, type "emacs&" in it to start emacs running (in a new window of its own). If an Xterm window doesn't pop up, then type "DISPLAY=:0 xterm&" to start one, or type "DISPLAY=:0 emacs&" to start emacs running directly. (Warning: the next time you run the cygwin setup program, it may try to replace emacs by an older version, for some mysterious reason. Watch out for that, and prevent it, if you prefer the recent version.)
Users new to emacs should spend some time becoming accustomed to it. A good place to start learning how to use emacs is with the Emacs Tutorial, which can be accessed after starting emacs.
Note: If you previously installed an older version of Macaulay 2 "manually" by unzipping a tar file, then it is important to move its files out of the way, unless you installed them under "/" or "/usr", where the new files will simply replace them. (In the future, the "setup" program will take care of deleting files from older versions.) Alternatively, if you don't want to (or you can't) move them out of the way, start the new M2 with the command "/usr/bin/M2", and after you get the first input prompt ("i1 = ") evaluate the expression "setup()". That action will modify your various init files so that the new M2 and its files will be found the next time you start a new cygwin shell, within that shell and its descendants.
Installing Macaulay 2 the way described above will set all paths appropriately and make the Macaulay 2 emacs files visible to emacs, so users will not have to run the "setup()" function in Macaulay 2. However, if you at least run the "setupEmacs()" function in Macaulay 2, then code will be added to your emacs init file that arranges for the "f12" function key to be bound to the emacs "M2" function, which starts Macaulay 2 running in an interactive emacs buffer. One way to run the new code in your emacs init file is to restart emacs, after which the "f12" key in emacs should work. If you don't run "setupEmacs()" in Macaulay 2, you can always start Macaulay 2 in emacs with the keystrokes "M-x M2" in emacs.
Here are some solutions for some common problems that occur when running Cygwin.
Here are some current problems with Macaulay 2 running under Cygwin.
Let us know if there are any (further) problems!