~ubuntu-branches/ubuntu/lucid/php5/lucid

« back to all changes in this revision

Viewing changes to README.WIN32-BUILD-SYSTEM

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-03-16 09:09:50 UTC
  • mfrom: (1.1.18 upstream) (0.3.10 sid)
  • Revision ID: james.westby@ubuntu.com-20100316090950-e36m0pzranoixifd
Tags: 5.3.2-1ubuntu1
* Merge from debian unstable: 
  - debian/control:
    * Dropped firebird2.1-dev, libc-client-dev, libmcrypt-dev as it is in universe.
    * Dropped libmysqlclient15-dev, build against mysql 5.1.
    * Dropped libcurl-dev not in the archive.
    * Suggest php5-suhosin rather than recommends.
    * Dropped php5-imap, php5-interbase, php5-mcrypt since we have versions already in
      universe.
    * Dropped libonig-dev and libqgdbm since its in universe. (will be re-added in lucid+1)
    * Dropped locales-all.
  - modulelist: Drop imap, interbase, and mcrypt.
  - debian/rules:
    * Dropped building of mcrypt, imap, and interbase.
    * Install apport hook for php5.
  - Dropped debian/patches/libedit_is_editline.patch.

Show diffs side-by-side

added added

removed removed

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