|
1 | | -## Script for building Windows PHP packages |
| 1 | +# Build [PHP](https://secure.php.net) for [SimpleFramework](https://github.com/iTXTech/SimpleFramework) |
2 | 2 |
|
3 | | -The script need to be ran on Linux. |
| 3 | +The recommended [PHP](https://secure.php.net) environment for running [SimpleFramework](https://github.com/iTXTech/SimpleFramework). |
4 | 4 |
|
5 | | -## Script for building and installing PHP on Linux |
| 5 | +Features: |
6 | 6 |
|
7 | | -Run this to build and install PHP configure to match your environment. |
8 | | -You need basic compiler package group, build dependencies and curl, sudo, tar. |
| 7 | +1. Thread Safe |
| 8 | +1. Integrated extensions: `sodium`, `gd` and more |
| 9 | +1. Extended extensions: `swoole`, `yaml`, `pthreads`, `runkit7` and `zip` |
| 10 | + |
| 11 | +## Build on Linux |
| 12 | + |
| 13 | +### Dependencies |
9 | 14 |
|
10 | | -The following is just for reference: |
11 | 15 | * For Debian-based distros: `libssl-dev autoconf pkg-config curl libedit-dev libsqlite3-dev libxml2-dev libcurl4-openssl-dev libyaml-dev libzip-dev libgmp-dev libsodium-dev libjpeg-dev libpng-dev libwebp-dev libfreetype6-dev` |
12 | | -* For RPM-based-distros: `autoconf pkg-config curl libedit-devel libsqlite3-devel libxml2-devel libyaml-devel libcurl-devel libzip-last-devel libgmp-devel` |
| 16 | +* For RPM-based-distros: `autoconf pkg-config curl libedit-devel libsqlite3-devel libxml2-devel libyaml-devel libcurl-devel libzip-last-devel gmp-devel` and more |
13 | 17 |
|
14 | 18 | * If you are using Ubuntu 17.04, configure can not locate the libcurl, so you need to `sudo ln -s /usr/include/x86_64-linux-gnu/curl /usr/include` |
15 | 19 |
|
16 | | -Environment variable "$PREFIX" can be set to install to other locations (must be absolute path). The default is /usr/local, which most time has the highest priority in the PATH. |
| 20 | +### Install system wide |
17 | 21 |
|
18 | | -## Home based install with phpbrew |
| 22 | +`$ curl -fsSL https://raw.githubusercontent.com/iTXTech/php-build-scripts/master/install.sh | bash` |
19 | 23 |
|
20 | | -After installing [phpbrew](https://github.com/phpbrew/phpbrew#install), you can build with the following flags: |
21 | | -``` |
22 | | -phpbrew install -j $(nproc) latest +neutral-cgi+mbstring+bcmath+sockets+curl+editline+openssl+zlib+pcntl+zts |
23 | | -phpbrew ext install yaml latest |
24 | | -phpbrew ext install pthreads latest |
25 | | -phpbrew ext install weakref latest |
| 24 | +### Customize your install script |
| 25 | + |
| 26 | +```bash |
| 27 | +$ wget https://raw.githubusercontent.com/iTXTech/php-build-scripts/master/install.sh |
| 28 | +$ nano install.sh #modify something, like changing DL to aria2c -s16 -x16 |
| 29 | +$ bash install.sh |
26 | 30 | ``` |
| 31 | + |
| 32 | +## Build on macOS |
| 33 | + |
| 34 | +1. Install dependencies using [homebrew](https://brew.sh/) |
| 35 | +1. You will have to specify the location of libraries in `install.sh` |
| 36 | + |
| 37 | +## Windows Binary |
| 38 | + |
| 39 | +See [releases](https://github.com/iTXTech/php-build-scripts/releases) |
| 40 | + |
| 41 | +Include `pthreads` and `yaml`. |
| 42 | + |
| 43 | +`runkit7` will be available shortly. |
0 commit comments