From d03be75184aca68fc3f40abd30a54a8fdc8b21d0 Mon Sep 17 00:00:00 2001 From: ryanbodrug-microsoft <56318517+ryanbodrug-microsoft@users.noreply.github.com> Date: Thu, 9 Apr 2020 09:42:36 -0700 Subject: [PATCH] Removing unused post build and deploy scripts. --- src/modules/launcher/Deploy/local_build.ps1 | 4 - .../PowerLauncher/PowerLauncher.csproj | 8 - src/modules/launcher/Scripts/post_build.ps1 | 140 ------------------ src/modules/launcher/Scripts/wox.nuspec | 16 -- .../launcher/Scripts/wox.plugin.nuspec | 16 -- src/modules/launcher/Wox/Wox.csproj | 5 - 6 files changed, 189 deletions(-) delete mode 100644 src/modules/launcher/Deploy/local_build.ps1 delete mode 100644 src/modules/launcher/Scripts/post_build.ps1 delete mode 100644 src/modules/launcher/Scripts/wox.nuspec delete mode 100644 src/modules/launcher/Scripts/wox.plugin.nuspec diff --git a/src/modules/launcher/Deploy/local_build.ps1 b/src/modules/launcher/Deploy/local_build.ps1 deleted file mode 100644 index 9dd7582b19..0000000000 --- a/src/modules/launcher/Deploy/local_build.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -New-Alias nuget.exe ".\packages\NuGet.CommandLine.*\tools\NuGet.exe" -$env:APPVEYOR_BUILD_FOLDER = Convert-Path . -$env:APPVEYOR_BUILD_VERSION = "1.2.0" -& .\Deploy\squirrel_installer.ps1 \ No newline at end of file diff --git a/src/modules/launcher/PowerLauncher/PowerLauncher.csproj b/src/modules/launcher/PowerLauncher/PowerLauncher.csproj index 9e2eed8b44..51061edb9c 100644 --- a/src/modules/launcher/PowerLauncher/PowerLauncher.csproj +++ b/src/modules/launcher/PowerLauncher/PowerLauncher.csproj @@ -188,12 +188,4 @@ Settings.Designer.cs - - - - - - - - \ No newline at end of file diff --git a/src/modules/launcher/Scripts/post_build.ps1 b/src/modules/launcher/Scripts/post_build.ps1 deleted file mode 100644 index 50a8f3f131..0000000000 --- a/src/modules/launcher/Scripts/post_build.ps1 +++ /dev/null @@ -1,140 +0,0 @@ -param( - [string]$config = "Release", - [string]$solution -) -Write-Host "Config: $config" - -function Build-Version { - if ([string]::IsNullOrEmpty($env:APPVEYOR_BUILD_VERSION)) { - $v = "1.2.0" - } else { - $v = $env:APPVEYOR_BUILD_VERSION - } - - Write-Host "Build Version: $v" - return $v -} - -function Build-Path { - if (![string]::IsNullOrEmpty($env:APPVEYOR_BUILD_FOLDER)) { - $p = $env:APPVEYOR_BUILD_FOLDER - } elseif (![string]::IsNullOrEmpty($solution)) { - $p = $solution - } else { - $p = Get-Location - } - - Write-Host "Build Folder: $p" - Set-Location $p - - return $p -} - -function Copy-Resources ($path, $config) { - $project = "$path\Wox" - $output = "$path\..\..\..\x64\$config\modules" - $target = "$output\launcher" - Copy-Item -Recurse -Force $project\Themes\* $target\Themes\ - Copy-Item -Recurse -Force $project\Images\* $target\Images\ - Copy-Item -Recurse -Force $path\Plugins\HelloWorldPython $target\Plugins\HelloWorldPython - Copy-Item -Recurse -Force $path\JsonRPC $target\JsonRPC - Copy-Item -Force %userprofile%\.nuget\packages\squirrel*\tools\Squirrel.exe $output\Update.exe -} - -function Delete-Unused ($path, $config) { - $target = "$path\..\..\..\x64\$config" - $included = Get-ChildItem $target -Filter "*.dll" - foreach ($i in $included){ - Remove-Item -Path $target\Plugins -Include $i -Recurse - Write-Host "Deleting duplicated $i" - } - Remove-Item -Path $target -Include "*.xml" -Recurse -} - -function Validate-Directory ($output) { - New-Item $output -ItemType Directory -Force -} - -function Pack-Nuget ($path, $version, $output) { - Write-Host "Begin build nuget library" - - $spec = "$path\Scripts\wox.plugin.nuspec" - Write-Host "nuspec path: $spec" - Write-Host "Output path: $output" - - Nuget pack $spec -Version $version -OutputDirectory $output - - Write-Host "End build nuget library" -} - -function Zip-Release ($path, $version, $output) { - Write-Host "Begin zip release" - - $input = "$path\..\..\..\x64\Output\Release\modules\launcher" - Write-Host "Input path: $input" - $file = "$output\Wox-$version.zip" - Write-Host "Filename: $file" - - [Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") - [System.IO.Compression.ZipFile]::CreateFromDirectory($input, $file) - - Write-Host "End zip release" -} - -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" - - $spec = "$path\Scripts\wox.nuspec" - Write-Host "nuspec path: $spec" - $input = "$path\..\..\..\x64\Release\modules\launcher" - Write-Host "Input path: $input" - Nuget pack $spec -Version $version -Properties Configuration=Release -BasePath $input -OutputDirectory $output - - $nupkg = "$output\Wox.$version.nupkg" - Write-Host "nupkg path: $nupkg" - $icon = "$path\Wox\Resources\app.ico" - Write-Host "icon: $icon" - # Squirrel.com: https://github.com/Squirrel/Squirrel.Windows/issues/369 - New-Alias Squirrel $path\packages\squirrel*\tools\Squirrel.exe -Force - # why we need Write-Output: https://github.com/Squirrel/Squirrel.Windows/issues/489#issuecomment-156039327 - # directory of releaseDir in fucking squirrel can't be same as directory ($nupkg) in releasify - $temp = "$output\Temp" - - Squirrel --releasify $nupkg --releaseDir $temp --setupIcon $icon --no-msi | Write-Output - Move-Item $temp\* $output -Force - Remove-Item $temp - - $file = "$output\Wox.exe" - Write-Host "Filename: $file" - - Move-Item "$output\Setup.exe" $file -Force - - Write-Host "End pack squirrel installer" -} - -function Main { - $p = Build-Path - $v = Build-Version - Copy-Resources $p $config - - if ($config -eq "Release"){ - - Delete-Unused $p $config - $o = "$p\..\..\..\x64\Release\modules\Packages" - Validate-Directory $o - New-Alias Nuget $p\..\..\..\packages\NuGet.CommandLine.*\tools\NuGet.exe -Force - Pack-Squirrel-Installer $p $v $o - - $isInCI = $env:APPVEYOR - if ($isInCI) { - Pack-Nuget $p $v $o - Zip-Release $p $v $o - } - - Write-Host "List output directory" - Get-ChildItem $o - } -} - -Main \ No newline at end of file diff --git a/src/modules/launcher/Scripts/wox.nuspec b/src/modules/launcher/Scripts/wox.nuspec deleted file mode 100644 index 6810996632..0000000000 --- a/src/modules/launcher/Scripts/wox.nuspec +++ /dev/null @@ -1,16 +0,0 @@ - - - - Wox - Wox - $version$ - happlebao - https://github.com/Wox-launcher/Wox - https://raw.githubusercontent.com/Wox-launcher/Wox/master/Wox/Images/app.png - false - Wox - a launcher for windows - - - - - diff --git a/src/modules/launcher/Scripts/wox.plugin.nuspec b/src/modules/launcher/Scripts/wox.plugin.nuspec deleted file mode 100644 index d88c91af8c..0000000000 --- a/src/modules/launcher/Scripts/wox.plugin.nuspec +++ /dev/null @@ -1,16 +0,0 @@ - - - - Wox.Plugin - $version$ - qianlifeng - https://github.com/Wox-launcher/Wox/blob/master/LICENSE - https://github.com/Wox-launcher/Wox - false - Reference this library if you want to develop a wox plugin - wox - - - - - diff --git a/src/modules/launcher/Wox/Wox.csproj b/src/modules/launcher/Wox/Wox.csproj index d91f963f3f..a107f7d830 100644 --- a/src/modules/launcher/Wox/Wox.csproj +++ b/src/modules/launcher/Wox/Wox.csproj @@ -182,9 +182,4 @@ PreserveNewest - - - - - \ No newline at end of file