mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-02 14:25:38 +08:00
add windows entry binary (#208)
This commit is contained in:
@@ -16,7 +16,7 @@ use ZM\Logger\ConsoleLogger;
|
|||||||
use ZM\Store\MockAtomic;
|
use ZM\Store\MockAtomic;
|
||||||
|
|
||||||
// 引入自动加载
|
// 引入自动加载
|
||||||
require dirname(__DIR__) . '/vendor/autoload.php';
|
require $_composer_autoload_path ?? dirname(__DIR__) . '/vendor/autoload.php';
|
||||||
|
|
||||||
// 声明一个全局的原子计数,用于保存整个进程的退出状态码
|
// 声明一个全局的原子计数,用于保存整个进程的退出状态码
|
||||||
global $_swoole_atomic;
|
global $_swoole_atomic;
|
||||||
|
|||||||
27
bin/zhamao.bat
Normal file
27
bin/zhamao.bat
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
@echo off
|
||||||
|
@REM Check if ZM_CUSTOM_PHP_PATH is set
|
||||||
|
IF /i "%ZM_CUSTOM_PHP_PATH%" neq "" (
|
||||||
|
@REM Set the path to the custom PHP
|
||||||
|
echo "* Using custom PHP executable: %ZM_CUSTOM_PHP_PATH%"
|
||||||
|
SET executable=%ZM_CUSTOM_PHP_PATH%
|
||||||
|
) ELSE IF exist ./runtime/php.exe (
|
||||||
|
@REM Set the path to the built-in PHP
|
||||||
|
echo "* Using built-in PHP executable"
|
||||||
|
SET executable=.\runtime\php.exe
|
||||||
|
) ELSE (
|
||||||
|
@REM Set the path to the system PHP
|
||||||
|
echo "* Using system PHP executable"
|
||||||
|
SET executable=php
|
||||||
|
)
|
||||||
|
@REM TODO: Phar write support is missing
|
||||||
|
IF exist src/entry.php (
|
||||||
|
@REM Run the PHP entry point
|
||||||
|
%executable% src/entry.php %*
|
||||||
|
) ELSE IF exist vendor/zhamao/framework/src/entry.php (
|
||||||
|
@REM Run the PHP entry point
|
||||||
|
%executable% vendor/zhamao/framework/src/entry.php %*
|
||||||
|
) ELSE (
|
||||||
|
@REM No entry point found
|
||||||
|
echo "[ErrCode:E00015] Cannot find zhamao-framework entry file!"
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
@@ -73,7 +73,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bin": [
|
"bin": [
|
||||||
"bin/gendoc",
|
|
||||||
"bin/phpunit-zm",
|
"bin/phpunit-zm",
|
||||||
"bin/zhamao"
|
"bin/zhamao"
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user