print 'Build : profile=' + profile + ' architecture=' + arch
command = ['gbs', '--conf', os.path.join(SCRIPT_PATH, 'gbs.conf'), 'build',
'-P', profile, '--include-all', '-A', arch, '--incremental']
+ if not force_bootstrap and not need_bootstrap(profile):
+ command.extend(['--define=skipbootstrap 1'])
return True if subprocess.call(command) == 0 else False
def find_architecture(profile):
arch = arch if arch != 'ia32' else 'i586'
return arch
+def need_bootstrap(profile):
+ # TODO: condition improvement is necessary
+ if profile == 'desktop':
+ if os.path.isdir(os.path.join(ROOT_PATH, 'out')):
+ return False
+ elif os.path.isdir(os.path.join(ROOT_PATH, 'out.tizen', 'out')):
+ return False
+ return True
+
def build_desktop(chromium_path, force_bootstrap, verbose):
if chromium_path is None:
parent_path = os.path.dirname(ROOT_PATH)
else:
chromium_path = os.path.abspath(chromium_path)
- if not run_bootstrap(chromium_path, verbose):
- print('Fail to run bootstrap script')
- return False
+ if force_bootstrap or need_bootstrap('desktop'):
+ if not run_bootstrap(chromium_path, verbose):
+ print('Fail to run bootstrap script')
+ return False
subprocess.call([os.path.join(ROOT_PATH, 'script', 'build.py'), '-c', 'D'])
return True