mirror of
https://github.com/php-win-ext/php-sdk-binary-tools.git
synced 2026-03-24 17:12:12 +01:00
Compare commits
37 Commits
php-sdk-2.
...
php-sdk-2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
422073f540 | ||
|
|
08fbbc7cd2 | ||
|
|
182f988f92 | ||
|
|
022eaba41e | ||
|
|
2a403e1820 | ||
|
|
07efa67e87 | ||
|
|
e74a98e253 | ||
|
|
04aaf65cda | ||
|
|
33c82a766f | ||
|
|
efb77f4589 | ||
|
|
cddbe84fe3 | ||
|
|
6326bba7a1 | ||
|
|
fdf6827c51 | ||
|
|
feb2b675cb | ||
|
|
b60fd588d5 | ||
|
|
4af7617b84 | ||
|
|
7395237e33 | ||
|
|
2bd2595a16 | ||
|
|
3c204136a2 | ||
|
|
ac205e153f | ||
|
|
71f60852f8 | ||
|
|
5999098add | ||
|
|
9f8cf17928 | ||
|
|
496a4498a1 | ||
|
|
1162213596 | ||
|
|
c8e1563cd4 | ||
|
|
9b139a61c8 | ||
|
|
bf84962182 | ||
|
|
d87c132a7e | ||
|
|
c781649433 | ||
|
|
bd8b82579f | ||
|
|
d6b76e7f7d | ||
|
|
7f0015a68c | ||
|
|
23a3eb2473 | ||
|
|
296be1b3b4 | ||
|
|
3ec0ac9d0b | ||
|
|
baf09da395 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -14,3 +14,7 @@ logs
|
||||
PFTT
|
||||
\.tmp
|
||||
\.cache
|
||||
oracle
|
||||
# either these two become submodules, or uncomment them
|
||||
#pgo-build
|
||||
#rmtools*
|
||||
|
||||
85
README.md
85
README.md
@@ -4,53 +4,98 @@ PHP SDK is a tool kit for Windows PHP builds
|
||||
|
||||
# License
|
||||
|
||||
BSD
|
||||
The PHP SDK itself and the SDK own tools are licensed under the BSD 2-Clause license. With the usage of the other tools, you accept the respective licenses.
|
||||
|
||||
# Notes
|
||||
# Overview
|
||||
|
||||
This reworked SDK is compatible with PHP 7.0 and above. The compatibility with php-sdk-binary-tools-20110915.zip available from windows.php.net is kept, though some irrelevant tools was removed. Though, newer tools and workflows are now possible, and the work is in progress. The toolset consists on a mix of the hand written scripts, selected MSYS2 parts and standalone programs.
|
||||
The PHP SDK 2.0 is compatible with PHP 7.0 and above. The compatibility with older versions, eq. php-sdk-binary-tools-20110915.zip available from windows.php.net previously, is kept. Though, some irrelevant tools was removed. Newer tools are now available, better workflows are now possible. The toolset consists on a mix of the hand written scripts, selected MSYS2 parts and standalone programs.
|
||||
|
||||
## SDK tools
|
||||
# Requirements
|
||||
|
||||
- `Visual C++ 2015` must be installed prior SDK usage
|
||||
- if `Cygwin` is installed, please read notes in the pitfalls section
|
||||
- if a 64-bit build is intended, a 64-bit system is required. Cross compilation of 64-bit on 32-bit system is not supported at the moment
|
||||
|
||||
# Tools
|
||||
|
||||
All the tools included are either scripts or 32-bit binaries. They are therefore runable on any of x86 or x64 Windows system.
|
||||
|
||||
## SDK
|
||||
|
||||
- starter scripts, named phpsdk-<crt>-<arch>.bat
|
||||
- `phpsdk_buildtree` - initialize the development filesystem structure
|
||||
- `phpsdk_deps` - check and handle dependency libraries
|
||||
- `phpsdk_deps` - handle dependency libraries
|
||||
- `phpsdk_version` - show SDK version
|
||||
- `phpsdk_dllmap` - create a JSON listing of DLLs contained in zip files
|
||||
|
||||
## Other available tools
|
||||
## Other tools
|
||||
|
||||
- `bison` 3.0.2, `re2c` 0.15.3
|
||||
- `awk`, `gawk`, `sed`, `grep`
|
||||
- `diff`, `diff3`, `patch`
|
||||
- `md5sum`, `sha1sum`, `sha224sum`, `sha256sum`, `sha384sum`, `sha512sum`
|
||||
- `7za`, `zip`, `unzip`
|
||||
- `7za`, `zip`, `unzip`, `unzipsfx`
|
||||
- `wget`
|
||||
|
||||
## Not included
|
||||
## Optional, not included
|
||||
|
||||
These are not included with the PHP SDK, but might be useful for the compilation and other tasks. While Visual C++ is the only required, the others might enable some additional functionality. Care yourself about making them available on your system.
|
||||
These are not included with the PHP SDK, but might be useful. While Visual C++ is the only required, the others might enable some additional functionality. Care yourself about making them available on your system, if relevant.
|
||||
|
||||
- Visual C++
|
||||
- clang
|
||||
- ICC
|
||||
- Git
|
||||
- Cppcheck
|
||||
- `Git` - useful for PHP source management
|
||||
- `Cppcheck` - used for static analysis
|
||||
- `clang` - useful for experimental builds and for static analysis
|
||||
- `ICC` - useful for experimental builds
|
||||
|
||||
# Usage
|
||||
|
||||
## Basic usage
|
||||
The PHP SDK should be unzipped into the shortest possible path, preferrably into the drive root.
|
||||
|
||||
Usually, the first step to start the PHP SDK is by invoking one of the suitable starter scripts. This automatically puts the console on the correct environment relevant for the desired PHP build configuration.
|
||||
|
||||
It is not required to hold the source in the PHP SDK directory. It could be useful, for example, to simplify the SDK updates.
|
||||
|
||||
## Basic usage example
|
||||
|
||||
- `git clone https://github.com/OSTC/php-sdk-binary-tools.git c:\php-sdk`
|
||||
- `cd c:\php-sdk`
|
||||
- `git checkout new_binary_tools`
|
||||
- `cd` to c:\php-sdk and click one of the `phpsdk-*.bat` files in the SDK root, depending on the desired build parameters
|
||||
- `phpsdk_buildtree && git clone https://github.com/php/php-src.git`, or fetch a zipball from windows.php.net
|
||||
- while in php-src, run `phpsdk_deps --update --branch YOUR_BRANCH_NAME`
|
||||
- either run or click on `phpsdk-vc14-x64.bat` in the PHP SDK root
|
||||
- `cd` to c:\php-sdk and click on `phpsdk-vc14-x64.bat` in the PHP SDK root
|
||||
- `phpsdk_buildtree phpmaster`
|
||||
- `git clone https://github.com/php/php-src.git && cd php-src`, or fetch a zipball
|
||||
- `phpsdk_deps --update --branch master`
|
||||
- do the build, eg. `buildconf && configure --enable-cli && nmake`
|
||||
|
||||
TODO more extensive documentation on the wiki
|
||||
TODO more extensive documentation on the wiki.
|
||||
|
||||
## Staying compatible with the older version of the SDK
|
||||
## The old way
|
||||
|
||||
- `git clone https://github.com/OSTC/php-sdk-binary-tools.git c:\php-sdk`
|
||||
- follow the instructions on the PHP [wiki page](https://wiki.php.net/internals/windows/stepbystepbuild "PHP wiki page")
|
||||
|
||||
# Customizing
|
||||
|
||||
A sript called phpsdk-local.bat has to be put into the PHP SDK root. If present, it will be automatically picked up by the starter script. A template for such a script is included with the PHP SDK. This allows to setup additional environment.
|
||||
|
||||
The starter scripts can be also easy integrated with the consoles other than standard cmd.exe. For the reference, here's an example ConEmu task
|
||||
|
||||
`C:\php-sdk\phpsdk-vc14-x64.bat -cur_console:d:C:\php-sdk\php70\vc14\x64\php-src`
|
||||
|
||||
# Upgrading
|
||||
|
||||
- backup phpsdk-local.bat
|
||||
- backup the source trees, contained in the PHP SDK root
|
||||
- move the PHP SDK folder into trash
|
||||
- download, unpack and the new PHP SDK version under the same path
|
||||
|
||||
# Extending
|
||||
|
||||
The SDK tools are based on the KISS principle and should be kept so. Basic tools are implemented as simple batch script. The minimalistic `PHP` is available for internal SDK purposes. It can be used, if more complexity is required. If you have an idea for some useful tool or workflow, please open a ticket or PR, so it can be discussed, implemented and added to the SDK. By contributing an implementation, you should also accept the SDK license.
|
||||
|
||||
# Pitfalls
|
||||
|
||||
- SDK or PHP sources put into paths including spaces might cause issue.
|
||||
- SDK or PHP sources put into too long paths, will cause an issue.
|
||||
- If Cygwin is installed, it might cause issues. If it's unavoidable, to have Cygwin on the same machine, ensure SDK preceeds it on the PATH.
|
||||
- Tools, based on MSYS2, only accept paths with forward slashes.
|
||||
|
||||
|
||||
@@ -4,33 +4,29 @@ IF "%1" EQU "" GOTO Help
|
||||
IF "%2" NEQ "" SET _=%2\%1
|
||||
IF "%2" EQU "" SET _=%CD%\%1
|
||||
|
||||
MD %_%\vc9\x86\deps\bin
|
||||
MD %_%\vc9\x86\deps\lib
|
||||
MD %_%\vc9\x86\deps\include
|
||||
MD %_%\vc9\x64\deps\bin
|
||||
MD %_%\vc9\x64\deps\lib
|
||||
MD %_%\vc9\x64\deps\include
|
||||
rem if we're in the starter script shell, create the only struct that corresponds to the current env
|
||||
rem otherwise - retain the old behavior, create structs for all the known build combinations and don't cd
|
||||
|
||||
MD %_%\vc11\x86\deps\bin
|
||||
MD %_%\vc11\x86\deps\lib
|
||||
MD %_%\vc11\x86\deps\include
|
||||
MD %_%\vc11\x64\deps\bin
|
||||
MD %_%\vc11\x64\deps\lib
|
||||
MD %_%\vc11\x64\deps\include
|
||||
if "%PHP_SDK_ARCH%" NEQ "" (
|
||||
if "%PHP_SDK_VC%" NEQ "" (
|
||||
MD %_%\%PHP_SDK_VC%\%PHP_SDK_ARCH%\deps\bin
|
||||
MD %_%\%PHP_SDK_VC%\%PHP_SDK_ARCH%\deps\lib
|
||||
MD %_%\%PHP_SDK_VC%\%PHP_SDK_ARCH%\deps\include
|
||||
cd %_%\%PHP_SDK_VC%\%PHP_SDK_ARCH%
|
||||
goto exit
|
||||
)
|
||||
goto create_all
|
||||
) else (
|
||||
:create_all
|
||||
MD %_%\vc14\x86\deps\bin
|
||||
MD %_%\vc14\x86\deps\lib
|
||||
MD %_%\vc14\x86\deps\include
|
||||
MD %_%\vc14\x64\deps\bin
|
||||
MD %_%\vc14\x64\deps\lib
|
||||
MD %_%\vc14\x64\deps\include
|
||||
)
|
||||
|
||||
MD %_%\vc12\x86\deps\bin
|
||||
MD %_%\vc12\x86\deps\lib
|
||||
MD %_%\vc12\x86\deps\include
|
||||
MD %_%\vc12\x64\deps\bin
|
||||
MD %_%\vc12\x64\deps\lib
|
||||
MD %_%\vc12\x64\deps\include
|
||||
|
||||
MD %_%\vc14\x86\deps\bin
|
||||
MD %_%\vc14\x86\deps\lib
|
||||
MD %_%\vc14\x86\deps\include
|
||||
MD %_%\vc14\x64\deps\bin
|
||||
MD %_%\vc14\x64\deps\lib
|
||||
MD %_%\vc14\x64\deps\include
|
||||
set _=
|
||||
|
||||
GOTO EXIT
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
@echo off
|
||||
|
||||
if "%PHP_SDK_PHP_CMD%"=="" (
|
||||
echo PHP SDK is not setup
|
||||
exit 3
|
||||
call %~dp0phpsdk_setvars.bat
|
||||
if "!PHP_SDK_PHP_CMD!"=="" (
|
||||
echo PHP SDK is not setup
|
||||
exit /b 3
|
||||
)
|
||||
)
|
||||
|
||||
call %PHP_SDK_PHP_CMD% %PHP_SDK_BIN_PATH%\phpsdk_deps.php %*
|
||||
|
||||
@@ -224,3 +224,11 @@ function msg(string $s, int $code = 0) {
|
||||
|
||||
exit(0);
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
@echo off
|
||||
|
||||
if "%PHP_SDK_PHP_CMD%"=="" (
|
||||
echo PHP SDK is not setup
|
||||
exit 3
|
||||
call %~dp0phpsdk_setvars.bat
|
||||
if "!PHP_SDK_PHP_CMD!"=="" (
|
||||
echo PHP SDK is not setup
|
||||
exit /b 3
|
||||
)
|
||||
)
|
||||
|
||||
call %PHP_SDK_PHP_CMD% %PHP_SDK_BIN_PATH%\phpsdk_dllmap.php %*
|
||||
|
||||
@@ -102,3 +102,11 @@ foreach ($dirs as $path) {
|
||||
|
||||
echo json_encode($out);
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
@echo off
|
||||
|
||||
if "%PHP_SDK_OS_ARCH%"=="" (
|
||||
echo PHP SDK is not setup
|
||||
exit /b 3
|
||||
)
|
||||
|
||||
call %PHP_SDK_BIN_PATH%\phpsdk_version.bat
|
||||
echo.
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
@echo off
|
||||
|
||||
if not defined PHP_SDK_RUN_FROM_ROOT (
|
||||
echo phpsdk_shell.bat should not be run directly, use starter scripts in the PHP SDK root
|
||||
echo This script should not be run directly.
|
||||
echo Use starter scripts looking like phpsdk-^<crt^>-^<arch^>.bat in the PHP SDK root instead.
|
||||
goto out_error
|
||||
)
|
||||
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
@echo off
|
||||
|
||||
if "%PHP_SDK_PHP_CMD%"=="" (
|
||||
call %~dp0phpsdk_setvars.bat
|
||||
if "!PHP_SDK_PHP_CMD!"=="" (
|
||||
echo PHP SDK is not setup
|
||||
exit /b 3
|
||||
)
|
||||
)
|
||||
|
||||
%PHP_SDK_PHP_CMD% -r "echo 'PHP SDK ' . file_get_contents(getenv('PHP_SDK_PATH') . '\\VERSION');"
|
||||
|
||||
exit /b
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace SDK\Dependency;
|
||||
namespace SDK;
|
||||
|
||||
use SDK\Config;
|
||||
use SDK\Cache;
|
||||
use SDK\Exception;
|
||||
|
||||
class Cache
|
||||
@@ -11,14 +12,14 @@ class Cache
|
||||
protected $hash;
|
||||
|
||||
public function __construct(string $id)
|
||||
{
|
||||
{/*{{{*/
|
||||
$this->id = $id;
|
||||
$this->hash = md5($id);
|
||||
/* XXX pass as arg, fine for now. */
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
protected function getCacheablePath(string $path, bool $relative = false) : string
|
||||
{
|
||||
{/*{{{*/
|
||||
if ($relative) {
|
||||
$dir = Config::getCacheDir();
|
||||
$name = $path;
|
||||
@@ -28,15 +29,15 @@ class Cache
|
||||
}
|
||||
|
||||
return $dir . DIRECTORY_SEPARATOR . $this->hash . "." . $name;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function fileIsCached(string $path, bool $relative = false) : bool
|
||||
{
|
||||
{/*{{{*/
|
||||
return file_exists($this->getCacheablePath($path, $relative));
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function cachedContentDiffers(string $path, string $content, bool $relative = false) : bool
|
||||
{
|
||||
{/*{{{*/
|
||||
$p = $this->getCacheablePath($path, $relative);
|
||||
|
||||
if (!file_exists($p)) {
|
||||
@@ -47,19 +48,19 @@ class Cache
|
||||
$new_sum = md5($content);
|
||||
|
||||
return $old_sum != $new_sum;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function cacheContent(string $path, string $content, bool $relative = false)
|
||||
{
|
||||
{/*{{{*/
|
||||
$p = $this->getCacheablePath($path, $relative);
|
||||
|
||||
if (strlen($content) !== file_put_contents($p, $content)) {
|
||||
throw new Exception("Couldn't cache '$p'");
|
||||
}
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function getCachedContent(string $path, bool $relative = false)
|
||||
{
|
||||
{/*{{{*/
|
||||
$p = $this->getCacheablePath($path, $relative);
|
||||
|
||||
if ($this->isFileCached($p)) {
|
||||
@@ -67,6 +68,14 @@ class Cache
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace SDK;
|
||||
|
||||
use SDK\Dependency\Fetcher;
|
||||
use SDK\Dependency\Cache;
|
||||
use SDK\Cache;
|
||||
use SDK\Exception;
|
||||
|
||||
class Config
|
||||
@@ -25,50 +25,52 @@ class Config
|
||||
protected static $depsLocalPath = NULL;
|
||||
|
||||
public static function getDepsHost() : string
|
||||
{
|
||||
{/*{{{*/
|
||||
return self::$depsHost;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public static function getDepsPort() : string
|
||||
{
|
||||
{/*{{{*/
|
||||
return self::$depsPort;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public static function getDepsBaseUri() : string
|
||||
{
|
||||
{/*{{{*/
|
||||
return self::$depsBaseUri;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public static function setCurrentArchName(string $arch)
|
||||
{
|
||||
{/*{{{*/
|
||||
self::$currentArchName = $arch;
|
||||
}
|
||||
} /*}}}*/
|
||||
|
||||
public static function getCurrentArchName()
|
||||
{
|
||||
{/*{{{*/
|
||||
return self::$currentArchName;
|
||||
}
|
||||
} /*}}}*/
|
||||
|
||||
public static function setCurrentCrtName(string $crt)
|
||||
{
|
||||
{/*{{{*/
|
||||
self::$currentCrtName = $crt;
|
||||
}
|
||||
} /*}}}*/
|
||||
|
||||
public static function getCurrentCrtName()
|
||||
{
|
||||
{/*{{{*/
|
||||
return self::$currentCrtName;
|
||||
}
|
||||
} /*}}}*/
|
||||
|
||||
public static function setCurrentStabilityName(string $stability)
|
||||
{
|
||||
{/*{{{*/
|
||||
self::$currentStabilityName = $stability;
|
||||
}
|
||||
} /*}}}*/
|
||||
|
||||
public static function getCurrentStabilityName()
|
||||
{
|
||||
{/*{{{*/
|
||||
return self::$currentStabilityName;
|
||||
}
|
||||
} /*}}}*/
|
||||
|
||||
public static function getKnownBranches() : array
|
||||
{
|
||||
{/*{{{*/
|
||||
if (empty(self::$knownBranches)) {
|
||||
$cache_file = "known_branches.txt";
|
||||
$cache = new Cache(self::getDepsLocalPath());
|
||||
@@ -101,24 +103,24 @@ class Config
|
||||
}
|
||||
|
||||
return self::$knownBranches;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public static function setCurrentBranchName(string $name)
|
||||
{
|
||||
{/*{{{*/
|
||||
if (!array_key_exists($name, self::getKnownBranches())) {
|
||||
// throw new Exception("Unsupported branch '$name'");
|
||||
}
|
||||
|
||||
self::$currentBranchName = $name;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public static function getCurrentBranchName()
|
||||
{
|
||||
{/*{{{*/
|
||||
return self::$currentBranchName;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public static function getCurrentBranchData() : array
|
||||
{
|
||||
{/*{{{*/
|
||||
$ret = array();
|
||||
$branches = self::getKnownBranches();
|
||||
|
||||
@@ -166,15 +168,15 @@ class Config
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public static function getSdkNugetFeedUrl() : string
|
||||
{
|
||||
{/*{{{*/
|
||||
return self::$sdkNugetFeedUrl;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public static function getSdkPath()
|
||||
{
|
||||
{/*{{{*/
|
||||
$path = getenv("PHP_SDK_PATH");
|
||||
|
||||
if (!$path) {
|
||||
@@ -187,10 +189,10 @@ class Config
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public static function getSdkVersion() : string
|
||||
{
|
||||
{/*{{{*/
|
||||
$path = self::getSdkPath() . DIRECTORY_SEPARATOR . "VERSION";
|
||||
|
||||
if (!file_exists($path)) {
|
||||
@@ -198,20 +200,20 @@ class Config
|
||||
}
|
||||
|
||||
return file_get_contents($path);
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public static function getDepsLocalPath()
|
||||
{
|
||||
{/*{{{*/
|
||||
return self::$depsLocalPath;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public static function setDepsLocalPath(string $path)
|
||||
{
|
||||
{/*{{{*/
|
||||
self::$depsLocalPath = $path;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public static function getCacheDir() : string
|
||||
{
|
||||
{/*{{{*/
|
||||
$path = self::getSdkPath() . DIRECTORY_SEPARATOR . ".cache";
|
||||
|
||||
if (!file_exists($path)) {
|
||||
@@ -221,10 +223,10 @@ class Config
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public static function getTmpDir() : string
|
||||
{
|
||||
{/*{{{*/
|
||||
$path = self::getSdkPath() . DIRECTORY_SEPARATOR . ".tmp";
|
||||
|
||||
if (!file_exists($path)) {
|
||||
@@ -234,6 +236,14 @@ class Config
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
|
||||
@@ -15,27 +15,27 @@ class Fetcher
|
||||
|
||||
|
||||
public function __construct(string $host, int $port, string $arch = NULL, string $stability = NULL, Series $series = NULL)
|
||||
{
|
||||
{/*{{{*/
|
||||
$this->stability = $stability;
|
||||
$this->arch = $arch;
|
||||
$this->host = $host;
|
||||
$this->port = $port;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function getSeries() : Series
|
||||
{
|
||||
{/*{{{*/
|
||||
return $this->series;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function setSeries(Series $series)
|
||||
{
|
||||
{/*{{{*/
|
||||
$this->series = $series;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
/* TODO more robust implementation. */
|
||||
/* TODO implement indicator. */
|
||||
public function getByUri($uri) : string
|
||||
{
|
||||
{/*{{{*/
|
||||
$url = "http://{$this->host}:{$this->port}$uri";
|
||||
$s = file_get_contents($url);
|
||||
|
||||
@@ -44,7 +44,7 @@ class Fetcher
|
||||
}
|
||||
|
||||
return $s;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
/*protected function fetch($uri) : string
|
||||
{
|
||||
@@ -80,3 +80,11 @@ class Fetcher
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
|
||||
@@ -3,10 +3,14 @@
|
||||
namespace SDK\Dependency;
|
||||
|
||||
use SDK\Config;
|
||||
use SDK\Cache;
|
||||
use SDK\Exception;
|
||||
use SDK\FileOps;
|
||||
|
||||
class Manager
|
||||
{
|
||||
use FileOps;
|
||||
|
||||
protected $stability;
|
||||
protected $arch;
|
||||
protected $path;
|
||||
@@ -14,7 +18,7 @@ class Manager
|
||||
protected $fetcher;
|
||||
|
||||
public function __construct(string $path, string $stability, string $arch)
|
||||
{
|
||||
{/*{{{*/
|
||||
$this->stability = $stability;
|
||||
$this->arch = $arch;
|
||||
$this->path = $path;
|
||||
@@ -29,21 +33,22 @@ class Manager
|
||||
|
||||
$this->fetcher = $fetcher;
|
||||
$this->series = $series;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
protected function getTmpSeriesPath()
|
||||
{
|
||||
{/*{{{*/
|
||||
return Config::getTmpDir() . DIRECTORY_SEPARATOR . $this->series->getname();
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function updatesAvailable() : bool
|
||||
{
|
||||
{/*{{{*/
|
||||
return $this->series->updatesAvailable();
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
/* TODO and implement --force. */
|
||||
/* FIXME implement rollback */
|
||||
public function performUpdate(string &$msg = NULL)
|
||||
{
|
||||
{/*{{{*/
|
||||
if (!$this->updatesAvailable()) {
|
||||
$msg = "No updates are available";
|
||||
return;
|
||||
@@ -51,12 +56,9 @@ class Manager
|
||||
|
||||
$series_data = $this->series->getData();
|
||||
|
||||
$tmp_dir = Config::getTmpDir() . DIRECTORY_SEPARATOR . md5(uniqid());
|
||||
$tmp_dir_packs = $tmp_dir . DIRECTORY_SEPARATOR . "packs";
|
||||
$tmp_dir_deps = $tmp_dir . DIRECTORY_SEPARATOR . "deps";
|
||||
mkdir($tmp_dir);
|
||||
mkdir($tmp_dir_packs);
|
||||
mkdir($tmp_dir_deps);
|
||||
$tmp_dir = $this->md("", true);
|
||||
$tmp_dir_packs = $this->md($tmp_dir . DIRECTORY_SEPARATOR . "packs");
|
||||
$tmp_dir_deps = $this->md($tmp_dir . DIRECTORY_SEPARATOR . "deps");
|
||||
|
||||
foreach ($series_data as $item) {
|
||||
echo "Processing package $item", PHP_EOL;
|
||||
@@ -69,46 +71,53 @@ class Manager
|
||||
unset($pkg);
|
||||
}
|
||||
|
||||
if (file_exists($this->path)) {
|
||||
$suffix = date("YmdHi");
|
||||
$new_path = "{$this->path}.$suffix";
|
||||
if (!rename($this->path, $new_path)) {
|
||||
throw new Exception("Unable to rename '{$this->path}' to '$new_path'");
|
||||
}
|
||||
} else {
|
||||
$up = dirname($this->path);
|
||||
if (!file_exists($up)) {
|
||||
if (!mkdir($up, 0755, true)) {
|
||||
throw new Exception("Unable to create '{$this->path}'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Clear, it is an extra handling. So far it's the only case, doing it this way. And, we have
|
||||
no package definitions ATM to handle it otherwise. */
|
||||
$extra = $tmp_dir_deps . DIRECTORY_SEPARATOR . "openssl.cnf";
|
||||
if (file_exists($extra)) {
|
||||
$tdir = $tmp_dir_deps . DIRECTORY_SEPARATOR . "template" . DIRECTORY_SEPARATOR . "ssl";
|
||||
|
||||
mkdir($tdir, 0755, true);
|
||||
rename($extra, $tdir . DIRECTORY_SEPARATOR . "openssl.cnf");
|
||||
$this->md($tdir);
|
||||
$this->mv($extra, $tdir . DIRECTORY_SEPARATOR . "openssl.cnf");
|
||||
}
|
||||
|
||||
if (!rename($tmp_dir_deps, $this->path)) {
|
||||
throw new Exception("Unable to rename '$tmp_dir_deps' to '{$this->path}'");
|
||||
if (file_exists($this->path)) {
|
||||
$suffix = date("YmdHi");
|
||||
$new_path = "{$this->path}.$suffix";
|
||||
|
||||
/* This is fine, it's gonna be on the same drive. */
|
||||
if (!$this->mv($this->path, $new_path)) {
|
||||
throw new Exception("Unable to rename '{$this->path}' to '$new_path'");
|
||||
}
|
||||
} else {
|
||||
$up = dirname($this->path);
|
||||
if (!file_exists($up)) {
|
||||
if (!$this->md($up)) {
|
||||
throw new Exception("Unable to create '{$this->path}'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rmdir($tmp_dir_packs);
|
||||
rmdir($tmp_dir);
|
||||
$this->mv($tmp_dir_deps, $this->path);
|
||||
|
||||
$this->rm($tmp_dir_packs);
|
||||
$this->rm($tmp_dir);
|
||||
|
||||
$this->series->cache();
|
||||
|
||||
/* save new series file, move the updated deps and backup the old ones, cleanup.*/
|
||||
$msg = "Updates performed successfully. ";
|
||||
$msg .= "Updated dependencies was saved to '{$this->path}'. ";
|
||||
$msg = "Updates performed successfully. " . PHP_EOL;
|
||||
if (isset($new_path)) {
|
||||
$msg .= "Old dependencies dir is moved to '$new_path'.";
|
||||
$msg .= "Old dependencies backed up into '$new_path'.";
|
||||
}
|
||||
}
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
|
||||
@@ -13,23 +13,23 @@ class Package
|
||||
protected $filepath;
|
||||
|
||||
public function __construct(string $name, Series $series, Fetcher $fetcher)
|
||||
{
|
||||
{/*{{{*/
|
||||
$this->name = $name;
|
||||
$this->series = $series;
|
||||
$this->fetcher = $fetcher;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function getUri() : string
|
||||
{
|
||||
{/*{{{*/
|
||||
$base = Config::getDepsBaseUri();
|
||||
$branch_data = Config::getCurrentBranchData();
|
||||
$arch = $this->series->getArch();
|
||||
|
||||
return "$base/{$branch_data['crt']}/$arch/{$this->name}";
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function retrieve(string $path)
|
||||
{
|
||||
{/*{{{*/
|
||||
$this->filepath = $path . DIRECTORY_SEPARATOR . $this->name;
|
||||
|
||||
$cont = $this->fetcher->getByUri($this->getUri());
|
||||
@@ -37,10 +37,10 @@ class Package
|
||||
$fd = fopen($this->filepath, "wb");
|
||||
fwrite($fd, $cont);
|
||||
fclose($fd);
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function unpack(string $path)
|
||||
{
|
||||
{/*{{{*/
|
||||
if (!$this->filepath || !file_exists($this->filepath)) {
|
||||
throw new Exception("Invalid filepath '{$this->filepath}'");
|
||||
}
|
||||
@@ -53,11 +53,19 @@ class Package
|
||||
} else {
|
||||
throw new Exception("Failed to unpack, error code '$ret'");
|
||||
}
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function cleanup()
|
||||
{
|
||||
{/*{{{*/
|
||||
unlink($this->filepath);
|
||||
}
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace SDK\Dependency;
|
||||
|
||||
use SDK\Config;
|
||||
use SDK\Cache;
|
||||
use SDK\Exception;
|
||||
|
||||
class Series
|
||||
@@ -14,53 +15,53 @@ class Series
|
||||
protected $cache;
|
||||
|
||||
public function __construct(string $stability, string $arch, Cache $cache, Fetcher $fetcher = NULL)
|
||||
{
|
||||
{/*{{{*/
|
||||
$this->fetcher = $fetcher;
|
||||
$this->stability = $stability;
|
||||
$this->arch = $arch;
|
||||
$this->cache = $cache;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function getFetcher() : Fetcher
|
||||
{
|
||||
{/*{{{*/
|
||||
return $this->fetcher;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function setFetcher(Fetcher $fetcher)
|
||||
{
|
||||
{/*{{{*/
|
||||
$this->fetcher = $fetcher;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function getArch() : string
|
||||
{
|
||||
{/*{{{*/
|
||||
return $this->arch;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function setArch(string $arch)
|
||||
{
|
||||
{/*{{{*/
|
||||
$this->arch = $arch;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function getName() : string
|
||||
{
|
||||
{/*{{{*/
|
||||
$base = Config::getDepsBaseUri();
|
||||
$branch_data = Config::getCurrentBranchData();
|
||||
|
||||
$file = "packages-" . Config::getCurrentBranchName() . "-{$branch_data['crt']}-{$this->arch}-{$this->stability}.txt";
|
||||
|
||||
return $file;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
protected function getUri() : string
|
||||
{
|
||||
{/*{{{*/
|
||||
$base = Config::getDepsBaseUri();
|
||||
$file = $this->getName();
|
||||
|
||||
return "$base/series/$file";
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function getData(bool $raw = false, bool $cache = true)
|
||||
{
|
||||
{/*{{{*/
|
||||
if ($cache && $this->rawData) {
|
||||
$ret = $this->rawData;
|
||||
} else {
|
||||
@@ -76,28 +77,36 @@ class Series
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function getSavePath()
|
||||
{
|
||||
{/*{{{*/
|
||||
return Config::getCacheDir() . DIRECTORY_SEPARATOR . $this->getname();
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function updatesAvailable()
|
||||
{
|
||||
{/*{{{*/
|
||||
$series_data = $this->getData(true);
|
||||
$series_file = $this->getSavePath();
|
||||
|
||||
return $this->cache->cachedContentDiffers($series_file, $series_data);
|
||||
}
|
||||
}/*}}}*/
|
||||
|
||||
public function cache(string $path = NULL)
|
||||
{
|
||||
{/*{{{*/
|
||||
if (!$path) {
|
||||
$path = $this->getSavePath();
|
||||
}
|
||||
|
||||
$this->cache->cacheContent($path, $this->getData(true));
|
||||
}
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
|
||||
@@ -7,3 +7,11 @@ class Exception extends \Exception
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
|
||||
127
lib/php/libsdk/SDK/FileOps.php
Normal file
127
lib/php/libsdk/SDK/FileOps.php
Normal file
@@ -0,0 +1,127 @@
|
||||
<?php
|
||||
|
||||
namespace SDK;
|
||||
|
||||
use SDK\Config;
|
||||
use SDK\Exception;
|
||||
|
||||
trait FileOps
|
||||
{
|
||||
protected function md(string $name = "", bool $tmp = false) : string
|
||||
{/*{{{*/
|
||||
$ret = $name;
|
||||
|
||||
if (!$name) {
|
||||
if ($tmp) {
|
||||
$pre = Config::getTmpDir();
|
||||
$ret = $pre . DIRECTORY_SEPARATOR . md5(uniqid());
|
||||
} else {
|
||||
throw new Exception("Dir name is empty");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!is_dir($ret)) {
|
||||
if (!mkdir($ret, 0755, true)) {
|
||||
throw new Exception("Unable to create '$ret'");
|
||||
}
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}/*}}}*/
|
||||
|
||||
/* TODO is link and more checks. */
|
||||
protected function rm(string $path) : bool
|
||||
{/*{{{*/
|
||||
if (!file_exists($path)) {
|
||||
return false;
|
||||
} else if (is_file($path)) {
|
||||
return unlink($path);
|
||||
}
|
||||
|
||||
$ret = true;
|
||||
|
||||
$iterator = new \RecursiveIteratorIterator(
|
||||
new \RecursiveDirectoryIterator(
|
||||
$path,
|
||||
\FilesystemIterator::SKIP_DOTS
|
||||
),
|
||||
\RecursiveIteratorIterator::CHILD_FIRST
|
||||
);
|
||||
foreach ($iterator as $item) {
|
||||
if ($item->isDir()) {
|
||||
$ret = $ret && rmdir($item->getPathname());
|
||||
} else {
|
||||
$ret = $ret && unlink($item->getPathname());
|
||||
}
|
||||
}
|
||||
return $ret && rmdir($path);
|
||||
}/*}}}*/
|
||||
|
||||
/* TODO islink and more checks */
|
||||
protected function cp_or_mv(string $src, string $dst, callable $cb) : bool
|
||||
{/*{{{*/
|
||||
if (!file_exists($src)) {
|
||||
return false;
|
||||
} else if (is_file($src)) {
|
||||
return call_user_func($cb, $src, $dst);
|
||||
}
|
||||
|
||||
if (!file_exists($dst)) {
|
||||
$this->md($dst);
|
||||
}
|
||||
|
||||
$iterator = new \RecursiveIteratorIterator(
|
||||
new \RecursiveDirectoryIterator(
|
||||
$src,
|
||||
\FilesystemIterator::SKIP_DOTS
|
||||
),
|
||||
\RecursiveIteratorIterator::CHILD_FIRST
|
||||
);
|
||||
$cut_len = strlen($src)+1;
|
||||
foreach ($iterator as $item) {
|
||||
$src_path = $item->getPathname();
|
||||
$sub = substr($src_path, $cut_len);
|
||||
$dst_path = $dst . DIRECTORY_SEPARATOR . $sub;
|
||||
$dst_parent = dirname($dst_path);
|
||||
|
||||
if (!is_dir($dst_parent)) {
|
||||
if (!$this->md($dst_parent)) {
|
||||
throw new Exception("Unable to create '$dst_parent'");
|
||||
}
|
||||
}
|
||||
|
||||
if ($item->isFile()) {
|
||||
if (!call_user_func($cb, $src_path, $dst_path)) {
|
||||
throw new Exception("Unable to $cb '$src_path' to '$dst_path'");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}/*}}}*/
|
||||
|
||||
protected function cp(string $src, string $dst) : bool
|
||||
{/*{{{*/
|
||||
return $this->cp_or_mv($src, $dst, "copy");
|
||||
}/*}}}*/
|
||||
|
||||
protected function mv(string $src, string $dst) : bool
|
||||
{/*{{{*/
|
||||
$ret = $this->cp_or_mv($src, $dst, "rename");
|
||||
|
||||
$ret = $ret && $this->rm($src);
|
||||
|
||||
return $ret;
|
||||
}/*}}}*/
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
@@ -5,3 +5,11 @@ function __autoload($name)
|
||||
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . $name . ".php";
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
20
phpsdk-local.bat.example
Normal file
20
phpsdk-local.bat.example
Normal file
@@ -0,0 +1,20 @@
|
||||
@echo off
|
||||
|
||||
set PGSQL_TEST_CONNSTR=host=127.0.0.1 dbname=test port=5432 user=test password=test
|
||||
set PDO_PGSQL_TEST_DSN=pgsql:host=127.0.0.1 port=5432 dbname=test user=test password=test
|
||||
|
||||
set PHP_SDK_FIREBIRD_PATH=
|
||||
if "%PHP_SDK_ARCH%"=="x64" (
|
||||
set PHP_SDK_FIREBIRD_PATH=E:\local_programs\Firebird-2.5.5.26952-0_x64\bin;
|
||||
set PDO_FIREBIRD_TEST_DSN=firebird:dbname=127.0.0.1:E:\local_programs\Firebird-2.5.5.26952-0_x64\examples\empbuild\EMPLOYEE.FDB
|
||||
set PDO_FIREBIRD_TEST_USER=SYSDBA
|
||||
set PDO_FIREBIRD_TEST_PASS=masterkey
|
||||
)
|
||||
set PATH=%PHP_SDK_FIREBIRD_PATH%%PATH%
|
||||
|
||||
set ODBC_TEST_USER=php_test2
|
||||
set ODBC_TEST_PASS=php_test2
|
||||
set ODBC_TEST_DSN=Driver={SQL Server};Server={W530-PHP-DEV\TEST2014};Database={php_test2};uid=%ODBC_TEST_USER%;pwd=%ODBC_TEST_PASS%
|
||||
|
||||
set PDOTEST_DSN=odbc:%ODBC_TEST_DSN%
|
||||
|
||||
34
phpsdk-starter.bat
Normal file
34
phpsdk-starter.bat
Normal file
@@ -0,0 +1,34 @@
|
||||
@echo off
|
||||
|
||||
setlocal enableextensions enabledelayedexpansion
|
||||
|
||||
if "%1" equ "" goto help
|
||||
if "%2" equ "" goto help
|
||||
goto skip_help
|
||||
|
||||
:help
|
||||
echo Usage: phpsdk-starter ^<crt^> ^<arch^> [^<append_script.bat^>]
|
||||
exit /b 0
|
||||
|
||||
:skip_help
|
||||
|
||||
set PHP_SDK_RUN_FROM_ROOT=1
|
||||
|
||||
title PHP SDK
|
||||
|
||||
call %~dp0bin\phpsdk_setshell.bat %1 %2
|
||||
|
||||
if errorlevel 3 (
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
if exist "%~dp0phpsdk-local.bat" (
|
||||
cmd /k "!PHP_SDK_VC_SHELL_CMD! && %~dp0\bin\phpsdk_setvars.bat && %~dp0\bin\phpsdk_dumpenv.bat && %~dp0\phpsdk-local.bat && echo. && set prompt=$P$_$+$$$S"
|
||||
) else (
|
||||
cmd /k "!PHP_SDK_VC_SHELL_CMD! && %~dp0\bin\phpsdk_setvars.bat && %~dp0\bin\phpsdk_dumpenv.bat && set prompt=$P$_$+$$$S"
|
||||
)
|
||||
|
||||
set PHP_SDK_RUN_FROM_ROOT=
|
||||
|
||||
exit /b
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
@echo off
|
||||
|
||||
setlocal enableextensions enabledelayedexpansion
|
||||
call %~dp0phpsdk-starter.bat vc14 x64 %*
|
||||
|
||||
set PHP_SDK_RUN_FROM_ROOT=1
|
||||
|
||||
call %~dp0bin\phpsdk_setshell.bat vc14 x64
|
||||
|
||||
cmd /k "%PHP_SDK_VC_SHELL_CMD% && %~dp0\bin\phpsdk_setvars.bat && %~dp0\bin\phpsdk_dumpenv.bat"
|
||||
|
||||
set PHP_SDK_RUN_FROM_ROOT=
|
||||
|
||||
exit
|
||||
exit /b
|
||||
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
@echo off
|
||||
|
||||
setlocal enableextensions enabledelayedexpansion
|
||||
call %~dp0phpsdk-starter.bat vc14 x86 %*
|
||||
|
||||
set PHP_SDK_RUN_FROM_ROOT=1
|
||||
|
||||
call %~dp0bin\phpsdk_setshell.bat vc14 x86
|
||||
|
||||
cmd /k "%PHP_SDK_VC_SHELL_CMD% && %~dp0\bin\phpsdk_setvars.bat && %~dp0\bin\phpsdk_dumpenv.bat"
|
||||
|
||||
set PHP_SDK_RUN_FROM_ROOT=
|
||||
|
||||
exit
|
||||
exit /b
|
||||
|
||||
|
||||
Reference in New Issue
Block a user