diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 7498262deba..9aa4b2bf29f 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -10,6 +10,9 @@ on: - dev - master pull_request: + branches: + - dev + - master jobs: build: @@ -28,6 +31,22 @@ jobs: file: | "**/SolutionAssemblyInfo.cs" version: ${{ env.FlowVersion }}.${{ env.BUILD_NUMBER }} + - uses: actions/cache@v4 + name: Restore Nuget Cache + with: + path: | + ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} + restore-keys: | + ${{ runner.os }}-nuget + - uses: actions/cache@v4 + name: Restore dotnet tool Cache + with: + path: | + ~/.dotnet/tools + key: ${{ runner.os }}-dotnet-tools-${{ hashFiles('~/.dotnet/tools/**') }} + restore-keys: | + ${{ runner.os }}-dotnet-tools - name: Setup .NET uses: actions/setup-dotnet@v4 with: @@ -89,3 +108,4 @@ jobs: path: | Output\Packages\RELEASES compression-level: 0 + diff --git a/Directory.Build.props b/Directory.Build.props index fa499273c56..bf2e468197c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,5 +1,6 @@ true + $(FlowRuntimeIdentifier) \ No newline at end of file diff --git a/Flow.Launcher/Flow.Launcher.csproj b/Flow.Launcher/Flow.Launcher.csproj index 37e1f6bcfd5..68dec3eb190 100644 --- a/Flow.Launcher/Flow.Launcher.csproj +++ b/Flow.Launcher/Flow.Launcher.csproj @@ -38,6 +38,13 @@ false + + ARM64;$(DefineConstants) + + + ARM64;$(DefineConstants) + + diff --git a/Flow.Launcher/Properties/PublishProfiles/Net7.0-SelfContained.pubxml b/Flow.Launcher/Properties/PublishProfiles/Net7.0-SelfContained.pubxml index 0e5cf4489b2..9ce1f958e85 100644 --- a/Flow.Launcher/Properties/PublishProfiles/Net7.0-SelfContained.pubxml +++ b/Flow.Launcher/Properties/PublishProfiles/Net7.0-SelfContained.pubxml @@ -6,10 +6,10 @@ https://go.microsoft.com/fwlink/?LinkID=208121. FileSystem Release - Any CPU + ARM64 net7.0-windows10.0.19041.0 ..\Output\Release\ - win-x64 + win-arm64 true False False diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/EverythingSDK/arm64/Everything.dll b/Plugins/Flow.Launcher.Plugin.Explorer/EverythingSDK/arm64/Everything.dll new file mode 100644 index 00000000000..49f487d469b Binary files /dev/null and b/Plugins/Flow.Launcher.Plugin.Explorer/EverythingSDK/arm64/Everything.dll differ diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml index 2e0f6a67db3..e391acd29d1 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml @@ -141,6 +141,7 @@ Failed to load Everything SDK Warning: Everything service is not running + ARM64 is not supported for everything. Error while querying Everything Sort By Name diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs index f1aea98b4bf..8f40ea921ec 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs @@ -42,11 +42,13 @@ public Task InitAsync(PluginInitContext context) contextMenu = new ContextMenu(Context, Settings, viewModel); searchManager = new SearchManager(Settings, Context); ResultManager.Init(Context, Settings); - + SortOptionTranslationHelper.API = context.API; +#if !ARM64 EverythingApiDllImport.Load(Path.Combine(Context.CurrentPluginMetadata.PluginDirectory, "EverythingSDK", Environment.Is64BitProcess ? "x64" : "x86")); +#endif return Task.CompletedTask; } @@ -75,7 +77,7 @@ public async Task> QueryAsync(Query query, CancellationToken token) IcoPath = e is EngineNotAvailableException { ErrorIcon: { } iconPath } ? iconPath : Constants.GeneralSearchErrorImagePath, - AsyncAction = e is EngineNotAvailableException {Action: { } action} + AsyncAction = e is EngineNotAvailableException { Action: { } action } ? action : _ => { diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingSearchManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingSearchManager.cs index ce71c94ba34..7248dbb3dc8 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingSearchManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingSearchManager.cs @@ -22,6 +22,15 @@ public EverythingSearchManager(Settings settings) private async ValueTask ThrowIfEverythingNotAvailableAsync(CancellationToken token = default) { +#if ARM64 + throw new EngineNotAvailableException( + Enum.GetName(Settings.IndexSearchEngineOption.Everything)!, + "ARM64 is not supported", + Main.Context.API.GetTranslation("flowlauncher_plugin_everything_not_support_arm64"), + Constants.EverythingErrorImagePath, + _ => ValueTask.FromResult(false)); +#endif + try { if (!await EverythingApi.IsEverythingRunningAsync(token)) @@ -46,7 +55,9 @@ private async ValueTask ClickToInstallEverythingAsync(ActionContext _) { try { - var installedPath = await EverythingDownloadHelper.PromptDownloadIfNotInstallAsync(Settings.EverythingInstalledPath, Main.Context.API); + var installedPath = + await EverythingDownloadHelper.PromptDownloadIfNotInstallAsync(Settings.EverythingInstalledPath, + Main.Context.API); if (installedPath == null) { @@ -72,17 +83,18 @@ private async ValueTask ClickToInstallEverythingAsync(ActionContext _) } } - public async IAsyncEnumerable SearchAsync(string search, [EnumeratorCancellation] CancellationToken token) + public async IAsyncEnumerable SearchAsync(string search, + [EnumeratorCancellation] CancellationToken token) { await ThrowIfEverythingNotAvailableAsync(token); if (token.IsCancellationRequested) yield break; - var option = new EverythingSearchOption(search, - Settings.SortOption, - MaxCount: Settings.MaxResult, - IsFullPathSearch: Settings.EverythingSearchFullPath, + var option = new EverythingSearchOption(search, + Settings.SortOption, + MaxCount: Settings.MaxResult, + IsFullPathSearch: Settings.EverythingSearchFullPath, IsRunCounterEnabled: Settings.EverythingEnableRunCount); await foreach (var result in EverythingApi.SearchAsync(option, token)) @@ -125,7 +137,8 @@ public async IAsyncEnumerable ContentSearchAsync(string plainSearc } } - public async IAsyncEnumerable EnumerateAsync(string path, string search, bool recursive, [EnumeratorCancellation] CancellationToken token) + public async IAsyncEnumerable EnumerateAsync(string path, string search, bool recursive, + [EnumeratorCancellation] CancellationToken token) { await ThrowIfEverythingNotAvailableAsync(token); diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs index f4f87d4d4be..e7760a3221b 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs @@ -99,7 +99,7 @@ when ActionKeywordMatch(query, Settings.ActionKeyword.FileContentSearchActionKey case false when ActionKeywordMatch(query, Settings.ActionKeyword.IndexSearchActionKeyword) || ActionKeywordMatch(query, Settings.ActionKeyword.SearchActionKeyword): - + searchResults = Settings.IndexProvider.SearchAsync(query.Search, token); engineName = Enum.GetName(Settings.IndexSearchEngine); break; diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index e54852d321b..448e24ac5d8 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -130,7 +130,7 @@ function Main { Validate-Directory $o Pack-Squirrel-Installer $p $v $o - Publish-Portable $o $v +# Publish-Portable $o $v } } diff --git a/appveyor.yml b/appveyor.yml index 39e2a114c7c..cb946a9dd92 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -25,7 +25,7 @@ assembly_info: assembly_informational_version: $(flowVersion) image: Visual Studio 2022 -platform: Any CPU +platform: ARM64 configuration: Release before_build: - ps: | @@ -41,6 +41,7 @@ before_build: build: project: Flow.Launcher.sln verbosity: minimal + test_script: - dotnet test --no-build -c Release after_test: