Fix Xcode support in xenia-build

This commit is contained in:
Conrad Kramer 2021-10-06 14:38:06 -07:00 committed by Triang3l
parent 28fec845d5
commit 548758857f
1 changed files with 18 additions and 3 deletions

View File

@ -822,9 +822,16 @@ class BaseBuildCommand(Command):
] + ([targets] if targets is not None else []) + pass_args, ] + ([targets] if targets is not None else []) + pass_args,
shell=False) shell=False)
elif sys.platform == 'darwin': elif sys.platform == 'darwin':
# TODO(benvanik): other platforms. schemes = args['target'] if len(args['target']) else ['xenia-app']
print('ERROR: don\'t know how to build on this platform.') nested_args = [['-scheme', scheme] for scheme in schemes]
result = 1 scheme_args = [arg for pair in nested_args for arg in pair]
result = subprocess.call([
'xcodebuild',
'-workspace',
'build/xenia.xcworkspace',
'-configuration',
args['config']
] + scheme_args + pass_args, shell=False, env=dict(os.environ))
else: else:
result = subprocess.call([ result = subprocess.call([
'make', 'make',
@ -1690,6 +1697,9 @@ class DevenvCommand(Command):
print('ERROR: Visual Studio is not installed.'); print('ERROR: Visual Studio is not installed.');
return 1 return 1
print('Launching Visual Studio...') print('Launching Visual Studio...')
elif sys.platform == 'darwin':
print('Launching Xcode...')
devenv = 'xcode4'
elif has_bin('clion') or has_bin('clion.sh'): elif has_bin('clion') or has_bin('clion.sh'):
print('Launching CLion...') print('Launching CLion...')
show_reload_prompt = create_clion_workspace() show_reload_prompt = create_clion_workspace()
@ -1711,6 +1721,11 @@ class DevenvCommand(Command):
'devenv', 'devenv',
'build\\xenia.sln', 'build\\xenia.sln',
]) ])
elif sys.platform == 'darwin':
shell_call([
'xed',
'build/xenia.xcworkspace',
])
elif has_bin('clion'): elif has_bin('clion'):
shell_call([ shell_call([
'clion', 'clion',