rootstrap_list = None
sdk_path = None
- def __init__(self, sdk_path=None, config=None):
+ def __init__(self, sdk_path=None, config=None, rootstrap_search=None):
self.tizen = sdk_path
- self.list_rootstrap()
+ self.list_rootstrap(rootstrap_search)
self.config_file = config
- def list_rootstrap(self):
+ def list_rootstrap(self, rootstrap_search=None):
"""List all the rootstraps"""
+ rs_prefix = 'mobile|wearable'
+ if rootstrap_search is not None:
+ rs_prefix = rootstrap_search
+ print 'Set rs_prefix: %s' % rs_prefix
+
if self.rootstrap_list != None:
return self.rootstrap_list
cmdline = self.tizen + ' list rootstrap'
ret = Executor().run(cmdline, show=False)
for x in ret.splitlines():
- if re.search('(mobile|wearable)-(2.4|3.0|4.0|5.0)-(device|emulator|device64|emulator64).core.*', x):
+ if re.search('(%s)-(2.4|3.0|4.0|5.0)-(device|emulator|device64|emulator64).core.*' % rs_prefix, x):
if self.rootstrap_list == None:
self.rootstrap_list = []
self.rootstrap_list.append(x.split(' ')[0])
+ else:
+ print 'No search result for %s' % '(%s)-(2.4|3.0|4.0|5.0)-(device|emulator|device64|emulator64).core.*' % rs_prefix
return self.rootstrap_list
def check_rootstrap(self, rootstrap, show=True):
'tizen-sdk-ux/tools/ide/bin/tizen', \
'tizen-sdk-cli/tools/ide/bin/tizen']
- def __init__(self, sdkpath=None):
+ def __init__(self, sdkpath=None, rootstrap_search=None):
self.error_parser = ErrorParser()
self.runtool = Executor(checker=self.error_parser)
print 'Cannot locate cli tool'
raise LocalError('Fail to locate cli tool')
- self.rs = _Rootstrap(sdk_path=self.tizen, config=self.config_file)
+ self.rs = _Rootstrap(sdk_path=self.tizen, config=self.config_file, rootstrap_search=rootstrap_search)
def get_user_root(self):
build.add_argument('--sdkpath', action='store', dest='sdkpath', \
help='Specify Tizen SDK installation root (one time init).' \
' ex) /home/yours/tizen-sdk/')
+ build.add_argument('--profile-to-search', action='store', dest='profiletosearch', \
+ help='Rootstrap profile prefix.' \
+ ' ex) (mobile|wearable|da-hfp)')
build.add_argument('--c-opts', action='store', dest='c_opts', \
help='Extra compile options USER_C_OPTS')
build.add_argument('--cpp-opts', action='store', dest='cpp_opts', \
my_source = Source(src=args.workspace)
my_source.set_user_options(c_opts=args.c_opts, cpp_opts=args.cpp_opts, link_opts=args.link_opts)
- my_sdk = Sdk(sdkpath=args.sdkpath)
+ print '-------------------'
+ print '(%s)' % args.profiletosearch
+ print '-------------------'
+ my_sdk = Sdk(sdkpath=args.sdkpath, rootstrap_search=args.profiletosearch)
my_sdk.clean(my_source)
my_sdk.build_native(my_source, rootstrap=args.rootstrap, arch=args.arch, conf=args.conf, jobs=args.jobs)
if args.conf == 'Debug' :