Friday, March 20, 2009

MinGW 3.1.0-1: The last real MinGW release

Once upon a time, MinGW (a free *NIX-like developing environment for Windows that allows one to make native Windows binaries using a Linux-like environment) was very simple to install:
  • Download MinGW-3.1.0-1.exe and MSYS-1.0.10.exe
  • Double click on MinGW-3.1.0-1.exe, yes, "I accept", yes, yes, finished
  • Double click on MSYS-1.0.10.exe, yes, "I accept", yes, yes
  • A terminal window opens; usually "y" then enter so MSYS can see MinGW
  • Uncheck the README and other file then click on "Finished"
Once this is done, you have a blue "M" on your desktop, which gives you a full *NIX development environment.

It's really easy to use if you're familiar with *NIX development. First, use an editor and make a file named hello.c that looks like main(){printf("Hello, world!\n");, then compile the program with gcc -o hello hello.c.

OK, some notes that, in typical open-source fashion, the MinGW developers never bothered to document. To get out of the *NIX-looking "jail" and access the full filesystem, go to a directory with a name like "/c" (the C drive), "/d" (the D drive), and so on. Note that, if you insert a USB stick after starting the msys command prompt, you will need to close the window and reopen the window before you can access the drive letter for the USB stick or what not.

The "jail" where you access files is usually "c:\msys\1.0" and you start in a directory with a name like "c:\msys\1.0\home\user" where "user" is your username in Windows.

The window with the terminal prompt is able to copy and paste to and from other Windows applications, but in a very *NIX-like way: You simply highlight something with your mouse to copy it to Windows' clipboard; to paste something from the clipboard in to the terminal window, simply click on either the middle button of your 3-button mouse (this is the wheel if you're using a wheel mouse) or both the left and right buttons at the same time (if you're using a 2-button mouse), and whatever is in the Windows clipboard will be pasted as if you typed it at the terminal window.

Well, ever since MinGW 3.1.0-1 and MSYS-1.0.10, the MinGW developers decided to make the install process more complicated, requiring downloading one program which in turn downloads whatever the MinGW developers decide is the current version of MinGW today (which makes it difficult to have a stable development environment). Fortunately, one can still readily download both MinGW-3.1.0-1 and MSYS-1.0.10; the total download size for these two programs is under 20 megs. Here is a Sourceforge link to download MinGW 3.1.0-1 (The MinGW developers have gone out of their way to hide this link), and here is MSYS-1.0.10.exe. For people wanting to verify these packages, here are the MD5 sums for these programs:

da686e2c7b283385ef79d7b75afb609c MSYS-1.0.10.exe
3784d99307566bd0a5f3790abdd35ee1 MinGW-3.1.0-1.exe


Here are the SHA1 sums:

510fcfa923833073bc55302913739e25b909e66a MSYS-1.0.10.exe
9c3d53eab502230eab01548f2e73e450539971b1 MinGW-3.1.0-1.exe


And here are the Radio Gatun 32 sums:

1550c17dcf05c9035a4d73e7bf7cc4165711006a57d00818282a562fca69e806 ./MinGW-3.1.0-1.exe
dff74bc62f2df11becc0b550e952ce3e2f48de092c32cb50e1290e4a38cadc33 ./MSYS-1.0.10.exe