feat: update starter and compile script

This commit is contained in:
shenjack 2022-12-09 21:06:15 +08:00
parent 8be2d655ca
commit b81cbb861c
3 changed files with 18 additions and 6 deletions

4
DR.py
View File

@ -52,8 +52,8 @@ if __name__ == '__main__':
from Difficult_Rocket import main, DR_runtime
DR_runtime.start_time_ns = start_time_ns
from pyglet.gl import glClearColor # 调整背景颜色
glClearColor(0.5, 0.5, 0.5, 0)
# from pyglet.gl import glClearColor # 调整背景颜色
# glClearColor(0.5, 0.5, 0.5, 0)
game = main.Game() # 实例化一个游戏
print(time.perf_counter_ns() - start_time_perf_ns, (time.perf_counter_ns() - start_time_perf_ns) / (10 ** 9), 'start') # 输出一下启动用时

View File

@ -17,14 +17,26 @@ import inspect
import threading
import dataclasses
from abc import ABC
from types import FrameType
from logging import NOTSET, DEBUG
from typing import NamedTuple, Optional, Type, Union, Dict, Iterable, Any, List
Version = '1.0.0'
os.system('')
# os.system('')
color_support = True
if sys.platform == "win32":
try:
# https://stackoverflow.com/questions/36760127/...
# how-to-use-the-new-support-for-ansi-escape-sequences-in-the-windows-10-console
from ctypes import windll
kernel32 = windll.kernel32
kernel32.SetConsoleMode(kernel32.GetStdHandle(-11), 7)
except OSError: # pragma: no cover
color_support = False
# print(os.path.abspath(os.curdir))
# TODO 这个文件就是个大TODO
"""
@ -328,7 +340,7 @@ class ListCache:
self.cache.clear()
class FormatterTemplate(ABC):
class FormatterTemplate:
"""用于格式化 log 信息的模板类"""
def __init__(self, formats: dict):

View File

@ -5,7 +5,7 @@ $end_time = Get-Uptime
$out = $end_time.TotalMilliseconds - $start_time.TotalMilliseconds
Write-Output $end_time.TotalSeconds $start_time.TotalSeconds $out s
Write-Output $start_time $end_time
Write-Output "--jobs=24 --mingw64 --lto=no --disable-ccache and $args"
Write-Output "--jobs=24 --mingw64 --lto=no and $args"
# --include-data-dir=./libs/pyglet=./pyglet
# --run
# --disable-ccache