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 ("", "*.jar *.exe .eclipseproduct"),
00019 ("configuration", "*.ini *.jar"),
00020 ("plugins", "*.jar"),
00021 ]
00022
00023 import os
00024 base_dir=os.getenv("RTSE_ROOT")
00025
00026 if base_dir == None:
00027 base_dir="C:\\distribution\\OpenRTP\\RTSystemEditor"
00028 else:
00029 base_dir = base_dir.replace("\"", "")
00030 base_dir += "\\"
00031
00032 def path_to_dir_id(path, prefix):
00033
00034
00035
00036 output = prefix + "_" + "_".join(path.split("/"))
00037 return output.replace(".", "_")
00038
00039
00040 def path_to_comp_id(path, prefix):
00041
00042
00043
00044 output = prefix.capitalize()
00045 for c in path.split("/"):
00046 output += c.capitalize()
00047 return output.replace(".", "_")
00048
00049 import makewxs
00050
00051 for (path, files) in data:
00052
00053 comp_name = path_to_comp_id(path, "openrtp")
00054
00055 dir_name = path_to_dir_id(path, "openrtp")
00056
00057 path = path.replace("/", "\\")
00058
00059
00060 full_path = base_dir + "\\" + path
00061
00062 import glob
00063 flist = []
00064 for f in files.split(" "):
00065 flist += glob.glob(full_path + "\\" + f)
00066
00067 cmd = ["flist",
00068 "-c", comp_name,
00069 "-o", dir_name + ".yaml",
00070 "-p", base_dir + path]
00071 cmd += flist
00072
00073 makewxs.main(cmd)
00074
00075
00076 cmd = ["wxs",
00077 "-o", "OpenRTP_inc.wxs",
00078 "-i", "OpenRTP_inc.wxs.in"]
00079 cmd += glob.glob("*.yaml")
00080 makewxs.main(cmd)