Skip to content

Commit

Permalink
Merge pull request #1199 from microsoft/main
Browse files Browse the repository at this point in the history
Merge 'main' into 'release/cpptools'
  • Loading branch information
WardenGnaw authored Aug 13, 2021
2 parents c3aefaa + d30bcc0 commit 946cea4
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 12 deletions.
15 changes: 12 additions & 3 deletions eng/pipelines/steps/PublishOpenDebugAD7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,21 @@ steps:
copy ${{ parameters.SignedBinariesFolder }}\Release\Microsoft.MICore.dll $(Build.StagingDirectory)\${{ parameters.RuntimeID }}\debugAdapters\bin\.
displayName: "Publish OpenDebugAD7 ${{ parameters.RuntimeID }}"

# Windows Steps for copying over OpenDebugAD7.exe, WindowsDebugLauncher.exe, and verify the windows binaries.
# Windows Steps for signing OpenDebugAD7.exe, copying over WindowsDebugLauncher.exe, and verify the windows binaries.
- ${{ if startsWith(parameters.RuntimeID, 'win') }}:
- template: ../tasks/MSBuild.yml
parameters:
DisplayName: "Sign OpenDebugAD7.exe"
solution: $(Build.SourcesDirectory)\src\OpenDebugAD7\OpenDebugAD7.csproj
configuration: ${{ parameters.Configuration }}
msbuildArguments: '/t:SignPublishedFiles /p:PublishPath=$(Build.StagingDirectory)\${{ parameters.RuntimeID }}\debugAdapters\bin'
env: {
"SIGN_TYPE": "$(SignType)"
}

- script: |
copy ${{ parameters.SignedBinariesFolder }}\Release\vscode\OpenDebugAD7.exe $(Build.StagingDirectory)\${{ parameters.RuntimeID }}\debugAdapters\bin\.
copy ${{ parameters.SignedBinariesFolder }}\Release\vscode\WindowsDebugLauncher.exe $(Build.StagingDirectory)\${{ parameters.RuntimeID }}\debugAdapters\bin\.
displayName: "Copy OpenDebugAD7.exe and WindowsDebugLauncher.exe"
displayName: "Copy WindowsDebugLauncher.exe"
- template: ../tasks/SignVerify.yml
parameters:
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/VSCode-release.template.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
parameters:
rids: ["win7-x86", "win-x64", "win10-arm64", "osx-x64", "linux-x64", "linux-arm", "linux-arm64", "linux-musl-x64" ]
rids: ["win-x86", "win10-arm64", "osx-x64", "linux-x64", "linux-arm", "linux-arm64", "linux-musl-x64" ]

steps:
- checkout: self
Expand Down
1 change: 0 additions & 1 deletion src/DebugEngineHost.VSCode/DebugEngineHost.VSCode.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<OutputPath>$(MIDefaultOutputPath)\vscode</OutputPath>
<DropSubDir>vscode</DropSubDir>
<TargetFramework>netstandard2.0</TargetFramework>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>

<ItemGroup Label="Compile Shared Interfaces">
Expand Down
1 change: 0 additions & 1 deletion src/MICore/MICore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
would take a fair amount of work.-->
<NoWarn>$(NoWarn);1591</NoWarn>
<TargetFramework>netstandard2.0</TargetFramework>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<None Include="SGEN_SHA2_SIGNATUREKEY" />
Expand Down
12 changes: 10 additions & 2 deletions src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,11 @@ private async Task<List<LaunchCommand>> GetInitializeCommands()
commands.Add(new LaunchCommand("-target-attach " + _launchOptions.ProcessId.Value.ToString(CultureInfo.InvariantCulture), ignoreFailures: false, failureHandler: failureHandler));
}

commands.AddRange(_launchOptions.PostRemoteConnectCommands);
if (_launchOptions.PostRemoteConnectCommands != null)
{
commands.AddRange(_launchOptions.PostRemoteConnectCommands);
}


if (this.MICommandFactory.Mode == MIMode.Lldb)
{
Expand Down Expand Up @@ -832,7 +836,11 @@ private async Task<List<LaunchCommand>> GetInitializeCommands()
}

}
commands.AddRange(_launchOptions.PostRemoteConnectCommands);

