Skip to content

Commit 3b4c8d6

Browse files
committed
make README clearer
1 parent 8ef1dfd commit 3b4c8d6

File tree

1 file changed

+57
-58
lines changed

1 file changed

+57
-58
lines changed

README.md

Lines changed: 57 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,64 @@ I used 7.0.11 and configured with:
5353

5454
```
5555
$ ./configure --prefix=/home/john/vips --enable-debug --enable-maintainer-zts \
56-
--enable-cgi --enable-cli --with-readline --with-openssl --with-zlib \
57-
--with-gd --with-jpeg-dir=/usr
56+
--enable-cgi --enable-cli --with-readline --with-openssl --with-zlib \
57+
--with-gd --with-jpeg-dir=/usr
5858
```
5959

60-
You'll need libvips 8.0 or later, including all the headers for development.
61-
On linux, install with your package manager.
62-
On OS X, install with `brew` or MacPorts. For Windows, download a zip from
63-
the libvips
64-
website, or build your own.
60+
You'll need libvips 8.0 or later, including all the headers for
61+
development. On linux, install with your package manager. On OS X,
62+
install with `brew` or MacPorts. For Windows, download a zip from the
63+
libvips website, or build your own.
6564

66-
### Regenerate build system
65+
### Installing
66+
67+
```
68+
$ pear package
69+
```
70+
71+
to make `vips-0.1.0.tgz`, then:
72+
73+
```
74+
$ pear install vips-0.1.0.tgz
75+
```
76+
77+
to install.
78+
79+
Add:
80+
81+
```
82+
extension=vips.so
83+
```
84+
85+
to your `php.ini`, perhaps in `~/vips/lib/php.ini`, if you configured php as
86+
above.
87+
88+
### Using
89+
90+
Try:
91+
92+
```php
93+
#!/usr/bin/env php
94+
<?php
95+
if (!extension_loaded("vips")) {
96+
dl('vips.' . PHP_SHLIB_SUFFIX);
97+
}
98+
99+
$x = vips_image_new_from_file($argv[1])["out"];
100+
$x = vips_call("invert", $x)["out"];
101+
vips_image_write_to_file($x, $argv[2]);
102+
?>
103+
```
104+
105+
And run with:
106+
107+
```
108+
$ ./try1.php ~/pics/k2.jpg x.tif
109+
```
110+
111+
See `examples/`.
112+
113+
### Development: regenerate build system
67114

68115
Run:
69116

@@ -73,7 +120,7 @@ $ phpize
73120

74121
To scan `config.m4` and your php install and regenerate the build system.
75122

76-
### Configuring
123+
### Development: configure
77124

78125
Run
79126

@@ -84,7 +131,7 @@ $ ./configure
84131
Check the output carefully for errors, and obviously check that it found your
85132
libvips.
86133

87-
### Installing
134+
### Development: make, test and install
88135

89136
Run:
90137

@@ -116,31 +163,6 @@ Finally, install to your php extensions area with:
116163
$ make install
117164
```
118165

119-
### Using
120-
121-
Try:
122-
123-
```php
124-
#!/usr/bin/env php
125-
<?php
126-
if (!extension_loaded("vips")) {
127-
dl('vips.' . PHP_SHLIB_SUFFIX);
128-
}
129-
130-
$x = vips_image_new_from_file($argv[1])["out"];
131-
$x = vips_call("invert", $x)["out"];
132-
vips_image_write_to_file($x, $argv[2]);
133-
?>
134-
```
135-
136-
And run with:
137-
138-
```
139-
$ ./try1.php ~/pics/k2.jpg x.tif
140-
```
141-
142-
See `examples/`.
143-
144166
### Links
145167

146168
http://php.net/manual/en/internals2.php
@@ -150,26 +172,3 @@ https://devzone.zend.com/303/extension-writing-part-i-introduction-to-php-and-ze
150172
https://devzone.zend.com/317/extension-writing-part-ii-parameters-arrays-and-zvals/
151173

152174
https://devzone.zend.com/446/extension-writing-part-iii-resources/
153-
154-
### Packaging
155-
156-
```
157-
$ pear package
158-
```
159-
160-
to make `vips-0.1.0.tgz`, then:
161-
162-
```
163-
$ pear install vips-0.1.0.tgz
164-
```
165-
166-
to install.
167-
168-
Add:
169-
170-
```
171-
extension=vips.so
172-
```
173-
174-
to your `php.ini`, perhaps in `~/vips/lib/php.ini`, if you configured php as
175-
above.

0 commit comments

Comments
 (0)