8 import os, glob, sys, _winreg
21 inst_ver = str(argvs[1])
22 examples_path = str(argvs[2])
29 reg_root = _winreg.HKEY_LOCAL_MACHINE
36 reg_hdl = _winreg.OpenKey(reg_root, reg_key)
37 reg_data = _winreg.EnumValue(reg_hdl, index)
38 InstallPath = reg_data[1]
39 _winreg.CloseKey(reg_hdl)
41 if InstallPath.rfind(
"\\") != (len(InstallPath) -1):
45 curr_dir = InstallPath +
"Lib\site-packages\OpenRTM_aist\RTM_IDL" 49 idl_cmd = InstallPath +
"omniidl.exe -bpython" 50 idl_list = glob.glob(
"*.idl")
51 idl_cnt = len(idl_list)
52 for i
in range(idl_cnt):
53 idl_cmd +=
" " + idl_list[i]
60 idl_cmd = InstallPath +
"omniidl.exe -bpython" 61 idl_list = glob.glob(
"device_interfaces\*.idl")
62 idl_cnt = len(idl_list)
63 for i
in range(idl_cnt):
64 idl_cmd +=
" " + idl_list[i]
70 ExamplesPath = exa_path
71 if ExamplesPath.rfind(
"\\") != (len(ExamplesPath) -1):
74 curr_dir = ExamplesPath +
"SimpleService" 78 idl_cmd = InstallPath +
"omniidl.exe -bpython MyService.idl" 83 except EnvironmentError:
92 if (inst_ver ==
"all")
or (inst_ver ==
"2.4"):
94 py_key =
"SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath" 97 print "Python %s Not Installed." % py_ver
103 if (inst_ver ==
"all")
or (inst_ver ==
"2.5"):
105 py_key =
"SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath" 108 print "Python %s Not Installed." % py_ver
114 if (inst_ver ==
"all")
or (inst_ver ==
"2.6"):
116 py_key =
"SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath" 119 print "Python %s Not Installed." % py_ver
def idl_compile(chk_ver, reg_key, exa_path)
Install check and IDL Compile