Nethence Documentation Lab Webmail Your IP BBDock  


Those documents are obsolete, please use the Nethence Documentation instead.

HomeUnixWindowsOracleObsoleteHardwareDIYMechanicsScriptsConfigsPrivate

Setting up MinGW and MSYS on a Windows system
 
Installation
Fetch and run the MinGW - Minimalist GNU for Windows binary installer. Then create a shortcut on your desktop against MSYS's provided bash,
Right-click on the desktop > new Text Document --> msys.bat
C:\MinGW\msys\1.0inash.exe --login -i
 
Add MinGW's binaries to your PATH,
System Properties > Advanced / Environment Variables
add C:\MinGW\msys\1.0in;
 
Configuration
Configure your environment,
echo syn off > .vimrc
vim .profile
like,
case "$-" in *i*)
PS1='$LOGNAME@${HOSTNAME%%\.*}> '
alias ll='ls -alkF'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias vi='vim'
;;
esac
note. using .profile instead of .bash* will make it work for any terminal, e.g. "minsys.bat" and "bash --login -i".
apply immediately,
source .profile
 
More applications
With the base system basically end up with this:
- a C compiler,
- a C++ compiler,
- and basic Unix commands.
 
To install additional packages, either run the mingw-get-setup.exe again to proceed directly the the mingw-get GUI or fetch them from sourceforge repository (http://sourceforge.net/projects/mingw/files/MSYS/) and extract them directly to /usr/,
mkdir man/
cd man/
for lz in \
  man-1.6f-2-msys-1.0.13-lic.tar.lzma \
  man-1.6f-2-msys-1.0.13-doc.tar.lzma \
  man-1.6f-2-msys-1.0.13-lang.tar.lzma \
  man-1.6f-2-msys-1.0.13-bin.tar.lzma; do
  wget "http://switch.dl.sourceforge.net/project/mingw/MSYS/Extension/man/man-1.6f-2/$lz"
  tar xkf $lz -C /usr
done
unset lz
 
Miscellaneous
Note. you can access e.g. the D: drive by typing,
cd /d
 
Devel
For example to compile menu_one from the winprog tutorial,
cd ~/source/menu_one/
windres.exe menu_one.rc menu_oneres.o
gcc -o menu_one.exe menu_one.c menu_oneres.o
 
References
http://www.redantigua.com/msys-win.html
http://www.mingw.org/wiki/FAQ
http://www.mingw.org/wiki/IncludePathHOWTO
http://maradns.blogspot.com/2009/03/mingw-310-1-last-real-mingw-release.html
http://www.stat.sc.edu/~habing/courses/740/mingw.html
 
Mailing-list archives
http://sourceforge.net/mailarchive/forum.php?forum_name=mingw-users
http://dir.gmane.org/gmane.comp.gnu.mingw.user
 

Last update: Dec 30, 2015