mingw&msys安装过程[@more@]
1. 到官网下安装文件mingw-get-inst-20111118.exe;http://sourceforge.net/projects/mingw/files/MinGW/
Wiik:http://www.mingw.org/wiki/Getting_Started
2. 安装mingw,并随带安装MSYS.
3. 运行C:MinGWmsys1.0msys.bat,下装支持复制的rxvt包:
mingw-get install msys-rxvt
或者:mingw-get install msys-mintty
4. 修改msys.bat,用rxvt取代cmd窗口
start %WD%rxvt -backspacekey -sl 5000 -fg White -bg "#008B8B" +sb -fn "Consolas-14" -tn msys -geometry 80x30 -e /bin/sh --login -i
5. 创建快捷启动run.bat:
msys.bat -rxvt
6. 增加alias ls="ls --color=tty --show-control-chars" 到 profile
7. 增加下面设置到 .inputrc
set meta-flag on
set input-meta on
set output-meta on
set convert-meta off
下面我设置的profile文件,包括增加了gcc的变量路径
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Copyright (C) 2001, 2002 Earnie Boyd
# This file is part of the Minimal SYStem.
# http://www.mingw.org/msys.shtml
#
# File: profile
# Description: Shell environment initialization script
# Last Revised: 2002.05.04
if [ -z "$MSYSTEM" ]; then
MSYSTEM=MINGW32
fi
# My decision to add a . to the PATH and as the first item in the path list
# is to mimick the Win32 method of finding executables.
#
# I filter the PATH value setting in order to get ready for self hosting the
# MSYS runtime and wanting different paths searched first for files.
if [ $MSYSTEM == MINGW32 ]; then
export PATH=".:/usr/local/bin:/mingw/bin:/bin:$PATH"
else
export PATH=".:/usr/local/bin:/bin:/mingw/bin:$PATH"
fi
PATH="$PATH:/utils/lib:/utils/include"
## Inlcude path of gcc
C_INCLUDE_PATH=$C_INCLUDE_PATH:/utils/include:.
export C_INCLUDE_PATH
## Dynamic library path of gcc
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/utils/lib:.
export LD_LIBRARY_PATH
## Static library path of gcc
LIBRARY_PATH=$LIBRARY_PATH:/utils/lib:.
export LIBRARY_PATH
alias rr="rxvt -backspacekey -sl 5000 -fg White -bg "#008B8B" +sb -fn "Consolas-14" -tn msys -geometry 80x25 -e /bin/sh --login -i"
if [ -z "$USERNAME" ]; then
LOGNAME="`id -un`"
else
LOGNAME="$USERNAME"
fi
# Set up USER's home directory
if [ -z "$HOME" ]; then
HOME="/home/$LOGNAME"
fi
if [ ! -d "$HOME" ]; then
mkdir -p "$HOME"
cp /etc/inputrc.default "$HOME"/.inputrc
fi
if [ "x$HISTFILE" == "x/.bash_history" ]; then
HISTFILE=$HOME/.bash_history
fi
export HOME LOGNAME MSYSTEM HISTFILE
for i in /etc/profile.d/*.sh ; do
if [ -f $i ]; then
. $i
fi
done
export MAKE_MODE=unix
#export PS1='[33]0;$MSYSTEM:w07
#33[32m]u@h [33[33mw33[0m]
#$ '
export PS1='~$PWD$'
alias clear=clsb
alias ls="ls --color=tty --show-control-chars"
##alias ls="ls --show-control-chars"
alias vi="vim"
##cd "$HOME"
echo ""
echo ""
echo "Welcome to Bill's MSYS"
echo ""
echo ""
cd /
echo "~$PWD$"
ls
echo ""
cd $HOME
echo "~$PWD$"
ls
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/640706/viewspace-1056914/
,如需转载,请注明出处,否则将追究法律责任。