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