Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add localized files & packaging support #1155

Merged
merged 16 commits into from
May 16, 2022
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions build/AzurePipelineTemplates/CsWinRT-LocalizeResources-Stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,58 @@ stages:
cultureMappingType: 'None'
gitAction: NONE

# Sign TDBuild Output
- task: EsrpCodeSigning@1
displayName: ESRP CodeSigning
inputs:
ConnectedServiceName: 81cc6790-027c-4ef3-928d-65e8b96a691a
FolderPath: $(LocOutputDir)
Pattern: |
release_x64\de-DE\WinRT.Host.dll.mui
release_x64\es-ES\WinRT.Host.dll.mui
release_x64\fr-FR\WinRT.Host.dll.mui
release_x64\it-IT\WinRT.Host.dll.mui
release_x64\ja-JP\WinRT.Host.dll.mui
release_x64\ko-KR\WinRT.Host.dll.mui
release_x64\pt-BR\WinRT.Host.dll.mui
release_x64\ru-RU\WinRT.Host.dll.mui
release_x64\zh-CN\WinRT.Host.dll.mui
release_x64\zh-TW\WinRT.Host.dll.mui
UseMinimatch: true
signConfigType: inlineSignParams
inlineOperation: |
[
{
"keyCode": "CP-230012",
"operationSetCode": "SigntoolSign",
"parameters": [
{
"parameterName": "OpusName",
"parameterValue": "Microsoft"
},
{
"parameterName": "OpusInfo",
"parameterValue": "http://www.microsoft.com"
},
{
"parameterName": "PageHash",
"parameterValue": "/NPH"
},
{
"parameterName": "FileDigest",
"parameterValue": "/fd sha256"
},
{
"parameterName": "TimeStamp",
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
}
],
"toolName": "signtool.exe",
"toolVersion": "6.2.9304.0"
}
]


# Stage TDBuild Output
- task: CopyFiles@2
displayName: Stage TouchdownBuild Output
Expand Down
2 changes: 2 additions & 0 deletions build/AzurePipelineTemplates/CsWinRT-PublishToNuget-Stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ stages:
net5.0\WinRT.Runtime.dll
net5.0\WinRT.Host.Shim.dll
release_x64\WinRT.Host.dll
release_x64\WinRT.Host.dll.mui
release_x86\WinRT.Host.dll
release_x86\WinRT.Host.dll.mui
release_arm64\WinRT.Host.dll
j0shuams marked this conversation as resolved.
Show resolved Hide resolved
net5.0\IIDOptimizer\IIDOptimizer.exe
net5.0\IIDOptimizer\IIDOptimizer.dll
Expand Down
4 changes: 2 additions & 2 deletions nuget/Microsoft.Windows.CsWinRT.Authoring.targets
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ Copyright (C) Microsoft Corporation. All rights reserved.
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>

<None Condition="Exists('$(CsWinRTPath)hosting\$(CsWinRTAuthoring_Platform)\native\en-us\WinRT.Host.dll.mui')"
Include="$(CsWinRTPath)hosting\$(CsWinRTAuthoring_Platform)\native\en-us\WinRT.Host.dll.mui">
<None Condition="Exists('$(CsWinRTPath)hosting\$(CsWinRTAuthoring_Platform)\native\en-US\WinRT.Host.dll.mui')"
Include="$(CsWinRTPath)hosting\$(CsWinRTAuthoring_Platform)\native\en-US\WinRT.Host.dll.mui">
<TargetPath>WinRT.Host.dll.mui</TargetPath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down
22 changes: 17 additions & 5 deletions nuget/Microsoft.Windows.CsWinRT.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,24 @@
<file src="$winrt_host_x86$" target ="hosting\x86\native"/>
<file src="$winrt_host_arm$" target ="hosting\arm\native"/>
<file src="$winrt_host_arm64$" target ="hosting\arm64\native"/>
<file src="$winrt_host_resource_x64$" target ="hosting\x64\native\en-us"/>
<file src="$winrt_host_resource_x86$" target ="hosting\x86\native\en-us"/>
<file src="$winrt_host_resource_arm$" target ="hosting\arm\native\en-us"/>
<file src="$winrt_host_resource_arm64$" target ="hosting\arm64\native\en-us"/>
<file src="$winrt_shim$" target ="lib\net5.0\"/>


<!-- Localized resources for error strings
The paths here leads to a folder of folders,
wherein the folders are the resources for a particular locale/cultures.
E.g. fr-FR/WinRT.Host.dll.mui -->
<file src="..\src\Authoring\WinRT.Host\MUI\**" target ="hosting\x64\native"/>
j0shuams marked this conversation as resolved.
Show resolved Hide resolved
<file src="..\src\Authoring\WinRT.Host\MUI\**" target ="hosting\x86\native"/>
<file src="..\src\Authoring\WinRT.Host\MUI\**" target ="hosting\arm\native"/>
<file src="..\src\Authoring\WinRT.Host\MUI\**" target ="hosting\arm64\native"/>
<file src="$winrt_host_resource_x64$" target ="hosting\x64\native\en-US"/>
<file src="$winrt_host_resource_x86$" target ="hosting\x86\native\en-US"/>
<file src="$winrt_host_resource_arm$" target ="hosting\arm\native\en-US"/>
<file src="$winrt_host_resource_arm64$" target ="hosting\arm64\native\en-US"/>

<file src="..\src\WinRT.Runtime\ResX\**" target ="lib\net5.0\"/>
<file src="..\src\Authoring\WinRT.SourceGenerator\ResX\**" target ="analyzers\dotnet\cs\"/>

<!-- Add the WinRT.Runtime sources to the pkg for embedded scenarios -->

<file src="..\src\WinRT.Runtime\*.cs" exclude="..\src\WinRT.Runtime\*.net*.cs" target="embedded\any\" />
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading