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
|
||||
|
||||
|
|
@ -47,9 +25,6 @@ opts.Add(BoolVariable("verbose", "Enable verbose output for the compilation", Fa
|
|||
|
||||
opts.Update(env)
|
||||
|
||||
if not env["verbose"]:
|
||||
methods.no_verbose(env)
|
||||
|
||||
if env["platform"] == "windows" and not env["use_mingw"]:
|
||||
env.AppendUnique(CCFLAGS=["/utf-8"]) # Force to use Unicode encoding.
|
||||
|
||||
|
|
@ -135,7 +110,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])
|
||||
|
|
@ -148,6 +123,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",
|
||||
|
|
@ -158,10 +134,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",
|
||||
]
|
||||
|
|
@ -174,7 +155,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])
|
||||
|
|
@ -303,7 +284,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])
|
||||
|
|
@ -323,7 +304,8 @@ thirdparty_harfbuzz_sources = [
|
|||
# "src/hb-cairo-utils.cc",
|
||||
# "src/hb-cairo.cc",
|
||||
"src/hb-common.cc",
|
||||
# "src/hb-coretext.cc",
|
||||
# "src/hb-coretext-font.cc",
|
||||
# "src/hb-coretext-shape.cc",
|
||||
# "src/hb-directwrite.cc",
|
||||
"src/hb-draw.cc",
|
||||
"src/hb-face-builder.cc",
|
||||
|
|
@ -385,6 +367,7 @@ thirdparty_harfbuzz_sources = [
|
|||
"src/hb-ucd.cc",
|
||||
"src/hb-unicode.cc",
|
||||
# "src/hb-uniscribe.cc",
|
||||
"src/OT/Var/VARC/VARC.cc",
|
||||
]
|
||||
|
||||
if env["freetype_enabled"]:
|
||||
|
|
@ -415,6 +398,7 @@ if env["platform"] == "android" or env["platform"] == "linuxbsd":
|
|||
|
||||
env_harfbuzz.Append(
|
||||
CCFLAGS=[
|
||||
"-DU_STATIC_IMPLEMENTATION",
|
||||
"-DU_HAVE_LIB_SUFFIX=1",
|
||||
"-DU_LIB_SUFFIX_C_NAME=_godot",
|
||||
"-DHAVE_ICU_BUILTIN",
|
||||
|
|
@ -434,7 +418,7 @@ if env["freetype_enabled"]:
|
|||
env.Append(CPPPATH=["../../../thirdparty/harfbuzz/src"])
|
||||
|
||||
lib = env_harfbuzz.Library(
|
||||
f'harfbuzz_builtin{env["suffix"]}{env["LIBSUFFIX"]}',
|
||||
f"harfbuzz_builtin{env['suffix']}{env['LIBSUFFIX']}",
|
||||
thirdparty_harfbuzz_sources,
|
||||
)
|
||||
env.Prepend(LIBS=[lib])
|
||||
|
|
@ -494,7 +478,7 @@ if env["graphite_enabled"] and env["freetype_enabled"]:
|
|||
)
|
||||
|
||||
lib = env_graphite.Library(
|
||||
f'graphite_builtin{env["suffix"]}{env["LIBSUFFIX"]}',
|
||||
f"graphite_builtin{env['suffix']}{env['LIBSUFFIX']}",
|
||||
thirdparty_graphite_sources,
|
||||
)
|
||||
env.Append(LIBS=[lib])
|
||||
|
|
@ -713,12 +697,10 @@ thirdparty_icu_sources = [
|
|||
]
|
||||
thirdparty_icu_sources = [thirdparty_icu_dir + file for file in thirdparty_icu_sources]
|
||||
|
||||
icu_data_name = "icudt75l.dat"
|
||||
|
||||
if env["static_icu_data"]:
|
||||
env_icu.Depends("../../../thirdparty/icu4c/icudata.gen.h", "../../../thirdparty/icu4c/" + icu_data_name)
|
||||
env_icu.Depends("../../../thirdparty/icu4c/icudata.gen.h", "../../../thirdparty/icu4c/icudt_godot.dat")
|
||||
env_icu.Command(
|
||||
"../../../thirdparty/icu4c/icudata.gen.h", "../../../thirdparty/icu4c/" + icu_data_name, methods.make_icu_data
|
||||
"../../../thirdparty/icu4c/icudata.gen.h", "../../../thirdparty/icu4c/icudt_godot.dat", methods.make_icu_data
|
||||
)
|
||||
env.Append(CXXFLAGS=["-DICU_STATIC_DATA"])
|
||||
env.Append(CPPPATH=["../../../thirdparty/icu4c/"])
|
||||
|
|
@ -741,14 +723,13 @@ env_icu.Append(
|
|||
"-DU_ENABLE_DYLOAD=0",
|
||||
"-DU_HAVE_LIB_SUFFIX=1",
|
||||
"-DU_LIB_SUFFIX_C_NAME=_godot",
|
||||
"-DICU_DATA_NAME=" + icu_data_name,
|
||||
]
|
||||
)
|
||||
env.Append(
|
||||
CXXFLAGS=[
|
||||
"-DU_STATIC_IMPLEMENTATION",
|
||||
"-DU_HAVE_LIB_SUFFIX=1",
|
||||
"-DU_LIB_SUFFIX_C_NAME=_godot",
|
||||
"-DICU_DATA_NAME=" + icu_data_name,
|
||||
]
|
||||
)
|
||||
env.Append(CPPPATH=["../../../thirdparty/icu4c/common/", "../../../thirdparty/icu4c/i18n/"])
|
||||
|
|
@ -756,7 +737,7 @@ env.Append(CPPPATH=["../../../thirdparty/icu4c/common/", "../../../thirdparty/ic
|
|||
if env["platform"] == "windows":
|
||||
env.Append(LIBS=["advapi32"])
|
||||
|
||||
lib = env_icu.Library(f'icu_builtin{env["suffix"]}{env["LIBSUFFIX"]}', thirdparty_icu_sources)
|
||||
lib = env_icu.Library(f"icu_builtin{env['suffix']}{env['LIBSUFFIX']}", thirdparty_icu_sources)
|
||||
env.Append(LIBS=[lib])
|
||||
|
||||
env.Append(CPPDEFINES=["GDEXTENSION"])
|
||||
|
|
@ -765,35 +746,21 @@ sources = Glob("../*.cpp")
|
|||
|
||||
if env["platform"] == "macos":
|
||||
methods.write_macos_plist(
|
||||
f'./bin/libtextserver_advanced.macos.{env["target"]}.framework',
|
||||
f'libtextserver_advanced.macos.{env["target"]}',
|
||||
f"./bin/libtextserver_advanced.macos.{env['target']}.framework",
|
||||
f"libtextserver_advanced.macos.{env['target']}",
|
||||
"org.godotengine.textserver_advanced",
|
||||
"ICU / HarfBuzz / Graphite Text Server",
|
||||
)
|
||||
library = env.SharedLibrary(
|
||||
f'./bin/libtextserver_advanced.macos.{env["target"]}.framework/libtextserver_advanced.macos.{env["target"]}',
|
||||
f"./bin/libtextserver_advanced.macos.{env['target']}.framework/libtextserver_advanced.macos.{env['target']}",
|
||||
source=sources,
|
||||
)
|
||||
else:
|
||||
library = env.SharedLibrary(
|
||||
f'./bin/libtextserver_advanced{env["suffix"]}{env["SHLIBSUFFIX"]}',
|
||||
f"./bin/libtextserver_advanced{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