omniORBpy26wxs.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 #
3 # @brief WiX wxs file generator for omniORBpy3.4-Python2.6
4 # @date $Date$
5 # @author Norkai Ando <n-ando@aist.go.jp>
6 #
7 # Copyright (C) 2010
8 # Noriaki Ando
9 # Intelligent Systems Research Institute,
10 # National Institute of
11 # Advanced Industrial Science and Technology (AIST), Japan
12 # All rights reserved.
13 #
14 # $Id$
15 #
16 
17 import os
18 import shutil
19 import glob
20 import makewxs
21 
22 data = [
23  ("bin/x86_win32", "*.dll *.exe"),
24  ("bin/dll", "*.dll"),
25  ("lib/x86_win32", "*.pyd"),
26  ("lib/python/", "*.py"),
27  ("lib/python/CosNaming", "*.py"),
28  ("lib/python/CosNaming__POA", "*.py"),
29  ("lib/python/omniidl", "*.py"),
30  ("lib/python/omniidl_be", "*.py"),
31  ("lib/python/omniORB", "*.py"),
32  ("lib/python/omniORB/COS", "*.py *.pth"),
33  ("lib/python/omniORB/COS/CosCollection", "*.py"),
34  ("lib/python/omniORB/COS/CosCollection__POA", "*.py"),
35  ("lib/python/omniORB/COS/CosCompoundLifeCycle", "*.py"),
36  ("lib/python/omniORB/COS/CosCompoundLifeCycle__POA", "*.py"),
37  ("lib/python/omniORB/COS/CosContainment", "*.py"),
38  ("lib/python/omniORB/COS/CosContainment__POA", "*.py"),
39  ("lib/python/omniORB/COS/CosEventChannelAdmin", "*.py"),
40  ("lib/python/omniORB/COS/CosEventChannelAdmin__POA", "*.py"),
41  ("lib/python/omniORB/COS/CosEventComm", "*.py"),
42  ("lib/python/omniORB/COS/CosEventComm__POA", "*.py"),
43  ("lib/python/omniORB/COS/CosExternalization", "*.py"),
44  ("lib/python/omniORB/COS/CosExternalizationContainment", "*.py"),
45  ("lib/python/omniORB/COS/CosExternalizationContainment__POA", "*.py"),
46  ("lib/python/omniORB/COS/CosExternalizationReference", "*.py"),
47  ("lib/python/omniORB/COS/CosExternalizationReference__POA", "*.py"),
48  ("lib/python/omniORB/COS/CosExternalization__POA", "*.py"),
49  ("lib/python/omniORB/COS/CosGraphs", "*.py"),
50  ("lib/python/omniORB/COS/CosGraphs__POA", "*.py"),
51  ("lib/python/omniORB/COS/CosLifeCycle", "*.py"),
52  ("lib/python/omniORB/COS/CosLifeCycleContainment", "*.py"),
53  ("lib/python/omniORB/COS/CosLifeCycleContainment__POA", "*.py"),
54  ("lib/python/omniORB/COS/CosLifeCycleReference", "*.py"),
55  ("lib/python/omniORB/COS/CosLifeCycleReference__POA", "*.py"),
56  ("lib/python/omniORB/COS/CosLifeCycle__POA", "*.py"),
57  ("lib/python/omniORB/COS/CosNaming", "*.py"),
58  ("lib/python/omniORB/COS/CosNaming__POA", "*.py"),
59  ("lib/python/omniORB/COS/CosNotification", "*.py"),
60  ("lib/python/omniORB/COS/CosNotification__POA", "*.py"),
61  ("lib/python/omniORB/COS/CosNotifyChannelAdmin", "*.py"),
62  ("lib/python/omniORB/COS/CosNotifyChannelAdmin__POA", "*.py"),
63  ("lib/python/omniORB/COS/CosNotifyComm", "*.py"),
64  ("lib/python/omniORB/COS/CosNotifyComm__POA", "*.py"),
65  ("lib/python/omniORB/COS/CosNotifyFilter", "*.py"),
66  ("lib/python/omniORB/COS/CosNotifyFilter__POA", "*.py"),
67  ("lib/python/omniORB/COS/CosObjectIdentity", "*.py"),
68  ("lib/python/omniORB/COS/CosObjectIdentity__POA", "*.py"),
69  ("lib/python/omniORB/COS/CosPersistenceDDO", "*.py"),
70  ("lib/python/omniORB/COS/CosPersistenceDDO__POA", "*.py"),
71  ("lib/python/omniORB/COS/CosPersistenceDS_CLI", "*.py"),
72  ("lib/python/omniORB/COS/CosPersistenceDS_CLI__POA", "*.py"),
73  ("lib/python/omniORB/COS/CosPersistencePDS", "*.py"),
74  ("lib/python/omniORB/COS/CosPersistencePDS_DA", "*.py"),
75  ("lib/python/omniORB/COS/CosPersistencePDS_DA__POA", "*.py"),
76  ("lib/python/omniORB/COS/CosPersistencePDS__POA", "*.py"),
77  ("lib/python/omniORB/COS/CosPersistencePID", "*.py"),
78  ("lib/python/omniORB/COS/CosPersistencePID__POA", "*.py"),
79  ("lib/python/omniORB/COS/CosPersistencePO", "*.py"),
80  ("lib/python/omniORB/COS/CosPersistencePOM", "*.py"),
81  ("lib/python/omniORB/COS/CosPersistencePOM__POA", "*.py"),
82  ("lib/python/omniORB/COS/CosPersistencePO__POA", "*.py"),
83  ("lib/python/omniORB/COS/CosPropertyService", "*.py"),
84  ("lib/python/omniORB/COS/CosPropertyService__POA", "*.py"),
85  ("lib/python/omniORB/COS/CosQuery", "*.py"),
86  ("lib/python/omniORB/COS/CosQueryCollection", "*.py"),
87  ("lib/python/omniORB/COS/CosQueryCollection__POA", "*.py"),
88  ("lib/python/omniORB/COS/CosQuery__POA", "*.py"),
89  ("lib/python/omniORB/COS/CosReference", "*.py"),
90  ("lib/python/omniORB/COS/CosReference__POA", "*.py"),
91  ("lib/python/omniORB/COS/CosRelationships", "*.py"),
92  ("lib/python/omniORB/COS/CosRelationships__POA", "*.py"),
93  ("lib/python/omniORB/COS/CosStream", "*.py"),
94  ("lib/python/omniORB/COS/CosStream__POA", "*.py"),
95  ("lib/python/omniORB/COS/CosTime", "*.py"),
96  ("lib/python/omniORB/COS/CosTimerEvent", "*.py"),
97  ("lib/python/omniORB/COS/CosTimerEvent__POA", "*.py"),
98  ("lib/python/omniORB/COS/CosTime__POA", "*.py"),
99  ("lib/python/omniORB/COS/CosTrading", "*.py"),
100  ("lib/python/omniORB/COS/CosTradingDynamic", "*.py"),
101  ("lib/python/omniORB/COS/CosTradingDynamic__POA", "*.py"),
102  ("lib/python/omniORB/COS/CosTradingRepos", "*.py"),
103  ("lib/python/omniORB/COS/CosTradingRepos__POA", "*.py"),
104  ("lib/python/omniORB/COS/CosTrading__POA", "*.py"),
105  ("lib/python/omniORB/COS/CosTypedEventChannelAdmin", "*.py"),
106  ("lib/python/omniORB/COS/CosTypedEventChannelAdmin__POA", "*.py"),
107  ("lib/python/omniORB/COS/CosTypedEventComm", "*.py"),
108  ("lib/python/omniORB/COS/CosTypedEventComm__POA", "*.py"),
109  ("lib/python/omniORB/COS/CosTypedNotifyChannelAdmin", "*.py"),
110  ("lib/python/omniORB/COS/CosTypedNotifyChannelAdmin__POA", "*.py"),
111  ("lib/python/omniORB/COS/CosTypedNotifyComm", "*.py"),
112  ("lib/python/omniORB/COS/CosTypedNotifyComm__POA", "*.py"),
113  ("lib/python/omniORB/COS/LifeCycleService", "*.py"),
114  ("lib/python/omniORB/COS/LifeCycleService__POA", "*.py"),
115  ("lib/python/omniORB/COS/RDITestTypes", "*.py"),
116  ("lib/python/omniORB/COS/RDITestTypes__POA", "*.py"),
117  ("lib/python/omniORB/COS/TimeBase", "*.py"),
118  ("lib/python/omniORB/COS/TimeBase__POA", "*.py")
119 ]
120 
121 
122 
124 base_dir = os.getenv("OMNIORB_PY26")
125 if base_dir == None:
126  base_dir = "C:\\distribution\\omniORBpy-3.4-Python2.6\\"
127 else:
128  base_dir = base_dir.replace("\"", "")
129  base_dir += "\\"
130 
131 
132 
134 temp_dir = base_dir + "bin\\dll"
135 dll_list = glob.glob(base_dir + "bin\\x86_win32\\*.dll")
136 dll_cnt = len(dll_list)
137 if os.path.exists(temp_dir) :
138  shutil.rmtree(temp_dir)
139 os.mkdir(temp_dir)
140 for i in range(dll_cnt):
141  shutil.copy2(dll_list[i], temp_dir)
142 
143 
144 def path_to_dir_id(path, prefix):
145  # path = "bin/x86_win32" prefix = "omni"
146  # output = "omni_bin_x86_win32"
147  # "." -> "_"
148  output = prefix + "_" + "_".join(path.split("/"))
149  return output.replace(".", "_")
150 
151 def path_to_comp_id(path, prefix):
152  # path = "bin/x86_win32" prefix = "omni"
153  # output = "OmniBinX86_win32"
154  # "." -> "_"
155  output = prefix.capitalize()
156  for c in path.split("/"):
157  output += c.capitalize()
158  return output.replace(".", "_")
159 
160 
161 
163 for (path, files) in data:
164  # wxs component name
165  comp_name = path_to_comp_id(path, "py26")
166  # wxs directory name
167  dir_name = path_to_dir_id(path, "py26")
168 
169  path = path.replace("/", "\\")
170 
171  # full path to target directory
172  full_path = base_dir + "\\" + path
173 
174  flist = []
175  for f in files.split(" "):
176  flist += glob.glob(full_path + "\\" + f)
177 
178  cmd = ["flist",
179  "-c", comp_name,
180  "-o", dir_name + ".yaml",
181  "-p", base_dir + path]
182  cmd += flist
183 
184  makewxs.main(cmd)
185 
186 
187 
189 cmd = ["wxs",
190  "-o", "omniORBpy26_inc.wxs",
191  "-i", "omniORBpy26_inc.wxs.in"]
192 cmd += glob.glob("*.yaml")
193 makewxs.main(cmd)
194 
def path_to_dir_id(path, prefix)
def path_to_comp_id(path, prefix)
def main(argv)
Definition: makewxs.py:157


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Mon Feb 28 2022 23:01:06