Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
e37217c
From alekhyareddy28:memoryIssue on Jun 27, 2020
alekhyareddy28 Aug 5, 2020
086c5d0
update to Flow
jjw24 Aug 5, 2020
86f6f99
update to use concurrent dictionary
jjw24 Aug 5, 2020
ffa68a5
use updated method from ImageCache class to save images to cache
jjw24 Aug 5, 2020
ca08e60
revert-image cache as dictionary, concurrent not serializable
jjw24 Aug 9, 2020
4e534b5
Skip ErrorIcon and DefaultIcon while resizing the dictionary. From ar…
arjunbalgovind Aug 10, 2020
97f7b48
fix BrowserBookmark dll name capitalisation
jjw24 Sep 10, 2020
1e5d7bd
add class to load assembly and resolve dependencies for each plugin
jjw24 Sep 16, 2020
ef95006
add Directory.Build.targets and update project files
jjw24 Sep 20, 2020
a8eda14
update dependency resolver to cater for existing dependency in Plugin
jjw24 Sep 21, 2020
904ad1a
include Directory.Build.targets file in solution
jjw24 Sep 21, 2020
7fd9c87
remove excess or duplicated package references
jjw24 Sep 21, 2020
4bfc733
Merge remote-tracking branch 'origin/dev' into fix_plugin_depenedency…
jjw24 Sep 21, 2020
d9085ca
Change Reference
bao-qian Oct 15, 2020
a1327c1
Seems that we don't need storage cache
taooceros Oct 15, 2020
3454dc6
Change Pinyin Library
bao-qian Oct 15, 2020
d17621c
change new string to string.concat()
taooceros Oct 17, 2020
c4b81a9
change query translation to Program.Main instead of using Alphabet.Tr…
taooceros Oct 18, 2020
4ebfba7
using ContainKey instead of getvalueofdefault
taooceros Oct 18, 2020
dd2d3c6
fixup the reduced code due to testing
taooceros Oct 18, 2020
6210454
Fix reverse condition
taooceros Oct 19, 2020
4bf5b2e
Add curly bracket
taooceros Oct 19, 2020
9b779d9
Add curly bracket
taooceros Oct 19, 2020
fb25d54
Add curly bracket
taooceros Oct 19, 2020
80a2f0d
Put tranlate query back to fuzzy search until better solution
taooceros Oct 21, 2020
48faa99
Merge branch 'dev' into fix_plugin_depenedency_loading
jjw24 Oct 24, 2020
77aff43
Initialize uninitialized cache
taooceros Oct 25, 2020
991227a
Add Enabled property to generic
taooceros Oct 14, 2020
24ce101
Improve reindex speed
taooceros Oct 14, 2020
86edae2
Use Generic to remove duplicate query
taooceros Oct 14, 2020
d65f5a3
remove extra fuzzy search
taooceros Oct 25, 2020
04ee651
remove extra fuzzy search
taooceros Oct 25, 2020
831f02c
Merge branch 'ProgramPluginImprovement' of github.com:taooceros/Flow.…
taooceros Oct 25, 2020
22fa8c1
Version Bump
taooceros Oct 25, 2020
a266c3f
Add Edge Dev bookmark
taooceros Oct 26, 2020
64f5181
Use the score from fuzzy search for bookmark search
taooceros Oct 26, 2020
ca264c3
Change contain to StartWith
taooceros Oct 28, 2020
8be2cf1
Change contain to StartWith
taooceros Oct 28, 2020
e7c4d83
Merge branch 'ProgramPluginImprovement' of github.com:taooceros/Flow.…
taooceros Oct 28, 2020
f146dd6
Removed unused using due to query translation
taooceros Nov 1, 2020
eb73656
Change the Alphabet Name to allow future expansion
taooceros Nov 1, 2020
da801f8
remove extra whitespace
taooceros Nov 1, 2020
9caa4d9
remove extra else
taooceros Nov 1, 2020
a0f552f
remove unused PinyinName Property and Version Bump
taooceros Nov 1, 2020
aa3177d
Merge pull request #183 from taooceros/PinyinLibraryChange
jjw24 Nov 1, 2020
c254c93
Merge pull request #190 from taooceros/BookMarkFix
jjw24 Nov 1, 2020
3181637
bump version
jjw24 Nov 1, 2020
732f3b4
Merge branch 'dev' into fix_plugin_depenedency_loading
jjw24 Nov 1, 2020
465146d
Add Exploere Customize to Program Plugin
taooceros Nov 3, 2020
5ba4e51
Add customized args
taooceros Nov 4, 2020
9de105b
Add customized args
taooceros Nov 4, 2020
ae8a6a0
bump version Program plugin
jjw24 Nov 8, 2020
8df4de9
move text to language xml
jjw24 Nov 8, 2020
b962e4d
use const instead of strings
jjw24 Nov 8, 2020
51ea7ab
remove empty string init
jjw24 Nov 8, 2020
d5d263b
update property name and use const
jjw24 Nov 8, 2020
ead4c9a
Add more customized args
taooceros Nov 9, 2020
39233cb
adjusted layout of the Add buttons and CustomizedExplorer fields
jjw24 Nov 9, 2020
3d06ade
Customize select funtionality in win32 except globally in program, an…
taooceros Nov 9, 2020
82afd37
Merge branch 'CustomizeExplorer' of github.com:taooceros/Flow.Launche…
taooceros Nov 9, 2020
c5720df
Adjust ui to not exceed boundary
taooceros Nov 9, 2020
e16f0e4
Fix opening UWP containing folder
taooceros Nov 10, 2020
8010179
Merge pull request #194 from taooceros/CustomizeExplorer
jjw24 Nov 10, 2020
d0cb802
Merge branch 'dev' into address_high_memory_issue
jjw24 Nov 10, 2020
d3d69be
fix merge error
jjw24 Nov 10, 2020
d4b5a19
add check for null or empty for description
taooceros Nov 11, 2020
b52ef23
Merge branch 'dev' into ProgramPluginImprovement
jjw24 Nov 11, 2020
d1be135
fix alignment, no logic changes
jjw24 Nov 11, 2020
2cc4e84
alignment no logic changes
jjw24 Nov 11, 2020
54ebe68
Merge pull request #189 from taooceros/ProgramPluginImprovement
jjw24 Nov 11, 2020
4d15e09
Revert unintended change
jjw24 Nov 11, 2020
44654e5
merge PR #196: Revert unintended change
JohnTheGr8 Nov 11, 2020
bf271b9
refactor Image Cache to single dictionary
taooceros Nov 7, 2020
55fb553
change struct to class to use reference type
taooceros Nov 11, 2020
822621d
remove unintended module
taooceros Nov 11, 2020
26285ab
fix formatting
jjw24 Nov 12, 2020
0ab7dc6
Merge pull request #133 from Flow-Launcher/address_high_memory_issue
taooceros Nov 12, 2020
e72407f
merge PR #160: fix plugin dependency loading
JohnTheGr8 Nov 12, 2020
601bc88
version bump Plugin
jjw24 Nov 12, 2020
6af40cb
version bump plugins
jjw24 Nov 12, 2020
e3c8d81
update appveyor.yml
JohnTheGr8 Nov 12, 2020
336cb3c
Merge pull request #192 from Flow-Launcher/bump_version
jjw24 Nov 12, 2020
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
15 changes: 15 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project>
<Target Name="ExcludePluginProjectReferenceOutput"
AfterTargets="AssignProjectConfiguration"
BeforeTargets="ResolveProjectReferences"
Condition="'$(OutputType)' == 'Library' and '$(CopyLocalLockFileAssemblies)' == 'true' and $(AssemblyName.EndsWith('Tests')) == 'false' ">
<ItemGroup>
<ProjectReferenceWithConfiguration Update="@(ProjectReferenceWithConfiguration)" >
<Private>false</Private>
</ProjectReferenceWithConfiguration>
<ProjectReference Update="@(ProjectReference)" >
<Private>false</Private>
</ProjectReference>
</ItemGroup>
</Target>
</Project>
4 changes: 0 additions & 4 deletions Flow.Launcher.Core/Flow.Launcher.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,8 @@

