From 88d7b22df2f6ba9711497cac24f9fa3ba6b52bab Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 24 Jun 2021 12:38:18 +0800 Subject: [PATCH] remove createdump.exe --- Scripts/post_build.ps1 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index 53dc7cf1f..34c010b69 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -56,10 +56,21 @@ function Delete-Unused ($path, $config) { Remove-Item -Path $target -Include "*.xml" -Recurse } +function Remove-CreateDumpExe ($path, $config) { + $target = "$path\Output\$config" + + $depjson = Get-Content $target\Flow.Launcher.deps.json -raw |ConvertFrom-Json -depth 32 + $depjson.targets.'.NETCoreApp,Version=v5.0/win-x64'.'runtimepack.Microsoft.NETCore.App.Runtime.win-x64/5.0.6'.native.PSObject.Properties.Remove("createdump.exe") + $depjson|ConvertTo-Json -Depth 32|Out-File $target\Flow.Launcher.deps.json + Remove-Item -Path $target -Include "*createdump.exe" -Recurse +} + + function Validate-Directory ($output) { New-Item $output -ItemType Directory -Force } + function Pack-Squirrel-Installer ($path, $version, $output) { # msbuild based installer generation is not working in appveyor, not sure why Write-Host "Begin pack squirrel installer" @@ -118,6 +129,8 @@ function Main { Publish-Self-Contained $p + Remove-CreateDumpExe $p $config + $o = "$p\Output\Packages" Validate-Directory $o Pack-Squirrel-Installer $p $v $o