现在的位置: 首页 > 综合 > 正文

MinGW和MSYS的自动安装

2013年09月10日 ⁄ 综合 ⁄ 共 12259字 ⁄ 字号 评论关闭

 

首先安装mingw

http://www.mingw.org/download.shtml

http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/mingw-get-inst-20110211/



mingw-get-inst is a simple InnoSetup GUI installer that (indirectly) installs

MinGW and MSYS.  It actually only installs the new `mingw-get' executable and

its support files---and then invokes that program to handle the actual

installation.


During the GUI phase of the installation, you may select which elements you

wish to install, from the following list:


可选安装的组件:


   MinGW Compiler Suite

      C Compiler             always installed

      C++ Compiler           optional

      Fortran Compiler       optional

      ObjC Compiler          optional

      Ada Compiler           optional

   MSYS Basic System         optional

   MinGW Developer Toolkit   optional


After the GUI phase of the installation is complete, mingw-get will be

invoked to download and install all of the selected components.


Once installation is complete, you can update to any available newer version

of the available components, or add additional components, by performing the

following steps:

 

进行更新的命令

   cd C:/MinGW/bin (or whereever mingw-get.exe is located)

   mingw-get update

   mingw-get install <... package names ...>


The 'update' command updates the local copy of the package information

database.  This version of mingw-get-inst ships with a snapshot of that

database, from 2011 Feb 11. (During the GUI phase of the installation, you

will be given the option of automatically updating the database to the

latest version, or using the pre-packaged snapshot).


If there are any issues with this installer or with mingw-get, please report

problems to

   mingw-users@lists.sourceforge.net

After triage, you may be asked to open an official bug report by following

the instructions here:

   http://www.mingw.org/reporting_bugs



Changes

==========

20110211:

* Ship with mingw-get-0.1-alpha-5.1.  This is a bug-fix release to

 correct a critical defect in the resolution of dependencies, when

 performing an upgrade operation.  It also provides more meaningful

 diagnostics when mingw-get is invoked without arguments.


* Remove 'MSYS System Builder' from GUI selection dialog. Too

 many novice users were installating it without understanding

 its purpose, leading to a lot of confusion on the mailing list.


 ************************************************************

 ** Most people should not install the MSYS System Builder **

 ** It is for building MSYS applications and libraries.    **

 ** As most users want to build MinGW (that is, native     **

 ** win32) applications and libraries, it is inappropriate **

 ** to install the MSYS System Builder.  However, if you   **

 ** really want to install it, use the command line tool   **

 **         'mingw-get install msys-dvlpr'                 **

 ** AFTER you install the other components using this GUI  **

 ** installation process. But DO NOT DO THIS unless you    **

 ** really understand the implications.                    **

 ************************************************************


* Update catalogue to 2011-02-11; update documentation to reflect

 availability of new MinGW gcc version 4.5.2.


20101030:

* Ship with mingw-get-0.1-alpha-5; this provides a more robust

 solution to the "mingw-get deleted itself" problem, together

 with a workaround to avoid a race condition in this installer

 itself.


20100909:

* Ship with mingw-get-0.1-alpha-4, which fixes the "mingw-get deleted

 itself" problem and adds a --help option.

* Now also (optionally) install the MinGW Developer Toolkit and/or

 MSYS System Builder meta package collections.

* No longer requires Admin privileges

* Optionally run 'mingw-get update' to download the most recent set of

 package metadata before performing the installation.


20100831:

* Initial release



Background

==========

mingw-get is the actual MinGW installer. It supports multiple installation

locations on a single computer, multiple repositories and handles dependency

relationships between elements.  However, it is still a work in progress---and

many potential users are intimidated by it, because it is a command line

application and requires some configuration file editing before it can be used.


mingw-get is structured as a library that contains all of the core

implementation logic, and a command-line interface (CLI) front end executable.

Eventually, that CLI application will be superseded by a GUI front end---once

the development of the back end implementation logic and library is complete.

However, the CLI mingw-get is usuable today, for simple installations.


mingw-get-inst is NOT the GUI version of mingw-get. Rather, it is a quick and

dirty InnoSetup wrapper that installs the CUI mingw-get, modifies the

configuration files as needed automatically, and invokes mingw-get with the

appropriate arguments to handle the actual installation.  We expect that

mingw-get-inst will be obsoleted once the GUI version of mingw-get is released,

but that may be some time from now.

mingw-get-inst-20110211.exe,被360安全卫士,鉴定为病毒。晕菜!
设置为信任之后,才可以继续运行。
C:/MinGW/这个路径推荐使用,可以解决很多莫名其妙的错误。
The recommended installation directory is C:/MinGW. Unless you are very sure you know what you are doing, you should not change this; in particular: never install MinGW into any directory which includes spaces in its absolute path name.
dos窗口上,一直在现在包,下载的包位于:
C:/Documents and Settings/Administrator.CHINA-EC4977140/Local Settings/Temporary Internet Files
以及C:/MinGW/var/cache/mingw-get/packages内。
我感觉,是不是从第一个目录作为缓冲,然后下好了复制到第二个目录下呢。
安装之后,C:/MinGW/lib文件夹空了,里头的mingw-get文件夹幸好被我提前保存了。
发现安装之后,lib目录为空,感觉 不对劲,然后看了下开始菜单,发现mingw shell没有了。说明有问题出现了。
可能是刚刚复制的时候,剪切了吗?
重新安装。
要安装这些东西,这个目录,一会是左,一会是右啊。主要是在/var/lib/mingw-get/这个目录。
Load catalogue: C:/MinGW/var/lib/mingw-get/data/package-list.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-package-list.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-autoconf.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-automake.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-basic-bsdtar.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-binutils.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-bzip2.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-cygutils.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-expat.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-gcc3.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-gcc4.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-gdb.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-gendef.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-gettext.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-gmp.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-libarchive.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-libiconv.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-libtool.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-make.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-mingw-get.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-mingw-utils.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-mpc.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-mpfr.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-pdcurses.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-pexports.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-popt.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-pthreads-w32.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-runtime.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-xz.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-zlib.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-base.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-autotools.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-package-list.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-autoconf.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-autogen.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-automake.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-bash.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-binutils.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-bison.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-bzip2.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-console.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-core.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-coreutils.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-crypt.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-cvs.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-cygutils.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-dash.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-diffutils.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-expat.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-file.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-findutils.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-flex.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-gawk.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-gcc.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-gdbm.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-gettext.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-gmp.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-grep.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-groff.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-guile.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-gzip.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-inetutils.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-less.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-libarchive.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-libiconv.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-libtool.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-libxml2.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-lndir.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-lpr-enhanced.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-m4.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-make.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-man.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-minires.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-mintty.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-mktemp.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-openssh.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-openssl.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-patch.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-perl.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-popt.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-rebase.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-regex.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-rxvt.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-sed.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-tar.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-termcap.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-texinfo.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-unzip.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-vim.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-w32api.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-wget.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-xz.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-zip.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-zlib.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-base.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw-developer-toolkit.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/msys-system-builder.xml
这个状态下下载包
lib目录和var目录
我把事先保存的lib目录下mingw-get放到var的cache目录下,
安装迅速完成了。
是这个样子的:
复制之后
更新命令还真可以用啊。
C:/MinGW>cd bin
C:/MinGW/bin>mingw-get update
Load catalogue: C:/MinGW/var/lib/mingw-get/data/package-list.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-package-list.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-autoconf.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-automake.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-basic-bsdtar.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-binutils.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-bzip2.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-cygutils.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-expat.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-gcc3.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-gcc4.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-gdb.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-gendef.xml
Load catalogue: C:/MinGW/var/lib/mingw-get/data/mingw32-gettext.xml
这位大牛的研究成果很值得借鉴:
不过,没有设置path路径,
也可以直接在cmd里头,用gnu的命令,但是必须在C:/MinGW/bin 路径下:
C:/>ls
'ls' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
C:/>gcc
'gcc' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
C:/>cd MinGW
C:/MinGW>cd bin
C:/MinGW/bin>gcc
gcc: no input files
cmd
mingw32里头,可以运行cmd的命令
mingw32里头,可以运行cmd的命令

 

抱歉!评论已关闭.