avoid to prepend app_dir for icon/presplash. use root_dir instead.

This commit is contained in:
Mathieu Virbel 2013-02-07 04:09:40 +01:00
parent c16361b295
commit fd5cbcb390
2 changed files with 11 additions and 9 deletions

View file

@ -572,10 +572,17 @@ class Buildozer(object):
''' '''
return re.sub('[^a-zA-Z0-9_\-]', '_', name) return re.sub('[^a-zA-Z0-9_\-]', '_', name)
@property
def root_dir(self):
return realpath(join(dirname(self.specfilename)))
@property @property
def buildozer_dir(self): def buildozer_dir(self):
return realpath(join( return join(self.root_dir, '.buildozer')
dirname(self.specfilename), '.buildozer'))
@property
def bin_dir(self):
return join(self.root_dir, 'bin')
@property @property
def platform_dir(self): def platform_dir(self):
@ -585,11 +592,6 @@ class Buildozer(object):
def app_dir(self): def app_dir(self):
return join(self.buildozer_dir, self.targetname, 'app') return join(self.buildozer_dir, self.targetname, 'app')
@property
def bin_dir(self):
return realpath(join(
dirname(self.specfilename), 'bin'))
@property @property
def applibs_dir(self): def applibs_dir(self):
return join(self.buildozer_dir, 'applibs') return join(self.buildozer_dir, 'applibs')

View file

@ -377,13 +377,13 @@ class TargetAndroid(Target):
# add presplash # add presplash
presplash = config.getdefault('app', 'presplash.filename', '') presplash = config.getdefault('app', 'presplash.filename', '')
if presplash: if presplash:
build_cmd += ' --presplash {}'.format(join(self.buildozer.app_dir, build_cmd += ' --presplash {}'.format(join(self.buildozer.root_dir,
presplash)) presplash))
# add icon # add icon
icon = config.getdefault('app', 'icon.filename', '') icon = config.getdefault('app', 'icon.filename', '')
if icon: if icon:
build_cmd += ' --icon {}'.format(join(self.buildozer.app_dir, icon)) build_cmd += ' --icon {}'.format(join(self.buildozer.root_dir, icon))
# build only in debug right now. # build only in debug right now.
if self.build_mode == 'debug': if self.build_mode == 'debug':