24 copy "%RTM_ROOT%\\etc\\rtm_config.vsprops" . 27 userprops =
"""<?xml version="1.0" encoding="shift_jis"?> 28 <VisualStudioPropertySheet 29 ProjectType="Visual C++" 41 </VisualStudioPropertySheet> 47 VC++ project-file generator 71 base = self.
data[
"basicInfo"][
"name"]
72 for key
in self.vcvers.keys():
75 v[
"sln_fname"] = base + suffix +
".sln" 76 v[
"exeproj_fname"] = base +
"Comp" + suffix +
".vcproj" 77 v[
"dllproj_fname"] = base + suffix +
".vcproj" 86 name = self.
data[
"basicInfo"][
"name"]
87 es = self.
data[
"exesources"] = []
88 eh = self.
data[
"exeheaders"] = []
89 ds = self.
data[
"dllsources"] = []
90 dh = self.
data[
"dllheaders"] = []
92 es += [name +
".cpp", name +
"Comp.cpp"]
99 nlist = [
"skel_basename",
"impl_basename"]
100 for sidl
in self.
data[
"service_idl"]:
102 l += [(sidl[key] +
".cpp")
for key
in nlist]
104 l += [(sidl[key] +
".h")
for key
in nlist]
105 nlist = [
"stub_basename"]
106 for sidl
in self.
data[
"consumer_idl"]:
108 l += [(sidl[key] +
".cpp")
for key
in nlist
if sidl.has_key(key)]
110 l += [(sidl[key] +
".h")
for key
in nlist
if sidl.has_key(key)]
115 Check file exist or not. 117 msg =
" already exists. Overwrite? (y/n)" 118 if (os.access(fname, os.F_OK)):
119 ans = raw_input(
"\"" + fname +
"\"" + msg)
120 if (ans ==
"y" or ans ==
"Y"):
121 return file(fname,
"wb")
125 return file(fname,
"wb")
130 Generate VC++ project-file 133 proj_name = self.
data[
"basicInfo"][
"name"]
134 version = self.
data[
"basicInfo"][
"version"]
135 exefiles = {
"source": self.
data[
"exesources"],
136 "header": self.
data[
"exeheaders"],
139 dllfiles = {
"source": self.
data[
"dllsources"],
140 "header": self.
data[
"dllheaders"],
143 for key
in self.vcvers.keys():
147 proj_name+
"Comp", version,
150 fname = v[
"exeproj_fname"]
154 print " File \"" + fname +
"\" was generated." 161 fname = v[
"dllproj_fname"]
165 print " File \"" + fname +
"\" was generated." 171 Generate VC++ solution-file 174 for key
in self.vcvers.keys():
176 fname = v[
"sln_fname"]
179 flist = [v[
"exeproj_fname"], v[
"dllproj_fname"]]
183 print " File \"" + fname +
"\" was generated." 188 fname =
"copyprops.bat" 191 o = copyprops.replace(
"\r\n",
"\n").replace(
"\n",
"\r\n")
193 print " File \"" + fname +
"\" was generated." 197 fname =
"user_config.vsprops" 200 o = userprops.replace(
"\r\n",
"\n").replace(
"\n",
"\r\n")
202 print " File \"" + fname +
"\" was generated."
def CreateSourceList(self)
def check_overwrite(self, fname, wmode="w")
def print_vcproject(self)
def check_overwrite(self, fname, wmode="wb")
def __init__(self, data, opts)
def print_userprops(self)
def generate(idl_file, preproc_args, impl_suffix, skel_suffix="Skel", fd_h=None, fd_cpp=None)