Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/auto-cache-pool-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
php prepare.php +apcu +ds +ssh2 +uuid +protobuf +gettext --with-libavif=1 --show-tarball-hash=1 @macos
php sapi/scripts/download-php-src-archive.php

echo 'cygwin: https://www.cygwin.com/COPYING' > bin/LICENSE
echo 'cygwin: https://www.cygwin.com/COPYING' >> bin/LICENSE
cd ${{ github.workspace }}/pool/
zip -9 -r ${WORK_DIR}/all-deps.zip ext lib php-tar
HASH=$(sha256sum ${WORK_DIR}/all-deps.zip | awk '{print $1}')
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@

## 相关文章

- [Swoole-Cli v6.1 将允许对 array/string/stream 类型使用内置方法](https://mp.weixin.qq.com/s/5qnqmjCEb_zxLaT4sR1HAg)
- [Swoole-Cli 介绍、使用说明](https://wenda.swoole.com/detail/108876)
- [Swoole-Cli v6.1 将允许对 array/string/stream 类型使用内置方法](https://mp.weixin.qq.com/s/RmdKC5TLREwjcJFc-upZLQ)
- [Swoole-Cli v5.0.2 增加 opcache/readline 扩展,强化 Cli-Server](https://wenda.swoole.com/detail/108931)
- [Swoole-Cli v5.0.1 使用说明](https://wenda.swoole.com/detail/108876)
- [Swoole-Cli v5.0.0 版本新特性预览之新的运行模式](https://wenda.swoole.com/detail/108706)
- [Swoole-Cli 已提供 Windows 平台 (cygwin64)支持](https://wenda.swoole.com/detail/108743)
- [Swoole-Cli 介绍、使用说明](https://wenda.swoole.com/detail/108876)
- [Swoole RFC ](https://github.com/swoole/rfc/)
- [Swoole v6.1 将提供 typed array 强类型数组实现,增强 PHP 标准库](https://mp.weixin.qq.com/s/yFuxYdNMqxI1VuZg0J07Wg)
- [Swoole v6 2024 重磅更新:Swoole v6 正式发布,增加 16 项新功能](https://mp.weixin.qq.com/s/Ks1x1LNTLdl5jk0sIS6V_w)
- [Swoole v6 协程是否支持 PHP 的 JIT ](https://mp.weixin.qq.com/s/Tm-6XVGQSlz0vDENLB3ylA)
Expand Down
50 changes: 47 additions & 3 deletions sapi/quickstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

## 一个脚本执行整个构建流程

> 定制 build-release-php.sh 脚本 即可开始构建
> 定制 build-release-php.sh 即可开始构建

```bash

cp build-release-example.sh build-release-php.sh
cp build-release-example.sh build-release-php.sh

bash build-release-php.sh
bash build-release-php.sh

```

Expand All @@ -22,6 +22,50 @@ bash build-release-php.sh

## [wsl](../../docs/wsl.md)

## 准备 PHP 运行时

```bash
# 准备 PHP 运行时
bash sapi/setup-php-runtime.sh

# 准备PHP 运行时 使用代理
bash sapi/setup-php-runtime.sh --proxy http://192.168.3.26:8015

# 准备PHP 运行时 使用镜像 (镜像源 https://www.swoole.com/download)
bash sapi/setup-php-runtime.sh --mirror china


# 验证
shopt -s expand_aliases
__DIR__=$(pwd)
export PATH="${__DIR__}/runtime/php/:$PATH"
alias php="php -d curl.cainfo=${__DIR__}/runtime/php/cacert.pem -d openssl.cafile=${__DIR__}/runtime/php/cacert.pem"

php -v
composer -v

```

## 准备依赖库源码

```bash

# 源码来源 https://github.com/swoole/swoole-cli/releases/download/${TAG}/all-deps.zip

bash sapi/download-box/download-box-get-archive-from-server.sh

```

## 准备 swoole 源码

> 拉取 swoole-cli 源码时没有拉取子模块,就需要执行这一步

```bash

git submodule update --init -f

```

## 准备运行环境 (linux/macos/windows)

1. [ linux 快速启动 容器 构建环环境 ](linux/README.md)
Expand Down
9 changes: 4 additions & 5 deletions sapi/quickstart/windows/msys2-build/install-msys2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,17 @@ fi
pacman -S --needed --noconfirm git curl wget openssl
pacman -S --needed --noconfirm zip unzip xz gcc gcc-libs cmake make
pacman -S --needed --noconfirm re2c
pacman -S --needed --noconfirm openssl-devel libreadline
pacman -S --needed --noconfirm lzip
pacman -S --needed --noconfirm zip unzip
pacman -S --needed --noconfirm zlib-devel
pacman -S --needed --noconfirm bison automake autoconf libtool coreutils
pacman -S --needed --noconfirm openssl-devel libreadline-devel libiconv-devel
pacman -S --needed --noconfirm libcurl-devel libxml2-devel libxslt-devel
pacman -S --needed --noconfirm libbz2-devel liblz4-devel liblzma-devel libcares-devel
pacman -S --needed --noconfirm libyaml-devel libzstd-devel libreadline-devel
pacman -S --needed --noconfirm libssh2-devel libidn2-devel gettext-devel
pacman -S --needed --noconfirm libzstd-devel
pacman -S --needed --noconfirm icu-devel
pacman -S --needed --noconfirm libsqlite-devel libsqlite
pacman -S --needed --noconfirm libyaml-devel
pacman -S --needed --noconfirm libssh2-devel libidn2-devel gettext-devel
pacman -S --needed --noconfirm libsqlite-devel
pacman -S --needed --noconfirm libedit-devel
pacman -S --needed --noconfirm gmp-devel
pacman -S --needed --noconfirm brotli-devel
Expand Down
4 changes: 2 additions & 2 deletions setup-php-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ done

case "$MIRROR" in
china)
APP_DOWNLOAD_URL="https://wenda-1252906962.file.myqcloud.com/dist/${APP_NAME}-${APP_VERSION}-${OS}-${ARCH}.tar.xz"
APP_DOWNLOAD_URL="https://storage.swoole.com/dist/${APP_NAME}-${APP_VERSION}-${OS}-${ARCH}.tar.xz"
COMPOSER_DOWNLOAD_URL="https://mirrors.tencent.com/composer/composer.phar"
if [ $OS = 'windows' ]; then
APP_DOWNLOAD_URL="https://wenda-1252906962.file.myqcloud.com/dist/${APP_NAME}-${APP_VERSION}-cygwin-${ARCH}.zip"
APP_DOWNLOAD_URL="https://storage.swoole.com/dist/${APP_NAME}-${APP_VERSION}-cygwin-${ARCH}.zip"
fi
;;

Expand Down
10 changes: 7 additions & 3 deletions setup-swoole-cli-runtime.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ try

if ($mirror -eq 'china')
{
$APP_DOWNLOAD_URL = "https://wenda-1252906962.file.myqcloud.com/dist/$APP_NAME-$APP_VERSION-cygwin-x64.zip"
$APP_DOWNLOAD_URL = "https://storage.swoole.com/dist/$APP_NAME-$APP_VERSION-cygwin-x64.zip"
}
if ($proxy -ne '')
{
Expand All @@ -47,13 +47,17 @@ try
{
if (Get-Command "curl.exe" -ErrorAction SilentlyContinue)
{
curl.exe -fSLo "$TMP_APP_RUNTIME\$FILE" $APP_DOWNLOAD_URL
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
}
else
{
$headers = @{
'User-Agent' = 'download swoole-cli runtime with setup-swoole-cli-runtime.ps1'
'Referer' = 'https://www.swoole.com/download'
}
# Invoke-WebRequest $APP_DOWNLOAD_URL -UseBasicParsing -OutFile $FILE
# Invoke-WebRequest -Uri $APP_DOWNLOAD_URL -OutFile $FILE
irm $APP_DOWNLOAD_URL -outfile "$TMP_APP_RUNTIME\$FILE"
irm $APP_DOWNLOAD_URL -Headers $headers -outfile "$TMP_APP_RUNTIME\$FILE"
}
}

Expand Down
4 changes: 2 additions & 2 deletions setup-swoole-cli-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ fi

case "$MIRROR" in
china)
APP_DOWNLOAD_URL="https://wenda-1252906962.file.myqcloud.com/dist/${APP_NAME}-${APP_VERSION}-${OS}-${ARCH}.tar.xz"
APP_DOWNLOAD_URL="https://storage.swoole.com/dist/${APP_NAME}-${APP_VERSION}-${OS}-${ARCH}.tar.xz"
COMPOSER_DOWNLOAD_URL="https://mirrors.tencent.com/composer/composer.phar"
if [ $OS = 'windows' ]; then
APP_DOWNLOAD_URL="https://wenda-1252906962.file.myqcloud.com/dist/${APP_NAME}-${APP_VERSION}-cygwin-${ARCH}.zip"
APP_DOWNLOAD_URL="https://storage.swoole.com/dist/${APP_NAME}-${APP_VERSION}-cygwin-${ARCH}.zip"
fi
;;

Expand Down
Loading