ã²ã¨æã»ã©åã«ä½¿ã£ã¦ãã³ã³ãã¥ã¼ã¿ãå£ãã¦ãèªåã®ãã¼ã ãã£ã¬ã¯ããªä»¥ä¸ã®ãã«ããã¯ã¢ãã以å¤ã¯ã»ã¼ãªããªãã¾ããï¼ãã³ãã«å°ãäºã«ã¯ãªãã¾ããã§ãããï¼ããã§ãæã«è§¦ãã¦ã½ããã¦ã§ã¢ã®ã¤ã³ã¹ãã¼ã«ããã¦ã¾ããä»æ¥ã¯MinGW/MSYSã
Cygwinã§ããããã ãã©ï¼Cygwinã¯æ¢ã«ã¤ã³ã¹ãã¼ã«æ¸ã¿ï¼ãMinGW/MSYSï¼http://www.mingw.org/ï¼ã®ã»ããåã®å¥½ã¿ãç¾æç¹ã§ã®ææ°ç㯠MinGW-5.1.6.exeãhttp://sourceforge.net/projects/mingw/files/ ãããã¦ã³ãã¼ãã§ãã¾ããWindowsã¤ã³ã¹ãã¼ã©ãªãã§ç¹ã«åé¡ã¯ãªãã§ããããé©å½ãªå ´æï¼å㯠C:\Installed\MinGWï¼ã«ã¤ã³ã¹ãã¼ã«ãã¦ãç°å¢å¤æ°Pathã«binã追å ããã°ãgcc, as, ar, nm ãªã©ã使ããããã«ãªãã¾ããhello.c ãã³ã³ãã¤ã«ï¼å®è¡ãã¦ç¢ºèªã
MinGWã ãã§ã¯ãdiff, tar, grep, sed, make*1 ãªã©ãããã¾ãããhttp://www.mingw.org/wiki/MSYS ã®ãªãã«ãããªã³ã¯ããMSYS-1.0.11.exeããã¦ã³ãã¼ãããããWindowsã¤ã³ã¹ãã¼ã©ã§ãããæ示ã«å¾ãã ããMSYSã®binããµã¼ããã¹ï¼ç°å¢å¤æ°Pathï¼ã«å ããã°ããã使ãã³ãã³ããWindowsã³ãã³ãããã³ãããã使ããããã«ãªãã¾ãã
Windowsã³ãã³ãããã³ãããã sh --login ã¨ããã°bashã«å ¥ãã¾ããMSYSç¬èªã®ã¿ã¼ããã«ã¦ã£ã³ãã¦ã§ããRTVXã使ãããã¨ãã¯ãmsys.batã使ããã¨ã«ãªãã§ãããããã®msys.batã¯ãªãã ã使ãã«ããã®ã§ãå°ãä¿®æ£ããããããä¸ã«è¼ãã¾ãï¼ãããã®å½ã¦æ¹ã¯ãããããã®ä½ãæ¹ã¨å½ã¦æ¹ã¯ãããããããããåç §ãã¦ãã ããï¼ãä¿®æ£ç¹ã¯æ¬¡ã§ãã
- msys/1.0/ ã«ç½®ãã¦ããmsys/1.0/bin/ ã«ç½®ãã¦ããã©ã¡ãã§ãæ£å¸¸ã«åä½ãã¾ããbin/ ã«ç½®ãã°ç°å¢å¤æ°Pathãå¢ããå¿ è¦ãããã¾ãã*2ã
- ä½æ¥ç¨ã®ç°å¢å¤æ°ããã¼ã«ã«ã«ããã®ã§ã大åç°å¢å¤æ°ãæ±ãã¾ããã
- msys.batãèµ·åããã³ã³ã½ã¼ã«ã³ãã³ãã¦ã£ã³ãã¦ãéãã¾ããã
- ç°å¢å¤æ°RXVT_GEOMETRYã«ãããRXVTã¦ã£ã³ãã¦ã®ãµã¤ãºãæå®ã§ãã¾ããä¾ãã°ï¼ set RXVT_GEOMETRY=80x40
使ãæ¹ã¯ï¼
- msys ï¼ ããã¯ãsh --login ã¨åãã§ãã
- msys --rxvt ï¼ RXVT ãèµ·åãã¾ãã
- msys --rxvt MSYS ï¼ è²ã®è¨å®ãMSYSã¢ã¼ãã«ãªãã¾ãã
- msys --rxvt MINGW32 ï¼ è²ã®è¨å®ãMINGW32ã¢ã¼ãã«ãªãã¾ãã
è²ã®è¨å®ãæå®ãããã¨ãã¯æ¬¡ã®ç°å¢å¤æ°ã使ãã¾ããè²ã®åå㯠X11 colors ã§ããããããCSSã¨åãååã使ããã¨æãã¾ãããã¶ãã
- MSYSBGCOLOR, MSYSFGCOLOR ï¼ MSYSã¢ã¼ãã®èæ¯è²ã¨åæ¯è²
- MINGW32BGCOLOR, MINGW32FGCOLOR ï¼ MINGW32ã¢ã¼ãã®èæ¯è²ã¨åæ¯è²
MSYSã¢ã¼ãï¼MINGW32ã¢ã¼ãã¨ããã®ã¯ãèæ¯è²ã¨åæ¯è²ã®çµã¿åããã®ãã¨ã§ãä»ã«ç¹å¥ãªæå³ã¯ããã¾ããã
注æï¼ rxvtã® -backspacekey ãªãã·ã§ã³ã®å¤ã¨ã㦠Ctrl-Hï¼æåçªå·8ï¼ã®ã³ã¼ããçã§å ¥ã£ã¦ãã¾ãã
--- msys.bat.orig 2009-07-11 15:34:35 +0900 +++ msys.bat 2010-01-08 11:19:19 +0900 @@ -15,7 +15,9 @@ rem ember value of GOTO: is used to know recursion has happened. if "%1" == "GOTO:" goto %2 -if NOT "x%WD%" == "x" set WD= +setlocal +set WD=%~dp0 +if "x%RXVT_GEOMETRY%" == "x" set RXVT_GEOMETRY=80x25 rem ember command.com only uses the first eight characters of the label. goto _WindowsNT @@ -67,12 +69,12 @@ :unknowncon echo %MSYSCON% is an unknown option for msys.bat. pause -exit 1 +goto EOF :notfound echo Cannot find the rxvt.exe or sh.exe binary -- aborting. pause -exit 1 +goto EOF rem If you don't want to use rxvt then rename the file rxvt.exe to something rem else. Then sh.exe will be used instead. @@ -89,13 +91,13 @@ if "%MSYSTEM%" == "MINGW32" set BGCOLOR=%MINGW32BGCOLOR% if "%MSYSTEM%" == "MINGW32" set FGCOLOR=%MINGW32FGCOLOR% -start %WD%rxvt -backspacekey -sl 2500 -fg %FGCOLOR% -bg %BGCOLOR% -sr -fn Courier-12 -tn msys -geometry 80x25 -e /bin/sh --login -i -exit +start %WD%rxvt -backspacekey -sl 2500 -fg %FGCOLOR% -bg %BGCOLOR% -sr -fn Courier-12 -tn msys -geometry %RXVT_GEOMETRY% -e /bin/sh --login -i +goto EOF :startsh if NOT EXIST %WD%sh.exe goto notfound -start %WD%sh --login -i -exit +%WD%sh --login -i +goto EOF :EOF
*1:MinGW/bin/ ã« mingw32-make.exe ã¨ããã³ãã³ããããã¾ãããããã¯MSYSã¨ç¸æ§ãæªãããã§ãâhttp://d.hatena.ne.jp/m-hiyama/20071102/1193965091
*2:åã®ç°å¢ã§ã¯ãC:\Installed\MinGW\bin;C:\Installed\msys\1.0\bin ããã¹ã«è¿½å ãã¦ããã ãã§ãã