зеркало из https://github.com/microsoft/cppwinrt.git
Enable faster dev cycle in Visual Studio (#1340)
* Enable faster dev cycle in Visual Studio * Oops, remove one more run * Fix linux build temporarily - see also #1341 --------- Co-authored-by: Jon Wiswall <jonwis@ntdev.microsoft.com>
This commit is contained in:
Родитель
4196e08bd2
Коммит
9b453cfc51
|
@ -483,7 +483,7 @@ jobs:
|
|||
|
||||
- name: Test run (build projection using Windows.winmd)
|
||||
run: |
|
||||
curl -o Windows.winmd -L https://github.com/microsoft/windows-rs/raw/master/crates/libs/metadata/default/Windows.winmd
|
||||
curl -o Windows.winmd -L https://github.com/microsoft/windows-rs/raw/master/crates/libs/bindgen/default/Windows.winmd
|
||||
install/bin/cppwinrt -in Windows.winmd -out /tmp/cppwinrt -verbose
|
||||
|
||||
- id: setup-llvm
|
||||
|
@ -575,7 +575,7 @@ jobs:
|
|||
|
||||
- name: Test run (build projection using Windows.winmd)
|
||||
run: |
|
||||
curl -o Windows.winmd -L https://github.com/microsoft/windows-rs/raw/master/crates/libs/metadata/default/Windows.winmd
|
||||
curl -o Windows.winmd -L https://github.com/microsoft/windows-rs/raw/master/crates/libs/bindgen/default/Windows.winmd
|
||||
install/bin/cppwinrt -in Windows.winmd -out build/out -verbose
|
||||
|
||||
build-msvc-natvis:
|
||||
|
|
10
README.md
10
README.md
|
@ -17,9 +17,13 @@ If you really want to build it yourself, the simplest way to do so is to run the
|
|||
|
||||
* Open a dev command prompt pointing at the root of the repo.
|
||||
* Open the `cppwinrt.sln` solution.
|
||||
* Rebuild the x64 Release configuration of the `cppwinrt` project only. Do not attempt to build anything else just yet.
|
||||
* Run `build_projection.cmd` in the dev command prompt.
|
||||
* Switch to the x64 Debug configuration in Visual Studio and build all projects as needed.
|
||||
* Choose a configuration (x64, x86, Release, Debug) and build projects as needed.
|
||||
|
||||
If you are working on an ARM64 or ARM specific issue from an x64 or x86 host, you will need to instead:
|
||||
|
||||
* Open the `cppwinrt.sln` solution
|
||||
* Build the x86 version of the "cppwinrt" project first
|
||||
* Switch to your preferred configuration and build the test binaries and run them in your test environment
|
||||
|
||||
## Comparing Outputs
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ call msbuild /p:Configuration=%target_configuration%,Platform=%target_platform%,
|
|||
if "%target_platform%"=="arm64" goto :eof
|
||||
|
||||
call msbuild /m /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% cppwinrt.sln /t:cppwinrt
|
||||
_build\%target_platform%\%target_configuration%\cppwinrt.exe -in local -out _build\%target_platform%\%target_configuration% -verbose
|
||||
|
||||
call msbuild /p:Configuration=%target_configuration%,Platform=%target_platform%,CppWinRTBuildVersion=%target_version% test\nuget\NugetTest.sln
|
||||
|
||||
|
|
12
cppwinrt.sln
12
cppwinrt.sln
|
@ -1,7 +1,7 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.28606.126
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.6.33829.357
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cppwinrt", "cppwinrt\cppwinrt.vcxproj", "{D613FB39-5035-4043-91E2-BAB323908AF4}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
|
@ -24,6 +24,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Component", "test\old_tests
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Composable", "test\old_tests\Composable\Composable.vcxproj", "{152E4C6E-9A9D-4D5A-B38D-4905D173649A}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270} = {A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270}
|
||||
{D613FB39-5035-4043-91E2-BAB323908AF4} = {D613FB39-5035-4043-91E2-BAB323908AF4}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
|
@ -41,16 +42,19 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test\test\test.vcxp
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_component_folders", "test\test_component_folders\test_component_folders.vcxproj", "{85695954-3800-4558-9857-966E69E9F9EC}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270} = {A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270}
|
||||
{D613FB39-5035-4043-91E2-BAB323908AF4} = {D613FB39-5035-4043-91E2-BAB323908AF4}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_component_no_pch", "test\test_component_no_pch\test_component_no_pch.vcxproj", "{F1C915B3-2C64-4992-AFB7-7F035B1A7607}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270} = {A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270}
|
||||
{D613FB39-5035-4043-91E2-BAB323908AF4} = {D613FB39-5035-4043-91E2-BAB323908AF4}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_component_base", "test\test_component_base\test_component_base.vcxproj", "{13333A6F-6A4A-48CD-865C-0F65135EB018}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270} = {A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270}
|
||||
{D613FB39-5035-4043-91E2-BAB323908AF4} = {D613FB39-5035-4043-91E2-BAB323908AF4}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
|
@ -61,6 +65,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_component_derived", "t
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_component_fast", "test\test_component_fast\test_component_fast.vcxproj", "{0E0ACA62-A92F-44CF-BD41-AEB541946DF8}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270} = {A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270}
|
||||
{D613FB39-5035-4043-91E2-BAB323908AF4} = {D613FB39-5035-4043-91E2-BAB323908AF4}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
|
@ -93,6 +98,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_module_lock_none", "te
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_module_lock_custom", "test\test_module_lock_custom\test_module_lock_custom.vcxproj", "{08C40663-B6A3-481E-8755-AE32BAD99501}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270} = {A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270}
|
||||
{D613FB39-5035-4043-91E2-BAB323908AF4} = {D613FB39-5035-4043-91E2-BAB323908AF4}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
|
@ -107,11 +113,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_win7", "test\test_win7
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_cpp20", "test\test_cpp20\test_cpp20.vcxproj", "{5FF6CD6C-515A-4D55-97B6-62AD9BCB77EA}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270} = {A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270}
|
||||
{D613FB39-5035-4043-91E2-BAB323908AF4} = {D613FB39-5035-4043-91E2-BAB323908AF4}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_cpp20_no_sourcelocation", "test\test_cpp20_no_sourcelocation\test_cpp20_no_sourcelocation.vcxproj", "{D4C8F881-84D5-4A7B-8BDE-AB4E34A05374}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270} = {A91B8BF3-28E4-4D9E-8DBA-64B70E4F0270}
|
||||
{D613FB39-5035-4043-91E2-BAB323908AF4} = {D613FB39-5035-4043-91E2-BAB323908AF4}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
|
|
|
@ -182,18 +182,6 @@
|
|||
<AdditionalMetadataDirectories>C:\Windows\System32\WinMetadata</AdditionalMetadataDirectories>
|
||||
<PrependWithABINamepsace>true</PrependWithABINamepsace>
|
||||
</Midl>
|
||||
<CustomBuildStep>
|
||||
<Command>$(CppWinRTDir)cppwinrt -input $(OutputPath)test_component.winmd -comp "$(ProjectDir)Generated Files" -out "$(ProjectDir)Generated Files" -include test_component -ref sdk -verbose -prefix -opt -lib test -fastabi -overwrite -name test_component</Command>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Message />
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Outputs>Generated Files\module.g.cpp</Outputs>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Inputs>$(OutputPath)test_component.winmd</Inputs>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<ClCompile>
|
||||
|
@ -243,19 +231,6 @@
|
|||
<AdditionalMetadataDirectories>C:\Windows\System32\WinMetadata</AdditionalMetadataDirectories>
|
||||
<PrependWithABINamepsace>true</PrependWithABINamepsace>
|
||||
</Midl>
|
||||
<CustomBuildStep>
|
||||
<Command>$(CppWinRTDir)cppwinrt -input $(OutputPath)test_component.winmd -comp "$(ProjectDir)Generated Files" -out "$(ProjectDir)Generated Files" -include test_component -ref sdk -verbose -prefix -opt -lib test -fastabi -overwrite -name test_component</Command>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Message>
|
||||
</Message>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Outputs>Generated Files\module.g.cpp</Outputs>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Inputs>$(OutputPath)test_component.winmd</Inputs>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
|
||||
<ClCompile>
|
||||
|
@ -305,19 +280,6 @@
|
|||
<AdditionalMetadataDirectories>C:\Windows\System32\WinMetadata</AdditionalMetadataDirectories>
|
||||
<PrependWithABINamepsace>true</PrependWithABINamepsace>
|
||||
</Midl>
|
||||
<CustomBuildStep>
|
||||
<Command>$(CppWinRTDir)cppwinrt -input $(OutputPath)test_component.winmd -comp "$(ProjectDir)Generated Files" -out "$(ProjectDir)Generated Files" -include test_component -ref sdk -verbose -prefix -opt -lib test -fastabi -overwrite -name test_component</Command>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Message>
|
||||
</Message>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Outputs>Generated Files\module.g.cpp</Outputs>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Inputs>$(OutputPath)test_component.winmd</Inputs>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
|
@ -354,18 +316,6 @@
|
|||
<AdditionalMetadataDirectories>C:\Windows\System32\WinMetadata</AdditionalMetadataDirectories>
|
||||
<PrependWithABINamepsace>true</PrependWithABINamepsace>
|
||||
</Midl>
|
||||
<CustomBuildStep>
|
||||
<Command>$(CppWinRTDir)cppwinrt -input $(OutputPath)test_component.winmd -comp "$(ProjectDir)Generated Files" -out "$(ProjectDir)Generated Files" -include test_component -ref sdk -verbose -prefix -opt -lib test -fastabi -overwrite -name test_component</Command>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Message />
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Outputs>Generated Files\module.g.cpp</Outputs>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Inputs>$(OutputPath)test_component.winmd</Inputs>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
|
@ -406,18 +356,6 @@
|
|||
<AdditionalMetadataDirectories>C:\Windows\System32\WinMetadata</AdditionalMetadataDirectories>
|
||||
<PrependWithABINamepsace>true</PrependWithABINamepsace>
|
||||
</Midl>
|
||||
<CustomBuildStep>
|
||||
<Command>$(CppWinRTDir)cppwinrt -input $(OutputPath)test_component.winmd -comp "$(ProjectDir)Generated Files" -out "$(ProjectDir)Generated Files" -include test_component -ref sdk -verbose -prefix -opt -lib test -fastabi -overwrite -name test_component</Command>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Message />
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Outputs>Generated Files\module.g.cpp</Outputs>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Inputs>$(OutputPath)test_component.winmd</Inputs>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<ClCompile>
|
||||
|
@ -471,19 +409,6 @@
|
|||
<AdditionalMetadataDirectories>C:\Windows\System32\WinMetadata</AdditionalMetadataDirectories>
|
||||
<PrependWithABINamepsace>true</PrependWithABINamepsace>
|
||||
</Midl>
|
||||
<CustomBuildStep>
|
||||
<Command>$(CppWinRTDir)cppwinrt -input $(OutputPath)test_component.winmd -comp "$(ProjectDir)Generated Files" -out "$(ProjectDir)Generated Files" -include test_component -ref sdk -verbose -prefix -opt -lib test -fastabi -overwrite -name test_component</Command>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Message>
|
||||
</Message>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Outputs>Generated Files\module.g.cpp</Outputs>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Inputs>$(OutputPath)test_component.winmd</Inputs>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
|
||||
<ClCompile>
|
||||
|
@ -537,19 +462,6 @@
|
|||
<AdditionalMetadataDirectories>C:\Windows\System32\WinMetadata</AdditionalMetadataDirectories>
|
||||
<PrependWithABINamepsace>true</PrependWithABINamepsace>
|
||||
</Midl>
|
||||
<CustomBuildStep>
|
||||
<Command>$(CppWinRTDir)cppwinrt -input $(OutputPath)test_component.winmd -comp "$(ProjectDir)Generated Files" -out "$(ProjectDir)Generated Files" -include test_component -ref sdk -verbose -prefix -opt -lib test -fastabi -overwrite -name test_component</Command>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Message>
|
||||
</Message>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Outputs>Generated Files\module.g.cpp</Outputs>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Inputs>$(OutputPath)test_component.winmd</Inputs>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
|
@ -590,17 +502,16 @@
|
|||
<AdditionalMetadataDirectories>C:\Windows\System32\WinMetadata</AdditionalMetadataDirectories>
|
||||
<PrependWithABINamepsace>true</PrependWithABINamepsace>
|
||||
</Midl>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<CustomBuildStep>
|
||||
<Command>$(CppWinRTDir)cppwinrt -input $(OutputPath)test_component.winmd -comp "$(ProjectDir)Generated Files" -out "$(ProjectDir)Generated Files" -include test_component -ref sdk -verbose -prefix -opt -lib test -fastabi -overwrite -name test_component</Command>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Message />
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Outputs>Generated Files\module.g.cpp</Outputs>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Inputs>$(OutputPath)test_component.winmd</Inputs>
|
||||
<Command>
|
||||
$(CppWinRTDir)cppwinrt -in local -out $(OutputPath) -verbose
|
||||
$(CppWinRTDir)cppwinrt -input $(OutputPath)test_component.winmd -comp "$(ProjectDir)Generated Files" -out "$(ProjectDir)Generated Files" -include test_component -ref sdk -verbose -prefix -opt -lib test -fastabi -overwrite -name test_component
|
||||
</Command>
|
||||
<Message>Projecting Windows and component metadata into $(OutputPath)</Message>
|
||||
<Outputs>$(OutputPath)\winrt\base.h;Generated Files\module.g.cpp</Outputs>
|
||||
<Inputs>$(CppWinRTDir)cppwinrt.exe;$(OutputPath)test_component.winmd</Inputs>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
|
Загрузка…
Ссылка в новой задаче