File tree Expand file tree Collapse file tree 7 files changed +66
-18
lines changed
Expand file tree Collapse file tree 7 files changed +66
-18
lines changed Original file line number Diff line number Diff line change 8888 php prepare.php +apcu +ds +ssh2 +uuid +protobuf +gettext --with-libavif=1 --show-tarball-hash=1 @macos
8989 php sapi/scripts/download-php-src-archive.php
9090
91- echo 'cygwin: https://www.cygwin.com/COPYING' > bin/LICENSE
91+ echo 'cygwin: https://www.cygwin.com/COPYING' >> bin/LICENSE
9292 cd ${{ github.workspace }}/pool/
9393 zip -9 -r ${WORK_DIR}/all-deps.zip ext lib php-tar
9494 HASH=$(sha256sum ${WORK_DIR}/all-deps.zip | awk '{print $1}')
Original file line number Diff line number Diff line change 1616
1717## 相关文章
1818
19- - [ Swoole-Cli v6.1 将允许对 array/string/stream 类型使用内置方法] ( https://mp.weixin.qq.com/s/5qnqmjCEb_zxLaT4sR1HAg )
19+ - [ Swoole-Cli 介绍、使用说明] ( https://wenda.swoole.com/detail/108876 )
20+ - [ Swoole-Cli v6.1 将允许对 array/string/stream 类型使用内置方法] ( https://mp.weixin.qq.com/s/RmdKC5TLREwjcJFc-upZLQ )
2021- [ Swoole-Cli v5.0.2 增加 opcache/readline 扩展,强化 Cli-Server] ( https://wenda.swoole.com/detail/108931 )
2122- [ Swoole-Cli v5.0.1 使用说明] ( https://wenda.swoole.com/detail/108876 )
2223- [ Swoole-Cli v5.0.0 版本新特性预览之新的运行模式] ( https://wenda.swoole.com/detail/108706 )
2324- [ Swoole-Cli 已提供 Windows 平台 (cygwin64)支持] ( https://wenda.swoole.com/detail/108743 )
24- - [ Swoole-Cli 介绍、使用说明 ] ( https://wenda.swoole. com/detail/108876 )
25+ - [ Swoole RFC ] ( https://github. com/swoole/rfc/ )
2526- [ Swoole v6.1 将提供 typed array 强类型数组实现,增强 PHP 标准库] ( https://mp.weixin.qq.com/s/yFuxYdNMqxI1VuZg0J07Wg )
2627- [ Swoole v6 2024 重磅更新:Swoole v6 正式发布,增加 16 项新功能] ( https://mp.weixin.qq.com/s/Ks1x1LNTLdl5jk0sIS6V_w )
2728- [ Swoole v6 协程是否支持 PHP 的 JIT ] ( https://mp.weixin.qq.com/s/Tm-6XVGQSlz0vDENLB3ylA )
Original file line number Diff line number Diff line change 22
33## 一个脚本执行整个构建流程
44
5- > 定制 build-release-php.sh 脚本 即可开始构建
5+ > 定制 build-release-php.sh 即可开始构建
66
77``` bash
88
9- cp build-release-example.sh build-release-php.sh
9+ cp build-release-example.sh build-release-php.sh
1010
11- bash build-release-php.sh
11+ bash build-release-php.sh
1212
1313```
1414
@@ -22,6 +22,50 @@ bash build-release-php.sh
2222
2323## [ wsl] ( ../../docs/wsl.md )
2424
25+ ## 准备 PHP 运行时
26+
27+ ``` bash
28+ # 准备 PHP 运行时
29+ bash sapi/setup-php-runtime.sh
30+
31+ # 准备PHP 运行时 使用代理
32+ bash sapi/setup-php-runtime.sh --proxy http://192.168.3.26:8015
33+
34+ # 准备PHP 运行时 使用镜像 (镜像源 https://www.swoole.com/download)
35+ bash sapi/setup-php-runtime.sh --mirror china
36+
37+
38+ # 验证
39+ shopt -s expand_aliases
40+ __DIR__=$( pwd)
41+ export PATH=" ${__DIR__} /runtime/php/:$PATH "
42+ alias php=" php -d curl.cainfo=${__DIR__} /runtime/php/cacert.pem -d openssl.cafile=${__DIR__} /runtime/php/cacert.pem"
43+
44+ php -v
45+ composer -v
46+
47+ ```
48+
49+ ## 准备依赖库源码
50+
51+ ``` bash
52+
53+ # 源码来源 https://github.com/swoole/swoole-cli/releases/download/${TAG}/all-deps.zip
54+
55+ bash sapi/download-box/download-box-get-archive-from-server.sh
56+
57+ ```
58+
59+ ## 准备 swoole 源码
60+
61+ > 拉取 swoole-cli 源码时没有拉取子模块,就需要执行这一步
62+
63+ ``` bash
64+
65+ git submodule update --init -f
66+
67+ ```
68+
2569## 准备运行环境 (linux/macos/windows)
2670
27711 . [ linux 快速启动 容器 构建环环境 ] ( linux/README.md )
Original file line number Diff line number Diff line change 5151pacman -S --needed --noconfirm git curl wget openssl
5252pacman -S --needed --noconfirm zip unzip xz gcc gcc-libs cmake make
5353pacman -S --needed --noconfirm re2c
54- pacman -S --needed --noconfirm openssl-devel libreadline
5554pacman -S --needed --noconfirm lzip
5655pacman -S --needed --noconfirm zip unzip
5756pacman -S --needed --noconfirm zlib-devel
5857pacman -S --needed --noconfirm bison automake autoconf libtool coreutils
58+ pacman -S --needed --noconfirm openssl-devel libreadline-devel libiconv-devel
5959pacman -S --needed --noconfirm libcurl-devel libxml2-devel libxslt-devel
6060pacman -S --needed --noconfirm libbz2-devel liblz4-devel liblzma-devel libcares-devel
61- pacman -S --needed --noconfirm libyaml-devel libzstd-devel libreadline-devel
62- pacman -S --needed --noconfirm libssh2-devel libidn2-devel gettext-devel
6361pacman -S --needed --noconfirm libzstd-devel
64- pacman -S --needed --noconfirm icu-devel
65- pacman -S --needed --noconfirm libsqlite-devel libsqlite
62+ pacman -S --needed --noconfirm libyaml-devel
63+ pacman -S --needed --noconfirm libssh2-devel libidn2-devel gettext-devel
64+ pacman -S --needed --noconfirm libsqlite-devel
6665pacman -S --needed --noconfirm libedit-devel
6766pacman -S --needed --noconfirm gmp-devel
6867pacman -S --needed --noconfirm brotli-devel
Original file line number Diff line number Diff line change 9797
9898case " $MIRROR " in
9999china)
100- APP_DOWNLOAD_URL=" https://wenda-1252906962.file.myqcloud .com/dist/${APP_NAME} -${APP_VERSION} -${OS} -${ARCH} .tar.xz"
100+ APP_DOWNLOAD_URL=" https://storage.swoole .com/dist/${APP_NAME} -${APP_VERSION} -${OS} -${ARCH} .tar.xz"
101101 COMPOSER_DOWNLOAD_URL=" https://mirrors.tencent.com/composer/composer.phar"
102102 if [ $OS = ' windows' ]; then
103- APP_DOWNLOAD_URL=" https://wenda-1252906962.file.myqcloud .com/dist/${APP_NAME} -${APP_VERSION} -cygwin-${ARCH} .zip"
103+ APP_DOWNLOAD_URL=" https://storage.swoole .com/dist/${APP_NAME} -${APP_VERSION} -cygwin-${ARCH} .zip"
104104 fi
105105 ;;
106106
Original file line number Diff line number Diff line change 3636
3737 if ($mirror -eq ' china' )
3838 {
39- $APP_DOWNLOAD_URL = " https://wenda-1252906962.file.myqcloud .com/dist/$APP_NAME -$APP_VERSION -cygwin-x64.zip"
39+ $APP_DOWNLOAD_URL = " https://storage.swoole .com/dist/$APP_NAME -$APP_VERSION -cygwin-x64.zip"
4040 }
4141 if ($proxy -ne ' ' )
4242 {
4747 {
4848 if (Get-Command " curl.exe" - ErrorAction SilentlyContinue)
4949 {
50- curl.exe - fSLo " $TMP_APP_RUNTIME \$FILE " $APP_DOWNLOAD_URL
50+ curl.exe - H ' Referer: https://www.swoole.com/download ' - H ' User-Agent: download swoole-cli runtime with setup-swoole-cli-runtime.ps1 ' - fSLo " $TMP_APP_RUNTIME \$FILE " $APP_DOWNLOAD_URL
5151 }
5252 else
5353 {
54+ $headers = @ {
55+ ' User-Agent' = ' download swoole-cli runtime with setup-swoole-cli-runtime.ps1'
56+ ' Referer' = ' https://www.swoole.com/download'
57+ }
5458 # Invoke-WebRequest $APP_DOWNLOAD_URL -UseBasicParsing -OutFile $FILE
5559 # Invoke-WebRequest -Uri $APP_DOWNLOAD_URL -OutFile $FILE
56- irm $APP_DOWNLOAD_URL - outfile " $TMP_APP_RUNTIME \$FILE "
60+ irm $APP_DOWNLOAD_URL - Headers $headers - outfile " $TMP_APP_RUNTIME \$FILE "
5761 }
5862 }
5963
Original file line number Diff line number Diff line change 121121
122122case " $MIRROR " in
123123china)
124- APP_DOWNLOAD_URL=" https://wenda-1252906962.file.myqcloud .com/dist/${APP_NAME} -${APP_VERSION} -${OS} -${ARCH} .tar.xz"
124+ APP_DOWNLOAD_URL=" https://storage.swoole .com/dist/${APP_NAME} -${APP_VERSION} -${OS} -${ARCH} .tar.xz"
125125 COMPOSER_DOWNLOAD_URL=" https://mirrors.tencent.com/composer/composer.phar"
126126 if [ $OS = ' windows' ]; then
127- APP_DOWNLOAD_URL=" https://wenda-1252906962.file.myqcloud .com/dist/${APP_NAME} -${APP_VERSION} -cygwin-${ARCH} .zip"
127+ APP_DOWNLOAD_URL=" https://storage.swoole .com/dist/${APP_NAME} -${APP_VERSION} -cygwin-${ARCH} .zip"
128128 fi
129129 ;;
130130
You can’t perform that action at this time.
0 commit comments