source: releases/0.99.0/doc/devel/mingw-build-OBSOLETE.txt @ 244

Last change on this file since 244 was 241, checked in by tim, 14 years ago

moving these back for the release

File size: 2.8 KB
Line 
1Cross-compiling RegLookup to Windows with MinGW
2===============================================
3
4MinGW can be used to compile Windows binaries from UNIX environments.
5The following instructions outline the steps required to build
6reglookup.exe and reglookup-recover.exe.  This process is experimental
7and Windows binaries have not been well tested.  You have been warned.
8
9Prerequisites
10-------------
11
12- Before you start, ensure you have MinGW installed.  Under Debian,
13  install the `mingw32' package.
14
15- Download pre-compiled libiconv packages from here:
16   http://gnuwin32.sourceforge.net/packages/libiconv.htm
17
18  You will need to download the "Binaries" and "Developer files"
19  packages, whose files are named libiconv-VERSION-bin.zip and
20  libiconv-VERSION-lib.zip respectively.
21
22- Unpack both zip files into a designated top-level directory.
23  Suggested commands:
24  $ mkdir /usr/local/src/libiconv-VERSION-bin /usr/local/src/libiconv-VERSION-lib
25  $ cd /usr/local/src/libiconv-VERSION-bin
26  $ unzip .../path/to/libiconv-VERSION-bin.zip
27  $ cd /usr/local/src/libiconv-VERSION-lib
28  $ unzip .../path/to/libiconv-VERSION-lib.zip
29 
30
31Building
32--------
33
34Review the top level RegLookup Makefile to ensure the settings match
35your environment.  Find the conditional block which looks like:
36
37################################################################################
38# MinGW cross-compiling build settings
39ifdef BUILD_MINGW
40
41## These may need to be changed
42CC=i586-mingw32msvc-cc
43LIBICONV_PATH=/usr/local/src/libiconv-1.9.2-1-lib
44
45## These probably do not need to be changed
46BIN_EXT=.exe
47INC:=$(INC) -I$(LIBICONV_PATH)/include
48EXTRA_OBJ=$(LIBICONV_PATH)/lib/libiconv.dll.a
49
50endif
51################################################################################
52
53
54If either the CC or LIBICONV_PATH settings are incorrect for your
55system, either update the Makefile, or override these options at build
56time when you run make.  For instance, the above settings in the
57Makefile are correct, you can execute the build by running:
58
59$ make BUILD_MINGW=1
60
61Alternatively, you may override the variables above with:
62
63$ make BUILD_MINGW=1 CC=my-mingw-binary LIBICONV_PATH=.../path/to/libiconv-VERSION-lib
64
65Once the build is complete, you'll find the .exe files under the
66build/bin directory.
67
68
69Installation
70------------
71Naturally, there is no install Makefile target for the MinGW build
72process, since we aren't installing on the local system.  To install
73these binaries on a Windows machine, simply copy over the reglookup.exe
74and reglookup-recover.exe files from the build/bin directory to the
75desired host.  In addition, you will need to install the libiconv2.dll
76file on that host (either in the same directory as the reglookup
77executables, or somewhere in the DLL search path).  This file is
78available in the libiconv-VERSION-bin.zip file you downloaded earlier,
79under the `bin' subdirectory.
80
Note: See TracBrowser for help on using the repository browser.