1
1
param (
2
- [string ]$config = " Release" ,
2
+ [string ]$config = " Release" ,
3
3
[string ]$solution = (Join-Path $PSScriptRoot " .." - Resolve)
4
4
)
5
5
Write-Host " Config: $config "
@@ -40,13 +40,11 @@ function Delete-Unused ($path, $config) {
40
40
$target = " $path \Output\$config "
41
41
$included = Get-ChildItem $target - Filter " *.dll"
42
42
foreach ($i in $included ){
43
- foreach ($plugin in Get-ChildItem $target \Plugins){
44
- $deleteList = Get-ChildItem $plugin - Filter $i.Name | Where { $_.VersionInfo.FileVersion -eq $i.VersionInfo.FileVersion -And $_.Name -eq $i.Name }
45
- $deleteList | ForEach-Object { Write-Host Deleting duplicated $_.Name with version $_.VersionInfo.FileVersion at location $_.Directory.FullName }
46
- $deleteList | Remove-Item
47
- }
43
+ $deleteList = Get-ChildItem $target \Plugins - Include $i - Recurse | Where { $_.VersionInfo.FileVersion -eq $i.VersionInfo.FileVersion -And $_.Name -eq " $i " }
44
+ $deleteList | ForEach-Object { Write-Host Deleting duplicated $_.Name with version $_.VersionInfo.FileVersion at location $_.Directory.FullName }
45
+ $deleteList | Remove-Item
48
46
}
49
- Remove-Item - Path $target - Include " *.xml" - Recurse
47
+ Remove-Item - Path $target - Include " *.xml" - Recurse
50
48
}
51
49
52
50
function Remove-CreateDumpExe ($path , $config ) {
@@ -89,7 +87,7 @@ function Pack-Squirrel-Installer ($path, $version, $output) {
89
87
Squirrel -- releasify $nupkg -- releaseDir $temp -- setupIcon $icon -- no- msi | Write-Output
90
88
Move-Item $temp \* $output - Force
91
89
Remove-Item $temp
92
-
90
+
93
91
$file = " $output \Flow-Launcher-Setup.exe"
94
92
Write-Host " Filename: $file "
95
93
@@ -109,7 +107,7 @@ function Publish-Self-Contained ($p) {
109
107
}
110
108
111
109
function Publish-Portable ($outputLocation , $version ) {
112
-
110
+
113
111
& $outputLocation \Flow-Launcher-Setup.exe -- silent | Out-Null
114
112
mkdir " $env: LocalAppData \FlowLauncher\app-$version \UserData"
115
113
Compress-Archive - Path $env: LocalAppData \FlowLauncher - DestinationPath $outputLocation \Flow- Launcher- Portable.zip
@@ -121,7 +119,7 @@ function Main {
121
119
Copy-Resources $p
122
120
123
121
if ($config -eq " Release" ){
124
-
122
+
125
123
Delete- Unused $p $config
126
124
127
125
Publish-Self - Contained $p
@@ -136,4 +134,4 @@ function Main {
136
134
}
137
135
}
138
136
139
- Main
137
+ Main
0 commit comments