|
@@ -3,20 +3,9 @@
|
|
|
import argparse
|
|
|
import configparser
|
|
|
import pathlib
|
|
|
-import struct
|
|
|
|
|
|
-import msgspec
|
|
|
-
|
|
|
-from .validate import (
|
|
|
- ByteSignature,
|
|
|
- Code,
|
|
|
- GameConfDict,
|
|
|
- IntLiteral,
|
|
|
- LinuxBinary,
|
|
|
- PlatformBinary,
|
|
|
- WindowsBinary,
|
|
|
- convert_types,
|
|
|
-)
|
|
|
+from . import validate
|
|
|
+from .validate import LinuxBinary, PlatformBinary, WindowsBinary
|
|
|
|
|
|
|
|
|
def main() -> None:
|
|
@@ -29,11 +18,7 @@ def main() -> None:
|
|
|
config = configparser.ConfigParser()
|
|
|
config.read(args.validation_file)
|
|
|
|
|
|
- entries = msgspec.convert(
|
|
|
- {s: config[s] for s in config.sections()},
|
|
|
- type=GameConfDict,
|
|
|
- dec_hook=convert_types(ByteSignature, Code, IntLiteral, struct.Struct, pathlib.Path),
|
|
|
- )
|
|
|
+ entries = validate.read_config(config)
|
|
|
|
|
|
linux_target = LinuxBinary(pathlib.Path("server_srv.so"))
|
|
|
windows_target = WindowsBinary(pathlib.Path("server.dll"))
|