NativeCamera build with AndroidStub backported from OpenCV master.

This commit is contained in:
Alexander Smorkalov
2013-11-18 09:30:12 +04:00
parent f95ff0a352
commit e3f450cffb
2 changed files with 33 additions and 26 deletions

View File

@@ -7,6 +7,12 @@ import shutil
ScriptHome = os.path.split(sys.argv[0])[0]
ConfFile = open(os.path.join(ScriptHome, "camera_build.conf"), "rt")
HomeDir = os.getcwd()
stub = os.environ.get("ANDROID_STUB_ROOT", "")
if (stub == ""):
print("Warning: ANDROID_STUB_ROOT environment variable is not set or is empty")
for s in ConfFile.readlines():
s = s[0:s.find("#")]
if (not s):
@@ -20,6 +26,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)