minttyをインストールしてみた。
Windows上でwget, vim, Linuxコマンドが簡単に利用出来て便利かもしれない。

Downloadサイト
http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/

今回は以下のファイルを利用
http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/mingw-get-inst-20120426/

1)DOWNLOADが終わったらセットアップを実行

2) Repository Catalogの選択

Compilerの選択

WEBにアクセスして必要なコンポーネントの自動ダウンロード

SETUP COMPLATED

WINDOWS PATH追加
C:\MinGW\msys\1.0\bin

パッケージのアップデートとMSYSのインストール
$ mingw-get update

$ mingw-get install msys-mintty

Mintty起動用ショートカットの作成とオプション設定
1. 「ショートカット」 C:\MinGW\msys\1.0\bin\mintty.exe /bin/bash –login -i
2. オプション設定

設定とアプリケーションインストール

$ mingw-get update

$ mingw-get upgrade

$ mingw-get install msys-coreutils msys-man msys-tar msys-gzip msys-wget msys-zip msys-unzip msys-vim
$ mingw-get install msys-openssl msys-openssh

インストール後の簡単な確認

パッケージリスト

anywhere@any-place ~/temp20120609
$ mingw-get list | egrep “Package:”
Package: mingw-developer-toolkit Subsystem: msys
Package: mingw32-autoconf Subsystem: mingw32
Package: mingw32-autoconf2.1 Subsystem: mingw32
Package: mingw32-autoconf2.5 Subsystem: mingw32
Package: mingw32-automake Subsystem: mingw32
Package: mingw32-automake1.10 Subsystem: mingw32
Package: mingw32-automake1.11 Subsystem: mingw32
Package: mingw32-automake1.4 Subsystem: mingw32
Package: mingw32-automake1.5 Subsystem: mingw32
Package: mingw32-automake1.6 Subsystem: mingw32
Package: mingw32-automake1.7 Subsystem: mingw32
Package: mingw32-automake1.8 Subsystem: mingw32
Package: mingw32-automake1.9 Subsystem: mingw32
Package: mingw32-autotools Subsystem: mingw32
Package: mingw32-base Subsystem: mingw32
Package: mingw32-basic-bsdtar Subsystem: mingw32
Package: mingw32-binutils Subsystem: mingw32
Package: mingw32-bsdcpio Subsystem: mingw32
Package: mingw32-bsdtar Subsystem: mingw32
Package: mingw32-bzip2 Subsystem: mingw32
Package: mingw32-dos2unix Subsystem: mingw32
Package: mingw32-expat Subsystem: mingw32
Package: mingw32-gcc Subsystem: mingw32
Package: mingw32-gcc-ada Subsystem: mingw32
Package: mingw32-gcc-fortran Subsystem: mingw32
Package: mingw32-gcc-g++ Subsystem: mingw32
Package: mingw32-gcc-objc Subsystem: mingw32
Package: mingw32-gcc-tools-epoch2-autoconf Subsystem: mingw32
Package: mingw32-gcc-tools-epoch2-automake Subsystem: mingw32
Package: mingw32-gcc-v3-ada Subsystem: mingw32
Package: mingw32-gcc-v3-core Subsystem: mingw32
Package: mingw32-gcc-v3-fortran Subsystem: mingw32
Package: mingw32-gcc-v3-g++ Subsystem: mingw32
Package: mingw32-gcc-v3-java Subsystem: mingw32
Package: mingw32-gcc-v3-objc Subsystem: mingw32
Package: mingw32-gdb Subsystem: mingw32
Package: mingw32-gdb-python Subsystem: mingw32
Package: mingw32-gendef Subsystem: mingw32
Package: mingw32-gettext Subsystem: mingw32
Package: mingw32-gmp Subsystem: mingw32
Package: mingw32-libarchive Subsystem: mingw32
Package: mingw32-libasprintf Subsystem: mingw32
Package: mingw32-libbz2 Subsystem: mingw32
Package: mingw32-libcharset Subsystem: mingw32
Package: mingw32-libexpat Subsystem: mingw32
Package: mingw32-libgcc Subsystem: mingw32
Package: mingw32-libgettextpo Subsystem: mingw32
Package: mingw32-libgfortran Subsystem: mingw32
Package: mingw32-libgmp Subsystem: mingw32
Package: mingw32-libgmpxx Subsystem: mingw32
Package: mingw32-libgnat Subsystem: mingw32
Package: mingw32-libgomp Subsystem: mingw32
Package: mingw32-libiconv Subsystem: mingw32
Package: mingw32-libintl Subsystem: mingw32
Package: mingw32-libltdl Subsystem: mingw32
Package: mingw32-liblzma Subsystem: mingw32
Package: mingw32-libminizip Subsystem: mingw32
Package: mingw32-libmpc Subsystem: mingw32
Package: mingw32-libmpfr Subsystem: mingw32
Package: mingw32-libobjc Subsystem: mingw32
Package: mingw32-libpdcurses Subsystem: mingw32
Package: mingw32-libpopt Subsystem: mingw32
Package: mingw32-libpthread-old Subsystem: mingw32
Package: mingw32-libpthreadgc Subsystem: mingw32
Package: mingw32-libpthreadgce Subsystem: mingw32
Package: mingw32-libquadmath Subsystem: mingw32
Package: mingw32-libquserex Subsystem: mingw32
Package: mingw32-libssp Subsystem: mingw32
Package: mingw32-libstdc++ Subsystem: mingw32
Package: mingw32-libtool Subsystem: mingw32
Package: mingw32-libunistring Subsystem: mingw32
Package: mingw32-libz Subsystem: mingw32
Package: mingw32-lua Subsystem: mingw32
Package: mingw32-make Subsystem: mingw32
Package: mingw32-mgwport Subsystem: mingw32
Package: mingw32-mingw-get Subsystem: mingw32
Package: mingw32-mingw-utils Subsystem: mingw32
Package: mingw32-mingwrt Subsystem: mingw32
Package: mingw32-minizip Subsystem: mingw32
Package: mingw32-mpc Subsystem: mingw32
Package: mingw32-mpfr Subsystem: mingw32
Package: mingw32-pdcurses Subsystem: mingw32
Package: mingw32-pexports Subsystem: mingw32
Package: mingw32-pkginfo Subsystem: mingw32
Package: mingw32-popt Subsystem: mingw32
Package: mingw32-pthreads-w32 Subsystem: mingw32
Package: mingw32-w32api Subsystem: mingw32
Package: mingw32-xz Subsystem: mingw32
Package: mingw32-zlib Subsystem: mingw32
Package: msys-autoconf Subsystem: msys
Package: msys-autogen Subsystem: msys
Package: msys-automake Subsystem: msys
Package: msys-base Subsystem: msys
Package: msys-bash Subsystem: msys
Package: msys-binutils Subsystem: msys
Package: msys-bison Subsystem: msys
Package: msys-bsdcpio Subsystem: msys
Package: msys-bsdtar Subsystem: msys
Package: msys-bzip2 Subsystem: msys
Package: msys-console Subsystem: msys
Package: msys-core Subsystem: msys
Package: msys-coreutils Subsystem: msys
Package: msys-crypt Subsystem: msys
Package: msys-cvs Subsystem: msys
Package: msys-cygutils Subsystem: msys
Package: msys-dash Subsystem: msys
Package: msys-diffstat Subsystem: msys
Package: msys-diffutils Subsystem: msys
Package: msys-dos2unix Subsystem: msys
Package: msys-expat Subsystem: msys
Package: msys-file Subsystem: msys
Package: msys-findutils Subsystem: msys
Package: msys-flex Subsystem: msys
Package: msys-gawk Subsystem: msys
Package: msys-gcc Subsystem: msys
Package: msys-gdbm Subsystem: msys
Package: msys-gettext Subsystem: msys
Package: msys-gmp Subsystem: msys
Package: msys-grep Subsystem: msys
Package: msys-groff Subsystem: msys
Package: msys-guile Subsystem: msys
Package: msys-gzip Subsystem: msys
Package: msys-help2man Subsystem: msys
Package: msys-inetutils Subsystem: msys
Package: msys-less Subsystem: msys
Package: msys-libarchive Subsystem: msys
Package: msys-libasprintf Subsystem: msys
Package: msys-libbz2 Subsystem: msys
Package: msys-libcharset Subsystem: msys
Package: msys-libcrypt Subsystem: msys
Package: msys-libexpat Subsystem: msys
Package: msys-libgdbm Subsystem: msys
Package: msys-libgettextpo Subsystem: msys
Package: msys-libgmp Subsystem: msys
Package: msys-libguile Subsystem: msys
Package: msys-libiconv Subsystem: msys
Package: msys-libintl Subsystem: msys
Package: msys-libltdl Subsystem: msys
Package: msys-liblzma Subsystem: msys
Package: msys-libmagic Subsystem: msys
Package: msys-libminires Subsystem: msys
Package: msys-libminizip Subsystem: msys
Package: msys-libopenssl Subsystem: msys
Package: msys-libopts Subsystem: msys
Package: msys-libpopt Subsystem: msys
Package: msys-libregex Subsystem: msys
Package: msys-libtermcap Subsystem: msys
Package: msys-libtool Subsystem: msys
Package: msys-libxml2 Subsystem: msys
Package: msys-lndir Subsystem: msys
Package: msys-locate Subsystem: msys
Package: msys-lpr-enhanced Subsystem: msys
Package: msys-m4 Subsystem: msys
Package: msys-make Subsystem: msys
Package: msys-man Subsystem: msys
Package: msys-minires Subsystem: msys
Package: msys-minizip Subsystem: msys
Package: msys-mintty Subsystem: msys
Package: msys-mksh Subsystem: msys
Package: msys-mktemp Subsystem: msys
Package: msys-openssh Subsystem: msys
Package: msys-openssl Subsystem: msys
Package: msys-patch Subsystem: msys
Package: msys-perl Subsystem: msys
Package: msys-popt Subsystem: msys
Package: msys-rebase Subsystem: msys
Package: msys-regex Subsystem: msys
Package: msys-rsync Subsystem: msys
Package: msys-rxvt Subsystem: msys
Package: msys-sed Subsystem: msys
Package: msys-system-builder Subsystem: msys
Package: msys-tar Subsystem: msys
Package: msys-termcap Subsystem: msys
Package: msys-texinfo Subsystem: msys
Package: msys-tiny Subsystem: msys
Package: msys-unzip Subsystem: msys
Package: msys-vim Subsystem: msys
Package: msys-w32api Subsystem: msys
Package: msys-wget Subsystem: msys
Package: msys-xz Subsystem: msys
Package: msys-zip Subsystem: msys
Package: msys-zlib Subsystem: msys

