From 625b7343d2f3bed1d26a68e663bb1afcbb523278 Mon Sep 17 00:00:00 2001
From: Ryan Fu <69221034+ryfu-msft@users.noreply.github.com>
Date: Thu, 30 Sep 2021 12:34:48 -0700
Subject: [PATCH] Add C++ runtime framework binaries to self-contained exe
(#181)
* add copy task
* try **
* test
* test 2
* addappx task
* show dir
* install dependency directly
* fix formatting
* show directory
* add double quotes
* remove show dir
* try again
* Revert pipeline and include binary items in build
* specify source folder
* fix /
* try without quotes
* extract appx
* test build
* fix csproj
* remove line changes
---
pipelines/azure-pipelines.release.yml | 16 ++++++++++++++++
src/WingetCreateCLI/WingetCreateCLI.csproj | 14 +++++++++++++-
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/pipelines/azure-pipelines.release.yml b/pipelines/azure-pipelines.release.yml
index 48782390..eeb351ac 100644
--- a/pipelines/azure-pipelines.release.yml
+++ b/pipelines/azure-pipelines.release.yml
@@ -90,6 +90,22 @@ jobs:
source: 'minkernel\published\internal\telemetry\TelemetryEventSource.cs'
destination: '$(workingDirectory)\WingetCreateCLI\Telemetry\'
+ # Copies binary dependencies from VCLibs package to be included in standalone exe
+ - task: PowerShell@2
+ displayName: Download VCLibs package
+ inputs:
+ targetType: 'inline'
+ script: |
+ iwr https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile Microsoft.VCLibs.x64.14.00.Desktop.appx
+
+ - task: ExtractFiles@1
+ displayName: Extract files from VCLibs appx
+ inputs:
+ archiveFilePatterns: 'Microsoft.VCLibs.x64.14.00.Desktop.appx'
+ destinationFolder: '$(workingDirectory)\WingetCreateCLI'
+ cleanDestinationFolder: false
+ overwriteExistingFiles: false
+
# NuGetCommand task, but since there are two duplicate tasks by this name in the org, must refer to it by GUID
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
displayName: Restore Packages
diff --git a/src/WingetCreateCLI/WingetCreateCLI.csproj b/src/WingetCreateCLI/WingetCreateCLI.csproj
index 2bb81994..5a36a9fe 100644
--- a/src/WingetCreateCLI/WingetCreateCLI.csproj
+++ b/src/WingetCreateCLI/WingetCreateCLI.csproj
@@ -77,6 +77,19 @@
PublicResXFileCodeGenerator
+
+
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
@@ -100,5 +113,4 @@
$(TargetFrameworkSDKToolsDirectory)$(PlatformTarget)\
-
\ No newline at end of file