summaryrefslogtreecommitdiff
path: root/win32/installer/README
blob: 0879497db5493eb2dbc32785721092075eeb92d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
PHP Installer for Win32, by Wez Furlong <wez@thebrainroom.com>
==============================================================
$Id$

Here are the supporting scripts for building the win32 PHP installer.

Requirements:

    MSI-2-XML from http://msi2xml.sourceforge.net/#Installation


Installer Layout:

We have the following features:

    o PHP Core - Always installed.
                 Includes php5ts.dll, php.ini + common dlls
                 and config files

    o SAPI
                 Contains a node for each stable SAPI

    o Extensions
                 Contains a node for each stable extension

    o Experimental
        o SAPI          Experimental SAPIs
        o Extensions    Experimental Extensions








You need to have the Super-Pimp Installer from Nullsoft (Open Source).
It is available here:
    http://nsis.sourceforge.net/

To build an installer, you need:

    o A Source Tree
    o A win32 snapshot (extracted from the .zip)

    (The source tree and snapshot should have matching versions!)

A Script/Batch file.
I'm using this (in a .bat file):

----------------------------------------------------------------
cd <snapshot_root>
cli\php <source_root>\win32\installer\gen-nsis.php > php.nsi
"C:\Program Files\NSIS\makensis" /pause /nocd php.nsi
----------------------------------------------------------------
  
  ** It is a good idea to examine the php.nsi file for WARNING
  ** comments.  These indicate inconsistencies about your source
  ** tree structure.

This will generate InstallPHP<Version>.exe, where <Version> is the version of
the php in the snapshot.  The Installer will be placed in the snapshot root.

Installer Concept
=================

Maintaining installers is a real chore, so we use PHP to generate as much as
possible.

The gen-nsis.php script will examine the extensions dir from the snapshot and
then attempt to extract information about the extensions from the source code.
The sapi dir is subjected to similar treatment.

Throughout the installation, values for php.ini settings are decided; these are
appended to a temporary file.  After everything has been installed, the
iniset.php script is run and merges the values from the temporary file into the
"official" php.ini.

These scripts take advantage of features found in PHP 4.3.0 and later, so you
can't build a PHP 4.2.x distro with it.

Hacking
=======

While hacking, it's a good idea to comment out the SetCompressor line; it will
speed up your installer builds...
Also, switch the logic for the $SYSDIR define at the top to install vital DLLs
to a fake system dir.



vim:et:tw=78