Merge pull request #438 from s4Ys369/revert-434-patch-1
[sm64pc.git] / diff_settings.py
blobc1cd3a5fa2559c6529e8ce6985022ef847044db6
1 #!/usr/bin/env python3
3 def add_custom_arguments(parser):
4 group = parser.add_mutually_exclusive_group(required=False)
5 group.add_argument('-j', dest='lang', action='store_const', const='jp',
6 help="Set version to JP.")
7 group.add_argument('-u', dest='lang', action='store_const', const='us',
8 help="Set version to US.")
9 group.add_argument('-e', dest='lang', action='store_const', const='eu',
10 help="Set version to EU.")
11 group.add_argument('-s', dest='lang', action='store_const', const='sh',
12 help="Set version to SH.")
14 def apply(config, args):
15 lang = args.lang or 'us'
16 config['mapfile'] = f'build/{lang}/sm64.{lang}.map'
17 config['myimg'] = f'build/{lang}/sm64.{lang}.z64'
18 config['baseimg'] = f'baserom.{lang}.z64'
19 config['makeflags'] = [f'VERSION={lang}']
20 config['source_directories'] = ['src', 'include']