feat: updated engine version to 4.4-rc1
This commit is contained in:
parent
ee00efde1f
commit
21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions
|
|
@ -1,28 +1,8 @@
|
|||
#!/usr/bin/env python
|
||||
import atexit
|
||||
import sys
|
||||
import time
|
||||
# ruff: noqa: F821
|
||||
|
||||
import methods
|
||||
|
||||
# Enable ANSI escape code support on Windows 10 and later (for colored console output).
|
||||
# <https://github.com/python/cpython/issues/73245>
|
||||
if sys.stdout.isatty() and sys.platform == "win32":
|
||||
try:
|
||||
from ctypes import WinError, byref, windll # type: ignore
|
||||
from ctypes.wintypes import DWORD # type: ignore
|
||||
|
||||
stdout_handle = windll.kernel32.GetStdHandle(DWORD(-11))
|
||||
mode = DWORD(0)
|
||||
if not windll.kernel32.GetConsoleMode(stdout_handle, byref(mode)):
|
||||
raise WinError()
|
||||
mode = DWORD(mode.value | 4)
|
||||
if not windll.kernel32.SetConsoleMode(stdout_handle, mode):
|
||||
raise WinError()
|
||||
except Exception as e:
|
||||
methods._colorize = False
|
||||
methods.print_error(f"Failed to enable ANSI escape code support, disabling color output.\n{e}")
|
||||
|
||||
# For the reference:
|
||||
# - CCFLAGS are compilation flags shared between C and C++
|
||||
# - CFLAGS are for C-specific compilation flags
|
||||
|
|
@ -31,8 +11,6 @@ if sys.stdout.isatty() and sys.platform == "win32":
|
|||
# - CPPDEFINES are for pre-processor defines
|
||||
# - LINKFLAGS are for linking flags
|
||||
|
||||
time_at_start = time.time()
|
||||
|
||||
env = SConscript("./godot-cpp/SConstruct")
|
||||
env.__class__.disable_warnings = methods.disable_warnings
|
||||
|
||||
|
|
@ -45,9 +23,6 @@ opts.Add(BoolVariable("verbose", "Enable verbose output for the compilation", Fa
|
|||
|
||||
opts.Update(env)
|
||||
|
||||
if not env["verbose"]:
|
||||
methods.no_verbose(env)
|
||||
|
||||
# ThorVG
|
||||
if env["thorvg_enabled"] and env["freetype_enabled"]:
|
||||
env_tvg = env.Clone()
|
||||
|
|
@ -130,7 +105,7 @@ if env["thorvg_enabled"] and env["freetype_enabled"]:
|
|||
env.Append(CPPDEFINES=["MODULE_SVG_ENABLED"])
|
||||
|
||||
lib = env_tvg.Library(
|
||||
f'tvg_builtin{env["suffix"]}{env["LIBSUFFIX"]}',
|
||||
f"tvg_builtin{env['suffix']}{env['LIBSUFFIX']}",
|
||||
thirdparty_tvg_sources,
|
||||
)
|
||||
env.Append(LIBS=[lib])
|
||||
|
|
@ -143,6 +118,7 @@ if env["msdfgen_enabled"] and env["freetype_enabled"]:
|
|||
thirdparty_msdfgen_dir = "../../../thirdparty/msdfgen/"
|
||||
thirdparty_msdfgen_sources = [
|
||||
"core/Contour.cpp",
|
||||
"core/DistanceMapping.cpp",
|
||||
"core/EdgeHolder.cpp",
|
||||
"core/MSDFErrorCorrection.cpp",
|
||||
"core/Projection.cpp",
|
||||
|
|
@ -153,10 +129,15 @@ if env["msdfgen_enabled"] and env["freetype_enabled"]:
|
|||
"core/edge-segments.cpp",
|
||||
"core/edge-selectors.cpp",
|
||||
"core/equation-solver.cpp",
|
||||
# "core/export-svg.cpp",
|
||||
"core/msdf-error-correction.cpp",
|
||||
"core/msdfgen.cpp",
|
||||
"core/rasterization.cpp",
|
||||
"core/render-sdf.cpp",
|
||||
# "core/save-bmp.cpp",
|
||||
# "core/save-fl32.cpp",
|
||||
# "core/save-rgba.cpp",
|
||||
# "core/save-tiff.cpp",
|
||||
"core/sdf-error-estimation.cpp",
|
||||
"core/shape-description.cpp",
|
||||
]
|
||||
|
|
@ -169,7 +150,7 @@ if env["msdfgen_enabled"] and env["freetype_enabled"]:
|
|||
env.Append(CPPDEFINES=["MODULE_MSDFGEN_ENABLED"])
|
||||
|
||||
lib = env_msdfgen.Library(
|
||||
f'msdfgen_builtin{env["suffix"]}{env["LIBSUFFIX"]}',
|
||||
f"msdfgen_builtin{env['suffix']}{env['LIBSUFFIX']}",
|
||||
thirdparty_msdfgen_sources,
|
||||
)
|
||||
env.Append(LIBS=[lib])
|
||||
|
|
@ -298,7 +279,7 @@ if env["freetype_enabled"]:
|
|||
env.Append(CPPDEFINES=["MODULE_FREETYPE_ENABLED"])
|
||||
|
||||
lib = env_freetype.Library(
|
||||
f'freetype_builtin{env["suffix"]}{env["LIBSUFFIX"]}',
|
||||
f"freetype_builtin{env['suffix']}{env['LIBSUFFIX']}",
|
||||
thirdparty_freetype_sources,
|
||||
)
|
||||
env.Append(LIBS=[lib])
|
||||
|
|
@ -310,35 +291,21 @@ sources = Glob("../*.cpp")
|
|||
|
||||
if env["platform"] == "macos":
|
||||
methods.write_macos_plist(
|
||||
f'./bin/libtextserver_fallback.macos.{env["target"]}.framework',
|
||||
f'libtextserver_fallback.macos.{env["target"]}',
|
||||
f"./bin/libtextserver_fallback.macos.{env['target']}.framework",
|
||||
f"libtextserver_fallback.macos.{env['target']}",
|
||||
"org.godotengine.textserver_fallback",
|
||||
"Fallback Text Server",
|
||||
)
|
||||
library = env.SharedLibrary(
|
||||
f'./bin/libtextserver_fallback.macos.{env["target"]}.framework/libtextserver_fallback.macos.{env["target"]}',
|
||||
f"./bin/libtextserver_fallback.macos.{env['target']}.framework/libtextserver_fallback.macos.{env['target']}",
|
||||
source=sources,
|
||||
)
|
||||
else:
|
||||
library = env.SharedLibrary(
|
||||
f'./bin/libtextserver_fallback{env["suffix"]}{env["SHLIBSUFFIX"]}',
|
||||
f"./bin/libtextserver_fallback{env['suffix']}{env['SHLIBSUFFIX']}",
|
||||
source=sources,
|
||||
)
|
||||
|
||||
Default(library)
|
||||
|
||||
|
||||
def print_elapsed_time():
|
||||
elapsed_time_sec = round(time.time() - time_at_start, 2)
|
||||
time_centiseconds = round((elapsed_time_sec % 1) * 100)
|
||||
print(
|
||||
"{}[Time elapsed: {}.{:02}]{}".format(
|
||||
methods.ANSI.GRAY,
|
||||
time.strftime("%H:%M:%S", time.gmtime(elapsed_time_sec)),
|
||||
time_centiseconds,
|
||||
methods.ANSI.RESET,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
atexit.register(print_elapsed_time)
|
||||
methods.prepare_timer()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue