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