Poodletooth-iLand/tools/build_client.py

35 lines
1 KiB
Python
Raw Normal View History

2015-03-03 22:10:12 +00:00
#!/usr/bin/env python2
import os
import sys
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--build-dir', default='build',
help='The directory of which the build was prepared.')
parser.add_argument('--output', default='GameData.pyd',
help='The built file.')
2015-03-10 22:36:03 +00:00
parser.add_argument('--main-module', default='united.base.ClientStart',
2015-03-03 22:10:12 +00:00
help='The module to load at the start of the game.')
2015-03-10 22:36:03 +00:00
parser.add_argument('modules', nargs='*', default=['shared', 'united'],
help='The Toontown United modules to be included in the build.')
2015-03-03 22:10:12 +00:00
args = parser.parse_args()
print 'Building the client...'
os.chdir(args.build_dir)
cmd = sys.executable + ' -m direct.showutil.pfreeze'
args.modules.extend(['direct', 'pandac'])
for module in args.modules:
cmd += ' -i %s.*.*' % module
cmd += ' -i encodings.*'
cmd += ' -i base64'
cmd += ' -i site'
cmd += ' -o ' + args.output
cmd += ' ' + args.main_module
os.system(cmd)
print 'Done building the client.'