Setup

Downloading Macaulay 2 for Cygwin with setup.exe

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.

It may happen, when you try to run setup.exe, that you get a warning that the file is from an untrusted source, and you are asked whether you really want to execute it. If you got it from http://cygwin.com/, then you can trust it and execute it.

Starting in 2008, it is important to start setup.exe in such a way that it does not check for a signature attached to our setup.ini file, since we don't know how to generate such signatures. (If anyone knows how we should generate signatures, inform us!) You must start it with -X on the command line. One way to do that is to open up a "command prompt" window, change to the directory containing setup.exe, and then type setup -X to run the program. (Please observe that the X is upper case; it will not work with x.) Another way is to create a shortcut on your desktop to the program, to edit the command line of the shortcut (or its target, under Vista) to add -X to it, and then to run the shortcut.

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 beginning 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, along with the other packages it needs.

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.