Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM64 Build #2985

Open
wants to merge 15 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 110 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# 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:
workflow_dispatch:
push:
branches:
- dev
- master
pull_request:
branches:
- dev
- master

jobs:
build:

runs-on: windows-latest
env:
FlowVersion: 1.18.0
NUGET_CERT_REVOCATION_MODE: offline
BUILD_NUMBER: ${{ github.run_number }}
steps:
- uses: actions/checkout@v4
- name: Set Flow.Launcher.csproj version
id: update
uses: vers-one/[email protected]
with:
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:
dotnet-version: 7.0.x
- name: Install vpk
Install vpk tool (dotnet tool install will not reinstall if already installed)
We will update the cli by removing cache
run: |
if (!(Get-Command vpk -ErrorAction SilentlyContinue)) {
dotnet tool install -g vpk
}
- name: Restore dependencies
run: dotnet restore -r win-arm64
- name: Build
run: dotnet build --no-restore -c Release -p:FlowRuntimeIdentifier=win-arm64
- name: Initialize Service
run: |
sc config WSearch start= auto # Starts Windows Search service- Needed for running ExplorerTest
net start WSearch
# - name: Test
# run: dotnet test --no-build --verbosity normal -c Release -p:FlowRuntimeIdentifier=win-arm64
- name: Perform post_build tasks
shell: pwsh
run: .\Scripts\post_build.ps1 -flowversion "${env:FlowVersion}-build.${env:BUILD_NUMBER}"
- name: Upload Plugin Nupkg
uses: actions/upload-artifact@v4
with:
name: Plugin nupkg
path: |
Output\Release\Flow.Launcher.Plugin.*.nupkg
compression-level: 0
- name: Upload Setup
uses: actions/upload-artifact@v4
with:
name: Flow Installer
path: |
Output\Packages\Flow-Launcher-*.exe
compression-level: 0
- name: Upload Portable Version
uses: actions/upload-artifact@v4
with:
name: Portable Version
path: |
Output\Packages\Flow-Launcher-Portable.zip
compression-level: 0
- name: Upload Full Nupkg
uses: actions/upload-artifact@v4
with:
name: Full nupkg
path: |
Output\Packages\FlowLauncher-*-full.nupkg

compression-level: 0
- name: Upload Release Information
uses: actions/upload-artifact@v4
with:
name: RELEASES
path: |
Output\Packages\RELEASES
compression-level: 0

1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project>
<PropertyGroup>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
<RuntimeIdentifier>$(FlowRuntimeIdentifier)</RuntimeIdentifier>
</PropertyGroup>
</Project>
7 changes: 7 additions & 0 deletions Flow.Launcher/Flow.Launcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM64' ">
<DefineConstants>ARM64;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM64' ">
<DefineConstants>ARM64;$(DefineConstants)</DefineConstants>
</PropertyGroup>

<ItemGroup>
<ApplicationDefinition Remove="App.xaml" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<Platform>ARM64</Platform>
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
<PublishDir>..\Output\Release\</PublishDir>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun>False</PublishReadyToRun>
Expand Down
Binary file not shown.
1 change: 1 addition & 0 deletions Plugins/Flow.Launcher.Plugin.Explorer/Languages/en.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
<!-- Everything -->
<system:String x:Key="flowlauncher_plugin_everything_sdk_issue">Failed to load Everything SDK</system:String>
<system:String x:Key="flowlauncher_plugin_everything_is_not_running">Warning: Everything service is not running</system:String>
<system:String x:Key="flowlauncher_plugin_everything_arm64_not_supported">ARM64 is not supported for everything.</system:String>
<system:String x:Key="flowlauncher_plugin_everything_query_error">Error while querying Everything</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by">Sort By</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_name">Name</system:String>
Expand Down
6 changes: 4 additions & 2 deletions Plugins/Flow.Launcher.Plugin.Explorer/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -75,7 +77,7 @@ public async Task<List<Result>> 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
: _ =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,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))
Expand All @@ -42,7 +51,9 @@ private async ValueTask ThrowIfEverythingNotAvailableAsync(CancellationToken tok

private async ValueTask<bool> ClickToInstallEverythingAsync(ActionContext _)
{
var installedPath = await EverythingDownloadHelper.PromptDownloadIfNotInstallAsync(Settings.EverythingInstalledPath, Main.Context.API);
var installedPath =
await EverythingDownloadHelper.PromptDownloadIfNotInstallAsync(Settings.EverythingInstalledPath,
Main.Context.API);

if (installedPath == null)
{
Expand All @@ -57,17 +68,18 @@ private async ValueTask<bool> ClickToInstallEverythingAsync(ActionContext _)
return true;
}

public async IAsyncEnumerable<SearchResult> SearchAsync(string search, [EnumeratorCancellation] CancellationToken token)
public async IAsyncEnumerable<SearchResult> 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))
Expand Down Expand Up @@ -110,7 +122,8 @@ public async IAsyncEnumerable<SearchResult> ContentSearchAsync(string plainSearc
}
}

public async IAsyncEnumerable<SearchResult> EnumerateAsync(string path, string search, bool recursive, [EnumeratorCancellation] CancellationToken token)
public async IAsyncEnumerable<SearchResult> EnumerateAsync(string path, string search, bool recursive,
[EnumeratorCancellation] CancellationToken token)
{
await ThrowIfEverythingNotAvailableAsync(token);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Scripts/post_build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function Main {
Validate-Directory $o
Pack-Squirrel-Installer $p $v $o

Publish-Portable $o $v
# Publish-Portable $o $v
}
}

Expand Down
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ assembly_info:
assembly_informational_version: $(flowVersion)

image: Visual Studio 2022
platform: Any CPU
platform: ARM64
configuration: Release
before_build:
- ps: nuget restore
build:
project: Flow.Launcher.sln
verbosity: minimal

test_script:
- dotnet test --no-build -c Release
after_test:
Expand Down
Loading