Readme.txt revision 5821806d5e7f356e8fa4b058a389a808ea183019
1
2                             Windows port
3                             ------------
4
5This directory contains the files required to build this software on the
6native Windows platform.
7
8As a rule of thumb, the root of this directory contains files needed
9to build the library using the command-line tools, while various
10subdirectories contain project files for various IDEs.
11
12
13  1. Building from the command-line
14  =================================
15
16This is the easiest, preferred and currently supported method. 
17
18In order to build from the command-line you need to make sure that
19your compiler works from the command line. This is not always the
20case, often the required environment variables are missing. If you are
21not sure, test if this works first. If it doesn't, you will first have
22to configure your compiler suite to run from the command-line - please
23refer to your compiler's documentation regarding that.
24
25The first thing you want to do is configure the source. You can have
26the configuration script do this automatically for you. The
27configuration script is written in JScript, a Microsoft's
28implementation of the ECMA scripting language. Almost every Windows
29machine can execute this through the Windows Scripting Host. If your
30system lacks the ability to execute JScript for some reason, you must
31perform the configuration manually.
32
33The second step is compiling the source and, optionally, installing it
34to the location of your choosing.
35
36
37  1.1 Configuring the source automatically
38  ----------------------------------------
39
40The configuration script accepts numerous options. Some of these
41affect features which will be available in the compiled software,
42others affect the way the software is built and installed. To see a
43full list of options supported by the configuration script, run
44
45  cscript configure.js help
46
47from the win32 subdirectory. The configuration script will present you
48the options it accepts and give a biref explanation of these. In every
49case you will have two sets of options. The first set is specific to
50the software you are building and the second one is specific to the
51Windows port.
52
53Once you have decided which options suit you, run the script with that
54options. Here is an example:
55
56  cscript configure.js prefix=c:\opt include=c:\opt\include 
57    lib=c:\opt\lib debug=yes
58
59The previous example will configure the process to install the library
60in c:\opt, use c:\opt\include and c:\opt\lib as additional search
61paths for the compiler and the linker and build executables with debug
62symbols.
63
64Note: Please do not use path names which contain spaces. This will
65fail. Allowing this would require me to put almost everything in the
66Makefile in quotas and that looks quite ugly with my
67syntax-highlighting engine. If you absolutely must use spaces in paths
68send me an email and tell me why. If there are enough of you out there
69who need this, or if a single one has a very good reason, I will
70modify the Makefile to allow spaces in paths.
71
72
73  1.2 (Not) Configuring the source manually
74  -----------------------------------------
75
76The manual configuration is pretty straightforward, but I would
77suggest rather to get a JScript engine and let the configure script do
78it for you. This process involves editing the apropriate Makefile to
79suit your needs, as well as manually generating certain *.h files from
80their *.h.in sources.
81
82If you really have no idea what I am talking about and ask yourself
83what in Gods name do I mean with '*.h files and their *.h.in sources',
84then you really should do an automatic configuration. Which files must
85be generated and what needs to be done with their sources in order to
86generate them is something people who have built this software before
87allready know. You will not find any explanations for that
88here. Please configure the source manually only if you allready know
89what you must do. Otherwise, you have the choice of either getting a
90precompiled binary distribution, or performing the automatic
91configuration.
92
93
94  1.3 Compiling
95  -------------
96
97After the configuration stage has been completed, you want to build
98the software. You will have to use the make tool which comes with
99your compiler. If you, for example, configured the source to build
100with Microsoft's MSVC compiler, you would use the NMAKE utility. If
101�ou configured it to build with GNU C compiler, mingw edition, you
102would use the GNU make. Assuming you use MSVC, type
103
104  nmake
105
106in the win32 subdirectory.When the building completes, you will find
107the executable files in win32\binaries directory.
108 
109You can install the software into the directory you specified to the
110configure script during the configure stage by typing
111
112  nmake install
113
114That would be it, enjoy.
115
116
117  2. Building with the IDE
118  ========================
119
120Each supported IDE has its project files placed in a subdirectory of
121win32. If you use a particular IDE, you should be able to
122instinctively recognise its project files. When you have found your
123favourites, load them into the IDE and do whatever you would do with
124any other project files. If you are a novice and puzzled about how to
125use particular project files with a particular IDE, check for a readme
126file in that IDEs subdirectory. I won't discuss any particular IDE
127here, because I would like to keep this document as general as
128possible, and there is also a chance that support exists for IDEs
129which I have never seen.
130
131
132November 2002, Igor Zlatkovic <igor@zlatkovic.com>
133
134