21 lines
964 B
Python
21 lines
964 B
Python
import os
|
|
import argparse
|
|
import sys
|
|
|
|
# Check if the script is run with the correct arguments
|
|
parser = argparse.ArgumentParser(description="Generate chunk header files")
|
|
parser.add_argument('--assets', required=True, help='Dir to output built assets')
|
|
parser.add_argument('--build-type', choices=['wad', 'header'], default='raw', help='Type of build to perform')
|
|
parser.add_argument('--output-file', help='Output file for built assets (required for wad build)')
|
|
parser.add_argument('--output-headers', help='Output header file for built assets (required for header build)')
|
|
parser.add_argument('--output-assets', help='Output directory for built assets (required for raw build)')
|
|
parser.add_argument('--input', required=True, help='Input assets to process', nargs='+')
|
|
args = parser.parse_args()
|
|
|
|
inputAssets = []
|
|
for inputArg in args.input:
|
|
inputAssets.extend(inputArg.split(','))
|
|
|
|
if not inputAssets:
|
|
print("Error: No input assets provided.")
|
|
sys.exit(1) |