Skip to content

Commit

Permalink
'update'
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjingxyk committed Jan 10, 2025
1 parent 9f60e6a commit 9211c10
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 78 deletions.
21 changes: 0 additions & 21 deletions phpunit.xml

This file was deleted.

26 changes: 24 additions & 2 deletions sapi/quickstart/windows/native-build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,34 @@ git config --global core.eol lf
git config --global core.ignorecase false
```

```bash

.\sapi\quickstart\windows\native-build\windows-init-download.bat
.\sapi\quickstart\windows\native-build\windows-init-install.bat
.\sapi\quickstart\windows\native-build\windows-init-install-vs-tools.bat

.\sapi\quickstart\windows\native-build\php-sdk.bat


.\sapi\quickstart\windows\native-build\run.bat

.\sapi\quickstart\windows\native-build\config.bat
.\sapi\quickstart\windows\native-build\x_custom_config.bat
.\sapi\quickstart\windows\native-build\build.bat

```

```powershell
cmd /c .\sapi\quickstart\windows\native-build\windows-init.bat
cmd /c .\sapi\quickstart\windows\native-build\windows-init-download.bat
cmd /c .\sapi\quickstart\windows\native-build\windows-init-install.bat
cmd /c .\sapi\quickstart\windows\native-build\windows-init-install-vs-tools.bat
cmd /c .\sapi\quickstart\windows\native-build\run.bat
cmd /c .\sapi\quickstart\windows\native-build\php-sdk.bat
cmd /c .\sapi\quickstart\windows\native-build\config.bat
cmd /c .\\sapi\quickstart\windows\native-build\x_custom_config.bat
cmd /c .\sapi\quickstart\windows\native-build\build.bat
```

Expand Down
9 changes: 5 additions & 4 deletions sapi/quickstart/windows/native-build/config.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@ echo %cd%
cd /d %__PROJECT__%\var\windows-build-deps\php-src\
echo %cd%

if exist "Makefile" (
if exist "configure.js" (
nmake clean
)

:: buildconf.bat -f
call buildconf.bat -f

echo "===================="
echo "========HELP============"

:: configure.bat --help
call configure.bat --help


echo "===================="

rem set "INCLUDE=%INCLUDE%;%__PROJECT__%\build\openssl\include\;%__PROJECT__%\build\zlib\include"
rem set "LIB=%LIB%;%__PROJECT__%\build\openssl\lib\;%__PROJECT__%\build\zlib\lib"
Expand Down
2 changes: 1 addition & 1 deletion sapi/quickstart/windows/native-build/php-sdk.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cd /d ..\..\..\..\
set "__PROJECT__=%cd%"
echo %cd%

.\var\windows-build-deps\php-sdk-binary-tools\phpsdk-vs17-x64.bat
call %__PROJECT__%\var\windows-build-deps\php-sdk-binary-tools\phpsdk-vs17-x64.bat

cd /d %__PROJECT__%

2 changes: 1 addition & 1 deletion sapi/quickstart/windows/native-build/run.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cd /d ..\..\..\..\
set "__PROJECT__=%cd%"
echo %cd%

:: call %__PROJECT__%\sapi\quickstart\windows\native-build\php-sdk.bat

call %__PROJECT__%\sapi\quickstart\windows\native-build\config.bat
call %__PROJECT__%\sapi\quickstart\windows\native-build\x_custom_config.bat
call %__PROJECT__%\sapi\quickstart\windows\native-build\build.bat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if not exist "VisualStudioSetup.exe" curl.exe -fSLo VisualStudioSetup.exe "https

if not exist "jq-windows-amd64.exe" curl.exe -fSLo jq-windows-amd64.exe https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-windows-amd64.exe

curl.exe https://windows.php.net/downloads/releases/releases.json | jq-windows-amd64.exe ".[\"8.3\"].[\"nts-vs16-x64\"].[\"zip\"].[\"path\"]" -r > TEMP_PHP_RUNTIME_FILE
if not exist "TEMP_PHP_RUNTIME_FILE" curl.exe https://windows.php.net/downloads/releases/releases.json | jq-windows-amd64.exe ".[\"8.3\"].[\"nts-vs16-x64\"].[\"zip\"].[\"path\"]" -r > TEMP_PHP_RUNTIME_FILE

set /p PHP_RUNIME_FILE=<TEMP_PHP_RUNTIME_FILE
echo %PHP_RUNIME_FILE%
Expand All @@ -39,8 +39,8 @@ if not exist "php-nts-Win32-x64.zip" curl.exe -fSLo php-nts-Win32-x64.zip "https
if not exist "composer.phar" curl.exe -fSLo composer.phar "https://getcomposer.org/download/latest-stable/composer.phar"
if not exist "cacert.pem" curl.exe -fSLo cacert.pem "https://curl.se/ca/cacert.pem"

git clone -b master --depth=1 https://github.com/php/php-sdk-binary-tools.git
git clone -b php-8.4.2 --depth=1 https://github.com/php/php-src.git
if not exist "php-sdk-binary-tools" git clone -b master --depth=1 https://github.com/php/php-sdk-binary-tools.git
if not exist "php-src" git clone -b php-8.4.2 --depth=1 https://github.com/php/php-src.git php-src


:: with mirror
Expand Down
25 changes: 3 additions & 22 deletions sapi/quickstart/windows/native-build/windows-init-install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ dir

msiexec /i strawberry-perl-5.38.2.2-64bit.msi /passive

.\vc_redist.x64.exe /install /passive /norestart
:: .\vc_redist.x64.exe /install /passive /norestart

.\7z2409-x64.exe /S


set "PATH=%ProgramFiles%\7-Zip;%PATH%;"
set "PATH=%__PROJECT__%\var\windows-build-deps\php-sdk-binary-tools\bin\;%__PROJECT__%\var\windows-build-deps\php-sdk-binary-tools\msys2\bin;%PATH%;"
echo "%PATH%"
echo %ProgramFiles%\7-Zip

Expand Down Expand Up @@ -108,27 +109,7 @@ echo apc.enable_cli=1

) > %__PROJECT__%\bin\runtime\php.ini



echo %comspec%
echo %ProgramFiles%
set "PATH=%ProgramFiles%\Git\bin;%__PROJECT__%\bin\runtime\;%__PROJECT__%\bin\runtime\nasm\;%__PROJECT__%\bin\runtime\php;%__PROJECT__%\bin\runtime\libarchive\bin;%PATH%"
echo "%PATH%"

:: git config --global core.autocrlf false
:: git config --global core.eol lf
:: git config --global core.ignorecase false

perl -v
nasm -v
git version
curl -V
dir %__PROJECT__%\bin\runtime\php\ext\
php -c %__PROJECT__%\bin\runtime\php.ini -v
php -c %__PROJECT__%\bin\runtime\php.ini -m
php -c %__PROJECT__%\bin\runtime\php.ini --ri curl


call %__PROJECT__%\sapi\quickstart\windows\native-build\windows-init-show-install-result.bat


endlocal
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
@echo off

setlocal


echo %~dp0


cd /d %~dp0
cd /d ..\..\..\..\


set "__PROJECT__=%cd%"
echo %cd%

md %__PROJECT__%\var\windows-build-deps\
md %__PROJECT__%\bin\runtime\

cd /d %__PROJECT__%\var\windows-build-deps\


echo %ProgramFiles(x86)%
echo %USERPROFILE%
echo %NUMBER_OF_PROCESSORS%
echo %ProgramFiles%
set "PATH=%ProgramFiles%\Git\bin;%__PROJECT__%\bin\runtime\;%__PROJECT__%\bin\runtime\nasm\;%__PROJECT__%\bin\runtime\php;%__PROJECT__%\bin\runtime\libarchive\bin;%PATH%"
set "PATH=%__PROJECT__%\var\windows-build-deps\php-sdk-binary-tools\bin\;%__PROJECT__%\var\windows-build-deps\php-sdk-binary-tools\msys2\bin;%PATH%"
echo "%PATH%"

:: git config --global core.autocrlf false
:: git config --global core.eol lf
:: git config --global core.ignorecase false

perl -v
nasm -v
git version
curl -V
:: dir %__PROJECT__%\bin\runtime\php\ext\
php -c %__PROJECT__%\bin\runtime\php.ini -v
php -c %__PROJECT__%\bin\runtime\php.ini -m
php -c %__PROJECT__%\bin\runtime\php.ini --ri curl
php -c %__PROJECT__%\bin\runtime\php.ini composer.phar list

:: vswhere find Visual Studio component
:: https://github.com/microsoft/vswhere/wiki/Examples

vswhere -?
vswhere -all

set

endlocal
24 changes: 0 additions & 24 deletions sapi/quickstart/windows/native-build/windows-init.bat

This file was deleted.

0 comments on commit 9211c10

Please sign in to comment.