From dfdf7e17dfb290f5a60c8a2f48b237ad1b870ef2 Mon Sep 17 00:00:00 2001 From: Kevin Zhang <45326534+taooceros@users.noreply.github.com> Date: Wed, 9 Nov 2022 12:42:10 -0600 Subject: [PATCH 01/37] Create dotnet.yml --- .github/workflows/dotnet.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/dotnet.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 00000000000..f67b41032f8 --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,31 @@ +# This workflow will build a .NET project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net + +name: .NET + +on: + push: + branches: [ "dev" ] + pull_request: + branches: [ "dev" ] + +jobs: + build: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 7.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Perform a Pester test from the command-line + shell: pwsh + run: .\Scripts\post_build.ps1 + - name: Test + run: dotnet test --no-build --verbosity normal From 66e48eeabe4ada006e39d46235907825a3525cc8 Mon Sep 17 00:00:00 2001 From: Kevin Zhang <45326534+taooceros@users.noreply.github.com> Date: Wed, 9 Nov 2022 12:43:11 -0600 Subject: [PATCH 02/37] Update dotnet.yml --- .github/workflows/dotnet.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index f67b41032f8..cb64866aac3 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -7,7 +7,6 @@ on: push: branches: [ "dev" ] pull_request: - branches: [ "dev" ] jobs: build: From 8927e3150bb8c629520463233ea2dbf755436360 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 9 Nov 2022 13:01:57 -0600 Subject: [PATCH 03/37] Build Release --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index cb64866aac3..8046d8e6c46 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -22,7 +22,7 @@ jobs: - name: Restore dependencies run: dotnet restore - name: Build - run: dotnet build --no-restore + run: dotnet build --no-restore -c Release - name: Perform a Pester test from the command-line shell: pwsh run: .\Scripts\post_build.ps1 From afc192b93192f42f182f24601ee43389530b0269 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 9 Nov 2022 13:10:33 -0600 Subject: [PATCH 04/37] Applies cache and Test release version --- .github/workflows/dotnet.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 8046d8e6c46..475d1264b8b 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -14,6 +14,12 @@ jobs: runs-on: windows-latest steps: + - uses: actions/cache@v3 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} + restore-keys: | + ${{ runner.os }}-nuget- - uses: actions/checkout@v3 - name: Setup .NET uses: actions/setup-dotnet@v3 @@ -27,4 +33,4 @@ jobs: shell: pwsh run: .\Scripts\post_build.ps1 - name: Test - run: dotnet test --no-build --verbosity normal + run: dotnet test --no-build --verbosity normal -c Release From 77f3a8b1bd0b0dc9fcf5ec5ba039c934f2c617ce Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 9 Nov 2022 13:31:38 -0600 Subject: [PATCH 05/37] enable windows search service and update version number --- .github/workflows/dotnet.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 475d1264b8b..450d93c5722 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -14,6 +14,14 @@ jobs: runs-on: windows-latest steps: + - name: Initialize Service + run: | + sc config WSearch start= auto # Starts Windows Search service- Needed for running ExplorerTest + net start WSearch + - name: Set version in all AssemblyInfo.cs files + uses: secondbounce/assemblyinfo-update@v2 + with: + version: '1.9.5' - uses: actions/cache@v3 with: path: ~/.nuget/packages From ae43c30e0f85fa1d98576441af737ecf94f445d0 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 9 Nov 2022 13:37:27 -0600 Subject: [PATCH 06/37] upload artifact --- .github/workflows/dotnet.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 450d93c5722..518de5cc300 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -42,3 +42,14 @@ jobs: run: .\Scripts\post_build.ps1 - name: Test run: dotnet test --no-build --verbosity normal -c Release + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + path: | + Output\Release\Flow.Launcher.Plugin.*.nupkg + Output\Packages\Flow-Launcher-*.exe + Output\Packages\Flow-Launcher-Portable.zip + Output\Packages\FlowLauncher-*-full.nupkg + Output\Packages\RELEASES + + From 2e8a0b99815cb9a0fce36d7a8debd887458bfb01 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 9 Nov 2022 13:43:54 -0600 Subject: [PATCH 07/37] Update nuspec --- Scripts/flowlauncher.nuspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/flowlauncher.nuspec b/Scripts/flowlauncher.nuspec index 8c1b16fe561..9c2c3e24560 100644 --- a/Scripts/flowlauncher.nuspec +++ b/Scripts/flowlauncher.nuspec @@ -11,6 +11,6 @@ Flow Launcher - a launcher for windows - + From 17cda4eec8cd1dafa295da054343661af635bf32 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 9 Nov 2022 13:52:18 -0600 Subject: [PATCH 08/37] Change Artifact Upload Spec --- .github/workflows/dotnet.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 518de5cc300..c53fced4e5a 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -42,14 +42,31 @@ jobs: run: .\Scripts\post_build.ps1 - name: Test run: dotnet test --no-build --verbosity normal -c Release - - name: Upload Artifact + - name: Upload Plugin Nupkg uses: actions/upload-artifact@v3 with: path: | Output\Release\Flow.Launcher.Plugin.*.nupkg + - name: Upload Setup + uses: actions/upload-artifact@v3 + with: + path: | Output\Packages\Flow-Launcher-*.exe + - name: Upload Portable Version + uses: actions/upload-artifact@v3 + with: + path: | Output\Packages\Flow-Launcher-Portable.zip + - name: Upload Full Nupkg + uses: actions/upload-artifact@v3 + with: + path: | Output\Packages\FlowLauncher-*-full.nupkg + + - name: Upload Release Information + uses: actions/upload-artifact@v3 + with: + path: | Output\Packages\RELEASES From d94e9a1d7051a8bd8c9e47cea1c0040961feceae Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 9 Nov 2022 14:04:34 -0600 Subject: [PATCH 09/37] Change artifact name --- .github/workflows/dotnet.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index c53fced4e5a..a3596ce2d9e 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -45,27 +45,32 @@ jobs: - name: Upload Plugin Nupkg uses: actions/upload-artifact@v3 with: + name: Plugin nupkg path: | Output\Release\Flow.Launcher.Plugin.*.nupkg - name: Upload Setup uses: actions/upload-artifact@v3 with: + name: Flow Installer path: | Output\Packages\Flow-Launcher-*.exe - name: Upload Portable Version uses: actions/upload-artifact@v3 with: + name: Portable Version path: | Output\Packages\Flow-Launcher-Portable.zip - name: Upload Full Nupkg uses: actions/upload-artifact@v3 with: + name: Full nupkg path: | Output\Packages\FlowLauncher-*-full.nupkg - name: Upload Release Information uses: actions/upload-artifact@v3 with: + name: RELEASES path: | Output\Packages\RELEASES From 659085bbbb01925ffc1bb26394a463243d7bff8f Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 9 Nov 2022 14:29:24 -0600 Subject: [PATCH 10/37] Updage nuget and update publish profile --- Flow.Launcher/Flow.Launcher.csproj | 4 ++-- ...et6.0-SelfContained.pubxml => Net7.0-SelfContained.pubxml} | 4 ++-- Scripts/post_build.ps1 | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename Flow.Launcher/Properties/PublishProfiles/{Net6.0-SelfContained.pubxml => Net7.0-SelfContained.pubxml} (83%) diff --git a/Flow.Launcher/Flow.Launcher.csproj b/Flow.Launcher/Flow.Launcher.csproj index c200030b614..aabf28d0e2a 100644 --- a/Flow.Launcher/Flow.Launcher.csproj +++ b/Flow.Launcher/Flow.Launcher.csproj @@ -82,7 +82,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -108,7 +108,7 @@ - + diff --git a/Flow.Launcher/Properties/PublishProfiles/Net6.0-SelfContained.pubxml b/Flow.Launcher/Properties/PublishProfiles/Net7.0-SelfContained.pubxml similarity index 83% rename from Flow.Launcher/Properties/PublishProfiles/Net6.0-SelfContained.pubxml rename to Flow.Launcher/Properties/PublishProfiles/Net7.0-SelfContained.pubxml index 23867d894bf..496fcb8e70b 100644 --- a/Flow.Launcher/Properties/PublishProfiles/Net6.0-SelfContained.pubxml +++ b/Flow.Launcher/Properties/PublishProfiles/Net7.0-SelfContained.pubxml @@ -7,12 +7,12 @@ https://go.microsoft.com/fwlink/?LinkID=208121. FileSystem Release Any CPU - net6.0-windows10.0.19041.0 + net7.0-windows10.0.19041.0 ..\Output\Release\ win-x64 true False - False + True False diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index fdf2a034997..2105b11d37f 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -71,7 +71,7 @@ function Pack-Squirrel-Installer ($path, $version, $output) { Write-Host "Packing: $spec" Write-Host "Input path: $input" # making version static as multiple versions can exist in the nuget folder and in the case a breaking change is introduced. - New-Alias Nuget $env:USERPROFILE\.nuget\packages\NuGet.CommandLine\5.7.2\tools\NuGet.exe -Force + New-Alias Nuget $env:USERPROFILE\.nuget\packages\NuGet.CommandLine\6.3.1\tools\NuGet.exe -Force # dotnet pack is not used because ran into issues, need to test installation and starting up if to use it. nuget pack $spec -Version $version -BasePath $input -OutputDirectory $output -Properties Configuration=Release From 12101ac43f40e242d5c8fc3dfc00cb9faa3fa010 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 9 Nov 2022 14:33:41 -0600 Subject: [PATCH 11/37] update workflow file --- .github/workflows/dotnet.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index a3596ce2d9e..f7e7b891beb 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -7,6 +7,7 @@ on: push: branches: [ "dev" ] pull_request: + workflow_dispatch: jobs: build: From 0327560f48737925f95ad159d902ed673d57b64b Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 9 Nov 2022 14:42:36 -0600 Subject: [PATCH 12/37] update post_build.ps1 --- Scripts/post_build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index 2105b11d37f..bd1d673eff8 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -100,7 +100,7 @@ function Pack-Squirrel-Installer ($path, $version, $output) { function Publish-Self-Contained ($p) { $csproj = Join-Path "$p" "Flow.Launcher/Flow.Launcher.csproj" -Resolve - $profile = Join-Path "$p" "Flow.Launcher/Properties/PublishProfiles/Net6.0-SelfContained.pubxml" -Resolve + $profile = Join-Path "$p" "Flow.Launcher/Properties/PublishProfiles/Net7.0-SelfContained.pubxml" -Resolve # we call dotnet publish on the main project. # The other projects should have been built in Release at this point. From 9cf105cee75ee076af47ad487c38232f99fd0978 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 9 Nov 2022 15:19:02 -0600 Subject: [PATCH 13/37] try new deletion policy --- Scripts/post_build.ps1 | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index bd1d673eff8..4389e78b3b5 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -8,7 +8,8 @@ function Build-Version { if ([string]::IsNullOrEmpty($env:flowVersion)) { $targetPath = Join-Path $solution "Output/Release/Flow.Launcher.dll" -Resolve $v = (Get-Command ${targetPath}).FileVersionInfo.FileVersion - } else { + } + else { $v = $env:flowVersion } @@ -19,9 +20,11 @@ function Build-Version { function Build-Path { if (![string]::IsNullOrEmpty($env:APPVEYOR_BUILD_FOLDER)) { $p = $env:APPVEYOR_BUILD_FOLDER - } elseif (![string]::IsNullOrEmpty($solution)) { + } + elseif (![string]::IsNullOrEmpty($solution)) { $p = $solution - } else { + } + else { $p = Get-Location } @@ -38,13 +41,19 @@ function Copy-Resources ($path) { function Delete-Unused ($path, $config) { $target = "$path\Output\$config" - $included = Get-ChildItem $target -Filter "*.dll" - foreach ($i in $included){ - $deleteList = Get-ChildItem $target\Plugins -Include $i -Recurse | Where { $_.VersionInfo.FileVersion -eq $i.VersionInfo.FileVersion -And $_.Name -eq "$i" } - $deleteList | ForEach-Object{ Write-Host Deleting duplicated $_.Name with version $_.VersionInfo.FileVersion at location $_.Directory.FullName } - $deleteList | Remove-Item + $included = @{} + Get-ChildItem $target -Filter "*.dll" | Get-FileHash | ForEach-Object { $included.Add($_.hash, $true) } + + $deleteList = Get-ChildItem $target\Plugins -Filter "*.dll" -Recurse + | Select-Object Name, VersionInfo, Directory, FullName, @{name = "hash"; expression = { (Get-FileHash $_.FullName).hash } } + | Where-Object { $included.Contains($_.hash) } + + $deleteList | ForEach-Object { + Write-Host Deleting duplicated $_.Name with version $_.VersionInfo.FileVersion at location $_.Directory.FullName } - Remove-Item -Path $target -Include "*.xml" -Recurse + $deleteList | Remove-Item -Path { $_.FullName } + + Remove-Item -Path $target -Include "*.xml" -Recurse } function Remove-CreateDumpExe ($path, $config) { @@ -99,7 +108,7 @@ function Pack-Squirrel-Installer ($path, $version, $output) { function Publish-Self-Contained ($p) { - $csproj = Join-Path "$p" "Flow.Launcher/Flow.Launcher.csproj" -Resolve + $csproj = Join-Path "$p" "Flow.Launcher/Flow.Launcher.csproj" -Resolve $profile = Join-Path "$p" "Flow.Launcher/Properties/PublishProfiles/Net7.0-SelfContained.pubxml" -Resolve # we call dotnet publish on the main project. @@ -119,7 +128,7 @@ function Main { $v = Build-Version Copy-Resources $p - if ($config -eq "Release"){ + if ($config -eq "Release") { Delete-Unused $p $config @@ -131,7 +140,7 @@ function Main { Validate-Directory $o Pack-Squirrel-Installer $p $v $o - Publish-Portable $o $v + # Publish-Portable $o $v } } From 0065b9d1ba41c865334171ca8759e7fe71b05426 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 9 Nov 2022 15:19:32 -0600 Subject: [PATCH 14/37] temporary only upload installer --- .github/workflows/dotnet.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index f7e7b891beb..13ab9a8e5e3 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -55,18 +55,18 @@ jobs: name: Flow Installer path: | Output\Packages\Flow-Launcher-*.exe - - name: Upload Portable Version - uses: actions/upload-artifact@v3 - with: - name: Portable Version - path: | - Output\Packages\Flow-Launcher-Portable.zip - - name: Upload Full Nupkg - uses: actions/upload-artifact@v3 - with: - name: Full nupkg - path: | - Output\Packages\FlowLauncher-*-full.nupkg + # - name: Upload Portable Version + # uses: actions/upload-artifact@v3 + # with: + # name: Portable Version + # path: | + # Output\Packages\Flow-Launcher-Portable.zip + # - name: Upload Full Nupkg + # uses: actions/upload-artifact@v3 + # with: + # name: Full nupkg + # path: | + # Output\Packages\FlowLauncher-*-full.nupkg - name: Upload Release Information uses: actions/upload-artifact@v3 From db3c0dade51cb5e3be811c8b5744accac0967b77 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 9 Nov 2022 15:26:08 -0600 Subject: [PATCH 15/37] enable faster cache restore --- .github/workflows/dotnet.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 13ab9a8e5e3..c5b81106d51 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -23,6 +23,12 @@ jobs: uses: secondbounce/assemblyinfo-update@v2 with: version: '1.9.5' + - if: ${{ runner.os == 'Windows' }} + name: Use GNU tar + shell: cmd + run: | + echo "Adding GNU tar to PATH" + echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%" - uses: actions/cache@v3 with: path: ~/.nuget/packages From fca78df72053cb2116b7d2c388ad7e0ef95f465d Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 9 Nov 2022 15:57:25 -0600 Subject: [PATCH 16/37] test new delete-unused --- Scripts/post_build.ps1 | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index 4389e78b3b5..13fdf23b2cd 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -1,11 +1,11 @@ param( - [string]$config = "Release", + [string]$config = "Release", [string]$solution = (Join-Path $PSScriptRoot ".." -Resolve) ) Write-Host "Config: $config" function Build-Version { - if ([string]::IsNullOrEmpty($env:flowVersion)) { + if ( [string]::IsNullOrEmpty($env:flowVersion)) { $targetPath = Join-Path $solution "Output/Release/Flow.Launcher.dll" -Resolve $v = (Get-Command ${targetPath}).FileVersionInfo.FileVersion } @@ -34,29 +34,29 @@ function Build-Path { return $p } -function Copy-Resources ($path) { +function Copy-Resources($path) { # making version static as multiple versions can exist in the nuget folder and in the case a breaking change is introduced. Copy-Item -Force $env:USERPROFILE\.nuget\packages\squirrel.windows\1.5.2\tools\Squirrel.exe $path\Output\Update.exe } -function Delete-Unused ($path, $config) { +function Delete-Unused($path, $config) { $target = "$path\Output\$config" - $included = @{} - Get-ChildItem $target -Filter "*.dll" | Get-FileHash | ForEach-Object { $included.Add($_.hash, $true) } + $included = @{ } + Get-ChildItem -Path $target -r | Where-Object { $_.PsIsContainer -and $_.FullName -notmatch 'Plugins' } | Get-FileHash | ForEach-Object { $included[$_.hash] = $true } - $deleteList = Get-ChildItem $target\Plugins -Filter "*.dll" -Recurse - | Select-Object Name, VersionInfo, Directory, FullName, @{name = "hash"; expression = { (Get-FileHash $_.FullName).hash } } - | Where-Object { $included.Contains($_.hash) } + $deleteList = Get-ChildItem $target\Plugins -Filter "*.dll" -Recurse | + Select-Object Name, VersionInfo, Directory, FullName, @{ name = "hash"; expression = { (Get-FileHash $_.FullName).hash } } | + Where-Object { $included.Contains($_.hash) } - $deleteList | ForEach-Object { + $deleteList | ForEach-Object { Write-Host Deleting duplicated $_.Name with version $_.VersionInfo.FileVersion at location $_.Directory.FullName } - $deleteList | Remove-Item -Path { $_.FullName } + $deleteList | Remove-Item -Path { $_.FullName } Remove-Item -Path $target -Include "*.xml" -Recurse } -function Remove-CreateDumpExe ($path, $config) { +function Remove-CreateDumpExe($path, $config) { $target = "$path\Output\$config" $depjson = Get-Content $target\Flow.Launcher.deps.json -raw @@ -65,12 +65,12 @@ function Remove-CreateDumpExe ($path, $config) { } -function Validate-Directory ($output) { +function Validate-Directory($output) { New-Item $output -ItemType Directory -Force } -function Pack-Squirrel-Installer ($path, $version, $output) { +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" @@ -82,7 +82,7 @@ function Pack-Squirrel-Installer ($path, $version, $output) { # making version static as multiple versions can exist in the nuget folder and in the case a breaking change is introduced. New-Alias Nuget $env:USERPROFILE\.nuget\packages\NuGet.CommandLine\6.3.1\tools\NuGet.exe -Force # dotnet pack is not used because ran into issues, need to test installation and starting up if to use it. - nuget pack $spec -Version $version -BasePath $input -OutputDirectory $output -Properties Configuration=Release + nuget pack $spec -Version $version -BasePath $input -OutputDirectory $output -Properties Configuration = Release $nupkg = "$output\FlowLauncher.$version.nupkg" Write-Host "nupkg path: $nupkg" @@ -97,7 +97,7 @@ function Pack-Squirrel-Installer ($path, $version, $output) { Squirrel --releasify $nupkg --releaseDir $temp --setupIcon $icon --no-msi | Write-Output Move-Item $temp\* $output -Force Remove-Item $temp - + $file = "$output\Flow-Launcher-Setup.exe" Write-Host "Filename: $file" @@ -106,18 +106,18 @@ function Pack-Squirrel-Installer ($path, $version, $output) { Write-Host "End pack squirrel installer" } -function Publish-Self-Contained ($p) { +function Publish-Self-Contained($p) { $csproj = Join-Path "$p" "Flow.Launcher/Flow.Launcher.csproj" -Resolve $profile = Join-Path "$p" "Flow.Launcher/Properties/PublishProfiles/Net7.0-SelfContained.pubxml" -Resolve # we call dotnet publish on the main project. # The other projects should have been built in Release at this point. - dotnet publish -c Release $csproj /p:PublishProfile=$profile + dotnet publish -c Release $csproj /p:PublishProfile = $profile } -function Publish-Portable ($outputLocation, $version) { - +function Publish-Portable($outputLocation, $version) { + & $outputLocation\Flow-Launcher-Setup.exe --silent | Out-Null mkdir "$env:LocalAppData\FlowLauncher\app-$version\UserData" Compress-Archive -Path $env:LocalAppData\FlowLauncher -DestinationPath $outputLocation\Flow-Launcher-Portable.zip @@ -129,7 +129,7 @@ function Main { Copy-Resources $p if ($config -eq "Release") { - + Delete-Unused $p $config Publish-Self-Contained $p From 520a842756cb2ff4080265d10b8bb5e1399fa4d6 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 9 Nov 2022 16:03:04 -0600 Subject: [PATCH 17/37] revise post_build --- Scripts/post_build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index 13fdf23b2cd..8460c37beed 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -42,7 +42,7 @@ function Copy-Resources($path) { function Delete-Unused($path, $config) { $target = "$path\Output\$config" $included = @{ } - Get-ChildItem -Path $target -r | Where-Object { $_.PsIsContainer -and $_.FullName -notmatch 'Plugins' } | Get-FileHash | ForEach-Object { $included[$_.hash] = $true } + Get-ChildItem -Path $target -r | Where-Object { !$_.PsIsContainer -and $_.FullName -notmatch 'Plugins' } | Get-FileHash | ForEach-Object { $included[$_.hash] = $true } $deleteList = Get-ChildItem $target\Plugins -Filter "*.dll" -Recurse | Select-Object Name, VersionInfo, Directory, FullName, @{ name = "hash"; expression = { (Get-FileHash $_.FullName).hash } } | From b74da425f281e7e47dfcff5b9f719f391fce3db3 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 9 Nov 2022 21:13:46 -0600 Subject: [PATCH 18/37] fix build script --- Flow.Launcher/Flow.Launcher.csproj | 1 + Scripts/post_build.ps1 | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Flow.Launcher/Flow.Launcher.csproj b/Flow.Launcher/Flow.Launcher.csproj index aabf28d0e2a..0af56a5953c 100644 --- a/Flow.Launcher/Flow.Launcher.csproj +++ b/Flow.Launcher/Flow.Launcher.csproj @@ -11,6 +11,7 @@ false false en + win-x64 AnyCPU diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index 8460c37beed..a7bae215f54 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -42,7 +42,7 @@ function Copy-Resources($path) { function Delete-Unused($path, $config) { $target = "$path\Output\$config" $included = @{ } - Get-ChildItem -Path $target -r | Where-Object { !$_.PsIsContainer -and $_.FullName -notmatch 'Plugins' } | Get-FileHash | ForEach-Object { $included[$_.hash] = $true } + Get-ChildItem -Path $target -r -Filter "*.dll" | Where-Object { !$_.PsIsContainer -and $_.FullName -notmatch 'Plugins' } | Get-FileHash | ForEach-Object { $included[$_.hash] = $true } $deleteList = Get-ChildItem $target\Plugins -Filter "*.dll" -Recurse | Select-Object Name, VersionInfo, Directory, FullName, @{ name = "hash"; expression = { (Get-FileHash $_.FullName).hash } } | @@ -113,7 +113,7 @@ function Publish-Self-Contained($p) { # we call dotnet publish on the main project. # The other projects should have been built in Release at this point. - dotnet publish -c Release $csproj /p:PublishProfile = $profile + dotnet publish --no-build -c Release $csproj /p:PublishProfile=$profile } function Publish-Portable($outputLocation, $version) { @@ -134,11 +134,11 @@ function Main { Publish-Self-Contained $p - Remove-CreateDumpExe $p $config +# Remove-CreateDumpExe $p $config - $o = "$p\Output\Packages" - Validate-Directory $o - Pack-Squirrel-Installer $p $v $o +# $o = "$p\Output\Packages" +# Validate-Directory $o +# Pack-Squirrel-Installer $p $v $o # Publish-Portable $o $v } From fb72286e98ad46676ecfe61acf5e3e485f33d722 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 9 Nov 2022 21:37:12 -0600 Subject: [PATCH 19/37] fix extra small version of tfm --- .../Properties/PublishProfiles/Net7.0-SelfContained.pubxml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/Properties/PublishProfiles/Net7.0-SelfContained.pubxml b/Flow.Launcher/Properties/PublishProfiles/Net7.0-SelfContained.pubxml index 496fcb8e70b..4080880de5a 100644 --- a/Flow.Launcher/Properties/PublishProfiles/Net7.0-SelfContained.pubxml +++ b/Flow.Launcher/Properties/PublishProfiles/Net7.0-SelfContained.pubxml @@ -7,7 +7,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. FileSystem Release Any CPU - net7.0-windows10.0.19041.0 + net7.0-windows10.0.19041 ..\Output\Release\ win-x64 true From c9e3182715d08f4f7540aed8e7b0778fe23a644d Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 9 Nov 2022 21:43:54 -0600 Subject: [PATCH 20/37] recover commentted publish --- Scripts/post_build.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index a7bae215f54..f33039cc27e 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -134,13 +134,13 @@ function Main { Publish-Self-Contained $p -# Remove-CreateDumpExe $p $config + Remove-CreateDumpExe $p $config -# $o = "$p\Output\Packages" -# Validate-Directory $o -# Pack-Squirrel-Installer $p $v $o + $o = "$p\Output\Packages" + Validate-Directory $o + Pack-Squirrel-Installer $p $v $o - # Publish-Portable $o $v + Publish-Portable $o $v } } From 89c38b4d7035dd1ebc13e4205195067766e3c4d3 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 9 Nov 2022 22:41:21 -0600 Subject: [PATCH 21/37] fix nuget pack argument --- Scripts/post_build.ps1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index f33039cc27e..4e3be251480 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -82,7 +82,7 @@ function Pack-Squirrel-Installer($path, $version, $output) { # making version static as multiple versions can exist in the nuget folder and in the case a breaking change is introduced. New-Alias Nuget $env:USERPROFILE\.nuget\packages\NuGet.CommandLine\6.3.1\tools\NuGet.exe -Force # dotnet pack is not used because ran into issues, need to test installation and starting up if to use it. - nuget pack $spec -Version $version -BasePath $input -OutputDirectory $output -Properties Configuration = Release + nuget pack $spec -Version $version -BasePath $input -OutputDirectory $output -Properties Configuration=Release $nupkg = "$output\FlowLauncher.$version.nupkg" Write-Host "nupkg path: $nupkg" @@ -130,15 +130,15 @@ function Main { if ($config -eq "Release") { - Delete-Unused $p $config + # Delete-Unused $p $config - Publish-Self-Contained $p + # Publish-Self-Contained $p - Remove-CreateDumpExe $p $config + # Remove-CreateDumpExe $p $config - $o = "$p\Output\Packages" - Validate-Directory $o - Pack-Squirrel-Installer $p $v $o + $o = "$p\Output\Packages" + Validate-Directory $o + Pack-Squirrel-Installer $p $v $o Publish-Portable $o $v } From 2ba9b621738d30b34bb9ecfb111f7904eb38d5b4 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Thu, 10 Nov 2022 11:08:01 -0600 Subject: [PATCH 22/37] update some package and stop building portable --- .../Flow.Launcher.Infrastructure.csproj | 7 +++---- Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj | 4 ++-- Flow.Launcher/Flow.Launcher.csproj | 10 ++++------ Scripts/flowlauncher.nuspec | 2 +- Scripts/post_build.ps1 | 12 ++++++------ 5 files changed, 16 insertions(+), 19 deletions(-) diff --git a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj index 99994255e1a..085a9ab4061 100644 --- a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj +++ b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj @@ -1,4 +1,4 @@ - + net7.0-windows {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3} @@ -43,15 +43,14 @@ - + all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj b/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj index 71e52ab69f9..580f79404bd 100644 --- a/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj +++ b/Flow.Launcher.Plugin/Flow.Launcher.Plugin.csproj @@ -54,13 +54,13 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/Flow.Launcher/Flow.Launcher.csproj b/Flow.Launcher/Flow.Launcher.csproj index 0af56a5953c..bf761678cd8 100644 --- a/Flow.Launcher/Flow.Launcher.csproj +++ b/Flow.Launcher/Flow.Launcher.csproj @@ -1,4 +1,4 @@ - + WinExe net7.0-windows10.0.19041 @@ -11,7 +11,6 @@ false false en - win-x64 AnyCPU @@ -75,7 +74,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -85,9 +84,8 @@ all - runtime; build; native; contentfiles; analyzers; buildtransitive - + all @@ -109,7 +107,7 @@ - + diff --git a/Scripts/flowlauncher.nuspec b/Scripts/flowlauncher.nuspec index 9c2c3e24560..03d6c113040 100644 --- a/Scripts/flowlauncher.nuspec +++ b/Scripts/flowlauncher.nuspec @@ -6,7 +6,7 @@ $version$ Flow-Launcher Team https://github.com/Flow-Launcher/Flow.Launcher - https://raw.githubusercontent.com/Flow-Launcher/Flow.Launcher/master/Flow.Launcher/Images/app.png + Images/app.png false Flow Launcher - a launcher for windows diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index 4e3be251480..cb2c623bb61 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -44,14 +44,14 @@ function Delete-Unused($path, $config) { $included = @{ } Get-ChildItem -Path $target -r -Filter "*.dll" | Where-Object { !$_.PsIsContainer -and $_.FullName -notmatch 'Plugins' } | Get-FileHash | ForEach-Object { $included[$_.hash] = $true } - $deleteList = Get-ChildItem $target\Plugins -Filter "*.dll" -Recurse | + $deleteList = Get-ChildItem "$target\Plugins" -Filter "*.dll" -Recurse | Select-Object Name, VersionInfo, Directory, FullName, @{ name = "hash"; expression = { (Get-FileHash $_.FullName).hash } } | Where-Object { $included.Contains($_.hash) } $deleteList | ForEach-Object { Write-Host Deleting duplicated $_.Name with version $_.VersionInfo.FileVersion at location $_.Directory.FullName + Remove-Item $_.FullName } - $deleteList | Remove-Item -Path { $_.FullName } Remove-Item -Path $target -Include "*.xml" -Recurse } @@ -130,17 +130,17 @@ function Main { if ($config -eq "Release") { - # Delete-Unused $p $config + Publish-Self-Contained $p - # Publish-Self-Contained $p + Delete-Unused $p $config - # Remove-CreateDumpExe $p $config + Remove-CreateDumpExe $p $config $o = "$p\Output\Packages" Validate-Directory $o Pack-Squirrel-Installer $p $v $o - Publish-Portable $o $v +# Publish-Portable $o $v } } From 1f8f3937560d76461ce8b5c997f7bdc07fce21a5 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Thu, 10 Nov 2022 11:13:38 -0600 Subject: [PATCH 23/37] revise icon path --- Scripts/flowlauncher.nuspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/flowlauncher.nuspec b/Scripts/flowlauncher.nuspec index 03d6c113040..46aa8334442 100644 --- a/Scripts/flowlauncher.nuspec +++ b/Scripts/flowlauncher.nuspec @@ -6,7 +6,7 @@ $version$ Flow-Launcher Team https://github.com/Flow-Launcher/Flow.Launcher - Images/app.png + Images\app.png false Flow Launcher - a launcher for windows From 82980495d4a1e168abef4c2fc824ea9a5b860872 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Thu, 10 Nov 2022 11:20:19 -0600 Subject: [PATCH 24/37] Append Runtime Identifier --- Flow.Launcher/Flow.Launcher.csproj | 1 + .../Flow.Launcher.Plugin.BrowserBookmark.csproj | 1 + .../Flow.Launcher.Plugin.Calculator.csproj | 1 + .../Flow.Launcher.Plugin.Explorer.csproj | 1 + .../Flow.Launcher.Plugin.PluginIndicator.csproj | 1 + .../Flow.Launcher.Plugin.PluginsManager.csproj | 1 + .../Flow.Launcher.Plugin.ProcessKiller.csproj | 5 +++-- .../Flow.Launcher.Plugin.Program.csproj | 1 + .../Flow.Launcher.Plugin.Shell.csproj | 1 + .../Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj | 1 + .../Flow.Launcher.Plugin.Url/Flow.Launcher.Plugin.Url.csproj | 1 + .../Flow.Launcher.Plugin.WebSearch.csproj | 1 + .../Flow.Launcher.Plugin.WindowsSettings.csproj | 1 + 13 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/Flow.Launcher.csproj b/Flow.Launcher/Flow.Launcher.csproj index bf761678cd8..1a76f6569de 100644 --- a/Flow.Launcher/Flow.Launcher.csproj +++ b/Flow.Launcher/Flow.Launcher.csproj @@ -10,6 +10,7 @@ false false false + win-x64 en diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj index 43425790402..cd5850e535a 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj @@ -2,6 +2,7 @@ Library net7.0-windows + win-x64 true {9B130CC5-14FB-41FF-B310-0A95B6894C37} Properties diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj b/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj index 4a285b31fee..92f6750fc62 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj +++ b/Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj @@ -2,6 +2,7 @@ Library net7.0-windows + win-x64 {59BD9891-3837-438A-958D-ADC7F91F6F7E} Properties Flow.Launcher.Plugin.Caculator diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj b/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj index 171c183ef49..f8f7aa77d3d 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj @@ -2,6 +2,7 @@ Library net7.0-windows + win-x64 true true true diff --git a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Flow.Launcher.Plugin.PluginIndicator.csproj b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Flow.Launcher.Plugin.PluginIndicator.csproj index b426c85b880..3c127b434f5 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginIndicator/Flow.Launcher.Plugin.PluginIndicator.csproj +++ b/Plugins/Flow.Launcher.Plugin.PluginIndicator/Flow.Launcher.Plugin.PluginIndicator.csproj @@ -3,6 +3,7 @@ Library net7.0-windows {FDED22C8-B637-42E8-824A-63B5B6E05A3A} + win-x64 Properties Flow.Launcher.Plugin.PluginIndicator Flow.Launcher.Plugin.PluginIndicator diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj b/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj index 20a271e4f41..83a8e634f5a 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj @@ -2,6 +2,7 @@ Library net7.0-windows + win-x64 true true true diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Flow.Launcher.Plugin.ProcessKiller.csproj b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Flow.Launcher.Plugin.ProcessKiller.csproj index 30c205efb6a..b90551f4348 100644 --- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Flow.Launcher.Plugin.ProcessKiller.csproj +++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Flow.Launcher.Plugin.ProcessKiller.csproj @@ -4,6 +4,7 @@ net7.0-windows Flow.Launcher.Plugin.ProcessKiller Flow.Launcher.Plugin.ProcessKiller + win-x64 Flow-Launcher https://github.com/Flow-Launcher/Flow.Launcher.Plugin.ProcessKiller https://github.com/Flow-Launcher/Flow.Launcher.Plugin.ProcessKiller @@ -45,8 +46,8 @@ - - + + diff --git a/Plugins/Flow.Launcher.Plugin.Program/Flow.Launcher.Plugin.Program.csproj b/Plugins/Flow.Launcher.Plugin.Program/Flow.Launcher.Plugin.Program.csproj index 54d2858da2e..b351cbd4bff 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Flow.Launcher.Plugin.Program.csproj +++ b/Plugins/Flow.Launcher.Plugin.Program/Flow.Launcher.Plugin.Program.csproj @@ -3,6 +3,7 @@ Library net7.0-windows10.0.19041 {FDB3555B-58EF-4AE6-B5F1-904719637AB4} + win-x64 Properties Flow.Launcher.Plugin.Program Flow.Launcher.Plugin.Program diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Flow.Launcher.Plugin.Shell.csproj b/Plugins/Flow.Launcher.Plugin.Shell/Flow.Launcher.Plugin.Shell.csproj index 649f6732e2e..b583bdb8da6 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/Flow.Launcher.Plugin.Shell.csproj +++ b/Plugins/Flow.Launcher.Plugin.Shell/Flow.Launcher.Plugin.Shell.csproj @@ -3,6 +3,7 @@ Library net7.0-windows {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0} + win-x64 Properties Flow.Launcher.Plugin.Shell Flow.Launcher.Plugin.Shell diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj b/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj index c83c7da4993..9f5c6c97ca5 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj +++ b/Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj @@ -7,6 +7,7 @@ Flow.Launcher.Plugin.Sys Flow.Launcher.Plugin.Sys true + win-x64 true true false diff --git a/Plugins/Flow.Launcher.Plugin.Url/Flow.Launcher.Plugin.Url.csproj b/Plugins/Flow.Launcher.Plugin.Url/Flow.Launcher.Plugin.Url.csproj index 648ffa60e3f..0abe38ad276 100644 --- a/Plugins/Flow.Launcher.Plugin.Url/Flow.Launcher.Plugin.Url.csproj +++ b/Plugins/Flow.Launcher.Plugin.Url/Flow.Launcher.Plugin.Url.csproj @@ -4,6 +4,7 @@ net7.0-windows {A3DCCBCA-ACC1-421D-B16E-210896234C26} true + win-x64 Properties Flow.Launcher.Plugin.Url Flow.Launcher.Plugin.Url diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/Flow.Launcher.Plugin.WebSearch.csproj b/Plugins/Flow.Launcher.Plugin.WebSearch/Flow.Launcher.Plugin.WebSearch.csproj index 2140146c50d..6a6ccb6f524 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/Flow.Launcher.Plugin.WebSearch.csproj +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/Flow.Launcher.Plugin.WebSearch.csproj @@ -4,6 +4,7 @@ net7.0-windows {403B57F2-1856-4FC7-8A24-36AB346B763E} Properties + win-x64 true Flow.Launcher.Plugin.WebSearch Flow.Launcher.Plugin.WebSearch diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Flow.Launcher.Plugin.WindowsSettings.csproj b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Flow.Launcher.Plugin.WindowsSettings.csproj index da7a5c6ba71..238586591fd 100644 --- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Flow.Launcher.Plugin.WindowsSettings.csproj +++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Flow.Launcher.Plugin.WindowsSettings.csproj @@ -4,6 +4,7 @@ net7.0-windows true true + win-x64 false Properties prompt From fce46f0b3550b8a8fe47225760084f6b303ea72d Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Thu, 10 Nov 2022 11:27:03 -0600 Subject: [PATCH 25/37] edit icon path --- Scripts/flowlauncher.nuspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/flowlauncher.nuspec b/Scripts/flowlauncher.nuspec index 46aa8334442..f7a416819ef 100644 --- a/Scripts/flowlauncher.nuspec +++ b/Scripts/flowlauncher.nuspec @@ -6,7 +6,7 @@ $version$ Flow-Launcher Team https://github.com/Flow-Launcher/Flow.Launcher - Images\app.png + lib\net7.0\Images\app.png false Flow Launcher - a launcher for windows From d4cbc8f4060fe10316a1b7a9caeb496b73fd42d4 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Thu, 10 Nov 2022 12:16:46 -0600 Subject: [PATCH 26/37] try again with a different approach --- Scripts/post_build.ps1 | 67 ++++++++++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 22 deletions(-) diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index cb2c623bb61..eb5a948f126 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -4,12 +4,15 @@ param( ) Write-Host "Config: $config" -function Build-Version { - if ( [string]::IsNullOrEmpty($env:flowVersion)) { +function Build-Version +{ + if ( [string]::IsNullOrEmpty($env:flowVersion)) + { $targetPath = Join-Path $solution "Output/Release/Flow.Launcher.dll" -Resolve $v = (Get-Command ${targetPath}).FileVersionInfo.FileVersion } - else { + else + { $v = $env:flowVersion } @@ -17,14 +20,18 @@ function Build-Version { return $v } -function Build-Path { - if (![string]::IsNullOrEmpty($env:APPVEYOR_BUILD_FOLDER)) { +function Build-Path +{ + if (![string]::IsNullOrEmpty($env:APPVEYOR_BUILD_FOLDER)) + { $p = $env:APPVEYOR_BUILD_FOLDER } - elseif (![string]::IsNullOrEmpty($solution)) { + elseif (![string]::IsNullOrEmpty($solution)) + { $p = $solution } - else { + else + { $p = Get-Location } @@ -34,19 +41,26 @@ function Build-Path { return $p } -function Copy-Resources($path) { +function Copy-Resources($path) +{ # making version static as multiple versions can exist in the nuget folder and in the case a breaking change is introduced. Copy-Item -Force $env:USERPROFILE\.nuget\packages\squirrel.windows\1.5.2\tools\Squirrel.exe $path\Output\Update.exe } -function Delete-Unused($path, $config) { +function Delete-Unused($path, $config) +{ $target = "$path\Output\$config" $included = @{ } - Get-ChildItem -Path $target -r -Filter "*.dll" | Where-Object { !$_.PsIsContainer -and $_.FullName -notmatch 'Plugins' } | Get-FileHash | ForEach-Object { $included[$_.hash] = $true } + Get-ChildItem -Path $target -r -Filter "*.dll" | Where-Object { !$_.PsIsContainer -and $_.FullName -notmatch 'Plugins' } | + ForEach-Object { + $included["$($_.Name)-$($_.VersionInfo.FileVersion)"] = $true + } + + # $included $deleteList = Get-ChildItem "$target\Plugins" -Filter "*.dll" -Recurse | - Select-Object Name, VersionInfo, Directory, FullName, @{ name = "hash"; expression = { (Get-FileHash $_.FullName).hash } } | - Where-Object { $included.Contains($_.hash) } + Where-Object { $included.ContainsKey("$($_.Name)-$($_.VersionInfo.FileVersion)") } + $deleteList | ForEach-Object { Write-Host Deleting duplicated $_.Name with version $_.VersionInfo.FileVersion at location $_.Directory.FullName @@ -56,7 +70,8 @@ function Delete-Unused($path, $config) { Remove-Item -Path $target -Include "*.xml" -Recurse } -function Remove-CreateDumpExe($path, $config) { +function Remove-CreateDumpExe($path, $config) +{ $target = "$path\Output\$config" $depjson = Get-Content $target\Flow.Launcher.deps.json -raw @@ -65,12 +80,14 @@ function Remove-CreateDumpExe($path, $config) { } -function Validate-Directory($output) { +function Validate-Directory($output) +{ New-Item $output -ItemType Directory -Force } -function Pack-Squirrel-Installer($path, $version, $output) { +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" @@ -82,7 +99,7 @@ function Pack-Squirrel-Installer($path, $version, $output) { # making version static as multiple versions can exist in the nuget folder and in the case a breaking change is introduced. New-Alias Nuget $env:USERPROFILE\.nuget\packages\NuGet.CommandLine\6.3.1\tools\NuGet.exe -Force # dotnet pack is not used because ran into issues, need to test installation and starting up if to use it. - nuget pack $spec -Version $version -BasePath $input -OutputDirectory $output -Properties Configuration=Release + nuget pack $spec -Version $version -BasePath $input -OutputDirectory $output -Properties Configuration = Release $nupkg = "$output\FlowLauncher.$version.nupkg" Write-Host "nupkg path: $nupkg" @@ -106,29 +123,33 @@ function Pack-Squirrel-Installer($path, $version, $output) { Write-Host "End pack squirrel installer" } -function Publish-Self-Contained($p) { +function Publish-Self-Contained($p) +{ $csproj = Join-Path "$p" "Flow.Launcher/Flow.Launcher.csproj" -Resolve $profile = Join-Path "$p" "Flow.Launcher/Properties/PublishProfiles/Net7.0-SelfContained.pubxml" -Resolve # we call dotnet publish on the main project. # The other projects should have been built in Release at this point. - dotnet publish --no-build -c Release $csproj /p:PublishProfile=$profile + dotnet publish --no-build -c Release $csproj /p:PublishProfile = $profile } -function Publish-Portable($outputLocation, $version) { +function Publish-Portable($outputLocation, $version) +{ & $outputLocation\Flow-Launcher-Setup.exe --silent | Out-Null mkdir "$env:LocalAppData\FlowLauncher\app-$version\UserData" Compress-Archive -Path $env:LocalAppData\FlowLauncher -DestinationPath $outputLocation\Flow-Launcher-Portable.zip } -function Main { +function Main +{ $p = Build-Path $v = Build-Version Copy-Resources $p - if ($config -eq "Release") { + if ($config -eq "Release") + { Publish-Self-Contained $p @@ -140,8 +161,10 @@ function Main { Validate-Directory $o Pack-Squirrel-Installer $p $v $o -# Publish-Portable $o $v + # Publish-Portable $o $v } } Main + +#Delete-Unused "C:\Users\1\AppData\Local\FlowLauncher\app-1.0.0" "" \ No newline at end of file From 44d4435ef1258c27f9e5a5cf766a68dc9f0f8a6a Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Thu, 10 Nov 2022 13:08:23 -0600 Subject: [PATCH 27/37] fix script --- Scripts/post_build.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index eb5a948f126..80700ca805a 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -53,13 +53,13 @@ function Delete-Unused($path, $config) $included = @{ } Get-ChildItem -Path $target -r -Filter "*.dll" | Where-Object { !$_.PsIsContainer -and $_.FullName -notmatch 'Plugins' } | ForEach-Object { - $included["$($_.Name)-$($_.VersionInfo.FileVersion)"] = $true + $included["$( $_.Name )-$( $_.VersionInfo.FileVersion )"] = $true } # $included $deleteList = Get-ChildItem "$target\Plugins" -Filter "*.dll" -Recurse | - Where-Object { $included.ContainsKey("$($_.Name)-$($_.VersionInfo.FileVersion)") } + Where-Object { $included.ContainsKey("$( $_.Name )-$( $_.VersionInfo.FileVersion )") } $deleteList | ForEach-Object { @@ -99,7 +99,7 @@ function Pack-Squirrel-Installer($path, $version, $output) # making version static as multiple versions can exist in the nuget folder and in the case a breaking change is introduced. New-Alias Nuget $env:USERPROFILE\.nuget\packages\NuGet.CommandLine\6.3.1\tools\NuGet.exe -Force # dotnet pack is not used because ran into issues, need to test installation and starting up if to use it. - nuget pack $spec -Version $version -BasePath $input -OutputDirectory $output -Properties Configuration = Release + nuget pack $spec -Version $version -BasePath $input -OutputDirectory $output -Properties Configuration=Release $nupkg = "$output\FlowLauncher.$version.nupkg" Write-Host "nupkg path: $nupkg" From ea2af925f1fc1e8d040c3434cbeed60f5ee1d8a2 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Fri, 11 Nov 2022 15:15:07 -0600 Subject: [PATCH 28/37] only allow manual run for github action --- .github/workflows/dotnet.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index c5b81106d51..471058be5ca 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -4,9 +4,6 @@ name: .NET on: - push: - branches: [ "dev" ] - pull_request: workflow_dispatch: jobs: From 9800bdb77dd5f6d0305a162ff270c9f71d44d962 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Fri, 11 Nov 2022 15:22:47 -0600 Subject: [PATCH 29/37] fix postbuild --- Scripts/post_build.ps1 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index 80700ca805a..3493a9e36af 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -131,7 +131,7 @@ function Publish-Self-Contained($p) # we call dotnet publish on the main project. # The other projects should have been built in Release at this point. - dotnet publish --no-build -c Release $csproj /p:PublishProfile = $profile + dotnet publish --no-build -c Release $csproj /p:PublishProfile=$profile } function Publish-Portable($outputLocation, $version) @@ -160,11 +160,8 @@ function Main $o = "$p\Output\Packages" Validate-Directory $o Pack-Squirrel-Installer $p $v $o - - # Publish-Portable $o $v + Publish-Portable $o $v } } Main - -#Delete-Unused "C:\Users\1\AppData\Local\FlowLauncher\app-1.0.0" "" \ No newline at end of file From 6615d59779cf50412a3dc20c870f5f782e0e9552 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Fri, 11 Nov 2022 15:45:40 -0600 Subject: [PATCH 30/37] run post_build after test --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index a71779fdc24..c14e5bc6413 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -28,7 +28,7 @@ before_build: build: project: Flow.Launcher.sln verbosity: minimal -after_build: +after_test: - ps: .\Scripts\post_build.ps1 artifacts: From c4aa1819fb1b9b8a7808c8adddfd81b86b63a095 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Fri, 11 Nov 2022 15:53:23 -0600 Subject: [PATCH 31/37] test ci --- Flow.Launcher.Test/Flow.Launcher.Test.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/Flow.Launcher.Test/Flow.Launcher.Test.csproj b/Flow.Launcher.Test/Flow.Launcher.Test.csproj index 1ae407da440..2e675c85222 100644 --- a/Flow.Launcher.Test/Flow.Launcher.Test.csproj +++ b/Flow.Launcher.Test/Flow.Launcher.Test.csproj @@ -10,6 +10,7 @@ false en + false true From c1f2fc92ea63f4983d01c5216723b0ac9a248720 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Fri, 11 Nov 2022 15:57:39 -0600 Subject: [PATCH 32/37] test cache and remove output path for test --- Flow.Launcher.Test/Flow.Launcher.Test.csproj | 2 -- appveyor.yml | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Test/Flow.Launcher.Test.csproj b/Flow.Launcher.Test/Flow.Launcher.Test.csproj index 2e675c85222..a5f747d2f42 100644 --- a/Flow.Launcher.Test/Flow.Launcher.Test.csproj +++ b/Flow.Launcher.Test/Flow.Launcher.Test.csproj @@ -16,7 +16,6 @@ true portable false - bin\Debug\ DEBUG;TRACE prompt 4 @@ -25,7 +24,6 @@ pdbonly true - bin\Release\ TRACE prompt 4 diff --git a/appveyor.yml b/appveyor.yml index c14e5bc6413..1cdefcf8bcd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -31,6 +31,8 @@ build: after_test: - ps: .\Scripts\post_build.ps1 + + artifacts: - path: 'Output\Release\Flow.Launcher.Plugin.*.nupkg' name: Plugin nupkg From 3197c9e7335009a15bf32859e3b4c22e528f02e4 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Fri, 11 Nov 2022 16:08:13 -0600 Subject: [PATCH 33/37] test another path --- Flow.Launcher.Test/Flow.Launcher.Test.csproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Flow.Launcher.Test/Flow.Launcher.Test.csproj b/Flow.Launcher.Test/Flow.Launcher.Test.csproj index a5f747d2f42..abe89021c40 100644 --- a/Flow.Launcher.Test/Flow.Launcher.Test.csproj +++ b/Flow.Launcher.Test/Flow.Launcher.Test.csproj @@ -16,6 +16,7 @@ true portable false + bin\$(Platform)\Debug\ DEBUG;TRACE prompt 4 @@ -24,6 +25,7 @@ pdbonly true + bin\$(Platform)\Release\ TRACE prompt 4 From e0c835f2103331b152247641252364e872239239 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Fri, 11 Nov 2022 16:12:36 -0600 Subject: [PATCH 34/37] change platform from "Any CPU" to "AnyCPU" --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 1cdefcf8bcd..4a8e860b396 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,7 +21,7 @@ skip_commits: - '*.md' image: Visual Studio 2022 -platform: Any CPU +platform: AnyCPU configuration: Release before_build: - ps: nuget restore From 252ba254dd62acf22e5a7bc28864a3c4d09b5c44 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Fri, 11 Nov 2022 16:13:32 -0600 Subject: [PATCH 35/37] cache nuget --- appveyor.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 4a8e860b396..6c46f24c749 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,6 +7,9 @@ init: - sc config WSearch start= auto # Starts Windows Search service- Needed for running ExplorerTest - net start WSearch +cache: + - packages -> **\packages.config + assembly_info: patch: true file: SolutionAssemblyInfo.cs From f1e51fc7d8bad2e1b1fd36099ec1c05047d70787 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Fri, 11 Nov 2022 16:16:40 -0600 Subject: [PATCH 36/37] test ci --- Flow.Launcher.Test/Flow.Launcher.Test.csproj | 4 ++-- appveyor.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher.Test/Flow.Launcher.Test.csproj b/Flow.Launcher.Test/Flow.Launcher.Test.csproj index abe89021c40..eea1dddfa50 100644 --- a/Flow.Launcher.Test/Flow.Launcher.Test.csproj +++ b/Flow.Launcher.Test/Flow.Launcher.Test.csproj @@ -12,7 +12,7 @@ en false - + true portable false @@ -22,7 +22,7 @@ 4 false - + pdbonly true bin\$(Platform)\Release\ diff --git a/appveyor.yml b/appveyor.yml index 6c46f24c749..b990917ed42 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,7 +24,7 @@ skip_commits: - '*.md' image: Visual Studio 2022 -platform: AnyCPU +platform: Any CPU configuration: Release before_build: - ps: nuget restore From b10bf26f73607a5f9b4259ad8d05f65e659b4da3 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Fri, 11 Nov 2022 16:20:43 -0600 Subject: [PATCH 37/37] hardcode the path --- Flow.Launcher.Test/Flow.Launcher.Test.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Test/Flow.Launcher.Test.csproj b/Flow.Launcher.Test/Flow.Launcher.Test.csproj index eea1dddfa50..f9a98c0ab00 100644 --- a/Flow.Launcher.Test/Flow.Launcher.Test.csproj +++ b/Flow.Launcher.Test/Flow.Launcher.Test.csproj @@ -16,7 +16,7 @@ true portable false - bin\$(Platform)\Debug\ + bin\Any CPU\Debug\ DEBUG;TRACE prompt 4 @@ -25,7 +25,7 @@ pdbonly true - bin\$(Platform)\Release\ + bin\Any CPU\Release\ TRACE prompt 4