Set the default option in the method parsing arguments, not in the builder.
This commit is contained in:
parent
54458ccb0a
commit
81612c2f2c
|
@ -72,6 +72,12 @@ def parse_args():
|
||||||
if not options.ios_arch:
|
if not options.ios_arch:
|
||||||
options.ios_arch = ['armv7', 'arm64', 'i386', 'x86_64']
|
options.ios_arch = ['armv7', 'arm64', 'i386', 'x86_64']
|
||||||
|
|
||||||
|
if not options.target_platform:
|
||||||
|
if options.target == 'kiwix-android':
|
||||||
|
options.target_platform = 'android'
|
||||||
|
else:
|
||||||
|
options.target_platform = 'native_dyn'
|
||||||
|
|
||||||
return options
|
return options
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
|
@ -18,11 +18,6 @@ class Builder:
|
||||||
PlatformInfo.get_platform('neutral', self._targets)
|
PlatformInfo.get_platform('neutral', self._targets)
|
||||||
|
|
||||||
target_platform = option('target_platform')
|
target_platform = option('target_platform')
|
||||||
if not target_platform:
|
|
||||||
if option('target') == 'kiwix-android':
|
|
||||||
target_platform = 'android'
|
|
||||||
else:
|
|
||||||
target_platform = 'native_dyn'
|
|
||||||
platform = PlatformInfo.get_platform(target_platform, self._targets)
|
platform = PlatformInfo.get_platform(target_platform, self._targets)
|
||||||
if neutralEnv('distname') not in platform.compatible_hosts:
|
if neutralEnv('distname') not in platform.compatible_hosts:
|
||||||
print(('ERROR: The target platform {} cannot be build on host {}.\n'
|
print(('ERROR: The target platform {} cannot be build on host {}.\n'
|
||||||
|
|
Loading…
Reference in New Issue