OS-Windows-POSIX-MSYS2

From KRayWiki
Jump to navigation Jump to search
See Also 
OS-Windows-POSIX
OS-Windows

From the MSYS2 Home Page:

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, revision control systems and the like for building native Windows applications using MinGW-w64 toolchains.

It features a package management system to provide easy installation of packages, Pacman. It brings many powerful features such as dependency resolution and simple complete system upgrades, as well as straight-forward package building.


Features

  • Supports 32-bit and 64-bit Windows environments.
  • Numerous shell-based environments/tools like:
    • BASH
    • Perl
    • Python
  • Has Windows-native version control tools like:
    • Bazaar
    • CVS
    • Git
  • Contains package management tools:
    • pacman

Packages

Packages of local interest:

  • bzr
  • cvs
  • make
  • man-pages-posix
  • openssh
  • patch
  • perl
  • python
  • rsync
  • tar
  • tree
  • unrar
  • unzip
  • vim
  • zip

Installation

Base Install

Installation restrictions:

  • MSYS2 no longer supports Windows XP.
  • MSYS2 does not install on FAT* partitions.

To perform a base installation:

  1. Download the "x86_64" installer for 64-bit Windows systems.
    The "i686" installer is optimal only for 32-bit Windows systems.
  2. Run the selected downloaded msys2-x86_64-CCYYMMDD.exe installer (i.e. msys2-x86_64-20161025.exe)
  3. Interact with the installer:
  4. MSYS2 64bit Setup 
    Welcome to the MSYS2 64bit Setup Wizard 
    [ Next ]
    Installation Folder 
    C:\msys64
    [ Next ]
    Start Menu shortcuts 
    MSYS2 64bit
    [ Next ]
    Installing MSYS2 64bit 
    ...
    Completing the MSYS2 64bit Wizard. 
    [✓] Run MSYS2 64bit now.
    [ Finish ]

Base Update

To update the base install:

  1. Continue installation in an MSYS2 shell:
    M ~ 
    user@hostname MSYS ~ 
    pacman -Syu
    Update the package database and core system packages.
    pacman -Syu
    Update the package database and core system packages.
    Proceed with installation? [Y/n]
    Y
    warning: terminate MSYS2 without returning to shell and check for updates again
    warning: for example close your terminal window instead of calling exit
  2. Kill the shell session.
    Right-click [ Start ]
      Task Manager
    Task Manager 
    (˅) More details
    Name 
    Find two similar processes with a garbage name, or, pacman.exe and TBD:
    Right-click the selected processes one at a time.
    Click End Task.
    If the second task is still present, repeat.
    [X]
  3. Continue installation in an MSYS2 shell:
    Click [ Start ]
      MSYS2 64bit (˅) 
    MSYS2 MSYS
    M ~ 
    user@hostname MSYS ~ 
    pacman -Su
    Proceed with installation? [Y/n]
    Y

Post Install

Run a script to modify the base install to add to or update it per local standard practice.

  1. M ~ 
    user@hostname MSYS ~ 
    /path/to/MSYS2PostInstallSetup.sh

The script does not update user files if they were previously modified by the script.

It may be advantageous to modify the script use patch to edit files as this may allow updates via multiple patch files.

Customization

Username

See: How to change Home directory and Start directory on MSYS2?

Home directory

See: How to change Home directory and Start directory on MSYS2?