Skip to content

Commit

Permalink
change name
Browse files Browse the repository at this point in the history
  • Loading branch information
j0shuams committed May 24, 2021
1 parent a5da964 commit 6ce7b4e
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 25 deletions.
2 changes: 1 addition & 1 deletion nuget/Microsoft.Windows.CsWinRT.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
<file src="$winrt_host_arm$" target ="runtimes\win-arm\native"/>
<file src="$winrt_host_arm64$" target ="runtimes\win-arm64\native"/>
<file src="$winrt_shim$" target ="lib\net5.0\"/>
<file src="$guid_patch$" target ="build\tools\GuidPatch"/>
<file src="$guid_patch$" target ="build\tools\IIDOptimizer"/>
</files>
</package>
27 changes: 12 additions & 15 deletions nuget/Microsoft.Windows.CsWinRT.targets
Original file line number Diff line number Diff line change
Expand Up @@ -148,34 +148,31 @@ $(CsWinRTFilters)
</Target>

<!-- Call The GuidPatch tool on the projection .dll -->
<Target Name="CsWinRTInvokeGuidPatcher" Condition="'$(CsWinRTGuidPatchOptOut)' != 'true'" AfterTargets="Compile" BeforeTargets="Link">
<Target Name="CsWinRTInvokeGuidPatcher" Condition="'$(CsWinRTIIDOptimizerOptOut)' != 'true'" AfterTargets="Compile" BeforeTargets="Link">

<!-- You can use a Directory.Build.props file to set two properties as the path to the patcher and the winrt.runtime used
- CsWinRTGuidPatchPath
- CsWinRTGuidPatchRuntimeDll
-->
<Message Text="CsWinRTGuidPatchPath = $(CsWinRTGuidPatchPath)"/>
<Message Text="CsWinRTGuidPatchRuntimePath = $(CsWinRTGuidPatchRuntimePath)"/>
<!-- todo: cut in final commi, for debugging only -->
<Message Text="CsWinRTIIDOptimizerPath = $(CsWinRTIIDOptimizerPath)"/>
<Message Text="CsWinRTIIDOptimizerRuntimePath = $(CsWinRTIIDOptimizerRuntimePath)"/>

<!-- We condition on CsWinRTGuidPatchPath and CsWinRTGuidPatchRuntimeDll in case we are doing a local (CsWinRT repo) build -->
<!-- We condition on CsWinRTIIDOptimizerPath and CsWinRTIIDOptimizerRuntimeDll in case we are doing a local (CsWinRT repo) build -->
<PropertyGroup>
<CsWinRTGuidPatchExePath Condition="'$(CsWinRTGuidPatchPath)' != ''">$(CsWinRTGuidPatchPath)</CsWinRTGuidPatchExePath>
<CsWinRTGuidPatchRuntimeDll Condition="'$(CsWinRTGuidPatchRuntimePath)' != ''">$(CsWinRTGuidPatchRuntimePath)</CsWinRTGuidPatchRuntimeDll>
<CsWinRTIIDOptimizerExePath Condition="'$(CsWinRTIIDOptimizerPath)' != ''">$(CsWinRTIIDOptimizerPath)</CsWinRTIIDOptimizerExePath>
<CsWinRTIIDOptimizerRuntimeDll Condition="'$(CsWinRTIIDOptimizerRuntimePath)' != ''">$(CsWinRTIIDOptimizerRuntimePath)</CsWinRTIIDOptimizerRuntimeDll>

<CsWinRTGuidPatchExePath Condition="'$(CsWinRTGuidPatchPath)' == ''">$(CsWinRTPath)build\tools\GuidPatch\</CsWinRTGuidPatchExePath>
<CsWinRTGuidPatchRuntimeDll Condition="'$(CsWinRTGuidPatchRuntimePath)' == ''">$(CsWinRTPath)lib\net5.0\</CsWinRTGuidPatchRuntimeDll>
<CsWinRTIIDOptimizerExePath Condition="'$(CsWinRTIIDOptimizerPath)' == ''">$(CsWinRTPath)build\tools\GuidPatch\</CsWinRTIIDOptimizerExePath>
<CsWinRTIIDOptimizerRuntimeDll Condition="'$(CsWinRTIIDOptimizerRuntimePath)' == ''">$(CsWinRTPath)lib\net5.0\</CsWinRTIIDOptimizerRuntimeDll>

<!-- Below "BuildProjectOutputGroupKeyOutput" is using the obj folder, reconsider... -->
<CsWinRTGuidPatchInput Condition="'$(CsWinRTGuidPatchInput)' == ''">@(BuiltProjectOutputGroupKeyOutput->'%(Identity)')</CsWinRTGuidPatchInput>
<CsWinRTIIDOptimizerInput Condition="'$(CsWinRTIIDOptimizerInput)' == ''">@(BuiltProjectOutputGroupKeyOutput->'%(Identity)')</CsWinRTIIDOptimizerInput>
</PropertyGroup>

<Exec Command="$(CsWinRTGuidPatchExePath)GuidPatch.exe $(CsWinRTGuidPatchInput) $(CsWinRTGuidPatchRuntimeDll)"
<Exec Command="$(CsWinRTIIDOptimizerExePath)IIDOptimizer.exe $(CsWinRTIIDOptimizerInput) $(CsWinRTIIDOptimizerRuntimeDll)"
ConsoleToMsBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="CsWinRTGuidPatchOutput" />
</Exec>

