Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 data = [
00018 ("bin", "*.dll *.exe rtc.conf")
00019 ]
00020
00021 import os
00022 base_dir = os.getenv("OPENCV_RTC_ROOT")
00023 base_dir = base_dir.replace("\"", "")
00024
00025 if base_dir == None:
00026 base_dir="C:\distribution\ImageProcessing\opencv"
00027 else:
00028 base_dir += "\\"
00029
00030 def path_to_dir_id(path, prefix):
00031
00032
00033
00034 output = prefix + "_" + "_".join(path.split("/"))
00035 return output.replace(".", "_")
00036
00037
00038 def path_to_comp_id(path, prefix):
00039
00040
00041
00042 output = prefix
00043 for c in path.split("/"):
00044 output += c.capitalize()
00045 return output.replace(".", "_")
00046
00047 import makewxs
00048
00049 for (path, files) in data:
00050
00051 comp_name = path_to_comp_id(path, "OpenCVRTC")
00052
00053 dir_name = path_to_dir_id(path, "OpenCVRTC")
00054
00055 path = path.replace("/", "\\")
00056
00057
00058 full_path = base_dir + "\\\\" + path
00059
00060 import glob
00061 flist = []
00062 for f in files.split(" "):
00063 flist += glob.glob(full_path + "\\" + f)
00064
00065 cmd = ["flist",
00066 "-c", comp_name,
00067 "-o", dir_name + ".yaml",
00068 "-p", base_dir + path]
00069 cmd += flist
00070
00071 makewxs.main(cmd)
00072
00073
00074 cmd = ["wxs",
00075 "-o", "OpenCV-RTC_inc.wxs",
00076 "-i", "OpenCV-RTC_inc.wxs.in"]
00077 cmd += glob.glob("*.yaml")
00078 makewxs.main(cmd)