21 vcproj_template =
"""<?xml version="1.0" encoding="shift_jis"?> 23 ProjectType="[ProjectType]" 25 Name="[RootNamespace]" 26 ProjectGUID="{[ProjectGUID]}" 27 RootNamespace="[RootNamespace]" 38 [for conf in Configurations] 41 OutputDirectory="[conf.OutputDirectory]" 42 IntermediateDirectory="[conf.IntermediateDirectory]" 43 ConfigurationType="%d" 45 [if-any conf.InheritedPropertySheets] 46 InheritedPropertySheets="[conf.InheritedPropertySheets]" 59 Filter="[Source.Filter]" 60 UniqueIdentifier="{[Source.GUID]}" 62 [if-any Source.Files][for file in Source.Files] 64 RelativePath="[file.Path]" 73 Filter="[Header.Filter]" 74 UniqueIdentifier="{[Header.GUID]}" 76 [if-any Header.Files][for file in Header.Files] 78 RelativePath="[file.Path]" 86 Name="[Resource.Name]" 87 Filter="[Resource.Filter]" 88 UniqueIdentifier="{[Resource.GUID]}" 90 [if-any Resoruce.Files][for file in Resoruce.Files] 92 RelativePath="[file.Path]" 101 </VisualStudioProject> 107 conf_type = {
"EXE": 1,
"DLL": 2,
"NMAKE": 3,
"LIB": 4,
108 "RTCEXE": 1,
"RTCDLL": 2}
114 [
"VCPreBuildEventTool",
116 "VCXMLDataGeneratorTool",
117 "VCWebServiceProxyGeneratorTool",
120 "VCManagedResourceCompilerTool",
121 "VCResourceCompilerTool",
122 "VCPreLinkEventTool",
130 "VCWebDeploymentTool",
131 "VCPostBuildEventTool"],
133 [
"VCPreBuildEventTool",
135 "VCXMLDataGeneratorTool",
136 "VCWebServiceProxyGeneratorTool",
139 "VCManagedResourceCompilerTool",
140 "VCResourceCompilerTool",
141 "VCPreLinkEventTool",
149 "VCWebDeploymentTool",
150 "VCPostBuildEventTool"],
152 [
"VCPreBuildEventTool",
154 "VCXMLDataGeneratorTool",
155 "VCWebServiceProxyGeneratorTool",
158 "VCManagedResourceCompilerTool",
159 "VCResourceCompilerTool",
160 "VCPreLinkEventTool",
166 "VCPostBuildEventTool"]
168 tools[
"RTCEXE"] = tools[
"EXE"]
169 tools[
"RTCDLL"] = tools[
"DLL"]
175 tool_elem =
""" <Tool 177 [if-any conf.%s][for tool in conf.%s] 179 [tool.Key]="[tool.Value]" 187 ProjectType: Visual C++ 189 Name: # Your Project Name 190 ProjectGUID: __GUID__ 198 OutputDirectory: $(ProjectDir)$(ConfigurationName) 199 IntermediateDirectory: $(ConfigurationName) 200 InheritedPropertySheets: # Set vsprops file if you need 207 exe_yaml =
"""ProjectType: "Visual C++" 209 Name: __PROJECT_NAME__ 210 ProjectGUID: __GUID__ 211 RootNamespace: __PROJECT_NAME__ 214 #------------------------------------------------------------ 215 # Debug Configuration 216 #------------------------------------------------------------ 217 - Name: "Debug|Win32" 218 OutputDirectory: $(ProjectDir)$(ConfigurationName)" 219 IntermediateDirectory: "$(ConfiguratioName)" 220 ConfigurationType: "1" 221 # InheritedPropertySheets: 223 # VCPreBuildEventTool: 225 # VCXMLDataGeneratorTool: 226 # VCWebServiceProxyGeneratorTool: 231 - Key: PreprocessorDefinitions 232 Value: "WIN32;_DEBUG;_CONSOLE;__WIN32__;__x86__;_WIN32_WINNT=0x0500;__NT__;__OSVERSION__=4" 233 - Key: MinimalRebuild 235 - Key: BasicRuntimeChecks 237 - Key: RuntimeLibrary 239 - Key: UsePrecompiledHeader 243 - Key: Detect64BitPortabilityProblems 245 - Key: DebugInformationFormat 247 # VCManagedResourceCompilerTool: 248 # VCResourceCompilerTool: 249 # VCPreLinkEventTool: 251 - Key: AdditionalDependencies 254 Value: "$(OutDir)\\\\__PROJECT_NAME__.exe" 255 - Key: LinkIncremental 257 - Key: IgnoreDefaultLibraryNames 259 - Key: GenerateDebugInformation 271 # VCWebDeploymentTool: 272 VCPostBuildEventTool: 273 #------------------------------------------------------------ 274 # Release Configuration 275 #------------------------------------------------------------ 276 - Name: "Release|Win32" 277 OutputDirectory: $(ProjectDir)$(ConfigurationName)" 278 IntermediateDirectory: "$(ConfiguratioName)" 279 ConfigurationType: "1" 280 InheritedPropertySheets: "" 282 WholeProgramOptimization: "0" 283 # VCPreBuildEventTool: 285 # VCXMLDataGeneratorTool: 286 # VCWebServiceProxyGeneratorTool: 289 - Key: PreprocessorDefinitions 290 Value: "WIN32;NDEBUG;_CONSOLE;__WIN32__;__x86__;_WIN32_WINNT=0x0500;__NT__;__OSVERSION__=4" 291 - Key: RuntimeLibrary 293 - Key: UsePrecompiledHeader 297 - Key: Detect64BitPortabilityProblems 299 - Key: DebugInformationFormat 301 # VCManagedResourceCompilerTool" 302 # VCResourceCompilerTool" 303 # VCPreLinkEventTool" 305 - Key: AdditionalDependencies 308 Value: "$(OutDir)\\\\__PROJECT_NAME__.exe" 309 - Key: LinkIncremental 311 - Key: GenerateDebugInformation 315 - Key: OptimizeReferences 317 - Key: EnableCOMDATFolding 319 - Key: LinkTimeCodeGeneration 329 # VCWebDeploymentTool: 330 # VCPostBuildEventTool: 333 dll_yaml =
"""ProjectType: "Visual C++" 335 Name: __PROJECT_NAME__ 336 ProjectGUID: __GUID__ 337 RootNamespace: __PROJECT_NAME__ 340 - Name: "Debug|Win32" 341 OutputDirectory: "$(ProjectDir)$(ConfigurationName)" 342 IntermediateDirectory: "$(ConfigurationName)" 343 ConfigurationType: "2" 344 # InheritedPropertySheets: "" 346 # VCPreBuildEventTool: 348 # VCXMLDataGeneratorTool: 349 # VCWebServiceProxyGeneratorTool: 354 - Key: PreprocessorDefinitions 355 Value: "WIN32;_DEBUG;_WINDOWS;_USRDLL;__WIN32__;__NT__;__OSVERSION__=4;__x86__;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE" 356 - Key: MinimalRebuild 358 - Key: BasicRuntimeChecks 360 - Key: RuntimeLibrary 362 - Key: UsePrecompiledHeader 366 - Key: Detect64BitPortabilityProblems 368 - Key: DebugInformationFormat 370 # VCManagedResourceCompilerTool: 371 # VCResourceCompilerTool: 375 lib -out:"$(TargetDir)RTC_static.lib" "$(TargetDir)*.obj" "$(SolutionDir)\\\\rtm\\\\idl\\\\$(ConfigurationName)\\\\*.obj" 376 set PATH=%PATH%;$(rtm_path) 378 start /wait cmd /c makedeffile.py RTC_static.lib RTC042d 0.4.1 RTC042d.def 379 move RTC042d.def ..\\\\ 381 - Key: AdditionalDependencies 384 Value: "$(OutDir)\\\\__PROJECT_NAME__.dll" 387 - Key: LinkIncremental 389 - Key: ModuleDefinitionFile 390 Value: "$(TargetName).def" 391 - Key: GenerateDebugInformation 403 # VCWebDeploymentTool: 404 VCPostBuildEventTool: 407 copy "$(OutDir)\\\\$(TargetName).lib" "$(SolutionDir)bin\\\\" 408 copy "$(OutDir)\\\\$(TargetName).dll" "$(SolutionDir)bin\\\\" 409 - Name: "Release|Win32" 410 OutputDirectory: "$(ProjectDir)$(ConfigurationName)" 411 IntermediateDirectory: "$(ConfigurationName)" 412 ConfigurationType: "2" 413 InheritedPropertySheets: "" 415 WholeProgramOptimization: "0" 416 # VCPreBuildEventTool: 418 # VCXMLDataGeneratorTool: 419 # VCWebServiceProxyGeneratorTool: 422 - Key: PreprocessorDefinitions 423 Value: "WIN32;NDEBUG;_WINDOWS;_USRDLL;__WIN32__;__NT__;__OSVERSION__=4;__x86__;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE" 424 - Key: RuntimeLibrary 426 - Key: UsePrecompiledHeader 430 - Key: Detect64BitPortabilityProblems 432 - Key: DebugInformationFormat 434 # VCManagedResourceCompilerTool: 435 # VCResourceCompilerTool: 439 lib -out:"$(TargetDir)RTC_static.lib" "$(TargetDir)*.obj" "$(SolutionDir)\\\\rtm\\\\idl\\\\$(ConfigurationName)\\\\*.obj" 440 set PATH=%PATH%;$(rtm_path) 442 start /wait cmd /c makedeffile.py RTC_static.lib RTC042 0.4.1 RTC042.def 443 move RTC042.def ..\\\\ 445 - Key: AdditionalDependencies 448 Value: "$(OutDir)\\\\__PROJECT_NAME__.dll" 449 - Key: LinkIncremental 451 - Key: ModuleDefinitionFile 452 Value: "$(TargetName).def" 453 - Key: GenerateDebugInformation 457 - Key: OptimizeReferences 459 - Key: EnableCOMDATFolding 469 # VCWebDeploymentTool: 470 VCPostBuildEventTool: 473 copy "$(OutDir)\\\\$(TargetName).lib" "$(SolutionDir)bin\\\\" 474 copy "$(OutDir)\\\\$(TargetName).dll" "$(SolutionDir)bin\\\\" 477 lib_yaml =
"""ProjectType: "Visual C++" 479 Name: __PROJECT_NAME__ 480 ProjectGUID: __GUID__ 481 RootNamespace: __PROJECT_NAME__ 484 - Name: "Debug|Win32" 485 OutputDirectory: "$(ProjectDir)$(ConfigurationName)" 486 IntermediateDirectory: "$(ConfigurationName)" 487 ConfigurationType: "4" 488 # InheritedPropertySheets: "..\\\\..\\\\OpenRTM-aist.vsprops" 490 DeleteExtensionsOnClean: "" 494 set PATH=$(rtm_path);%PYTHON_ROOT%\\\\;%PATH% 495 for %%x in (*.idl) do makewrapper.py %%x 496 for %%x in (*.idl) do omniidl -bcxx -Wba -nf %%x 498 # VCXMLDataGeneratorTool: 499 # VCWebServiceProxyGeneratorTool: 504 - Key: PreprocessorDefinitions 505 Value: "WIN32;_DEBUG;_LIB;__WIN32__;__NT__;__OSVERSION__=4;__x86__;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE" 506 - Key: MinimalRebuild 508 - Key: BasicRuntimeChecks 510 - Key: RuntimeLibrary 512 - Key: UsePrecompiledHeader 516 - Key: Detect64BitPortabilityProblems 518 - Key: DebugInformationFormat 520 # VCManagedResourceCompilerTool: 521 # VCResourceCompilerTool: 522 # VCPreLinkEventTool: 525 Value: "$(OutDir)\\\\__PROJECT_NAME__.lib" 530 VCPostBuildEventTool: 532 Value: "make .def file" 535 copy "$(OutDir)\\\\libRTCSkeld.lib" "$(SolutionDir)\\\\bin" 536 - Name: "Release|Win32" 537 OutputDirectory: "$(ProjectDir)$(ConfigurationName)" 538 IntermediateDirectory: "$(ConfigurationName)" 539 ConfigurationType: "4" 540 # InheritedPropertySheets: "..\\\\..\\\\OpenRTM-aist.vsprops" 542 WholeProgramOptimization: "0" 546 set PATH=$(rtm_path);%PYTHON_ROOT%\\\\;%PATH% 547 for %%x in (*.idl) do makewrapper.py %%x 548 for %%x in (*.idl) do omniidl -bcxx -Wba -nf %%x 550 # VCXMLDataGeneratorTool: 551 # VCWebServiceProxyGeneratorTool: 554 - Key: PreprocessorDefinitions 555 Value: "WIN32;NDEBUG;_LIB;__WIN32__;__NT__;__OSVERSION__=4;__x86__;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE" 556 - Key: RuntimeLibrary 558 - Key: UsePrecompiledHeader 562 - Key: Detect64BitPortabilityProblems 564 - Key: DebugInformationFormat 566 # VCManagedResourceCompilerTool: 567 # VCResourceCompilerTool: 568 # VCPreLinkEventTool: 571 Value: "$(OutDir)\\\\__PROJECT_NAME__.lib" 576 VCPostBuildEventTool: 579 copy "$(OutDir)\\\\libRTCSkel.lib" "$(SolutionDir)\\\\bin" 583 rtcexe_yaml=
"""ProjectType: "Visual C++" 584 Version: "__VCVERSION__" 585 Name: __PROJECT_NAME__ 586 ProjectGUID: __GUID__ 587 RootNamespace: __PROJECT_NAME__ 590 #------------------------------------------------------------ 591 # Debug Configuration 592 #------------------------------------------------------------ 593 - Name: "Debug|Win32" 594 OutputDirectory: "$(ProjectDir)__PROJECT_NAME__\\\\$(ConfigurationName)" 595 IntermediateDirectory: "__PROJECT_NAME__\\\\$(ConfigurationName)" 596 ConfigurationType: "1" 597 InheritedPropertySheets: "$(SolutionDir)rtm_config.vsprops;$(SolutionDir)user_config.vsprops" 602 set PATH=$(rtm_path);%PYTHON_ROOT%\\\\;%PATH% 603 for %%x in (*.idl) do rtm-skelwrapper.py --include-dir="" --skel-suffix=Skel --stub-suffix=Stub --idl-file=%%x 604 for %%x in (*.idl) do $(rtm_idlc) $(rtm_idlflags) %%x 608 - Key: PreprocessorDefinitions 609 Value: "USE_stub_in_nt_dll;WIN32;_DEBUG;_CONSOLE;__WIN32__;__x86__;_WIN32_WINNT=0x0500;__NT__;__OSVERSION__=4;_CRT_SECURE_NO_DEPRECATE" 610 - Key: MinimalRebuild 612 - Key: BasicRuntimeChecks 614 - Key: RuntimeLibrary 616 - Key: UsePrecompiledHeader 620 - Key: Detect64BitPortabilityProblems 622 - Key: DebugInformationFormat 625 - Key: AdditionalDependencies 628 Value: "$(OutDir)\\\\__PROJECT_NAME__.exe" 629 - Key: LinkIncremental 631 - Key: GenerateDebugInformation 637 #------------------------------------------------------------ 638 # Release Configuration 639 #------------------------------------------------------------ 640 - Name: "Release|Win32" 641 OutputDirectory: "$(ProjectDir)__PROJECT_NAME__\\\\$(ConfigurationName)" 642 IntermediateDirectory: "__PROJECT_NAME__\\\\$(ConfigurationName)" 643 ConfigurationType: "1" 644 InheritedPropertySheets: "$(SolutionDir)rtm_config.vsprops;$(SolutionDir)user_config.vsprops" 646 WholeProgramOptimization: "0" 650 set PATH=$(rtm_path);%PYTHON_ROOT%\\\\;%PATH% 651 for %%x in (*.idl) do rtm-skelwrapper.py --include-dir="" --skel-suffix=Skel --stub-suffix=Stub --idl-file=%%x 652 for %%x in (*.idl) do $(rtm_idlc) $(rtm_idlflags) %%x 653 VCPostBuildEventTool: 656 if NOT EXIST "$(SolutionDir)\\\\components" mkdir "$(SolutionDir)\\\\components" 657 copy "$(OutDir)\\\\__PROJECT_NAME__.exe" "$(SolutionDir)\\\\components" 659 - Key: PreprocessorDefinitions 660 Value: "USE_stub_in_nt_dll;WIN32;NDEBUG;_CONSOLE;__WIN32__;__x86__;_WIN32_WINNT=0x0500;__NT__;__OSVERSION__=4;_CRT_SECURE_NO_DEPRECATE" 661 - Key: RuntimeLibrary 663 - Key: UsePrecompiledHeader 667 - Key: Detect64BitPortabilityProblems 669 - Key: DebugInformationFormat 672 - Key: AdditionalDependencies 675 Value: "$(OutDir)\\\\__PROJECT_NAME__.exe" 676 - Key: LinkIncremental 678 - Key: GenerateDebugInformation 682 - Key: OptimizeReferences 684 - Key: EnableCOMDATFolding 686 - Key: LinkTimeCodeGeneration 692 rtcdll_yaml=
"""ProjectType: "Visual C++" 693 Version: "__VCVERSION__" 694 Name: __PROJECT_NAME__ 695 ProjectGUID: __GUID__ 696 RootNamespace: __PROJECT_NAME__ 699 #------------------------------------------------------------ 700 # Debug Configuration 701 #------------------------------------------------------------ 702 - Name: "Debug|Win32" 703 OutputDirectory: "$(ProjectDir)__PROJECT_NAME__\\\\$(ConfigurationName)" 704 IntermediateDirectory: "__PROJECT_NAME__\\\\$(ConfigurationName)" 705 ConfigurationType: "2" 706 InheritedPropertySheets: "$(SolutionDir)rtm_config.vsprops;$(SolutionDir)user_config.vsprops" 711 set PATH=$(rtm_path);%PYTHON_ROOT%\\\\;%PATH% 712 for %%x in (*.idl) do rtm-skelwrapper.py --include-dir="" --skel-suffix=Skel --stub-suffix=Stub --idl-file=%%x 713 for %%x in (*.idl) do $(rtm_idlc) $(rtm_idlflags) %%x 717 - Key: PreprocessorDefinitions 718 Value: "USE_stub_in_nt_dll;WIN32;_DEBUG;_WINDOWS;_USRDLL;__WIN32__;__NT__;__OSVERSION__=4;__x86__;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE" 719 - Key: MinimalRebuild 721 - Key: BasicRuntimeChecks 723 - Key: RuntimeLibrary 725 - Key: UsePrecompiledHeader 729 - Key: Detect64BitPortabilityProblems 731 - Key: DebugInformationFormat 734 - Key: AdditionalDependencies 737 # Value: "$(OutDir)\\\\__PROJECT_NAME__.dll" 740 - Key: LinkIncremental 742 # - Key: ModuleDefinitionFile 743 # Value: "$(TargetName).def" 744 - Key: GenerateDebugInformation 750 #------------------------------------------------------------ 751 # Release Configuration 752 #------------------------------------------------------------ 753 - Name: "Release|Win32" 754 OutputDirectory: "$(ProjectDir)__PROJECT_NAME__\\\\$(ConfigurationName)" 755 IntermediateDirectory: "__PROJECT_NAME__\\\\$(ConfigurationName)" 756 ConfigurationType: "2" 757 InheritedPropertySheets: "$(SolutionDir)rtm_config.vsprops;$(SolutionDir)user_config.vsprops" 759 WholeProgramOptimization: "0" 763 set PATH=$(rtm_path);%PYTHON_ROOT%\\\\;%PATH% 764 for %%x in (*.idl) do rtm-skelwrapper.py --include-dir="" --skel-suffix=Skel --stub-suffix=Stub --idl-file=%%x 765 for %%x in (*.idl) do $(rtm_idlc) $(rtm_idlflags) %%x 766 VCPostBuildEventTool: 769 if NOT EXIST "$(SolutionDir)\\\\components" mkdir "$(SolutionDir)\\\\components" 770 copy "$(OutDir)\\\\__PROJECT_NAME__.dll" "$(SolutionDir)\\\\components" 772 - Key: PreprocessorDefinitions 773 Value: "USE_stub_in_nt_dll;WIN32;NDEBUG;_WINDOWS;_USRDLL;__WIN32__;__NT__;__OSVERSION__=4;__x86__;_WIN32_WINNT=0x0500;_CRT_SECURE_NO_DEPRECATE" 774 - Key: RuntimeLibrary 776 - Key: UsePrecompiledHeader 780 - Key: Detect64BitPortabilityProblems 782 - Key: DebugInformationFormat 785 - Key: AdditionalDependencies 788 # Value: "$(OutDir)\\\\__PROJECT_NAME__.dll" 789 - Key: LinkIncremental 791 # - Key: ModuleDefinitionFile 792 # Value: "$(TargetName).def" 793 - Key: GenerateDebugInformation 797 - Key: OptimizeReferences 799 - Key: EnableCOMDATFolding 809 vcprojtool.py cmd options 811 vcproj: Generate vcproj 812 yaml : Generate example yaml file 813 flist : Generate file list as yaml 815 vcprojtool.py vcproj --type [exe|dll|nmake|lib] 821 vcprojtool.py yaml --type [exe|dll|nmake|lib] --output 822 vcprojtool.py flist --out --source|--header|--resource * 833 class InvalidOption(VCProjException):
835 self.
msg =
"Error: InvalidOption:\n " 840 self.
msg =
"Error: InvalidCommand:\n " 850 self.
dict = yaml.load(yaml_text)
856 return self.template.generate(self.
dict).replace(
"\r\n",
"\n").replace(
"\n",
"\r\n")
860 for tool
in tools[type]:
861 t = tool_elem % (tool, tool, tool)
866 return vcproj_template % (conf_type[type], self.
tool_element(type))
869 if not dict.has_key(
"Configurations"):
return 871 def escape_cmd(text):
872 text = text.replace(
"\"",
""")
873 text = text.replace(
"\r\n",
"\n")
874 text = text.replace(
"\n",
"
")
876 from types
import DictType, ListType
877 for conf
in dict[
"Configurations"]:
878 for tool
in conf.keys():
879 if isinstance(conf[tool], ListType):
880 for keyval
in conf[tool]:
881 if isinstance(keyval, DictType) \
882 and keyval.has_key(
"Key") \
883 and keyval.has_key(
"Value") \
884 and keyval[
"Key"] ==
"CommandLine":
885 keyval[
"Value"] = escape_cmd(keyval[
"Value"])
891 def __init__(self, type, vcversion, projectname, version, flist):
899 "RTCEXE": rtcexe_yaml,
"RTCDLL": rtcdll_yaml}
911 token0 = text.split(
"__GUID__")
913 for i
in range(1, len(token0)):
915 text0 += u + token0[i]
917 token1 = text0.split(
"__UUID")
919 for i
in range(1, len(token1)):
921 text1 += u + token1[i]
927 if self.flist.has_key(
"yaml")
and len(self.
flist[
"yaml"]) > 0:
930 if loaded.find(
"ProjectType:") < 0:
931 if self.yaml_template.has_key(self.
type):
935 print "type should be specified." 944 text = text.replace(
"__PROJECT_NAME__", self.
projectname)
946 text = text.replace(
"__VERSION__", self.
version)
948 text = text.replace(
"__VCVERSION__", self.
vcversion)
959 "name":
"Source Files",
960 "filter":
"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx",
964 "name":
"Header Files",
965 "filter":
"h;hpp;hxx;hm;inl;inc;xsd",
969 "name":
"Resource Files",
970 "filter":
"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav",
983 for f
in [
"source",
"header",
"resource"]:
984 if len(self.
flist[f]) > 0:
985 text += self.
temp % \
988 for file
in self.
flist[f]:
990 file = file.replace(
"/",
"\\")
991 text +=
" - Path: " + file +
"\n" 1031 if not (cmd ==
"vcproj" or cmd ==
"flist" or cmd ==
"yaml"):
1039 flist = {
"yaml": [],
"source": [],
"header": [],
"resource": []}
1045 if opt ==
"--projectname":
1047 if i < argc: projectname = argv[i]
1049 elif opt ==
"--version":
1051 if i < argc: version = argv[i]
1053 elif opt ==
"--vcversion":
1055 if i < argc: vcversion = argv[i]
1057 elif opt ==
"--output" or opt ==
"--out" or opt ==
"-o":
1059 if i < argc: outfname = argv[i]
1061 elif opt ==
"--type" or opt ==
"-t":
1063 if i < argc: type = argv[i]
1066 if not conf_type.has_key(type):
1069 " --type should be [exe|dll|nmake|lib]")
1070 elif opt[:2] ==
"--" and flist.has_key(opt[2:]):
1074 while i < argc
and argv[i][:2] !=
"--":
1075 flist[lname].
append(argv[i])
1077 if len(flist[lname]) == 0:
1083 return (cmd, vcversion, projectname, version, outfname, type, flist)
1095 except VCProjException, e:
1096 print "\n" + e.msg +
"\n" 1102 projectname = res[2]
1111 projectname, version, flist).
generate()
1113 elif cmd ==
"flist":
1121 fd = open(outfile,
"wb")
1129 print FileList({
"source": [
"hoge.cpp",
"hage.cpp",
"fuga.cpp"],
1130 "header": [
"hoge.h",
"hage.h",
"fuga.h"],
1134 print YamlConfig(
"EXE",
"8.00",
"Test",
"0.9.1",
1140 [
"hoge.h",
"hage.h",
"fuga.h"],
1151 [
"hoge.h",
"hage.h",
"fuga.h"],
1160 if __name__ ==
"__main__":
def uuid1(node=None, clock_seq=None)
void append(SDOPackage::NVList &dest, const SDOPackage::NVList &src)
Append an element to NVList.
def generate(idl_file, preproc_args, impl_suffix, skel_suffix="Skel", fd_h=None, fd_cpp=None)