Installing MinGW & MSYS on Windows

From Genome Analysis Wiki
Jump to: navigation, search

Installing MinGW/MSYS

Further help can be found at:

Install MinGW before MSYS.

Installing MinGW

  1. Download the MinGW Installer:
  2. Select Save File when prompted.
  3. Open the downloaded exe.
  4. Click Yes when Windows asks if you want to allow it.
  5. Click Next > on the Welcome screen.
  6. Select Download and Install and click Next >
  7. Read the License Agreement and click I agree
  8. Select Current to install the current MinGW package and click Next >
  9. Check the MinGW base tools and g++ compiler click Next
  10. Destination Folder should be C:\MinGW
  11. Click Next >
  12. Leave the default folder and click Install
  13. When Installation is complete, click Next >
  14. Click Finish

Installing MSYS

  1. Download MSYS
  2. Run the downloaded exe.
  3. Click Yes when Windows asks if you want to allow it.
  4. Click Yes you want to install in the Setup pop-up.
  5. Click Next in the Welcome Window.
  6. Read the License Agreement and click Yes
  7. Read the Information and click Next >
  8. The Default Destination of C:\msys\1.0 is fine, so click Next >
  9. The default folder of MinGW is fine, so click Next >
  10. Click Install
  11. A cmd shell will pop-up asking if you want to continue with the post install, enter y enter
  12. Answer y you do have MinGW Installed.
  13. Enter c:/mingw as the path where MinGW is installed.
  14. It should confirm that you have make.exe installed, press any key to continue.
  15. Click Finish you are done the installation. (It is up to you if you want to open the documents.)


Optional Version Control

There are many types of version control that you can use to track changes to files. Git is one of those types.

Version control is not required, but it can be useful.

Git for MSYS

Only necessary if you want to use git version control on windows.

Installing Git for MSYS

  1. Download msysgit from http://code.google.com/p/msysgit/ by clicking the exe under Featured download
  2. Click Save File in the pop-up.
  3. Run the downloaded executable.
  4. Click Run in the Open File - Security Warning pop-up.
  5. Click Yes in the allow to make changes pop-up.
  6. Click Next > in the Welcome window.
  7. Read the License and click Next >
  8. Accept the Default Install Location by clicking Next >
  9. Accept the default Start Menu folder by clicking Next >
  10. Click Next > on the Additional Tasks screen - I left all items checked.
  11. I left the PATH environment to be set to Use Git Bash only and click Next >
  12. Modified the CR/LF beahavior to be Use Unix style line endings and click Next >
  13. Click Finish on the completion screen

Using Git for MSYS

Git Bash and Git Gui should now be installed.

  1. To use msysgit, run, Git Bash this will open an msys terminal that allows the use of git.
  2. Right click on the Git window title bar and select Properties
  3. In the Options tab, check QuickEdit Mode - this will allow copy and paste. (Highlight to copy, Insert button to paste)
  4. I made a software subfolder: mkdir software; cd software
  5. Type:
git clone wonderland.sph.umich.edu:/home/pipeline
  1. I have not yet really integrated git and my msys/mingw - so I use the git bash window for git, and a general msys window for compiling.


Additional Optional Library Installations

The following installations are optional and are only required if the software you are compiling requires them.


Install MSYS DTK

This is not necessary, but may include openssl and other stuff that some users need.

  1. Install MSYS DTK: http://sourceforge.net/projects/mingw/files/MSYS%20Supplementary%20Tools/msysDTK-1.0.1/msysDTK-1.0.1.exe/download
    1. Click Save File
    2. Run the downloaded exe.
    3. Click Yes allow the program to make changes.
    4. Click Yes to install.
    5. Click Next > on the Welcome screen.
    6. Read the License Agreement and click Yes
    7. Confirm the Destination Directory is set to C:\msys\1.0 and click Next >
    8. Click Next on the Select Components screen.
    9. Click Install
    10. To continue the Setup, click Next >
    11. Click Finish


zlib

zlib is a compression library used for compressing/decompressing files from code. You only need to download this if your software uses this library.

I forget exactly what I did here – I downloaded zlib from zlib.org.... I probably did

./configure --prefix=/mingw
make 
make install

(I'm not sure this actually built correctly...TBD...)


curses

curses is a library used by samtools, so may be required for compiling samtools and programs using samtools.

I downloaded and installed curses from: http://sourceforge.net/projects/mingw/files/User%20Contributed/pdcurses/Current%20Release_%20pdcurses-2.6.0/pdcurses-2.6.0-2003.07.21-1.exe/download

Sorry, I had step-by-step instructions but I lost them.

You should install it either into C:\MinGW or C:\MinGW\pdcurses. You want the libraries and h files to install into /mingw/lib/ and /mingw/include/ You will probably need to do ln -s /mingw/include/libpdcurses.a /mingw/include/libcurses.a.

I'm not sure if this was done via a build, but I don't think so...if it was a build, maybe it required --prefix=/mingw


Openssl

OpenSSL is a library for Secure Sockets Layer (SSL), Transport Layer Security (TLS) protocols, and cryptography. Some tools require openSSL, if so, here are some instructions:

I downloaded an openssl installer from: http://www.slproweb.com/products/Win32OpenSSL.html I installed into /mingw/openssl/. I then linked the includes:

cd /mingw/include
ln -s ../openssl/include/openssl openssl

You may or may not need to link libraries – I haven't done this yet.