<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.7.1" />
<PackageReference Include="JetBrains.Annotations" Version="2019.1.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="squirrel.windows" Version="1.5.2" />
<PackageReference Include="PropertyChanged.Fody" Version="2.5.13" />
<PackageReference Include="SharpZipLib" Version="1.2.0" />
<PackageReference Include="System.Runtime" Version="4.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down
57 changes: 57 additions & 0 deletions Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
using Flow.Launcher.Infrastructure;
using System;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.Loader;

namespace Flow.Launcher.Core.Plugin
{
internal class PluginAssemblyLoader : AssemblyLoadContext
{
private readonly AssemblyDependencyResolver dependencyResolver;

private readonly AssemblyDependencyResolver referencedPluginPackageDependencyResolver;

private readonly AssemblyName assemblyName;

internal PluginAssemblyLoader(string assemblyFilePath)
{
dependencyResolver = new AssemblyDependencyResolver(assemblyFilePath);
assemblyName = new AssemblyName(Path.GetFileNameWithoutExtension(assemblyFilePath));

referencedPluginPackageDependencyResolver =
new AssemblyDependencyResolver(Path.Combine(Constant.ProgramDirectory, "Flow.Launcher.Plugin.dll"));
}

internal Assembly LoadAssemblyAndDependencies()
{
return LoadFromAssemblyName(assemblyName);
}

protected override Assembly Load(AssemblyName assemblyName)
{
string assemblyPath = dependencyResolver.ResolveAssemblyToPath(assemblyName);

// When resolving dependencies, ignore assembly depenedencies that already exits with Flow.Launcher.Plugin
// Otherwise will get unexpected behaviour with plugins, e.g. JsonIgnore attribute not honored in WebSearch or other plugins
// that use Newtonsoft.Json
if (assemblyPath == null || ExistsInReferencedPluginPackage(assemblyName))
return null;

return LoadFromAssemblyPath(assemblyPath);
}

internal Type FromAssemblyGetTypeOfInterface(Assembly assembly, Type type)
{
var allTypes = assembly.ExportedTypes;

return allTypes.First(o => o.IsClass && !o.IsAbstract && o.GetInterfaces().Contains(type));
}

internal bool ExistsInReferencedPluginPackage(AssemblyName assemblyName)
{
return referencedPluginPackageDependencyResolver.ResolveAssemblyToPath(assemblyName) != null;
}
}
}
12 changes: 6 additions & 6 deletions Flow.Launcher.Core/Plugin/PluginsLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ public static IEnumerable<PluginPair> DotNetPlugins(List<PluginMetadata> source)
{

#if DEBUG
var assembly = AssemblyLoadContext.Default.LoadFromAssemblyPath(metadata.ExecuteFilePath);
var types = assembly.GetTypes();
var type = types.First(o => o.IsClass && !o.IsAbstract && o.GetInterfaces().Contains(typeof(IPlugin)));
var assemblyLoader = new PluginAssemblyLoader(metadata.ExecuteFilePath);
var assembly = assemblyLoader.LoadAssemblyAndDependencies();
var type = assemblyLoader.FromAssemblyGetTypeOfInterface(assembly, typeof(IPlugin));
var plugin = (IPlugin)Activator.CreateInstance(type);
#else
Assembly assembly = null;
IPlugin plugin = null;

try
{
assembly = AssemblyLoadContext.Default.LoadFromAssemblyPath(metadata.ExecuteFilePath);
var assemblyLoader = new PluginAssemblyLoader(metadata.ExecuteFilePath);
assembly = assemblyLoader.LoadAssemblyAndDependencies();

var types = assembly.GetTypes();
var type = types.First(o => o.IsClass && !o.IsAbstract && o.GetInterfaces().Contains(typeof(IPlugin)));
var type = assemblyLoader.FromAssemblyGetTypeOfInterface(assembly, typeof(IPlugin));

plugin = (IPlugin)Activator.CreateInstance(type);
}
Expand Down
178 changes: 0 additions & 178 deletions Flow.Launcher.Infrastructure/Alphabet.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2019.1.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="NLog.Schema" Version="4.7.0-rc1" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.9.0" />
<PackageReference Include="Pinyin4DotNet" Version="2016.4.23.4" />
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
<PackageReference Include="System.Runtime" Version="4.3.1" />
<PackageReference Include="PropertyChanged.Fody" Version="2.5.13" />
<PackageReference Include="ToolGood.Words.Pinyin" Version="3.0.1.4" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading