This is pretty much a reformatting of this post by Xiaofan for the purpose of building libusb and similar projects
- Install 7-zip from http://www.7-zip.org as all the MSYS/MinGW are provided in LZMA format. Make sure you go to Options -> System and set the .lzma file association.
- Chose a SourceForge mirror from this list and make sure you bypass SourceForge super annoying interface, by browsing project directories in an FTP like fashion. For instance, you can use http://ftp.heanet.ie/mirrors/sourceforge/m/project/mi/mingw to get access to the files fast.
- Create both an msys and MinGW directories, on one of your disks, preferably at the root level. For instance, if you install to C, you should create C:\MinGW and C:\msys
- In the following list items, I will list the current directory you should download the files from at the root level, and the files to download at the item level. With regards to the extraction, you should extract the files into the same directory as the root for the download (eg. MinGW/BaseSystem/GCC/Version4/gcc-4.5.0-1/gcc-core-4.5.0-1 -> C:\MinGW). Note that the archives are an lzma of a tar, so in 7-zip, you should double click until you see the directories like bin/, include/ etc. These are the directories that need to be copied over to the MinGW or msys dir, so make sure you extract at the right level.
- MinGW/BaseSystem/GCC/Version4/gcc-4.5.0-1/
- gcc-core-4.5.0-1-mingw32-bin.tar.lzma
- gcc-c++-4.5.0-1-mingw32-bin.tar.lzma
- libgcc-4.5.0-1-mingw32-dll-1.tar.lzma
- libstdc++-4.5.0-1-mingw32-dll-6.tar.lzma
- libssp-4.5.0-1-mingw32-dll-0.tar.lzma
- MinGW/BaseSystem/GNU-Binutils/binutils-2.20.51/
- binutils-2.20.51-1-mingw32-bin.tar.lzma
- MinGW/gmp/gmp-5.0.1-1/
- libgmp-5.0.1-1-mingw32-dll-10.tar.lzma
- MinGW/mpc/mpc-0.8.1-1/
- libmpc-0.8.1-1-mingw32-dll-2.tar.lzma
- MinGW/mpfr/mpfr-2.4.1-1/
- libmpfr-2.4.1-1-mingw32-dll-1.tar.lzma
- MinGW/BaseSystem/RuntimeLibrary/MinGW-RT/mingwrt-3.18/
- mingwrt-3.18-mingw32-dll.tar.gz
- mingwrt-3.18-mingw32-dev.tar.gz
- MinGW/BaseSystem/RuntimeLibrary/Win32-API/w32api-3.14/
- w32api-3.14-mingw32-dev.tar.gz
- MSYS/BaseSystem/msys-1.0.15-1/
- msysCORE-1.0.15-1-msys-1.0.15-bin.tar.lzma
- msysCORE-1.0.15-1-msys-1.0.15-ext.tar.lzma (this is the file containing the postinstall script we need to run)
- MSYS/autoconf/autoconf-2.65-1/
- autoconf-2.65-1-msys-1.0.13-bin.tar.lzma
- MSYS/autogen/autogen-5.10.1-1/
- autogen-5.10.1-1-msys-1.0.15-bin.tar.lzma
- libopts-5.10.1-1-msys-1.0.15-dll-25.tar.lzma
- MSYS/automake/automake-1.11.1-1/
- automake-1.11.1-1-msys-1.0.13-bin.tar.lzma
- MSYS/bash/bash-3.1.17-3/
- bash-3.1.17-3-msys-1.0.13-bin.tar.lzma
- MSYS/console/console-2.00b146-1/
- console-2.00b146-1-msys-1.0.14-bin.tar.lzma
- MSYS/coreutils/coreutils-5.97-3/
- coreutils-5.97-3-msys-1.0.13-bin.tar.lzma
- coreutils-5.97-3-msys-1.0.13-ext.tar.lzma
- MSYS/crypt/crypt-1.1_1-3/
- libcrypt-1.1_1-3-msys-1.0.13-dll-0.tar.lzma
- MSYS/gawk/gawk-3.1.7-2/
- gawk-3.1.7-2-msys-1.0.13-bin.tar.lzma
- MSYS/gdbm/gdbm-1.8.3-3/
- libgdbm-1.8.3-3-msys-1.0.13-dll-3.tar.lzma
- MSYS/gettext/gettext-0.17-2/
- gettext-0.17-2-msys-1.0.13-bin.tar.lzma
- libasprintf-0.17-2-msys-dll-0.tar.lzma
- libgettextpo-0.17-2-msys-dll-0.tar.lzma
- libintl-0.17-2-msys-dll-8.tar.lzma
- MSYS/grep/grep-2.5.4-2/
- grep-2.5.4-2-msys-1.0.13-bin.tar.lzma
- MSYS/libiconv/libiconv-1.13.1-2/
- libcharset-1.13.1-2-msys-1.0.13-dll-1.tar.lzma
- libiconv-1.13.1-2-msys-1.0.13-dll-2.tar.lzma
- MSYS/libtool/libtool-2.2.7a-2/
- libtool-2.2.7a-2-msys-1.0.13-bin.tar.lzma
- libltdl-2.2.7a-2-msys-1.0.13-dll-7.tar.lzma
- MSYS/m4/m4-1.4.14-1/
- m4-1.4.14-1-msys-1.0.13-bin.tar.lzma
- MSYS/make/make-3.81-3/
- make-3.81-3-msys-1.0.13-bin.tar.lzma
- MSYS/patch/patch-2.6.1-1/
- patch-2.6.1-1-msys-1.0.13-bin.tar.lzma
- MSYS/perl/perl-5.6.1_2-2/
- perl-5.6.1_2-2-msys-1.0.13-bin.tar.lzma
- MSYS/sed/sed-4.2.1-2/
- sed-4.2.1-2-msys-1.0.13-bin.tar.lzma
- MSYS/tar/tar-1.23-1/
- tar-1.23-1-msys-1.0.13-bin.tar.lzma
- MSYS/termcap/termcap-0.20050421_1-2/
- libtermcap-0.20050421_1-2-msys-1.0.13-dll-0.tar.lzma
- termcap-0.20050421_1-2-msys-1.0.13-bin.tar.lzma
- MSYS/zlib/zlib-1.2.3-2/
- zlib-1.2.3-2-msys-1.0.13-dll.tar.lzma
- MSYS/cvs/cvs-1.12.13-2/
- cvs-1.12.13-2-msys-1.0.13-bin.tar.lzma
- MSYS/file/file-5.04-1/
- file-5.04-1-msys-1.0.13-bin.tar.lzma
- libmagic-5.04-1-msys-1.0.13-dll-1.tar.lzma
- MSYS/gzip/gzip-1.3.12-2/
- gzip-1.3.12-2-msys-1.0.13-bin.tar.lzma
- MSYS/regex/regex-1.20090805-2/
- libregex-1.20090805-2-msys-1.0.13-dll-1.tar.lzma
- double click msys.bat
- navigate to c/msys/postinstall
- run
./pi.sh
and follow the prompts
Do you want to install the msys version of autotools (autoconf, automake, etc.) and of files like iconv, libtool and gettext or the mingw version? Was under the impression the msys versions were strictly for use in the msys environment, so if you wanted to build something for mingw as a target, use the mingw versions. If targeting msys, use msys versions. I did an install very similar to the one you have above based on a bash script I have that uses wget to fetch the files. When I tried to build an application with the results, I found it was linking in msys-iconv-2.dll and msys-1.0.dll. Don't think most developers would want to distribute the msys dlls with a Windows native application. If you have any tips for getting the GNU auto-tools and gettext and other GNU internationalization libraries and programs set up so you can more easily built applications, I'd really like to read about them. Seems like every time I reinstall mingw, I need to struggle with getting the right libraries in the proper locations or most programs using ./configure simply just won't work.
ReplyDeleteBy the way, a few other libraries an average user trying to compile Open Source programs might want to install are libpthread-2.8.0-3-mingw32-dll-2.tar.lzma, pthreads-w32-2.8.0-3-mingw32-dev.tar.lzma, libgomp-4.5.0-1-mingw32-dll-1.tar.lzma, libssp-4.5.0-1-mingw32-dll-0.tar.lzma, mpc-0.8.1-1-mingw32-dev.tar.lzma, mpfr-2.4.1-1-mingw32-dev.tar.lzma, gmp-5.0.1-1-mingw32-dev.tar.lzma (according to the HOWTO Install the MINGW Compiler Suite at the MinGW wiki). I also like to install dlfcn-win32-shared.tar.bz2 from the dlfcn-win32 project. One of the reasons I switched to using scripts to download all of this is there are now just too many files to easily find the right ones and get them to the proper locations. I'd try out mingw-get to automate the process, but I can't get it to work in my particular situation.