anywhere@any-place ~/temp20120609
$

mintty導入後の設定微調整とコンパイラー確認

1. Compile
2. 環境設定

1.Compileの基本確認
Cで動作確認用のソースを書いて、コンパイルの基本動作確認をしてみた。


#include <stdio.h>

main()
{
   int number;

   printf("Enter an integer\n");
   scanf("%d",&number);

   printf("Integer entered by you is %d\n", number);

   return 0;
}

コンパイルの動作確認

2. 環境設定
UTF-8とSJISが混在して日本語表示がおかしくなるので、ユーザー環境変数を変更。

—————————-
MEMO on July/1
—————————-
~/.profile

# lsで日本語を表示するためのalias
alias ls='ls --color=auto --show-control-chars'
# gettext用
export OUTPUT_CHARSET=sjis

~/.inputrc

set meta-flag on
set output-meta on
set convert-meta off
set kanji-code sjis

~/.minttyrc
Locale=ja_JP
Charset=SJIS

/share/misc/man.conf

# manは標準ではsjisで出力できないためutf8で出力する
JNROFF /usr/bin/groff -DeucJP -Tutf8 -mandoc
JNEQN /usr/bin/eqn -Tutf8

# PAGERでsjisへ変換
PAGER nkf -s | /usr/bin/less -isrR

~/.vimrc

set enc=sjis

参考:
mintty
Windowsで最高のターミナルを構築する方法
List of terminal emulators

Comments are closed.

Post Navigation