forked from organicmaps/organicmaps
[android] Fixed env setup script for new SDK
This commit is contained in:
parent
792d40346a
commit
aea5519f77
1 changed files with 15 additions and 12 deletions
|
@ -37,20 +37,23 @@ def update_assets():
|
|||
|
||||
|
||||
def replace_aapt(sdkDir, oldAaptName='aapt2'):
|
||||
aaptPath = os.path.join(sdkDir, 'build-tools/android-4.2.2', 'aapt')
|
||||
aaptRealPath = os.path.join(sdkDir, 'build-tools/android-4.2.2', oldAaptName)
|
||||
buildToolsPath = os.path.join(sdkDir, 'build-tools')
|
||||
# Build tools now are in different folders for each version
|
||||
for buildToolsVersion in os.listdir(buildToolsPath):
|
||||
aaptPath = os.path.join(buildToolsPath, buildToolsVersion, 'aapt')
|
||||
aaptRealPath = os.path.join(buildToolsPath, buildToolsVersion, oldAaptName)
|
||||
|
||||
# handle case of non-existing file
|
||||
if not os.path.exists(aaptRealPath):
|
||||
os.rename(aaptPath, aaptRealPath)
|
||||
else:
|
||||
print 'aapt2 already exists, skipping'
|
||||
# handle case of non-existing file
|
||||
if not os.path.exists(aaptRealPath):
|
||||
os.rename(aaptPath, aaptRealPath)
|
||||
else:
|
||||
print 'aapt2 already exists, skipping'
|
||||
|
||||
# copy new hacked aapt version
|
||||
curDir = os.getcwd()
|
||||
hackedAaptPath = os.path.join(curDir, 'aapt')
|
||||
print 'hacked path; %s' % hackedAaptPath
|
||||
print 'copied: %s' % shutil.copy(hackedAaptPath, aaptPath)
|
||||
# copy new hacked aapt version
|
||||
curDir = os.getcwd()
|
||||
hackedAaptPath = os.path.join(curDir, 'aapt')
|
||||
print 'hacked path; %s' % hackedAaptPath
|
||||
print 'copied: %s' % shutil.copy(hackedAaptPath, aaptPath)
|
||||
|
||||
|
||||
def write_local_properties(sdkDir, ndkDir):
|
||||
|
|
Loading…
Add table
Reference in a new issue