Overview of Installation
In order to get MinGW 64-Bit installed, I will first need to download and install MSYS2. This provides a package manager pacman
, which is a port from Arch Linux.
If you would like a more in-depth guide for the installation process, please view my full guide .
Downloading and Installing MSYS2
I recommend having a Windows Command Prompt open (or your preferred Windows Console Emulator) to assist in the installation process for there are some things you cannot do from within MSYS2 Shell.
Downloaded the 64-Bit Installer Binaries
- I chose
msys2-x86_64-20161025.exe
.
Note: From this version of MSYS2, it cannot be installed on FAT* partitions, and cannot be installed on Windows XP.- I chose
Installed using the Installation Wizard.
- Installation folder:
C:\Apps\msys64
- Left default Start Menu Shortcut.
See full guide for a step-by-step walkthrough of the installation wizard.- Installation folder:
Moved my
/home/Brian
directory to another part on the harddrive and created a junction. MSYS2 will keep all files within its installation directory, this includes the users/home/
directories. For reasons like if you ever uninstall MSYS2, part of the uninstallation process will remove everything within the installation directory thus removing your/home/
directory.
Because creating symlinks within MSYS2 is not a fully supported feature1, I chose instead to use Windows CMD Prompt.
- Within a CMD Prompt and navigate to
C:\Apps\msys64\home
. - Move
Brian
directory using Robocopy.
example:robocopy Brian C:\slash\home\Brian /MOVE
- Create a junction
mklink /J Brian C:\slash\home\Brian
See full guide for more information about moving/home/Brian/
and creating a junction.- Within a CMD Prompt and navigate to
Restrict access to
/home/Brian/
Because I did not put my home directory within my Users directory, as inC:\Users\Brian
, creating a directory as what was done in the previous step would use the default permission. Unless you or your administrator has changed the policy, by default everyone who has access to the machine will be able to view these files.- From your Command Prompt, run:
icacls Brian /inheritance:r /grant:r Administrators:(OI)(CI)(IO)F^ /grant:r Administrators:F /grant:r Brian:(OI)(CI)(IO)F /grant:r Brian:F /T
icacls
.- From your Command Prompt, run:
Added icons for MSYS2’s shortcuts. To add a bit of colour to the shortcuts, I added the provided MSYS2’s icons for each.
Shortcut
Icon
MSYS2 MinGW 32-bit: C:\Apps\msys64\msys2_shell.cmd -mingw32
MSYS2 MinGW 64-bit: C:\Apps\msys64\msys2_shell.cmd -mingw64
MSYS2 MSYS: C:\Apps\msys64\msys2_shell.cmd -msys
See full guide for more information on adding icons to shortcuts.
Added exclusion to Anti-virus/malware programs.
- Added an exclusion in Malwarebytes Premium for:
C:\Apps\msys64\usr\bin\pacman.exe
Note: I am only adding the exception to Malwarebytes for I’ve run into issues with it. Since we will be adding a way of backing up and restore our system I figure it’s better to only add exclusions if we need it.
See full guide for a walkthrough on adding an exclusion to Malwarebytes.- Added an exclusion in Malwarebytes Premium for:
Updated the core packages using
pacman
.- Open a MSYS2 Subsystem shell.
- Run
pacman -Sy
to synchronize local database with latest repositories. - Run
pacman --needed -S bash pacman pacman-mirrors msys2-runtime
to update the the core packages.
Important: If any packages are updated, you must restart MSYS2. - After completing, we had packages that were upgraded, so now we need to kill the process and relaunch the shell.
- Within your CMD Prompt, run
taskkill /IM mintty.exe /T
- Re-launch your MSYS2 Subsystem shell.
Updated the remaining packages.
- Open a MSYS2 Subsystem shell.
- Run
pacman --needed -Suu
which updates the remaining packages on my system that may need updating.
MSYS2 Installation Complete
Running pacman --needed -Suu
shows that everything is up to date.
Brian@Brian-PC MSYS ~
$ pacman --needed -Suu
:: Starting core system upgrade...
there is nothing to do
:: Starting full system upgrade...
there is nothing to do
Our installation of MSYS2 is complete. Next we will be setting up your development environment using pacman
to install the required packages.
Please [let me know][linkContact] if you ran into any issues with the installationthe installation.
What is MinGW?
MinGW stands for Minimalist GNU for Windows. MinGW-w64 is a fork from the original MinGW project. From MinGW’s own description, it should be noted that “MinGW, being minimalist, does not, and never will attempt to provide a POSIX runtime environment for POSIX application deployment on MS-Windows.”
What is MSYS2?
From their webpage, MSYS2 is a software distro and building platform for Windows.
At its core is an independent rewrite of MSYS, based on modern Cygwin (POSIX compatibility layer) and MinGW-w64 with the aim of better interoperability with native Windows software. It provides a bash shell, Autotools, revisiion control systems and the like for building native Windows applications using the MinGW-w64 toolchains.
- A minor correction is that following the instructions that were responded within the issue, if you modify
msys2_shell.cmd
and always run the shell as Administrator, you can properly create symlinks. Due to me not liking to always be working as Administrator, I prefer to just use a CMD Prompt instead. [return]