Normalize line endings and whitespace
This commit is contained in:

committed by
Andrey Kamaev

parent
69020da607
commit
04384a71e4
@@ -10,11 +10,11 @@ HomeDir = os.getcwd()
|
||||
for s in ConfFile.readlines():
|
||||
s = s[0:s.find("#")]
|
||||
if (not s):
|
||||
continue
|
||||
continue
|
||||
keys = s.split(";")
|
||||
if (len(keys) < 4):
|
||||
print("Error: invalid config line: \"%s\"" % s)
|
||||
continue
|
||||
print("Error: invalid config line: \"%s\"" % s)
|
||||
continue
|
||||
MakeTarget = str.strip(keys[0])
|
||||
Arch = str.strip(keys[1])
|
||||
NativeApiLevel = str.strip(keys[2])
|
||||
@@ -23,19 +23,19 @@ for s in ConfFile.readlines():
|
||||
print("Building %s for %s" % (MakeTarget, Arch))
|
||||
BuildDir = os.path.join(HomeDir, MakeTarget + "_" + Arch)
|
||||
if (os.path.exists(BuildDir)):
|
||||
shutil.rmtree(BuildDir)
|
||||
shutil.rmtree(BuildDir)
|
||||
try:
|
||||
os.mkdir(BuildDir)
|
||||
os.mkdir(BuildDir)
|
||||
except:
|
||||
print("Error: cannot create direcotry \"%s\"" % BuildDir)
|
||||
continue
|
||||
print("Error: cannot create direcotry \"%s\"" % BuildDir)
|
||||
continue
|
||||
shutil.rmtree(os.path.join(AndroidTreeRoot, "out", "target", "product", "generic", "system"), ignore_errors=True)
|
||||
if (Arch == "x86"):
|
||||
shutil.copytree(os.path.join(AndroidTreeRoot, "bin_x86", "system"), os.path.join(AndroidTreeRoot, "out", "target", "product", "generic", "system"))
|
||||
shutil.copytree(os.path.join(AndroidTreeRoot, "bin_x86", "system"), os.path.join(AndroidTreeRoot, "out", "target", "product", "generic", "system"))
|
||||
elif (Arch == "mips"):
|
||||
shutil.copytree(os.path.join(AndroidTreeRoot, "bin_mips", "system"), os.path.join(AndroidTreeRoot, "out", "target", "product", "generic", "system"))
|
||||
shutil.copytree(os.path.join(AndroidTreeRoot, "bin_mips", "system"), os.path.join(AndroidTreeRoot, "out", "target", "product", "generic", "system"))
|
||||
else:
|
||||
shutil.copytree(os.path.join(AndroidTreeRoot, "bin_arm", "system"), os.path.join(AndroidTreeRoot, "out", "target", "product", "generic", "system"))
|
||||
shutil.copytree(os.path.join(AndroidTreeRoot, "bin_arm", "system"), os.path.join(AndroidTreeRoot, "out", "target", "product", "generic", "system"))
|
||||
os.chdir(BuildDir)
|
||||
BuildLog = os.path.join(BuildDir, "build.log")
|
||||
CmakeCmdLine = "cmake -DCMAKE_TOOLCHAIN_FILE=../android.toolchain.cmake -DANDROID_SOURCE_TREE=\"%s\" -DANDROID_NATIVE_API_LEVEL=\"%s\" -DANDROID_ABI=\"%s\" -DANDROID_USE_STLPORT=ON ../../ > \"%s\" 2>&1" % (AndroidTreeRoot, NativeApiLevel, Arch, BuildLog)
|
||||
@@ -47,12 +47,12 @@ for s in ConfFile.readlines():
|
||||
os.chdir(HomeDir)
|
||||
CameraLib = os.path.join(BuildDir, "lib", Arch, "lib" + MakeTarget + ".so")
|
||||
if (os.path.exists(CameraLib)):
|
||||
try:
|
||||
shutil.copyfile(CameraLib, os.path.join("..", "3rdparty", "lib", Arch, "lib" + MakeTarget + ".so"))
|
||||
print("Building %s for %s\t[\033[92mOK\033[0m]" % (MakeTarget, Arch));
|
||||
except:
|
||||
print("Building %s for %s\t[\033[91mFAILED\033[0m]" % (MakeTarget, Arch));
|
||||
try:
|
||||
shutil.copyfile(CameraLib, os.path.join("..", "3rdparty", "lib", Arch, "lib" + MakeTarget + ".so"))
|
||||
print("Building %s for %s\t[\033[92mOK\033[0m]" % (MakeTarget, Arch));
|
||||
except:
|
||||
print("Building %s for %s\t[\033[91mFAILED\033[0m]" % (MakeTarget, Arch));
|
||||
else:
|
||||
print("Building %s for %s\t[\033[91mFAILED\033[0m]" % (MakeTarget, Arch));
|
||||
print("Building %s for %s\t[\033[91mFAILED\033[0m]" % (MakeTarget, Arch));
|
||||
ConfFile.close()
|
||||
|
||||
|
Reference in New Issue
Block a user