21 vcxproj_template =
"""<?xml version="1.0" encoding="utf-8"?> 22 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 23 <ItemGroup Label="ProjectConfigurations"> 24 <ProjectConfiguration Include="Debug|Win32"> 25 <Configuration>Debug</Configuration> 26 <Platform>Win32</Platform> 27 </ProjectConfiguration> 28 <ProjectConfiguration Include="Release|Win32"> 29 <Configuration>Release</Configuration> 30 <Platform>Win32</Platform> 31 </ProjectConfiguration> 33 <PropertyGroup Label="Globals"> 34 <ProjectName>[RootNamespace]</ProjectName> 35 <ProjectGuid>{[ProjectGUID]}</ProjectGuid> 36 <RootNamespace>[RootNamespace]</RootNamespace> 37 <Keyword>Win32Proj</Keyword> 39 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> 40 [for conf in Configurations] 41 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='[conf.Name]'" Label="Configuration"> 42 <ConfigurationType>%s</ConfigurationType> 43 <CharacterSet>NotSet</CharacterSet> 46 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> 47 <ImportGroup Label="ExtensionSettings"> 49 [for conf in Configurations] 50 <ImportGroup Condition="'$(Configuration)|$(Platform)'=='[conf.Name]'" Label="PropertySheets"> 51 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> 52 [for inher in conf.VC10_InheritedPropertySheets] 54 <Import Project="[inher]" /> 59 <PropertyGroup Label="UserMacros" /> 61 <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> 62 [for conf in Configurations] 63 <OutDir Condition="'$(Configuration)|$(Platform)'=='[conf.Name]'">[conf.VC10_OutputDirectory]</OutDir> 64 <IntDir Condition="'$(Configuration)|$(Platform)'=='[conf.Name]'">[conf.VC10_IntermediateDirectory]</IntDir> 65 <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='[conf.Name]'">[conf.VC10_LinkIncrementalCondition]</LinkIncremental> 69 [for conf in Configurations] 70 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='[conf.Name]'"> 71 <!-- PreBuildEvent --> 91 <!-- PostBuildEvent --> 95 </ItemDefinitionGroup> 99 <Filter Include="[Source.Name]"> 100 <UniqueIdentifier>{[Source.GUID]}</UniqueIdentifier> 101 <Extensions>[Source.Filter]</Extensions> 105 <Filter Include="[Header.Name]"> 106 <UniqueIdentifier>{[Header.GUID]}</UniqueIdentifier> 107 <Extensions>[Header.Filter]</Extensions> 112 [if-any Source.Files][for file in Source.Files] 113 <ClCompile Include="[file.Path]"> 114 <Filter>[Source.Name]</Filter> 119 [if-any Header.Files][for file in Header.Files] 120 <ClInclude Include="[file.Path]"> 121 <Filter>[Header.Name]</Filter> 125 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> 126 <ImportGroup Label="ExtensionTargets"> 135 conf_type = {
"EXE":
"Application",
"DLL":
"DynamicLibrary",
137 "LIB":
"StaticLibrary",
138 "RTCEXE":
"Application",
"RTCDLL":
"DynamicLibrary"}
144 PreBuildEventtools = {
"EXE":
147 "VCXMLDataGeneratorTool",
148 "VCWebServiceProxyGeneratorTool",
150 "VCManagedResourceCompilerTool",
151 "VCResourceCompilerTool",
158 PreBuildEventtools[
"RTCEXE"] = PreBuildEventtools[
"EXE"]
159 PreBuildEventtools[
"RTCDLL"] = PreBuildEventtools[
"DLL"]
161 [
"VCCustomBuildTool",
162 "VCXMLDataGeneratorTool",
163 "VCWebServiceProxyGeneratorTool",
165 "VC10_VCCLCompilerTool",
166 "VCManagedResourceCompilerTool",
167 "VCResourceCompilerTool",
170 [
"VCCustomBuildTool",
171 "VCXMLDataGeneratorTool",
172 "VCWebServiceProxyGeneratorTool",
174 "VC10_VCCLCompilerTool",
175 "VCManagedResourceCompilerTool",
176 "VCResourceCompilerTool",
179 [
"VCCustomBuildTool",
180 "VCXMLDataGeneratorTool",
181 "VCWebServiceProxyGeneratorTool",
183 "VC10_VCCLCompilerTool",
184 "VCManagedResourceCompilerTool",
185 "VCResourceCompilerTool"]
187 Cltools[
"RTCEXE"] = Cltools[
"EXE"]
188 Cltools[
"RTCDLL"] = Cltools[
"DLL"]
196 Libtools[
"RTCEXE"] = Libtools[
"EXE"]
197 Libtools[
"RTCDLL"] = Libtools[
"DLL"]
198 PreLinkEventtools = {
"EXE":
199 [
"VC10_VCPreLinkEventTool"],
201 [
"VC10_VCPreLinkEventTool"],
205 PreLinkEventtools[
"RTCEXE"] = PreLinkEventtools[
"EXE"]
206 PreLinkEventtools[
"RTCDLL"] = PreLinkEventtools[
"DLL"]
208 [
"VC10_VCPreLinkEventTool",
216 "VCWebDeploymentTool"],
218 [
"VC10_VCLinkerTool",
225 "VCWebDeploymentTool"],
229 Linktools[
"RTCEXE"] = Linktools[
"EXE"]
230 Linktools[
"RTCDLL"] = Linktools[
"DLL"]
231 PostBuildEventtools = {
"EXE":
232 [
"VC10_VCPreLinkEventTool",
240 "VCWebDeploymentTool",
241 "VC10_VCPostBuildEventTool"],
243 [
"VC10_VCPostBuildEventTool"],
245 [
"VC10_VCPostBuildEventTool"]
247 PostBuildEventtools[
"RTCEXE"] = PostBuildEventtools[
"EXE"]
248 PostBuildEventtools[
"RTCDLL"] = PostBuildEventtools[
"DLL"]
254 tool_elem =
"""[if-any conf.%s][for tool in conf.%s] 256 <[tool.Key]>[tool.Value]</[tool.Key]> 262 ProjectType: Visual C++ 263 Version: "__VCVERSION__" 264 Name: # Your Project Name 265 ProjectGUID: __GUID__ 273 VC10_OutputDirectory: $(ProjectDir)$(Configuration) 274 VC10_IntermediateDirectory: $(Configuration) 275 VC10_InheritedPropertySheets: # Set vsprops file if you need 282 exe_yaml =
"""ProjectType: "Visual C++" 283 Version: "__VCVERSION__" 284 Name: __PROJECT_NAME__ 285 ProjectGUID: __GUID__ 286 RootNamespace: __PROJECT_NAME__ 289 #------------------------------------------------------------ 290 # Debug Configuration 291 #------------------------------------------------------------ 292 - Name: "Debug|Win32" 293 VC10_OutputDirectory: $(ProjectDir)$(Configuration)" 294 VC10_IntermediateDirectory: "$(Configuratio)" 295 ConfigurationType: "1" 296 # VC10_InheritedPropertySheets: 298 VC10_LinkIncrementalCondition: "true" 299 # VCPreBuildEventTool: 301 # VCXMLDataGeneratorTool: 302 # VCWebServiceProxyGeneratorTool: 304 VC10_VCCLCompilerTool: 307 - Key: PreprocessorDefinitions 308 Value: "WIN32;_DEBUG;_CONSOLE;__WIN32__;__x86__;_WIN32_WINNT=0x0400;__NT__;__OSVERSION__=4;%(PreprocessorDefinitions)" 309 - Key: MinimalRebuild 311 - Key: BasicRuntimeChecks 312 Value: "EnableFastChecks" 313 - Key: RuntimeLibrary 314 Value: "MultiThreadedDebugDLL" 315 - Key: PrecompiledHeader 319 - Key: Detect64BitPortabilityProblems 321 - Key: DebugInformationFormat 322 Value: "EditAndContinue" 323 # VCManagedResourceCompilerTool: 324 # VCResourceCompilerTool: 325 # VC10_VCPreLinkEventTool: 327 - Key: AdditionalDependencies 330 Value: "$(OutDir)\\\\__PROJECT_NAME__.exe" 331 - Key: LinkIncremental 333 - Key: IgnoreDefaultLibraryNames 335 - Key: GenerateDebugInformation 347 # VCWebDeploymentTool: 348 VC_10VCPostBuildEventTool: 349 VCPreLinkEvent: 'lib -out:"$(TargetDir)coil_static.lib" "$(TargetDir)*.obj" 350 set PATH=%PATH%%3b$(coil_path) 352 start /wait cmd /c makedeffile.py coil_static.lib coil$(coil_dllver)d $(coil_version) coil$(coil_dllver)d.def 353 move coil$(coil_dllver)d.def ..\' 354 VC10_VCPostBuildEventTool: 'copy "$(OutDir)\$(TargetName).lib" "$(SolutionDir)bin\\coil$(coil_dllver)d.lib" 355 copy "$(OutDir)\coil$(coil_dllver)d.dll" "$(SolutionDir)bin\\"' 356 VCPreLinkEvent: 'lib -out:"$(TargetDir)coil_static.lib" "$(TargetDir)*.obj" 357 set PATH=%PATH%%3b$(coil_path) 359 start /wait cmd /c makedeffile.py coil_static.lib coil$(coil_dllver) $(coil_version) coil$(coil_dllver).def 360 move coil$(coil_dllver).def ..\\' 361 VC10_VCPostBuildEventTool: 'copy "$(OutDir)\$(TargetName).lib" "$(SolutionDir)bin\\coil$(coil_dllver).lib" 362 copy "$(OutDir)\coil$(coil_dllver).dll" "$(SolutionDir)bin\\"' 363 #------------------------------------------------------------ 364 # Release Configuration 365 #------------------------------------------------------------ 366 - Name: "Release|Win32" 367 VC10_OutputDirectory: $(ProjectDir)$(Configuration)" 368 VC10_IntermediateDirectory: "$(Configuratio)" 369 ConfigurationType: "1" 370 # VC10_InheritedPropertySheets: "" 372 VC10_LinkIncrementalCondition: "false" 373 WholeProgramOptimization: "0" 374 # VCPreBuildEventTool: 376 # VCXMLDataGeneratorTool: 377 # VCWebServiceProxyGeneratorTool: 379 VC10_VCCLCompilerTool: 380 - Key: PreprocessorDefinitions 381 Value: "WIN32;NDEBUG;_CONSOLE;__WIN32__;__x86__;_WIN32_WINNT=0x0400;__NT__;__OSVERSION__=4;%(PreprocessorDefinitions)" 382 - Key: RuntimeLibrary 383 Value: "MultiThreadedDLL" 384 - Key: PrecompiledHeader 388 - Key: Detect64BitPortabilityProblems 390 - Key: DebugInformationFormat 391 Value: "ProgramDatabase" 392 # VCManagedResourceCompilerTool" 393 # VCResourceCompilerTool" 394 # VC10_VCPreLinkEventTool" 396 - Key: AdditionalDependencies 399 Value: "$(OutDir)\\\\__PROJECT_NAME__.exe" 400 - Key: LinkIncremental 402 - Key: GenerateDebugInformation 406 - Key: OptimizeReferences 408 - Key: EnableCOMDATFolding 410 - Key: LinkTimeCodeGeneration 420 # VCWebDeploymentTool: 421 # VC10_VCPostBuildEventTool: 424 dll_yaml =
"""ProjectType: "Visual C++" 425 Version: "__VCVERSION__" 426 Name: __PROJECT_NAME__ 427 ProjectGUID: __GUID__ 428 RootNamespace: __PROJECT_NAME__ 431 - Name: "Debug|Win32" 432 VC10_OutputDirectory: "$(ProjectDir)$(Configuration)" 433 VC10_IntermediateDirectory: "$(Configuration)" 434 ConfigurationType: "2" 435 # VC10_InheritedPropertySheets: "" 437 VC10_LinkIncrementalCondition: "true" 438 # VCPreBuildEventTool: 440 # VCXMLDataGeneratorTool: 441 # VCWebServiceProxyGeneratorTool: 443 VC10_VCCLCompilerTool: 446 - Key: PreprocessorDefinitions 447 Value: "WIN32;_DEBUG;_WINDOWS;_USRDLL;__WIN32__;__NT__;__OSVERSION__=4;__x86__;_WIN32_WINNT=0x0400;_CRT_SECURE_NO_DEPRECATE" 448 - Key: MinimalRebuild 450 - Key: BasicRuntimeChecks 451 Value: "EnableFastChecks" 452 - Key: RuntimeLibrary 453 Value: "MultiThreadedDebugDLL" 454 - Key: PrecompiledHeader 458 - Key: Detect64BitPortabilityProblems 460 - Key: DebugInformationFormat 461 Value: "EditAndContinue" 462 # VCManagedResourceCompilerTool: 463 # VCResourceCompilerTool: 464 VC10_VCPreLinkEventTool: 467 lib -out:"$(TargetDir)RTC_static.lib" "$(TargetDir)*.obj" "$(SolutionDir)\\\\rtm\\\\idl\\\\$(ConfigurationName)\\\\*.obj" 468 set PATH=%PATH%;$(rtm_path) 470 start /wait cmd /c makedeffile.py RTC_static.lib RTC042d 0.4.1 RTC042d.def 471 move RTC042d.def ..\\\\ 473 - Key: AdditionalDependencies 476 Value: "$(OutDir)\\\\__PROJECT_NAME__.dll" 479 - Key: LinkIncremental 481 - Key: ModuleDefinitionFile 482 Value: "$(TargetName).def" 483 - Key: GenerateDebugInformation 495 # VCWebDeploymentTool: 496 VC10_VCPostBuildEventTool: 499 copy "$(OutDir)\\\\$(TargetName).lib" "$(SolutionDir)bin\\\\" 500 copy "$(OutDir)\\\\$(TargetName).dll" "$(SolutionDir)bin\\\\" 501 - Name: "Release|Win32" 502 VC10_OutputDirectory: "$(ProjectDir)$(Configuration)" 503 VC10_IntermediateDirectory: "$(Configuration)" 504 ConfigurationType: "2" 505 VC10_InheritedPropertySheets: "" 507 VC10_LinkIncrementalCondition: "false" 508 WholeProgramOptimization: "0" 509 # VCPreBuildEventTool: 511 # VCXMLDataGeneratorTool: 512 # VCWebServiceProxyGeneratorTool: 514 VC10_VCCLCompilerTool: 515 - Key: PreprocessorDefinitions 516 Value: "WIN32;NDEBUG;_WINDOWS;_USRDLL;__WIN32__;__NT__;__OSVERSION__=4;__x86__;_WIN32_WINNT=0x0400;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)" 517 - Key: RuntimeLibrary 518 Value: "MultiThreadedDLL" 519 - Key: UsePrecompiledHeader 523 - Key: Detect64BitPortabilityProblems 525 - Key: DebugInformationFormat 526 Value: "ProgramDatabase" 527 # VCManagedResourceCompilerTool: 528 # VCResourceCompilerTool: 529 VC10_VCPreLinkEventTool: 532 lib -out:"$(TargetDir)RTC_static.lib" "$(TargetDir)*.obj" "$(SolutionDir)\\\\rtm\\\\idl\\\\$(ConfigurationName)\\\\*.obj" 533 set PATH=%PATH%;$(rtm_path) 535 start /wait cmd /c makedeffile.py RTC_static.lib RTC042 0.4.1 RTC042.def 536 move RTC042.def ..\\\\ 538 - Key: AdditionalDependencies 541 Value: "$(OutDir)\\\\__PROJECT_NAME__.dll" 542 - Key: LinkIncremental 544 - Key: ModuleDefinitionFile 545 Value: "$(TargetName).def" 546 - Key: GenerateDebugInformation 550 - Key: OptimizeReferences 552 - Key: EnableCOMDATFolding 562 # VCWebDeploymentTool: 563 VC10_VCPostBuildEventTool: 566 copy "$(OutDir)\\\\$(TargetName).lib" "$(SolutionDir)bin\\\\" 567 copy "$(OutDir)\\\\$(TargetName).dll" "$(SolutionDir)bin\\\\" 570 lib_yaml =
"""ProjectType: "Visual C++" 571 Version: "__VCVERSION__" 572 Name: __PROJECT_NAME__ 573 ProjectGUID: __GUID__ 574 RootNamespace: __PROJECT_NAME__ 577 - Name: "Debug|Win32" 578 VC10_OutputDirectory: "$(ProjectDir)$(Configuration)" 579 VC10_IntermediateDirectory: "$(Configuration)" 580 ConfigurationType: "4" 581 # VC10_InheritedPropertySheets: "..\\\\..\\\\OpenRTM-aist.vsprops" 583 VC10_LinkIncrementalCondition: "true" 584 DeleteExtensionsOnClean: "" 588 set PATH=$(rtm_path);%PYTHON_ROOT%\\\\;%PATH% 589 for %%x in (*.idl) do makewrapper.py %%x 590 for %%x in (*.idl) do omniidl -bcxx -Wba -nf %%x 592 # VCXMLDataGeneratorTool: 593 # VCWebServiceProxyGeneratorTool: 595 VC10_VCCLCompilerTool: 598 - Key: PreprocessorDefinitions 599 Value: "WIN32;_DEBUG;_LIB;__WIN32__;__NT__;__OSVERSION__=4;__x86__;_WIN32_WINNT=0x0400;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)" 600 - Key: MinimalRebuild 602 - Key: BasicRuntimeChecks 603 Value: "EnableFastChecks" 604 - Key: RuntimeLibrary 605 Value: "MultiThreadedDebugDLL" 606 - Key: PrecompiledHeader 610 - Key: Detect64BitPortabilityProblems 612 - Key: DebugInformationFormat 613 Value: "EditAndContinue" 614 # VCManagedResourceCompilerTool: 615 # VCResourceCompilerTool: 616 # VC10_VCPreLinkEventTool: 619 Value: "$(OutDir)\\\\__PROJECT_NAME__.lib" 624 VC10_VCPostBuildEventTool: 626 Value: "make .def file" 629 copy "$(OutDir)\\\\libRTCSkeld.lib" "$(SolutionDir)\\\\bin" 630 - Name: "Release|Win32" 631 VC10_OutputDirectory: "$(ProjectDir)$(Configuration)" 632 VC10_IntermediateDirectory: "$(Configuration)" 633 ConfigurationType: "4" 634 # VC10_InheritedPropertySheets: "..\\\\..\\\\OpenRTM-aist.vsprops" 636 VC10_LinkIncrementalCondition: "false" 637 WholeProgramOptimization: "0" 641 set PATH=$(rtm_path);%PYTHON_ROOT%\\\\;%PATH% 642 for %%x in (*.idl) do makewrapper.py %%x 643 for %%x in (*.idl) do omniidl -bcxx -Wba -nf %%x 645 # VCXMLDataGeneratorTool: 646 # VCWebServiceProxyGeneratorTool: 648 VC10_VCCLCompilerTool: 649 - Key: PreprocessorDefinitions 650 Value: "WIN32;NDEBUG;_LIB;__WIN32__;__NT__;__OSVERSION__=4;__x86__;_WIN32_WINNT=0x0400;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)" 651 - Key: RuntimeLibrary 652 Value: "MultiThreadedDLL" 653 - Key: PrecompiledHeader 657 - Key: Detect64BitPortabilityProblems 659 - Key: DebugInformationFormat 660 Value: "ProgramDatabase" 661 # VCManagedResourceCompilerTool: 662 # VCResourceCompilerTool: 663 # VC10_VCPreLinkEventTool: 666 Value: "$(OutDir)\\\\__PROJECT_NAME__.lib" 671 VC10_VCPostBuildEventTool: 674 copy "$(OutDir)\\\\libRTCSkel.lib" "$(SolutionDir)\\\\bin" 678 rtcexe_yaml=
"""ProjectType: "Visual C++" 679 Version: "__VCVERSION__" 680 Name: __PROJECT_NAME__ 681 ProjectGUID: __GUID__ 682 RootNamespace: __PROJECT_NAME__ 685 #------------------------------------------------------------ 686 # Debug Configuration 687 #------------------------------------------------------------ 688 - Name: "Debug|Win32" 689 VC10_OutputDirectory: "$(ProjectDir)__PROJECT_NAME__\\\\$(Configuration)" 690 VC10_IntermediateDirectory: "__PROJECT_NAME__\\\\$(Configuration)" 691 ConfigurationType: "1" 692 VC10_InheritedPropertySheets: 693 - "$(SolutionDir)user_config.props" 694 - "$(SolutionDir)rtm_config.props" 696 VC10_LinkIncrementalCondition: "true" 700 set PATH=$(rtm_path);%PYTHON_ROOT%\\\\;%PATH% 701 for %%x in (*.idl) do rtm-skelwrapper.py --include-dir="" --skel-suffix=Skel --stub-suffix=Stub --idl-file=%%x 702 for %%x in (*.idl) do $(rtm_idlc) $(rtm_idlflags) %%x 703 VC10_VCCLCompilerTool: 706 - Key: PreprocessorDefinitions 707 Value: "USE_stub_in_nt_dll;WIN32;_DEBUG;_CONSOLE;__WIN32__;__x86__;_WIN32_WINNT=0x0400;__NT__;__OSVERSION__=4;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)" 708 - Key: MinimalRebuild 710 - Key: BasicRuntimeChecks 711 Value: "EnableFastChecks" 712 - Key: RuntimeLibrary 713 Value: "MultiThreadedDebugDLL" 714 - Key: PrecompiledHeader 718 - Key: Detect64BitPortabilityProblems 720 - Key: DebugInformationFormat 721 Value: "EditAndContinue" 723 - Key: AdditionalDependencies 724 Value: "$(rtm_libd);%(AdditionalDependencies)" 726 Value: "$(OutDir)\\\\__PROJECT_NAME__.exe" 727 - Key: LinkIncremental 729 - Key: GenerateDebugInformation 735 #------------------------------------------------------------ 736 # Release Configuration 737 #------------------------------------------------------------ 738 - Name: "Release|Win32" 739 VC10_OutputDirectory: "$(ProjectDir)__PROJECT_NAME__\\\\$(Configuration)" 740 VC10_IntermediateDirectory: "__PROJECT_NAME__\\\\$(Configuration)" 741 ConfigurationType: "1" 742 VC10_InheritedPropertySheets: 743 - "$(SolutionDir)user_config.props" 744 - "$(SolutionDir)rtm_config.props" 746 VC10_LinkIncrementalCondition: "false" 747 WholeProgramOptimization: "0" 751 set PATH=$(rtm_path);%PYTHON_ROOT%\\\\;%PATH% 752 for %%x in (*.idl) do rtm-skelwrapper.py --include-dir="" --skel-suffix=Skel --stub-suffix=Stub --idl-file=%%x 753 for %%x in (*.idl) do $(rtm_idlc) $(rtm_idlflags) %%x 754 VC10_VCPostBuildEventTool: 757 if NOT EXIST "$(SolutionDir)\\\\components" mkdir "$(SolutionDir)\\\\components" 758 copy "$(OutDir)\\\\__PROJECT_NAME__.exe" "$(SolutionDir)\\\\components" 759 VC10_VCCLCompilerTool: 760 - Key: PreprocessorDefinitions 761 Value: "USE_stub_in_nt_dll;WIN32;NDEBUG;_CONSOLE;__WIN32__;__x86__;_WIN32_WINNT=0x0400;__NT__;__OSVERSION__=4;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)" 762 - Key: RuntimeLibrary 763 Value: "MultiThreadedDLL" 764 - Key: PrecompiledHeader 768 - Key: Detect64BitPortabilityProblems 770 - Key: DebugInformationFormat 771 Value: "ProgramDatabase" 774 - Key: AdditionalDependencies 775 Value: "$(rtm_lib);%(AdditionalDependencies)" 777 Value: "$(OutDir)\\\\__PROJECT_NAME__.exe" 778 - Key: LinkIncremental 780 - Key: GenerateDebugInformation 784 - Key: OptimizeReferences 786 - Key: EnableCOMDATFolding 788 - Key: LinkTimeCodeGeneration 794 rtcdll_yaml=
"""ProjectType: "Visual C++" 795 Version: "__VCVERSION__" 796 Name: __PROJECT_NAME__ 797 ProjectGUID: __GUID__ 798 RootNamespace: __PROJECT_NAME__ 801 #------------------------------------------------------------ 802 # Debug Configuration 803 #------------------------------------------------------------ 804 - Name: "Debug|Win32" 805 VC10_OutputDirectory: "$(ProjectDir)__PROJECT_NAME__\\\\$(Configuration)" 806 VC10_IntermediateDirectory: "__PROJECT_NAME__\\\\$(Configuration)" 807 ConfigurationType: "2" 808 VC10_InheritedPropertySheets: 809 - "$(SolutionDir)user_config.props" 810 - "$(SolutionDir)rtm_config.props" 812 VC10_LinkIncrementalCondition: "true" 816 set PATH=$(rtm_path);%PYTHON_ROOT%\\\\;%PATH% 817 for %%x in (*.idl) do rtm-skelwrapper.py --include-dir="" --skel-suffix=Skel --stub-suffix=Stub --idl-file=%%x 818 for %%x in (*.idl) do $(rtm_idlc) $(rtm_idlflags) %%x 819 VC10_VCCLCompilerTool: 822 - Key: PreprocessorDefinitions 823 Value: "USE_stub_in_nt_dll;WIN32;_DEBUG;_WINDOWS;_USRDLL;__WIN32__;__NT__;__OSVERSION__=4;__x86__;_WIN32_WINNT=0x0400;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)" 824 - Key: MinimalRebuild 826 - Key: BasicRuntimeChecks 827 Value: "EnableFastChecks" 828 - Key: RuntimeLibrary 829 Value: "MultiThreadedDebugDLL" 830 - Key: PrecompiledHeader 834 - Key: Detect64BitPortabilityProblems 836 - Key: DebugInformationFormat 837 Value: "EditAndContinue" 839 - Key: AdditionalDependencies 840 Value: "$(rtm_libd);%(AdditionalDependencies)" 842 # Value: "$(OutDir)\\\\__PROJECT_NAME__.dll" 845 - Key: LinkIncremental 847 # - Key: ModuleDefinitionFile 848 # Value: "$(TargetName).def" 849 - Key: GenerateDebugInformation 855 #------------------------------------------------------------ 856 # Release Configuration 857 #------------------------------------------------------------ 858 - Name: "Release|Win32" 859 VC10_OutputDirectory: "$(ProjectDir)__PROJECT_NAME__\\\\$(Configuration)" 860 VC10_IntermediateDirectory: "__PROJECT_NAME__\\\\$(Configuration)" 861 ConfigurationType: "2" 862 VC10_InheritedPropertySheets: 863 - "$(SolutionDir)user_config.props" 864 - "$(SolutionDir)rtm_config.props" 866 VC10_LinkIncrementalCondition: "false" 867 WholeProgramOptimization: "0" 871 set PATH=$(rtm_path);%PYTHON_ROOT%\\\\;%PATH% 872 for %%x in (*.idl) do rtm-skelwrapper.py --include-dir="" --skel-suffix=Skel --stub-suffix=Stub --idl-file=%%x 873 for %%x in (*.idl) do $(rtm_idlc) $(rtm_idlflags) %%x 874 VC10_VCPostBuildEventTool: 877 if NOT EXIST "$(SolutionDir)\\\\components" mkdir "$(SolutionDir)\\\\components" 878 copy "$(OutDir)\\\\__PROJECT_NAME__.dll" "$(SolutionDir)\\\\components" 879 VC10_VCCLCompilerTool: 880 - Key: PreprocessorDefinitions 881 Value: "USE_stub_in_nt_dll;WIN32;NDEBUG;_WINDOWS;_USRDLL;__WIN32__;__NT__;__OSVERSION__=4;__x86__;_WIN32_WINNT=0x0400;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)" 882 - Key: RuntimeLibrary 883 Value: "MultiThreadedDLL" 884 - Key: PrecompiledHeader 888 - Key: Detect64BitPortabilityProblems 890 - Key: DebugInformationFormat 891 Value: "ProgramDatabase" 893 - Key: AdditionalDependencies 894 Value: "$(rtm_lib);%(AdditionalDependencies)" 896 # Value: "$(OutDir)\\\\__PROJECT_NAME__.dll" 897 - Key: LinkIncremental 899 # - Key: ModuleDefinitionFile 900 # Value: "$(TargetName).def" 901 - Key: GenerateDebugInformation 905 - Key: OptimizeReferences 907 - Key: EnableCOMDATFolding 917 vcprojtool.py cmd options 919 vcproj: Generate vcproj 920 yaml : Generate example yaml file 921 flist : Generate file list as yaml 923 vcprojtool.py vcproj --type [exe|dll|nmake|lib] 929 vcprojtool.py yaml --type [exe|dll|nmake|lib] --output 930 vcprojtool.py flist --out --source|--header|--resource * 941 class InvalidOption(VCProjException):
943 self.
msg =
"Error: InvalidOption:\n " 948 self.
msg =
"Error: InvalidCommand:\n " 958 self.
dict = yaml.load(yaml_text)
964 return self.template.generate(self.
dict).replace(
"\r\n",
"\n").replace(
"\n",
"\r\n")
968 for tool
in PreBuildEventtools[type]:
969 t = tool_elem % (tool, tool)
975 for tool
in Cltools[type]:
976 t = tool_elem % (tool, tool)
982 for tool
in Libtools[type]:
983 t = tool_elem % (tool, tool)
989 for tool
in PreLinkEventtools[type]:
990 t = tool_elem % (tool, tool)
996 for tool
in Linktools[type]:
997 t = tool_elem % (tool, tool)
1003 for tool
in PostBuildEventtools[type]:
1004 t = tool_elem % (tool, tool)
1014 if not dict.has_key(
"Configurations"):
return 1016 def escape_cmd(text):
1017 text = text.replace(
"\"",
""")
1018 text = text.replace(
"\r\n",
"\n")
1019 text = text.replace(
"\n",
"
")
1021 from types
import DictType, ListType
1022 for conf
in dict[
"Configurations"]:
1023 for tool
in conf.keys():
1024 if isinstance(conf[tool], ListType):
1025 for keyval
in conf[tool]:
1026 if isinstance(keyval, DictType) \
1027 and keyval.has_key(
"Key") \
1028 and keyval.has_key(
"Value") \
1029 and keyval[
"Key"] ==
"Command":
1030 keyval[
"Value"] = escape_cmd(keyval[
"Value"])
1036 def __init__(self, type, vcversion, projectname, version, flist):
1044 "RTCEXE": rtcexe_yaml,
"RTCDLL": rtcdll_yaml}
1056 token0 = text.split(
"__GUID__")
1058 for i
in range(1, len(token0)):
1060 text0 += u + token0[i]
1062 token1 = text0.split(
"__UUID")
1064 for i
in range(1, len(token1)):
1066 text1 += u + token1[i]
1072 if self.flist.has_key(
"yaml")
and len(self.
flist[
"yaml"]) > 0:
1075 if loaded.find(
"ProjectType:") < 0:
1076 if self.yaml_template.has_key(self.
type):
1080 print "type should be specified." 1091 text = text.replace(
"__PROJECT_NAME__", self.
projectname)
1093 text = text.replace(
"__VERSION__", self.
version)
1095 text = text.replace(
"__VCVERSION__", self.
vcversion)
1106 "name":
"Source Files",
1107 "filter":
"cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx",
1111 "name":
"Header Files",
1112 "filter":
"h;hpp;hxx;hm;inl;inc;xsd",
1116 "name":
"Resource Files",
1117 "filter":
"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav",
1130 for f
in [
"source",
"header",
"resource"]:
1131 if len(self.
flist[f]) > 0:
1132 text += self.
temp % \
1134 self.
filter[f][
"filter"])
1135 for file
in self.
flist[f]:
1137 file = file.replace(
"/",
"\\")
1138 text +=
" - Path: " + file +
"\n" 1178 if not (cmd ==
"vcxproj" or cmd ==
"flist" or cmd ==
"yaml"):
1186 flist = {
"yaml": [],
"source": [],
"header": [],
"resource": []}
1192 if opt ==
"--projectname":
1194 if i < argc: projectname = argv[i]
1196 elif opt ==
"--version":
1198 if i < argc: version = argv[i]
1200 elif opt ==
"--vcversion":
1202 if i < argc: vcversion = argv[i]
1204 elif opt ==
"--output" or opt ==
"--out" or opt ==
"-o":
1206 if i < argc: outfname = argv[i]
1208 elif opt ==
"--type" or opt ==
"-t":
1210 if i < argc: type = argv[i]
1213 if not conf_type.has_key(type):
1216 " --type should be [exe|dll|nmake|lib]")
1217 elif opt[:2] ==
"--" and flist.has_key(opt[2:]):
1221 while i < argc
and argv[i][:2] !=
"--":
1222 flist[lname].
append(argv[i])
1224 if len(flist[lname]) == 0:
1230 return (cmd, vcversion, projectname, version, outfname, type, flist)
1242 except VCProjException, e:
1243 print "\n" + e.msg +
"\n" 1249 projectname = res[2]
1255 if cmd ==
"vcxproj":
1258 projectname, version, flist).
generate()
1260 elif cmd ==
"flist":
1268 fd = open(outfile,
"wb")
1276 print FileList({
"source": [
"hoge.cpp",
"hage.cpp",
"fuga.cpp"],
1277 "header": [
"hoge.h",
"hage.h",
"fuga.h"],
1281 print YamlConfig(
"EXE",
"10.00",
"Test",
"0.9.1",
1287 [
"hoge.h",
"hage.h",
"fuga.h"],
1298 [
"hoge.h",
"hage.h",
"fuga.h"],
1307 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)