1 Star 1 Fork 2

lichuang_code/as

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Console.bat 3.10 KB
一键复制 编辑 原始数据 按行查看 历史
parai 提交于 2019-04-17 23:48 . bring up backtrace on msys2
@echo off
set ASPATH=%~dp0
set astmp=%ASPATH%
set ASDISK=%astmp:~1,2%
set MSYS2=C:\msys64
%ASDISK%
cd %ASPATH%
if NOT EXIST "%ASPATH%\Console.bat" goto perror
if NOT EXIST %MSYS2%\usr\bin goto install_msys2
REM base env PATH
set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0
set PATH=C:\Anaconda3;C:\Anaconda3\Scripts;%MSYS2%\mingw64\bin;%MSYS2%\usr\bin;%MSYS2%\mingw32\bin;%PATH%
if NOT EXIST "%ASPATH%\release\download" mkdir %ASPATH%\release\download
set CZ=%ASPATH%\release\download\ConsoleZ\Console.exe
set ConEmu=%ASPATH%\release\download\ConEmu\ConEmu64.exe
if EXIST %ConEmu% goto prepareEnv
cd %ASPATH%\release\download
mkdir ConEmu
cd ConEmu
wget https://github.com/Maximus5/ConEmu/releases/download/v18.06.26/ConEmuPack.180626.7z
"C:\Program Files\7-Zip\7z.exe" x ConEmuPack.180626.7z
cd %ASPATH%
if EXIST %CZ% goto prepareEnv
cd %ASPATH%\release\download
wget https://github.com/cbucher/console/releases/download/1.18.3/ConsoleZ.x64.1.18.3.18143.zip
mkdir ConsoleZ
cd ConsoleZ
unzip ..\ConsoleZ.x64.1.18.3.18143.zip
cd %ASPATH%
:prepareEnv
set MSYS=winsymlinks:nativestrict
if EXIST "%ASPATH%\scons.bat" goto launchConsole
REM pacman -Syuu
pacman -S unzip wget git mingw-w64-x86_64-gcc mingw-w64-x86_64-glib2 mingw-w64-x86_64-gtk3
pacman -S mingw32/mingw-w64-i686-gcc mingw-w64-x86_64-diffutils
pacman -S ncurses-devel gperf scons curl make cmake automake-wrapper libtool
pacman -S unrar mingw-w64-x86_64-pkg-config mingw-w64-x86_64-binutils
conda install scons pyserial
echo @echo off > scons.bat
echo @echo !!!SCONS on MSYS2!!! >> scons.bat
echo %MSYS2%\usr\bin\python2.exe %MSYS2%\usr\bin\scons %%* >> scons.bat
:launchConsole
REM env.asc in format "tokens=value" such as "PACKET_LIB_ADAPTER_NR=2" to set some environment
if EXIST "%ASPATH%\env.asc" for /F "tokens=*" %%I in (%ASPATH%\env.asc) do set %%I
cd %ASPATH%
set ASROOT=%ASPATH%
set PYTHONPATH=%ASPATH%/com/as.tool/config.infrastructure.system;%ASPATH%/com/as.tool/config.infrastructure.system/third_party;%PYTHONPATH%
set ISMSYS2=YES
REM check CI parameter
IF "%1"=="ci" goto runCI
if EXIST %ConEmu% goto launchConEmu
if EXIST %CZ% goto launchCZ
:launchConEmu
start %ConEmu% -title aslua-ascore-asboot-asone ^
-runlist -new_console:d:"%ASPATH%\release\aslua":t:aslua ^
^|^|^| -new_console:d:"%ASPATH%\release\ascore":t:ascore ^
^|^|^| -new_console:d:"%ASPATH%\release\asboot":t:asboot ^
^|^|^| -new_console:d:"%ASPATH%\com\as.tool\as.one.py":t:asone
exit 0
:launchCZ
start %CZ% -ws %ASPATH%\ConsoleZ.workspace
exit 0
:runCI
%ASDISK%
cd \
mkdir asci
cd asci
git clone https://github.com/parai/as.git
cd as\release
rm download -fr
mkdir download
git pull
cd aslua
make aslua
cd ..\ascore
set BOARD=posix
scons
set BOARD=versatilepb
scons
cd ..\asboot
set BOARD=posix
scons
set BOARD=versatilepb
scons
goto exitPoint
:install_msys2
set msys2="www.msys2.org"
echo Please visit %msys2% and install msys2 as c:\msys64
pause
exit -1
:perror
echo Please fix the var "ASDISK" and "ASPATH" to the right path!
pause
:exitPoint
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/lichuang_code/as.git
[email protected]:lichuang_code/as.git
lichuang_code
as
as
master

搜索帮助