提交 1af2cf8b 编写于 作者: W wwccss

Merge branch 'master' of git@github.com:easysoft/zentaoatf

VERSION=$(shell head -n 1 VERSION)
VERSION=1.1
all: tgz
all: zip win32 win64
clean:
rm -fr zentaoatf
rm -fr *.zip
tgz:
zip:
mkdir zentaoatf
cp -fr {zt,langs,hello} zentaoatf
find zentaoatf/.git |xargs rm -fr
zip -r -9 ZenTaoATF.$(VERSION).zip zentaoatf
rm -fr zentaoatf
win32:
mkdir zentaoatf
cp -fr {zt,langs,hello} zentaoatf
mkdir zentaoatf/runtime
cp -fr runtime/ansicon/x32/* zentaoatf/runtime
cp -fr runtime/php/* zentaoatf/runtime
echo "@echo off" > zentaoatf/zt.bat
echo "set console=ansicon" >> zentaoatf/zt.bat
echo ".\runtime\ansicon.exe .\runtime\php.exe zt %*" >> zentaoatf/zt.bat
zip -r -9 ZenTaoATF.$(VERSION).win32.zip zentaoatf
rm -fr zentaoatf
win64:
mkdir zentaoatf
cp -fr {zt,langs,hello} zentaoatf
mkdir zentaoatf/runtime
cp -fr runtime/ansicon/x64/* zentaoatf/runtime
cp -fr runtime/php/* zentaoatf/runtime
echo "@echo off" > zentaoatf/zt.bat
echo "set console=ansicon" >> zentaoatf/zt.bat
echo ".\runtime\ansicon.exe .\runtime\php.exe zt %*" >> zentaoatf/zt.bat
zip -r -9 ZenTaoATF.$(VERSION).win64.zip zentaoatf
rm -fr zentaoatf
......@@ -861,7 +861,7 @@ class zentaotest
}
/**
* Print a string in color.
* Print a string in color in a linux os or in ansicon console in windows.
*
* @param string $string
* @param string $color
......@@ -870,7 +870,12 @@ class zentaotest
*/
public function colorString($string, $color)
{
if($this->os == 'win') return $string;
if($this->os == 'win')
{
$console = getenv('console');
if($console !== 'ansicon') return $string;
}
return COLOR_PREFIX . $color . $string . COLOR_POSTFIX;
}
......
.\php\php.exe zt %*
@echo off
set console=ansicon
.\runtime\ansicon\x32\ansicon.exe .\runtime\php\php.exe zt %*
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册