Implement configurable kill rewards with account-wide daily limits, transactional deduplication, and game-to-db retries. Add the approved wide rules and tested isolation tooling. Stage wear40 equipment and persistent extra item metadata with an explicit migration plan and client revision gate. Track all 168 remaining offers; sixteen have staged data/assets, while live acceptance and other systems remain incomplete. This commit is not a production deployment.
30 lines
1.4 KiB
Python
30 lines
1.4 KiB
Python
#!/usr/bin/env python3
|
|
"""Build game/db without either Makefile's production installation default."""
|
|
import argparse
|
|
from pathlib import Path
|
|
import subprocess
|
|
|
|
|
|
def main():
|
|
p = argparse.ArgumentParser(description=__doc__)
|
|
p.add_argument('--source', type=Path, required=True, help='directory containing server/ and extern/')
|
|
p.add_argument('--output', type=Path, required=True)
|
|
p.add_argument('--target', choices=['game', 'db'], required=True)
|
|
p.add_argument('--jobs', type=int, default=1)
|
|
a = p.parse_args()
|
|
source, output = a.source.resolve(), a.output.resolve()
|
|
for destination in (output, (output/'bin').resolve(), (output/'work').resolve()):
|
|
if destination == Path('/usr/metin2/server') or Path('/usr/metin2/server') in destination.parents:
|
|
p.error('build outputs must not be inside the production server tree')
|
|
for name in ('bin', 'work', 'obj-'+a.target):
|
|
(output/name).mkdir(parents=True, exist_ok=True)
|
|
# DB uses DBDIR, game uses GAMEDIR. Always override both, even when building one target.
|
|
subprocess.run(['gmake', '-j%d' % max(1, a.jobs), 'BINDIR='+str(output/'work'),
|
|
'GAMEDIR='+str(output/'bin'), 'DBDIR='+str(output/'bin'),
|
|
'OBJDIR='+str(output/('obj-'+a.target))],
|
|
cwd=source/'server'/a.target/'src', check=True)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|