Native camera warper libraries build improved

Environment variables support added to Android tree path;
Default config updated to use env variable.
This commit is contained in:
Alexander Smorkalov
2012-11-30 13:09:02 +04:00
parent f6ca38a579
commit be80ad1607
2 changed files with 33 additions and 22 deletions

View File

@@ -7,6 +7,16 @@ import shutil
ScriptHome = os.path.split(sys.argv[0])[0]
ConfFile = open(os.path.join(ScriptHome, "camera_build.conf"), "rt")
HomeDir = os.getcwd()
stub = ""
try:
stub = os.environ["ANDROID_STUB_ROOT"]
except:
None
if (stub == ""):
print("Warning: ANDROID_STUB_ROOT environment variable is not set")
for s in ConfFile.readlines():
s = s[0:s.find("#")]
if (not s):
@@ -20,6 +30,7 @@ for s in ConfFile.readlines():
NativeApiLevel = str.strip(keys[2])
AndroidTreeRoot = str.strip(keys[3])
AndroidTreeRoot = str.strip(AndroidTreeRoot, "\n")
AndroidTreeRoot = os.path.expandvars(AndroidTreeRoot)
print("Building %s for %s" % (MakeTarget, Arch))
BuildDir = os.path.join(HomeDir, MakeTarget + "_" + Arch)