Skip to content

Commit 064621f

Browse files
committed
- if they are outdated/wrong, no need to confuse the users
1 parent 4c0d91b commit 064621f

File tree

1 file changed

+1
-174
lines changed

1 file changed

+1
-174
lines changed

README.WIN32-BUILD-SYSTEM

+1-174
Original file line numberDiff line numberDiff line change
@@ -1,179 +1,6 @@
11
The Win32 Build System.
2-
$Id$
3-
Wez Furlong <wez@thebrainroom.com>
42

5-
6-
NOTE:
7-
These instructions are outdated, use at your own risk.
8-
9-
10-
If you need help with the build system, send mail to
11-
internals-win@lists.php.net; please don't email me directly.
12-
13-
===========================================================
14-
Contents:
15-
1. How to build PHP under windows
16-
a. Requirements
17-
b. Opening a command prompt
18-
c. Generating configure.js
19-
d. Configuring
20-
e. Building
21-
f. Cleaning up
22-
g. Running the test suite
23-
h. snapshot building
24-
25-
2. How to write config.w32 files
26-
x. to be written.
27-
28-
===========================================================
29-
1. How to build PHP under windows
30-
a. Requirements
31-
32-
You need:
33-
- Windows Scripting Host (cscript.exe)
34-
- Microsoft Build Tools from:
35-
Microsoft Visual Studio (VC6) or later
36-
37-
You also need:
38-
- bindlib_w32 [http://www.php.net/extra/bindlib_w32.zip]
39-
- win32build [http://www.php.net/extra/win32build.zip]
40-
41-
b. Opening the Build Environment Command Prompt:
42-
- Using Visual Studio (VC6)
43-
1. Install it
44-
2. If you have a VC++ Command Prompt icon on your start menu,
45-
click on it to get a Command Prompt with the env vars
46-
set up correctly.
47-
48-
If not, create a new shortcut and set the Target to:
49-
50-
%comspec% /k "C:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32.bat"
51-
52-
You might also want to set the prompt to start in
53-
a convenient location (such as the root of your
54-
PHP source checkout).
55-
56-
- Using Visual Studio .Net
57-
1. Install it.
58-
2. Under the Visual Studio .Net Tools sub menu of your start
59-
menu, you should have a Visual Studio .Net Command Prompt
60-
icon. If not, create a new shortcut and set the Target to:
61-
62-
%comspec% /k "C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\vsvars32.bat"
63-
64-
You might also want to set the prompt to start in
65-
a convenient location (such as the root of your
66-
PHP source checkout).
67-
68-
- Using the Platform SDK tools
69-
1. Download the Platform SDK:
70-
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
71-
72-
- You need the Core SDK, which is approx 200MB to download
73-
and requires approx 500MB of disk space.
74-
- The other components of the SDK are not required by PHP
75-
- You might be able to reduce the download size by downloading
76-
the installer control component first and then selecting
77-
only the Build Environment (around 30MB), but I haven't
78-
tried this.
79-
80-
** Note: it seems that MS don't include the 32 bit
81-
build tools in the platform SDK any longer, so
82-
you will probably have very limited luck if you
83-
don't also have VC++ or VS.Net already installed.
84-
85-
2. Once installed, you will have an icon on your start menu
86-
that will launch the build environment; the latest SDK's
87-
install a number of different versions of this; you probably
88-
want to choose the Windows 2000 Retail build environment.
89-
Clicking on this will open a command prompt with its Path,
90-
Include and Lib env vars set to point to the build tools
91-
and win32 headers.
92-
93-
c. Generating configure
94-
95-
Change directory to where you have your PHP sources.
96-
Run buildconf.bat.
97-
98-
d. Configuring
99-
100-
cscript /nologo configure.js --help
101-
102-
Will give you a list of configuration options; these will
103-
have the form:
104-
105-
--enable-foo or --disable-foo or --with-foo or --without-foo.
106-
107-
--enable-foo will turn something on, and is equivalent to
108-
specifying --enable-foo=yes
109-
110-
--disable-foo will turn something off, and is equivalent to
111-
specifying --enable-foo=no
112-
113-
--enable-foo=shared will attempt to build that feature as
114-
a shared, dynamically loadable module.
115-
116-
Sometimes a configure option needs additional information
117-
about where to find headers and libraries; quite often
118-
you can specify --enable-foo=option where option could be
119-
the path to where to find those files. If you want to
120-
specify a parameter and build it as shared, you can use
121-
this syntax instead: --enable-foo=shared,option
122-
123-
The same rules all apply to --with-foo and --without-foo;
124-
the only difference is the way the options are named;
125-
the convention is that --enable-foo means that you are
126-
switching on something that comes with PHP, whereas
127-
--with-foo means that you want to build in something
128-
external to PHP.
129-
130-
e. Building
131-
132-
Once you have successfully configured your build (make
133-
sure you read the output from the command to make sure
134-
it worked correctly), you can build the code; simply type
135-
136-
"nmake" at the command prompt, and it will build everthing
137-
you asked for.
138-
139-
Once the build has completed, you will find your binaries
140-
in the build dir determined by configure; this is typically
141-
Release_TS for release builds or Debug_TS for debug builds.
142-
If you build a non-thread-safe build, it will use Release
143-
or Debug to store the files. Also in this build dir you
144-
will find sub directories for each module that went into
145-
your PHP build. The files you'll want to keep are the
146-
.exe and .dll files directly in your build dir.
147-
148-
f. Cleaning Up
149-
150-
You can automatically delete everything that was built
151-
by running "nmake clean". This will delete everything
152-
that was put there when you ran nmake, including the
153-
.exe and .dll files.
154-
155-
g. Running the test suite
156-
157-
You can verify that your build is working well by running
158-
the regression test suite. You do this by typing
159-
"nmake test". You can specify the tests you want to run
160-
by defing the TESTS variable - if you wanted to run the
161-
sqlite test suite only, you would type
162-
"nmake /D TESTS=ext/sqlite/tests test"
163-
164-
h. Snapshot Building
165-
166-
If you want to set up an automated build that will tolerate
167-
breakages in some of the modules, you can use the
168-
--enable-snapshot-build configure option to generate a
169-
makefile optimized for that purpose. A snapshot build will
170-
switch the argument parser so that the default option for
171-
configure switches that your don't specify will be set
172-
to "shared". The effect of this is to turn on all options
173-
unless you explicitly disable them. When you have configured
174-
your snapshot build, you can use "nmake build-snap" to build
175-
everything, ignoring build errors in individual extensions
176-
or SAPI.
3+
See http://wiki.php.net/internals/windows/stepbystepbuild
1774

1785
vim:tw=78:sw=1:ts=1:et
1796

0 commit comments

Comments
 (0)