<ItemGroup>
<CsWinRTGuidPatchedFiles Include="$(MSBuildProjectDirectory)\obj\GuidPatcherOutput\*.dll" />
<CsWinRTGuidPatchedFiles Include="$(MSBuildProjectDirectory)\obj\IIDOptimizer\*.dll" />
</ItemGroup>

<!-- Replace the .dll in the output folder with the optimized version we just made -->
Expand Down
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
</PropertyGroup>

<PropertyGroup>
<CsWinRTGuidPatchPath>$(MSBuildThisFileDirectory)Perf\GuidPatch\bin\$(Platform)\$(Configuration)\net5.0\</CsWinRTGuidPatchPath>
<CsWinRTGuidPatchRuntimePath>$(MSBuildThisFileDirectory)WinRT.Runtime\bin\$(Configuration)\net5.0\</CsWinRTGuidPatchRuntimePath>
<CsWinRTIIDOptimizerPath>$(MSBuildThisFileDirectory)Perf\IIDOptimizer\bin\$(Configuration)\net5.0\</CsWinRTIIDOptimizerPath>
<CsWinRTIIDOptimizerRuntimePath>$(MSBuildThisFileDirectory)WinRT.Runtime\bin\$(Configuration)\net5.0\</CsWinRTIIDOptimizerRuntimePath>
</PropertyGroup>

<PropertyGroup>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ static void Main(string[] args)
resolver,
winRTRuntimeAssembly);
int numPatches = guidPatcher.ProcessAssembly();
Directory.CreateDirectory("obj\\GuidPatcherOutput");
guidPatcher.SaveAssembly("obj\\GuidPatcherOutput");
Directory.CreateDirectory("obj\\IIDOptimizer");
guidPatcher.SaveAssembly("obj\\IIDOptimizer");
Console.WriteLine($"{numPatches} IID calculations/fetches patched");
}
catch (AssemblyResolutionException)
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/Tests/AuthoringTest/AuthoringTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<!-- Enable to diagnose generation issues -->
<!-- <CsWinRTEnableLogging>true</CsWinRTEnableLogging> -->
<!-- <CsWinRTKeepGeneratedSources>true</CsWinRTKeepGeneratedSources> -->
<CsWinRTGuidPatchOptOut>true</CsWinRTGuidPatchOptOut>
<CsWinRTIIDOptimizerOptOut>true</CsWinRTIIDOptimizerOptOut>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/DiagnosticTests/DiagnosticTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net5.0-windows10.0.19041.0</TargetFramework>
<IsPackable>false</IsPackable>
<CsWinRTGuidPatchOptOut>true</CsWinRTGuidPatchOptOut>
<CsWinRTIIDOptimizerOptOut>true</CsWinRTIIDOptimizerOptOut>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/UnitTest/UnitTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<SimulateCsWinRTNugetReference>true</SimulateCsWinRTNugetReference>
<CsWinRTEnabled>false</CsWinRTEnabled>
<CsWinRTGuidPatchOptOut>true</CsWinRTGuidPatchOptOut>
<CsWinRTIIDOptimizerOptOut>true</CsWinRTIIDOptimizerOptOut>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ set net5_runtime=%this_dir%WinRT.Runtime\bin\%cswinrt_configuration%\net5.0\WinR
set source_generator=%this_dir%Authoring\WinRT.SourceGenerator\bin\%cswinrt_configuration%\netstandard2.0\WinRT.SourceGenerator.dll
set winrt_host_%cswinrt_platform%=%this_dir%_build\%cswinrt_platform%\%cswinrt_configuration%\WinRT.Host\bin\WinRT.Host.dll
set winrt_shim=%this_dir%Authoring\WinRT.Host.Shim\bin\%cswinrt_configuration%\net5.0\WinRT.Host.Shim.dll
set guid_patch=%this_dir%Perf\GuidPatch\bin\%cswinrt_platform%\%cswinrt_configuration%\net5.0\*.*
set guid_patch=%this_dir%Perf\IIDOptimizer\bin\%cswinrt_configuration%\net5.0\*.*
echo Creating nuget package
call :exec %nuget_dir%\nuget pack %this_dir%..\nuget\Microsoft.Windows.CsWinRT.nuspec -Properties cswinrt_exe=%cswinrt_exe%;netstandard2_runtime=%netstandard2_runtime%;net5_runtime=%net5_runtime%;source_generator=%source_generator%;cswinrt_nuget_version=%cswinrt_version_string%;winrt_host_x86=%winrt_host_x86%;winrt_host_x64=%winrt_host_x64%;winrt_host_arm=%winrt_host_arm%;winrt_host_arm64=%winrt_host_arm64%;winrt_shim=%winrt_shim%;guid_patch=%guid_patch% -OutputDirectory %cswinrt_bin_dir% -NonInteractive -Verbosity Detailed -NoPackageAnalysis
goto :eof
Expand Down
2 changes: 1 addition & 1 deletion src/cswinrt.sln
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AuthoringWinUITest", "Tests
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Perf", "Perf", "{539DBDEF-3B49-4503-9BD3-7EB83C2179CB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GuidPatch", "Perf\GuidPatch\GuidPatch.csproj", "{AE3B0611-2FBB-42AB-A245-B4E79868A5F9}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IIDOptimizer", "Perf\IIDOptimizer\IIDOptimizer.csproj", "{AE3B0611-2FBB-42AB-A245-B4E79868A5F9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down

0 comments on commit 6ce7b4e

Please sign in to comment.