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)
@property
def root_dir(self):
return realpath(join(dirname(self.specfilename)))
@property
def buildozer_dir(self):
return realpath(join(
dirname(self.specfilename), '.buildozer'))
return join(self.root_dir, '.buildozer')
@property
def bin_dir(self):
return join(self.root_dir, 'bin')
@property
def platform_dir(self):
@ -585,11 +592,6 @@ class Buildozer(object):
def app_dir(self):
return join(self.buildozer_dir, self.targetname, 'app')
@property
def bin_dir(self):
return realpath(join(
dirname(self.specfilename), 'bin'))
@property
def applibs_dir(self):
return join(self.buildozer_dir, 'applibs')

View file

@ -377,13 +377,13 @@ class TargetAndroid(Target):
# add presplash
presplash = config.getdefault('app', 'presplash.filename', '')
if presplash:
build_cmd += ' --presplash {}'.format(join(self.buildozer.app_dir,
build_cmd += ' --presplash {}'.format(join(self.buildozer.root_dir,
presplash))
# add icon
icon = config.getdefault('app', 'icon.filename', '')
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.
if self.build_mode == 'debug':