if (_launchOptions.PostRemoteConnectCommands != null)
{
commands.AddRange(_launchOptions.PostRemoteConnectCommands);
}

// Environment variables are set for the debuggee only with the modes that support that
foreach (EnvironmentEntry envEntry in _launchOptions.Environment)
Expand Down
1 change: 0 additions & 1 deletion src/MIDebugEngine/MIDebugEngine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputPath>$(MIDefaultOutputPath)</OutputPath>
<TargetFramework>netstandard2.0</TargetFramework>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/OpenDebugAD7/AD7DebugSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ protected override void HandleInitializeRequestAsync(IRequestResponder<Initializ
SupportsModulesRequest = true,
AdditionalModuleColumns = additionalModuleColumns,
SupportsGotoTargetsRequest = true,
SupportsDisassembleRequest = true,
SupportsDisassembleRequest = m_engine is IDebugMemoryBytesDAP,
SupportsValueFormattingOptions = true,
SupportsSteppingGranularity = true,
};
Expand Down
38 changes: 36 additions & 2 deletions src/OpenDebugAD7/OpenDebugAD7.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<OutputType>Exe</OutputType>
<DropSubDir>vscode</DropSubDir>
<TargetFramework>net5.0</TargetFramework>
<Prefer32Bit>false</Prefer32Bit>

<!--
For non-Windows platforms, .NET Core depends on libicu for data about locales and international settings.
Expand Down Expand Up @@ -75,7 +74,6 @@
<ItemGroup Label="Drop Files">
<DropSignedFile Include="$(OutputPath)\OpenDebugAD7.dll" />
<DropUnsignedFile Include="$(OutputPath)\OpenDebugAD7.pdb" />
<DropSignedFile Condition="$([MSBuild]::IsOSPlatform('windows')) AND ('$(RuntimeIdentifier)' == '' OR $(RuntimeIdentifier.Contains('win')))" Include="$(OutputPath)\OpenDebugAD7.exe" />
<!-- We will build OpenDebugAD7 via publish for non-windows -->
<DropThirdPartySignedFile Include="$(OutputPath)\Newtonsoft.Json.dll" />
<DropUnsignedFile Include="$(OutputPath)\Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.dll" />
Expand All @@ -90,4 +88,40 @@
<OutputType>Exe</OutputType>
</PropertyGroup>
</Target>

<!--
Run Target to Sign Published Files if we have:
1. The Microbuild Tools
2. On Windows without an RID or targeting Windows RIDs
This target needs to be run directly with /t and /p:PublishPath needs to be set.
-->
<Target Name="SignPublishedFiles" BeforeTargets="" AfterTargets="">
<Error
Condition="'$(PkgMicrosoft_VisualStudioEng_MicroBuild_Core)'=='' and '$(Lab)'!='false' and '$(TEST_LAB_BUILD)'=='' and '$(BUILD_BUILDURI)'!=''"
Text="Microsoft.VisualStudioEng.MicroBuild.Core needs to be added as a PackageReference for SignFiles."
/>
<Error Condition="'$(PublishPath)'==''" Text="PublishPath needs to be set for SignPublishedFiles target." />

<ItemGroup>
<PublishFileToSign Include="$(PublishPath)\OpenDebugAD7.exe" />
</ItemGroup>

<ItemGroup Condition="'$(SIGN_TYPE)' == 'real'">
<!-- Real Signed -->
<PublishedFilesToSign Include="@(PublishFileToSign)">
<Authenticode>Microsoft400</Authenticode>
<StrongName>StrongNameSHA2</StrongName>
</PublishedFilesToSign>
</ItemGroup>

<ItemGroup Condition="'$(SIGN_TYPE)' != 'real'">
<!-- Test Signed -->
<PublishedFilesToSign Include="@(PublishFileToSign)">
<Authenticode>Microsoft400</Authenticode>
</PublishedFilesToSign>
</ItemGroup>

<SignFiles Files="@(PublishedFilesToSign)" Type="$(SIGN_TYPE)" BinariesDirectory="$(PublishPath)" IntermediatesDirectory="$(IntermediateOutputPath)" ESRPSigning="$(ESRPSigning)" UseBearerToken="$(UseBearerToken)" />
</Target>
</Project>

0 comments on commit 946cea4

Please sign in to comment.