Inhaltsverzeichnis

MinGW - Minimalist GNU for Windows

A UNIX-like working environments for M$-Windows.

pro:

  • Unix like directory tree
  • Full GCC development environment
  • Native Windows™ executable linked to common Windows™ libraries (nothing like cygwin.dll).

cons:

  • Requires more Linux/Unix skills (probably too much for those who just want to profit from the power of some few Unix commands.
  • No (out of the box) explorer integration
  • Some tools need to be selected manually (selecting full package may be too much for those who just want to profit from the power of some few Unix commands).

Installation

  1. Read "Getting Started" advise.
  2. Run the installer and follow the instructions.
    Note: You may accept the defaults, however be sure to select MSYS Basic System in the component selection dialog in order to create a user's home directory.
  3. Install mintty for MSYS 1) 2)
    mingw-get install mintty
    C:\MinGW\msys\1.0\msys.bat --mintty
  4. Install some very basic utilities from MinGW shell.
    postinstall.sh
    #!/bin/sh
     
    # Get latest package list from server
    #mingw-get update
     
    # Upgrade already installed packages
    #mingw-get upgrade
     
    # Install important software packages from MinGW archives
    #mingw-get install msys-wget
    #mingw-get install msys-zip
    #mingw-get install msys-unzip
    #mingw-get install msys-man
    #mingw-get install msys-perl
    #mingw-get install msys-vim
    #mingw-get install mintty
     
    # Install optional extra software tools
    OPT=`pwd -W | sed -e 's/\([A-Z]:\).*/\1\\opt/'`
  5. For your convenience setup the Windows Explorer integration.

Tutorials

More UNIX tools

Windows Explorer Integration

In order to get an Open MinGW Bash here… item in the windows explorer's context menu add one the below to your registry 1) 2):

MinGW_Open_Bash_here.reg
Windows Registry Editor Version 5.00
 
[HKEY_CLASSES_ROOT\Directory\shell\MinGW_Here]
@="&MinGW: Open Bash here..."
[HKEY_CLASSES_ROOT\Directory\shell\MinGW_Here\command]
@="C:\\MinGW\\msys\\1.0\\bin\\bash.exe --login -c \"cd '%1' ; exec /bin/bash -rcfile ~/.bashrc\""
 
[HKEY_CLASSES_ROOT\Drive\shell\MinGW_Here]
@="&MinGW: Open Bash here..."
[HKEY_CLASSES_ROOT\Drive\shell\MinGW_Here\command]
@="C:\\MinGW\\msys\\1.0\\bin\\bash.exe --login -c \"cd '%1' ; exec /bin/bash -rcfile ~/.bashrc\""

If you like to cut&paste from/to windows applications you may prefer MinTTY as console replacement:

MinGW_Open_Bash_here.reg
Windows Registry Editor Version 5.00
 
[HKEY_CLASSES_ROOT\Directory\shell\MinGW_Here]
@="&MinGW: Open Bash here..."
[HKEY_CLASSES_ROOT\Directory\shell\MinGW_Here\command]
@="C:\\MinGW\\msys\\1.0\\bin\\mintty.exe /bin/bash --login -c \"cd '%1' ; exec /bin/bash -rcfile ~/.bashrc\""
 
[HKEY_CLASSES_ROOT\Drive\shell\MinGW_Here]
@="&MinGW: Open Bash here..."
[HKEY_CLASSES_ROOT\Drive\shell\MinGW_Here\command]
@="C:\\MinGW\\msys\\1.0\\bin\\mintty.exe /bin/bash --login -c \"cd '%1' ; exec /bin/bash -rcfile ~/.bashrc\""

References:

Troubleshooting