MSYS2: Difference between revisions

From David's Wiki
Line 25: Line 25:


==Running Windows Programs==
==Running Windows Programs==
* Go to <code>/c/msys64/msys2.ini</code>
* Go to <code>/c/msys64/msys2_shell.cmd</code>
* Uncomment <code>MSYS2_PATH_TYPE=inherit</code>
* Uncomment <code>set MSYS2_PATH_TYPE=inherit</code>

Revision as of 15:29, 12 June 2020

Bash for windows

Getting Started

  • Install Msys2 from https://www.msys2.org/
    • Note: You can also install with choco install msys2 but you will need to set start menu shortcuts yourself
  • Install common developer tools
    • pacman -S --needed base-devel git
    • pacman -S --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake

Package Management

Reference

# Install a package
pacman -S <package>

# Uninstall a package
pacman -R <package>

Changing Home Dir

Set the following:

  • db_home in /etc/nsswitch.conf
    db_home: /c/Users/david
  • HOME environment variable to %USERPROFILE%

Running Windows Programs

  • Go to /c/msys64/msys2_shell.cmd
  • Uncomment set MSYS2_PATH_TYPE=inherit