Merge commit '3a7f96fd99528968c39b5be81db067ca018d432b' into dev
This commit is contained in:
96
external/SDL/build-scripts/SDL_migration.cocci
vendored
96
external/SDL/build-scripts/SDL_migration.cocci
vendored
File diff suppressed because one or more lines are too long
@@ -591,7 +591,6 @@ foreach (@ARGV) {
|
||||
process_xcode($arg, 'Xcode/SDL/SDL.xcodeproj/project.pbxproj');
|
||||
process_visualstudio($arg, 'VisualC/SDL/SDL.vcxproj');
|
||||
process_visualstudio($arg, 'VisualC-GDK/SDL/SDL.vcxproj');
|
||||
process_visualstudio($arg, 'VisualC-WinRT/SDL-UWP.vcxproj');
|
||||
}
|
||||
|
||||
print("Done. Please run `git diff` and make sure this looks okay!\n");
|
||||
|
||||
4
external/SDL/build-scripts/build-release.py
vendored
4
external/SDL/build-scripts/build-release.py
vendored
@@ -179,7 +179,7 @@ class Releaser:
|
||||
continue
|
||||
mod_type, file_paths = line.split(maxsplit=1)
|
||||
assert current_time is not None
|
||||
for file_path in file_paths.split():
|
||||
for file_path in file_paths.split("\t"):
|
||||
if file_path in set_paths and file_path not in path_times:
|
||||
path_times[file_path] = current_time
|
||||
assert set(path_times.keys()) == set_paths
|
||||
@@ -264,7 +264,7 @@ class Releaser:
|
||||
self.artifacts[f"src-tar-{comp}"] = tar_path
|
||||
|
||||
def create_xcframework(self, configuration: str="Release") -> None:
|
||||
dmg_in = self.root / f"Xcode/SDL/build/SDL3.dmg"
|
||||
dmg_in = self.root / f"Xcode/SDL/build/{self.project}.dmg"
|
||||
dmg_in.unlink(missing_ok=True)
|
||||
self.executer.run(["xcodebuild", "-project", str(self.root / "Xcode/SDL/SDL.xcodeproj"), "-target", "SDL3.dmg", "-configuration", configuration])
|
||||
if self.dry:
|
||||
|
||||
@@ -19,6 +19,7 @@ git checkout \
|
||||
stdlib/SDL_qsort.c \
|
||||
stdlib/SDL_strtokr.c \
|
||||
video/khronos \
|
||||
video/x11/edid.h \
|
||||
video/x11/edid-parse.c \
|
||||
video/x11/xsettings-client.* \
|
||||
video/yuv2rgb
|
||||
|
||||
2
external/SDL/build-scripts/rename_api.py
vendored
2
external/SDL/build-scripts/rename_api.py
vendored
@@ -57,7 +57,7 @@ def main():
|
||||
i += 2
|
||||
|
||||
regex = create_regex_from_replacements(replacements)
|
||||
for dir in ["src", "test", "include", "docs", "cmake/test"]:
|
||||
for dir in ["src", "test", "examples", "include", "docs", "cmake/test"]:
|
||||
replace_symbols_in_path(SDL_ROOT / dir, regex, replacements)
|
||||
|
||||
# Replace the symbols in documentation
|
||||
|
||||
2
external/SDL/build-scripts/rename_macros.py
vendored
2
external/SDL/build-scripts/rename_macros.py
vendored
@@ -129,7 +129,6 @@ RENAMED_MACROS = {
|
||||
"__VITA__": "SDL_PLATFORM_VITA",
|
||||
"__3DS__": "SDL_PLATFORM_3DS",
|
||||
# "__unix__": "SDL_PLATFORM_UNIX,
|
||||
"__WINRT__": "SDL_PLATFORM_WINRT",
|
||||
"__XBOXSERIES__": "SDL_PLATFORM_XBOXSERIES",
|
||||
"__XBOXONE__": "SDL_PLATFORM_XBOXONE",
|
||||
"__WINDOWS__": "SDL_PLATFORM_WINDOWS",
|
||||
@@ -145,6 +144,7 @@ DEPRECATED_PLATFORM_MACROS = {
|
||||
"__NACL__",
|
||||
"__PNACL__",
|
||||
"__WINDOWS__",
|
||||
"__WINRT__",
|
||||
"SDL_ALTIVEC_BLITTERS",
|
||||
"SDL_ARM_NEON_BLITTERS",
|
||||
"SDL_ARM_SIMD_BLITTERS",
|
||||
|
||||
80
external/SDL/build-scripts/rename_types.py
vendored
Executable file
80
external/SDL/build-scripts/rename_types.py
vendored
Executable file
@@ -0,0 +1,80 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# This script renames symbols in the specified paths
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
if len(args.args) < 1:
|
||||
print("Usage: %s files_or_directories ..." % sys.argv[0])
|
||||
exit(1)
|
||||
|
||||
replacements = {
|
||||
"SDL_bool": "bool",
|
||||
"SDL_TRUE": "true",
|
||||
"SDL_FALSE": "false",
|
||||
}
|
||||
entries = args.args[0:]
|
||||
|
||||
regex = create_regex_from_replacements(replacements)
|
||||
|
||||
for entry in entries:
|
||||
path = pathlib.Path(entry)
|
||||
if not path.exists():
|
||||
print("%s doesn't exist, skipping" % entry)
|
||||
continue
|
||||
|
||||
replace_symbols_in_path(path, regex, replacements)
|
||||
|
||||
def create_regex_from_replacements(replacements):
|
||||
return re.compile(r"\b(%s)\b" % "|".join(map(re.escape, replacements.keys())))
|
||||
|
||||
def replace_symbols_in_file(file, regex, replacements):
|
||||
try:
|
||||
with file.open("r", encoding="UTF-8", newline="") as rfp:
|
||||
original = rfp.read()
|
||||
contents = regex.sub(lambda mo: replacements[mo.string[mo.start():mo.end()]], original)
|
||||
if contents != original:
|
||||
with file.open("w", encoding="UTF-8", newline="") as wfp:
|
||||
wfp.write(contents)
|
||||
except UnicodeDecodeError:
|
||||
print("%s is not text, skipping" % file)
|
||||
except Exception as err:
|
||||
print("%s" % err)
|
||||
|
||||
|
||||
def replace_symbols_in_dir(path, regex, replacements):
|
||||
for entry in path.glob("*"):
|
||||
if entry.is_dir():
|
||||
replace_symbols_in_dir(entry, regex, replacements)
|
||||
else:
|
||||
print("Processing %s" % entry)
|
||||
replace_symbols_in_file(entry, regex, replacements)
|
||||
|
||||
|
||||
def replace_symbols_in_path(path, regex, replacements):
|
||||
if path.is_dir():
|
||||
replace_symbols_in_dir(path, regex, replacements)
|
||||
else:
|
||||
replace_symbols_in_file(path, regex, replacements)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
parser = argparse.ArgumentParser(fromfile_prefix_chars='@')
|
||||
parser.add_argument("args", nargs="*")
|
||||
args = parser.parse_args()
|
||||
|
||||
try:
|
||||
main()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
exit(-1)
|
||||
|
||||
exit(0)
|
||||
|
||||
0
external/SDL/build-scripts/setup-gdk-desktop.py
vendored
Normal file → Executable file
0
external/SDL/build-scripts/setup-gdk-desktop.py
vendored
Normal file → Executable file
Reference in New Issue
Block a user