Re: MinGW and MSYS

  • From: "John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Sat, 3 Apr 2010 06:13:48 -0500

Attached is a draft of an html file that will ultimately be part of 
www.abilitiessoft.com It addresses the problems of buildingand accessing 
this environment. 

John

On Sat, Apr 03, 2010 at 06:22:36AM -0400, Jamal Mazrui wrote:
> Since that is a GNU-related project, as far as I know, it would be good 
> to have especially good documentation on how to use it.  I think such 
> documentation should include any accessibility tips that may be relevant 
> either in the development environment or in building resulting 
> applications that are as accessible as possible for end-users on various 
> platforms.
> 
> Jamal
> 
> 
> On 4/2/2010 7:10 PM, qubit wrote:
> >Greetings. A question:
> >I need to work on some software that requires MinGW to emulate linux on my
> >windows box.
> >I honestly don't know why they distribute MinGW and MSYS separately since
> >they appear to be interdependent.  But I built MinGW first as I wasn't sure
> >from the documentation which needed to come first.
> >Both builds went off with no problems, but there are paths that need to be
> >reset -- but the problem is that MSYS seems to put the root directory 2
> >levels down from MinGW and put /MinGW in its PATH variable.
> >Anyway, to make a long story short, there are several ways I could proceed,
> >all requiring altering files in either MinGW or MSYS.
> >Does anyone else use this environment? How do you do the build?
> >Slightly annoyed.  Oh well.
> >TIA for any suggestions.
> >--le
> >
> >__________
> >View the list's information and change your settings at
> >//www.freelists.org/list/programmingblind
> >
> __________
> View the list's information and change your settings at 
> //www.freelists.org/list/programmingblind

-- 
John J. Boyer; President, Chief Software Developer
Abilitiessoft, Inc.
http://www.abilitiessoft.com
Madison, Wisconsin USA
Developing software for people with disabilities

by
Michel Such
and
John J. Boyer

This document describes how to build liblouisxml and associated tools under Windows using the msys-MinGW environment.

1. Prerequisites and dependencies:

- Performing the steps below requires you to be familiar with a Unix-like development environment. The one used here is Mingw, so you first need to install the Mingw, Msys and MsysDtk packages, which you can find at: http://www.mingw.org .

Installation of Mingw, Msys and Msysdtk is easy since they come under the form of a classic WINDOWS install program. The packages must be installed in the following order: Mingw, Msys and finally MsysDtk. Mingw will install in the c:\mingw directory. When installing MSYS, you'll be proposed to install it in the same mingw directory. Don't do it! Replace the proposed directory by c:\msys . At the end of installation of MSYS, you'll be asked where Mingw is installed. Answer: c:\mingw .

By default, msys opens in a draphical interface which is not accessible, at least not by Jaws. To tell it to use a command-line interface, go to your msys directory, then to bin. Change the name of rxvt.exe to something else.

You will also need to install pkg-config from: http://pkg-config.freedesktop.org/releases/ Version 0.21 seems to be the preferred one. Uncompress it using the command: tar xfz pkg-config-0.21.tar.gz This creates a directory called pkg-config-0.21

Note: the tar command comes with Mingw and should be located in directory c:\mingw\bin or c:\msys\1.0\bin

>From the MSYS prompt, change directories to pkg-config-0.21 with the command: cd c:/pkg-config-0.21 (note the use of the '/' character instead of the '\' we generally use under Windows).

Now, simply run the 3 following commands: ./configure --prefix=c:/mingw make make install

- As liblouisxml depends on the liblouis and libxml2 libraries, we will first build and install these libraries.

- For convenience, we will install liblouis, libxml2 and liblouisxml in directory c:\louis. Once the complete build process is finished, you will be able to move this directory anywhere you want (for example in c:\ProgramFiles\louis).

2. Installing Liblouis:

>From the Liblouis site: http://www.abilitiessoft.com/ download the latest liblouis tarball. Uncompress it using the command: tar xfz liblouis-x.x.x.tar.gz where x.x.x is the tarball version number used in the filename. This creates a directory called liblouis-x.x.x

>From the MSYS prompt, change directories to liblouis-x.x.x with the command: cd c:/liblouis-x.x.x (note the use of the '/' character instead of the '\' we generally use under Windows).

Now, simply run the 3 following commands: ./configure --prefix=c:/louis make make install

3. Installing libxml2:

>From the Libxml2 site: http://xmlsoft.org/ download the latest libxml2 tarball. Uncompress it using the command: tar xfz libxml2-x.x.x.tar.gz where x.x.x is the tarball version number used in the filename. This creates a directory called libxml2-x.x.x

>From the MSYS prompt, change directories to libxml2-x.x.x with the command: cd c:/libxml2-x.x.x

Now, simply run the 3 following commands: ./configure --prefix=c:/louis make make install

4. Installing liblouisxml:

>From the Liblouisxml site: http://www.abilitiessoft.com/ download the latest liblouisxml tarball. Uncompress it using the command: tar xfz liblouisxml-x.x.x.tar.gz where x.x.x is the tarball version number used in the filename. This creates a directory called liblouisxml-x.x.x

We now need to configure pkg-config a bit so it can find the dependencies: Edit the Msys profile located in directory c:\msys\1.0\etc add the following line at the end of the file: export PKG_CONFIG_PATH=c:/louis/lib/pkgconfig

>From the MSYS prompt, change directories to liblouisxml-x.x.x with the command: cd c:/liblouisxml-x.x.x

Now, simply run the 3 following commands: ./configure --prefix=c:/louis --build=i686 make make install

5 All done!

The directory c:\louis now contains all the components you need. the bin subdirectory contains all executables and dlls. To save some disk space, you may apply the strip command against them as follows: strip *.exe strip *.dll The strip command comes with Mingw and should be located in directory c:\mingw\bin

If you wish to make an archive of your louis directory, which can be used as a sort of Windows binary, do the following: cd c: tar cfz winlouis.tar.gz louss This will create the file winlouis.tar.gz, which will recreate the louis directory and all its subdirectories wherever it is unpacked.

Other related posts: