Add Quirrel script checks and a GUI build command

Compile the upstream Quirrel checker with MSVC and invoke syntax and
static analysis for each input file. Treat reported errors and warnings
as failures because the checker can return a zero exit code for them.

Split the command line by purpose and add GUI pack construction from
declared edits and injected scripts. Verify the checker against stock
scripts and invalid inputs, and confirm that patch checks still run.
This commit is contained in:
N0VAN0M4LY committed 2026-11-23 14:36:15 +08:00
1 parent 8fa50b7804
commit b6d72f4792
8 files changed
+290 -16

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
"""Command line entry point for the development-side tools.
Each group of commands lives in its own module and registers itself here:
- exe_commands: check-patches, patch-exe
- build_commands: build-gui
- script_commands: build-script-checker, check-scripts
Run `wtotools <command> --help` for the arguments of one command.
"""
from __future__ import annotations
import argparse
from . import build_commands, exe_commands, script_commands
def main(argv: list[str] | None = None) -> int:
parser = argparse.ArgumentParser(prog="wtotools", description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter)
commands = parser.add_subparsers(dest="command", required=True)
for group in (exe_commands, build_commands, script_commands):
group.register(commands)
args = parser.parse_args(argv)
return args.handler(args)