next up previous contents index
Next: General Notes Up: Installation and Setup Previous: Installing MSYS2   Contents   Index

The mintty Terminal Emulator Window

The terminal window used in MSYS2 is ``mintty''. This does NOT work directly with native Windows programs that work with a console window, which includes the XicTools programs. One must run WRspice and possibly Xic with the ``winpty'' program. Just type winpty followed by the name and arguments of the program you want to run.

For example, the command to run WRspice is

winpty wrspice ...
where the ... represents the command line arguments to WRspice. The winpty program performs some magic that enables native Windows programs expecting to find a cmd.com type of window to work with the mintty.

subsubsectionMSYS2 Basics

The environment is a bash shell and environment very similar to Linux.

You bring up a new shell window from the MSYS2 64bit / MSYS2 MinGW x64 entry of the Start menu. There are multiple selections for MSYS2 in the Start menu, including MSYS2 MinGW x86 which is the MINGW 32-bit subsystem, MSYS2 MinGW x64 is the MINGW 64-bit subsystem used for XicTools, and MSYS2 MSYS is the MSYS subsystem without MinGW support. MinGW is ``minimal Gnu (for) Windows'' and is a library that provides a limited Linux-like programming environment under Windows. The XicTools programs use this environment and are thus Windows-native programs.

MSYS2 uses an underlying dll to provide a more complete Linux-like environment, similar to Cygwin. Installed programs are available for all three subsystems, though the search order differs. The XicTools do not use the dll, but the MSYS2 environment is very convenient for use with the tools. The MSYS subsystem provides the shell and other Linux-emulation commands. The MinGW subsystems provide libraries which enable porting of Linux programs to native Windows.

From the shell window, the file system installed under c: \ msys64 (or wherever the msys64 directory is installed) is taken as root. One can access the files and directories explicitly with a path starting with /c where the c can be any existing drive letter. Your home directory is /home/yourname, or equivalently /c/msys64/home/yourname.

It is important to realize that within MINGW and other native Windows programs including XicTools, the paths used by the programs are expected to be Windows paths, though they may use forward slashes. For example, in the shell /usr/local is rooted to the msys64 directory, but within Xic /usr/local is rooted to the current drive, e.g., c:/usr/local.

In MSYS2, the mount command can provide an alias between the file system as viewed from the shell and that of Windows. The command

mount c:/usr/local/xictools /usr/local/xictools
will map the Windows directory c:/usr/local/xictools to the location /usr/local/xictools in the shell. From a shell window, /usr/local/xictools is equivalent to /c/usr/local/xictools, or in Windows c:/usr/local/xictools, the default XicTools installation location.

By default, the actual binary executable is run from a script (.bat) file, which is installed in the same directory as the executables, which by default is C: \ usr \ local \ xictools \ bin.

A program group named XicTools is created in the Start menu (or equivalent), from which the programs can be started. The programs can also be started from a command line, in either a Windows Command Prompt window or a MSYS2/Cygwin shell window. One will need to type the full path to the bat file (e.g., type ``C: \ usr \ local \ xictools \ bin \ xic'' to start Xic). There are two ways to avoid having to type the whole path:

  1. Add the directory to your search path. This is the PATH variable in the environment. This can be set in your Command Prompt window by giving a command like
    PATH=
    or the PATH can be set from the Control Panel (the procedure is described below for Windows 8).

  2. The bat files can be copied from the installation location into a directory that is already in the search path, or to the current directory.


next up previous contents index
Next: General Notes Up: Installation and Setup Previous: Installing MSYS2   Contents   Index
Stephen R. Whiteley 2024-09-29