Restore direct-installation Classic baseline for OpenBMH 1.0 (by Codex)
This commit is contained in:
1 parent
c8f04d0099
commit
c3704878d6
255 files changed
+311
-21131
No files matched your search
@@ -10,17 +10,11 @@ import zipfile
|
||||
|
||||
|
||||
def validate(directory, windows):
|
||||
products = {name + ('.exe' if windows else '') for name in ('OpenBMH', 'openbmh_cli', 'openbmh_import')}
|
||||
products = {'openbmh_play.exe', 'openbmh_cli.exe'} if windows else {'openbmh_play', 'openbmh_cli'}
|
||||
documents = {'README.md', 'LICENSE', 'THIRD_PARTY_NOTICES.md', 'ACKNOWLEDGEMENTS.md', 'CONTRIBUTING.md'}
|
||||
licenses = {'README.md', 'LGPL-2.1.txt', 'Nuked-OPL3-notices.txt', 'LZMA-SDK.txt', 'SDL2-HIDAPI-BSD.txt',
|
||||
'SDL2-HIDAPI-options.txt', 'SDL2-HIDAPI-original.txt', 'SDL2-yuv2rgb.txt',
|
||||
'SDL2.txt', 'miniz-source-notices.txt', 'miniz.txt', 'nativefiledialog-extended.txt',
|
||||
'RmlUi.txt', 'RmlUi-containers.txt', 'RmlUi-fonts.txt', 'RmlUi-Khronos.txt',
|
||||
'FreeType.txt', 'FreeType-FTL.txt', 'FreeType-BDF.txt', 'FreeType-PCF.txt', 'FreeType-zlib.txt',
|
||||
'nlohmann-json.txt', 'cpp-httplib.txt', 'SDL2_image.txt', 'stb-image.txt',
|
||||
'libwebp.txt', 'libwebp-PATENTS.txt', 'LunaSVG.txt', 'PlutoVG.txt', 'pugixml.txt'}
|
||||
launcher_assets = {'assets/launcher/' + name for name in
|
||||
('launcher.rml', 'theme.rcss', 'stadium.tga', 'LatoLatin-Regular.ttf', 'LatoLatin-Bold.ttf')}
|
||||
'SDL2.txt', 'miniz-source-notices.txt', 'miniz.txt', 'nativefiledialog-extended.txt'}
|
||||
present = set()
|
||||
for file in directory.rglob('*'):
|
||||
if not file.is_file():
|
||||
@@ -28,22 +22,18 @@ def validate(directory, windows):
|
||||
relative = file.relative_to(directory)
|
||||
present.add(relative.as_posix())
|
||||
allowed = (len(relative.parts) == 1 and file.name in products | documents)
|
||||
allowed |= relative.as_posix() in launcher_assets
|
||||
allowed |= len(relative.parts) == 3 and relative.parts[:2] == ('docs', 'licenses') and file.name in licenses
|
||||
allowed |= (len(relative.parts) >= 2 and relative.parts[0] == 'docs' and
|
||||
'licenses' not in relative.parts and file.suffix in {'.md', '.txt', '.csv'} and
|
||||
all(part not in {'analyses', 'agents', 'manuals', 'validation'} for part in relative.parts))
|
||||
# Versioned OBW schemas are authored format documentation, not game data.
|
||||
allowed |= bool(re.fullmatch(r'docs/formats/obw/schema/[1-9][0-9]*\.[0-9]+/[a-z][a-z0-9_-]*\.json',
|
||||
relative.as_posix()))
|
||||
# App-local UCRT deployment must ship the whole redist set, core forwarders included.
|
||||
allowed |= (windows and len(relative.parts) == 1 and
|
||||
bool(re.fullmatch(r'(?:vcruntime\d+(?:_\d+)?|msvcp\d+(?:_\d+|_atomic_wait|_codecvt_ids)?|'
|
||||
r'concrt\d+|ucrtbase|api-ms-win-(?:crt|core)-[a-z0-9-]+)\.dll', file.name, re.I)))
|
||||
if not allowed:
|
||||
raise RuntimeError('Unexpected package entry: ' + relative.as_posix())
|
||||
required = products | documents | launcher_assets | {'docs/licenses/' + name for name in licenses}
|
||||
required.add('docs/release/0.2/RELEASE_NOTES.md')
|
||||
required = products | documents | {'docs/licenses/' + name for name in licenses}
|
||||
required.add('docs/release/0.1/RELEASE_NOTES.md')
|
||||
if required - present:
|
||||
raise RuntimeError('Missing package entries: ' + ', '.join(sorted(required - present)))
|
||||
if windows and not {'vcruntime140.dll', 'msvcp140.dll'} <= present:
|
||||
|
||||
Reference in new issue
Block a user