-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #691 from jingjingxyk/build_native_php
Build native php 添加创建扩展 例子 脚本
- Loading branch information
Showing
6 changed files
with
57 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
sapi/DownloadPHPSourceCode.php → sapi/scripts/DownloadPHPSourceCode.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env bash | ||
|
||
|
||
:<<'COMMENT' | ||
创建 PHP 扩展 辅助工具 | ||
COMMENT | ||
|
||
__DIR__=$( | ||
cd "$(dirname "$0")" | ||
pwd | ||
) | ||
if [ -f ${__DIR__}/prepare.php ] ; then | ||
__PROJECT__=$( | ||
cd ${__DIR__}/ | ||
pwd | ||
) | ||
else | ||
__PROJECT__=$( | ||
cd ${__DIR__}/../../ | ||
pwd | ||
) | ||
fi | ||
|
||
cd ${__DIR__} | ||
|
||
|
||
export PATH="${__PROJECT__}/bin/runtime:$PATH" | ||
|
||
alias php='php -c ${__PROJECT__}/bin/runtime/php.ini' | ||
php ${__PROJECT__}/sapi/scripts/DownloadPHPSourceCode.php | ||
|
||
|
||
php ${__PROJECT__}/var/php-8.2.13/ext/ext_skel.php --help | ||
|
||
# 创建扩展 | ||
# 使用 `--dir ${__PROJECT__}/../ ` # 指定生成扩展的目录 | ||
|
||
php ${__PROJECT__}/var/php-8.2.13/ext/ext_skel.php --ext example --author jingjingxyk --std | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters