Skip to content

Commit

Permalink
windows terminal ANSI colored output
Browse files Browse the repository at this point in the history
  • Loading branch information
Dituon committed Sep 10, 2023
1 parent 051ef85 commit 8277db4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

3. 将图片素材放入 `./data/xmmt.dituon.petpet/` 目录

4. `cd ./` `java -jar petpet.jar`, 可自行更改配置文件 `config.json`, 重启后生效
4. 运行 `start.bat``start.sh`, 可自行更改配置文件 `config.json`, 重启后生效

5. 参考[`WebServer`](#WebServer)一节 发起网络请求 / 或使用[`WebUI`](#WebUI)

Expand Down
4 changes: 2 additions & 2 deletions start.bat
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ for /f "delims=" %%a in ('dir /b /a-d %jar_file%') do (

echo Running %jar_file%
if exist %SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe (
start powershell.exe -Command "cd '%~dp0'; java -jar -Xms16M "%jar_file%" %args%"
start powershell.exe -Command "Set-ItemProperty HKCU:\Console VirtualTerminalLevel -Type DWORD 1; cd '%~dp0'; java -jar -Xms16M "%jar_file%" %args%"
) else (
cmd /c "cd /d %~dp0 && java -jar -Xms16M "%jar_file%" %args%"
cmd /c "reg add HKCU\Console /v VirtualTerminalLevel /t REG_DWORD /d 1 /f && cd /d %~dp0 && java -jar -Xms16M "%jar_file%" %args%"
)

endlocal

0 comments on commit 8277db4

Please sign in to comment.