<< Prev | - Up - | Next >> |
Package Directory
We will install all our packages in a new directory we create especially for them. Say this directory is /opt/packages
. Whatever it is, we will refer to it as packages throughout this document. Furthermore, we populate the packages directory with the following subdirectories:
Directory | Purpose |
---|---|
| For the Dynamically Linked Libraries (DLLs). |
| For the packages' C/C++ header files ( |
| For the libraries ( |
Furthermore, we create a separate directory for the builds, for example, /tmp/build
. We will refer to this as build.
Required Packages
The following table lists the packages we need, along with their versions and the place where they can be downloaded.
Package | Version | Location |
---|---|---|
GNU MP | 4.1.4 | |
zlib | 1.2.3 | |
Tcl/Tk | 8.4.12.0 | |
GDBM | 1.8.3 | |
regex | 0.12 |
Note that these are all source packages except for Tcl/Tk. You'll soon find out why.
Build Flags
The remainder of this chapter will use CFLAGS to indicate a meaningful set of flags for the C/C++ compilers. For instance, you can use the following, which we used for the last releases:
-mno-cygwin -O3 -fomit-frame-pointer -march=i586 -mcpu=i686
It is imperative that you include -mno-cygwin
!
A Note for the Lazy
There's some good news: If you are lazy enough that you would trust the packages I built, you can just obtain a copy of my packages directory from http://www.mozart-oz.org/download/mozart-ftp/extras/packages.tgz
and skip most of the following sections (in fact, all but those about the msvcrt and Emacs). Be sure to adapt the included tclConfig.sh
and tkConfig.sh
files to reflect your system's paths!
This one is easy: You already have it! It is located in $SYSTEMROOT/system32/
(at least under Windows 2000; if you're running 9x, then you'll have to locate it yourself). So we just copy it to our packages/dlls
directory:
cp $SYSTEMROOT/system32/msvcrt.dll
packages/dlls
Unpack it, configure it, build it, and install it thus:
cd
buildpackages
tar zxvf gmp-4.1.2.tar.gz
cd gmp-4.1.2
./configure --prefix=--disable-shared CFLAGS="
CFLAGS"
make
make install
You should end up with the following files:
packages |
packages |
Unpack it, configure it, build it, and install it thus:
cd
buildCFLAGS
tar zxvf zlib.tar.gz
cd zlib-1.1.4
CFLAGS="" ./configure --prefix=
packages
make
make install
You should end up with the following files:
packages |
packages |
packages |
Install your Tcl/Tk distribution (for example, ActiveTcl). Copy the following files and directories from the installed location:
packages |
packages |
packages |
packages |
packages |
packages |
packages |
packages |
packages |
packages |
packages |
packages |
packages |
Unfortunately, Windows Tcl/Tk distributions come without the all-important tclConfig.sh
and tkConfig.sh
files, which we therefore have to create manually (directly in the packages directory). tclConfig.sh
should have the following contents:
# tclConfig.sh --
packages
TCL_VERSION='8.4'
TCL_PREFIX=''
packages
TCL_LIBS=''
TCL_LIB_SPEC='/dlls/tcl84.dll'
Whereas tkConfig.sh
ought to look like this:
# tkConfig.sh --
packages
TK_VERSION='8.4'
TK_PREFIX=''
packages
TK_LIBS=''
TK_LIB_SPEC='/dlls/tk84.dll'
TK_XINCLUDES=''
(Don't forget to substitute your actual packages directory for packages in these files!)
Unpack it thus:
cd
packages
tar zxvf gdbm-1.8.3.tar.gz
cd gdbm-1.8.3
GDBM does not compile out-of-the-box for MinGW, so we have to apply a patch. Copy the file gdbm-1.8.3-patch.diff, then patch it, configure it, build it, and install it thus:
patch < gdbm-1.8.3-patch.diff
CFLAGS
CFLAGS="" ./configure --disable-shared
CFLAGS
make CFLAGS=""
packages
make prefix=install
You should end up with the following files:
packages |
packages |
Unpack it thus:
cd
packages
tar zxvf regex-0.12.tar.gz
cd regex-0.12
Like GDBM, the regex package needs a patch regex-0.12-patch.diff. Patch the package, configure it, build it, and install it thus:
patch < regex-0.12-patch.diff
CFLAGS
CFLAGS="" ./configure --prefix=
packagesCFLAGS
make CFLAGS=""
packages
make prefix=install
You should end up with the following files:
packages |
packages |
You need an installed Emacs. You can get it at http://www.gnu.org/software/emacs/windows/
. Unpack it somewhere, for example to /cygdrive/c/Program\ Files/
and execute the addpm.exe
binary in the bin
subdirectory. We will refer to the directory where Emacs is installed as emacs.
You really need to use the Emacs version you have installed in your Windows system. If you have Emacs installed along with cygwin, you have to change your PATH to build Mozart in order to find first the Emacs that it's installed for Windows. Be aware that the configure
script is not going to check whether you have Emacs installed in your system, but it will be necessary to build, so install it NOW!
<< Prev | - Up - | Next >> |