00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 import os
00018 import shutil
00019 import glob
00020 import makewxs
00021
00022 data = [
00023 ("bin/x86_win32", "*.dll *.exe"),
00024 ("bin/dll", "*.dll"),
00025 ("lib/x86_win32", "*.pyd"),
00026 ("lib/python/", "*.py"),
00027 ("lib/python/CosNaming", "*.py"),
00028 ("lib/python/CosNaming__POA", "*.py"),
00029 ("lib/python/omniidl", "*.py"),
00030 ("lib/python/omniidl_be", "*.py"),
00031 ("lib/python/omniORB", "*.py"),
00032 ("lib/python/omniORB/COS", "*.py *.pth"),
00033 ("lib/python/omniORB/COS/CosCollection", "*.py"),
00034 ("lib/python/omniORB/COS/CosCollection__POA", "*.py"),
00035 ("lib/python/omniORB/COS/CosCompoundLifeCycle", "*.py"),
00036 ("lib/python/omniORB/COS/CosCompoundLifeCycle__POA", "*.py"),
00037 ("lib/python/omniORB/COS/CosContainment", "*.py"),
00038 ("lib/python/omniORB/COS/CosContainment__POA", "*.py"),
00039 ("lib/python/omniORB/COS/CosEventChannelAdmin", "*.py"),
00040 ("lib/python/omniORB/COS/CosEventChannelAdmin__POA", "*.py"),
00041 ("lib/python/omniORB/COS/CosEventComm", "*.py"),
00042 ("lib/python/omniORB/COS/CosEventComm__POA", "*.py"),
00043 ("lib/python/omniORB/COS/CosExternalization", "*.py"),
00044 ("lib/python/omniORB/COS/CosExternalizationContainment", "*.py"),
00045 ("lib/python/omniORB/COS/CosExternalizationContainment__POA", "*.py"),
00046 ("lib/python/omniORB/COS/CosExternalizationReference", "*.py"),
00047 ("lib/python/omniORB/COS/CosExternalizationReference__POA", "*.py"),
00048 ("lib/python/omniORB/COS/CosExternalization__POA", "*.py"),
00049 ("lib/python/omniORB/COS/CosGraphs", "*.py"),
00050 ("lib/python/omniORB/COS/CosGraphs__POA", "*.py"),
00051 ("lib/python/omniORB/COS/CosLifeCycle", "*.py"),
00052 ("lib/python/omniORB/COS/CosLifeCycleContainment", "*.py"),
00053 ("lib/python/omniORB/COS/CosLifeCycleContainment__POA", "*.py"),
00054 ("lib/python/omniORB/COS/CosLifeCycleReference", "*.py"),
00055 ("lib/python/omniORB/COS/CosLifeCycleReference__POA", "*.py"),
00056 ("lib/python/omniORB/COS/CosLifeCycle__POA", "*.py"),
00057 ("lib/python/omniORB/COS/CosNaming", "*.py"),
00058 ("lib/python/omniORB/COS/CosNaming__POA", "*.py"),
00059 ("lib/python/omniORB/COS/CosNotification", "*.py"),
00060 ("lib/python/omniORB/COS/CosNotification__POA", "*.py"),
00061 ("lib/python/omniORB/COS/CosNotifyChannelAdmin", "*.py"),
00062 ("lib/python/omniORB/COS/CosNotifyChannelAdmin__POA", "*.py"),
00063 ("lib/python/omniORB/COS/CosNotifyComm", "*.py"),
00064 ("lib/python/omniORB/COS/CosNotifyComm__POA", "*.py"),
00065 ("lib/python/omniORB/COS/CosNotifyFilter", "*.py"),
00066 ("lib/python/omniORB/COS/CosNotifyFilter__POA", "*.py"),
00067 ("lib/python/omniORB/COS/CosObjectIdentity", "*.py"),
00068 ("lib/python/omniORB/COS/CosObjectIdentity__POA", "*.py"),
00069 ("lib/python/omniORB/COS/CosPersistenceDDO", "*.py"),
00070 ("lib/python/omniORB/COS/CosPersistenceDDO__POA", "*.py"),
00071 ("lib/python/omniORB/COS/CosPersistenceDS_CLI", "*.py"),
00072 ("lib/python/omniORB/COS/CosPersistenceDS_CLI__POA", "*.py"),
00073 ("lib/python/omniORB/COS/CosPersistencePDS", "*.py"),
00074 ("lib/python/omniORB/COS/CosPersistencePDS_DA", "*.py"),
00075 ("lib/python/omniORB/COS/CosPersistencePDS_DA__POA", "*.py"),
00076 ("lib/python/omniORB/COS/CosPersistencePDS__POA", "*.py"),
00077 ("lib/python/omniORB/COS/CosPersistencePID", "*.py"),
00078 ("lib/python/omniORB/COS/CosPersistencePID__POA", "*.py"),
00079 ("lib/python/omniORB/COS/CosPersistencePO", "*.py"),
00080 ("lib/python/omniORB/COS/CosPersistencePOM", "*.py"),
00081 ("lib/python/omniORB/COS/CosPersistencePOM__POA", "*.py"),
00082 ("lib/python/omniORB/COS/CosPersistencePO__POA", "*.py"),
00083 ("lib/python/omniORB/COS/CosPropertyService", "*.py"),
00084 ("lib/python/omniORB/COS/CosPropertyService__POA", "*.py"),
00085 ("lib/python/omniORB/COS/CosQuery", "*.py"),
00086 ("lib/python/omniORB/COS/CosQueryCollection", "*.py"),
00087 ("lib/python/omniORB/COS/CosQueryCollection__POA", "*.py"),
00088 ("lib/python/omniORB/COS/CosQuery__POA", "*.py"),
00089 ("lib/python/omniORB/COS/CosReference", "*.py"),
00090 ("lib/python/omniORB/COS/CosReference__POA", "*.py"),
00091 ("lib/python/omniORB/COS/CosRelationships", "*.py"),
00092 ("lib/python/omniORB/COS/CosRelationships__POA", "*.py"),
00093 ("lib/python/omniORB/COS/CosStream", "*.py"),
00094 ("lib/python/omniORB/COS/CosStream__POA", "*.py"),
00095 ("lib/python/omniORB/COS/CosTime", "*.py"),
00096 ("lib/python/omniORB/COS/CosTimerEvent", "*.py"),
00097 ("lib/python/omniORB/COS/CosTimerEvent__POA", "*.py"),
00098 ("lib/python/omniORB/COS/CosTime__POA", "*.py"),
00099 ("lib/python/omniORB/COS/CosTrading", "*.py"),
00100 ("lib/python/omniORB/COS/CosTradingDynamic", "*.py"),
00101 ("lib/python/omniORB/COS/CosTradingDynamic__POA", "*.py"),
00102 ("lib/python/omniORB/COS/CosTradingRepos", "*.py"),
00103 ("lib/python/omniORB/COS/CosTradingRepos__POA", "*.py"),
00104 ("lib/python/omniORB/COS/CosTrading__POA", "*.py"),
00105 ("lib/python/omniORB/COS/CosTypedEventChannelAdmin", "*.py"),
00106 ("lib/python/omniORB/COS/CosTypedEventChannelAdmin__POA", "*.py"),
00107 ("lib/python/omniORB/COS/CosTypedEventComm", "*.py"),
00108 ("lib/python/omniORB/COS/CosTypedEventComm__POA", "*.py"),
00109 ("lib/python/omniORB/COS/CosTypedNotifyChannelAdmin", "*.py"),
00110 ("lib/python/omniORB/COS/CosTypedNotifyChannelAdmin__POA", "*.py"),
00111 ("lib/python/omniORB/COS/CosTypedNotifyComm", "*.py"),
00112 ("lib/python/omniORB/COS/CosTypedNotifyComm__POA", "*.py"),
00113 ("lib/python/omniORB/COS/LifeCycleService", "*.py"),
00114 ("lib/python/omniORB/COS/LifeCycleService__POA", "*.py"),
00115 ("lib/python/omniORB/COS/RDITestTypes", "*.py"),
00116 ("lib/python/omniORB/COS/RDITestTypes__POA", "*.py"),
00117 ("lib/python/omniORB/COS/TimeBase", "*.py"),
00118 ("lib/python/omniORB/COS/TimeBase__POA", "*.py")
00119 ]
00120
00121
00122
00123
00124 base_dir = os.getenv("OMNIORB_PY25")
00125 if base_dir == None:
00126 base_dir = "C:\\distribution\\omniORBpy-3.4-Python2.5\\"
00127 else:
00128 base_dir = base_dir.replace("\"", "")
00129 base_dir += "\\"
00130
00131
00132
00133
00134 temp_dir = base_dir + "bin\\dll"
00135 dll_list = glob.glob(base_dir + "bin\\x86_win32\\*.dll")
00136 dll_cnt = len(dll_list)
00137 if os.path.exists(temp_dir) :
00138 shutil.rmtree(temp_dir)
00139 os.mkdir(temp_dir)
00140 for i in range(dll_cnt):
00141 shutil.copy2(dll_list[i], temp_dir)
00142
00143
00144 def path_to_dir_id(path, prefix):
00145
00146
00147
00148 output = prefix + "_" + "_".join(path.split("/"))
00149 return output.replace(".", "_")
00150
00151 def path_to_comp_id(path, prefix):
00152
00153
00154
00155 output = prefix.capitalize()
00156 for c in path.split("/"):
00157 output += c.capitalize()
00158 return output.replace(".", "_")
00159
00160
00161
00162
00163 for (path, files) in data:
00164
00165 comp_name = path_to_comp_id(path, "py25")
00166
00167 dir_name = path_to_dir_id(path, "py25")
00168
00169 path = path.replace("/", "\\")
00170
00171
00172 full_path = base_dir + "\\" + path
00173
00174 flist = []
00175 for f in files.split(" "):
00176 flist += glob.glob(full_path + "\\" + f)
00177
00178 cmd = ["flist",
00179 "-c", comp_name,
00180 "-o", dir_name + ".yaml",
00181 "-p", base_dir + path]
00182 cmd += flist
00183
00184 makewxs.main(cmd)
00185
00186
00187
00188
00189 cmd = ["wxs",
00190 "-o", "omniORBpy25_inc.wxs",
00191 "-i", "omniORBpy25_inc.wxs.in"]
00192 cmd += glob.glob("*.yaml")
00193 makewxs.main(cmd)
00194