Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
30c37f0
Take space into consideration while calculating the first matched ind…
alekhyareddy28 Jun 1, 2020
d35b516
Add unit test more weight to start of new word
jjw24 Jun 22, 2020
11c4aea
fix testing to be more reflective of testing intent
jjw24 Jun 22, 2020
b0ec137
add test to safe guard exact matches
jjw24 Jun 23, 2020
c363b9a
update tests for string matcher
jjw24 Jun 23, 2020
c142a50
update unit test naming, no logic changes
jjw24 Jun 23, 2020
3abd2d0
fix formatting
jjw24 Jun 23, 2020
9d45158
Merge branch 'dev' into fix_stringmatcher_resultweighting
jjw24 Jun 23, 2020
2fd318f
refactor logging in Core.Plugin.PluginInstaller
JohnTheGr8 May 26, 2020
4abc9d8
refactor Core.Plugin.PluginConfig
JohnTheGr8 May 26, 2020
0ddd7f2
define plugin metadata file name as constant
JohnTheGr8 Jun 9, 2020
4ac1925
refactor Core.Configuration.Portable
JohnTheGr8 Jun 13, 2020
94a2393
refactor Core.Plugin.PluginInstaller
JohnTheGr8 Jun 13, 2020
35cf51f
refactor Core.Plugin.PluginsLoader
JohnTheGr8 Jun 24, 2020
0d9cfd6
refactor Core.Plugin.PluginsLoader (continued)
JohnTheGr8 Jun 24, 2020
4205db2
refactor Core.Plugin.PluginManager
JohnTheGr8 Jun 25, 2020
8a5dc55
update text message when launcher update fails
JohnTheGr8 Jun 25, 2020
3a712b7
Core/Portable: switch back to using statements
JohnTheGr8 Jun 26, 2020
ad006a2
Core/Portable: update logging, exception handling
JohnTheGr8 Jun 26, 2020
813147b
Merge branch 'dev' into refactor_core_infra
jjw24 Jun 28, 2020
4c20dbc
Merge pull request #80 from JohnTheGr8/refactor_core_infra
jjw24 Jun 28, 2020
2ff4ffd
Merge remote-tracking branch 'origin/dev' into fix_stringmatcher_resu…
jjw24 Jun 28, 2020
4676a2a
Merge pull request #77 from Flow-Launcher/fix_stringmatcher_resultwei…
jjw24 Jun 28, 2020
0304d12
update PackageVersion to 1.0.0
jjw24 Jun 28, 2020
cbefd4e
merge PR #83: update plugin version to 1.0.0
JohnTheGr8 Jun 28, 2020
ef20e2e
update appveyor version to 1.0.0
jjw24 Jun 29, 2020
5ff2782
fix environment variable search to be case insensitive
jjw24 Jun 29, 2020
c447023
merge PR #87: Update appveyor version to 1.0.0
JohnTheGr8 Jun 29, 2020
95a1b9a
fix typo
jjw24 Jun 29, 2020
b183aa7
Merge remote-tracking branch 'origin/dev' into fix_environmentpath_ca…
jjw24 Jun 29, 2020
718f683
Merge pull request #89 from Flow-Launcher/fix_environmentpath_caseins…
jjw24 Jun 29, 2020
3fa3090
Explorer plugin- change DefaultFolderSubtitleString to path
jjw24 Jun 29, 2020
492c02e
add custom plugin ToolTip on result hover over
jjw24 Jun 29, 2020
90b7559
show ToolTip directory path on current folder result
jjw24 Jun 29, 2020
bd64512
add open containing folder to file results
jjw24 Jun 29, 2020
97ca626
merge PR #94: Explorer plugin enhancements
JohnTheGr8 Jun 30, 2020
a0f931c
Add GitHub Issue Templates
kalaschnik Jul 1, 2020
16c7d5c
Add GitHub Issue Templates
kalaschnik Jul 1, 2020
79bbab9
Merge branch 'IssueTemplates' of github.com:Kalaschnik/Flow.Launcher …
kalaschnik Jul 1, 2020
ca20370
remove the hello-world plugins (#96)
JohnTheGr8 Jul 1, 2020
9fea313
Merge pull request #100 from JohnTheGr8/remove_helloworld_plugins
jjw24 Jul 1, 2020
148ffd9
Merge branch 'dev' into IssueTemplates
jjw24 Jul 2, 2020
8e38891
Update IssueTemplate
kalaschnik Jul 2, 2020
8a860ec
fix the width of the blur effect
jjw24 Jul 2, 2020
7bee288
Merge pull request #97 from Kalaschnik/IssueTemplates
jjw24 Jul 2, 2020
1b3c750
Merge branch 'dev' into fix_blur_theme
JohnTheGr8 Jul 2, 2020
8f74316
merge PR #102: fix the width of the blur effect
JohnTheGr8 Jul 2, 2020
852750d
start off the ProcessKiller plugin
JohnTheGr8 Jul 2, 2020
1707ec7
ProcessKiller: quick refactoring
JohnTheGr8 Jul 2, 2020
d0e196c
ProcessKiller: highlight result title
JohnTheGr8 Jul 2, 2020
a52575c
ProcessKiller: do not convert paths to lower-case
JohnTheGr8 Jul 2, 2020
563bf4d
ProcessKiller: add i18n support
JohnTheGr8 Jul 2, 2020
10ce003
ProcessKiller: change condition for batch kill
JohnTheGr8 Jul 2, 2020
6e6a74b
ProcessKiller: add context menu option
JohnTheGr8 Jul 2, 2020
1228114
ProcessKiller: support spaces in process search
JohnTheGr8 Jul 3, 2020
e2bef82
ProcessKiller: split source to multiple files
JohnTheGr8 Jul 3, 2020
2c53058
ProcessKiller: use process icon in context menu
JohnTheGr8 Jul 3, 2020
daa112e
ProcessKiller: add a readme
JohnTheGr8 Jul 3, 2020
a828e9c
Merge pull request #103 from JohnTheGr8/plugin_process_killer
jjw24 Jul 4, 2020
4961bf3
bump version for release
jjw24 Jul 4, 2020
956ab1f
update appveyor version
jjw24 Jul 4, 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
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: "\U0001F41E Bug report"
about: Create a bug report to help us improve Flow Launcher
title: "[Describe Your Bug]"
labels: 'bug'
assignees: ''

---

**Describe the bug/issue**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. ...
2. ...
3. ...

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Your System**
```
Windows build number: (run "ver" at a command prompt)
Flow Launcher version: (Settings => About)
```
**Flow Launcher Error Log**
<!--
The latest log file can be found here: %AppData%\FlowLauncher\Logs\<version>\<date>.txt
or for portable mode: %LocalAppData%\FlowLauncher\<App-Version>\UserData\Logs\<version>\<date>.txt
Drag and drop the log file below this comment.
-->
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/code-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: "\U0001F50E Code Review"
about: Describe (bad) code that needs to be improved
title: "[Describe Problematic Code]"
labels: 'code review'
assignees: ''

---

**Point to the corresponding file and line number(s) which could be improved.**

Click on the line number in GitHub to create an anchored link to the corresponding code section. For example:


https://github.com/Flow-Launcher/Flow.Launcher/blob/master/Flow.Launcher/Storage/TopMostRecord.cs#L8

Provide your alternative implementation idea:

```
Code
```
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/discussion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: "⁉️ Question/Discussion"
about: Create a report to help us improve
title: "[Ask a question or propose a change]"
labels: 'question/discussion'
assignees: ''

---

**Question**
Describe your question.

**Discussion**
Discuss a topic.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: "⭐ Feature request"
about: Suggest a new idea or a feature enhacement
title: "[Describe Your Feature]"
labels: 'enhancement'
assignees: ''

---

**Is your feature request related to a problem? Please describe.**

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**

A clear and concise description of what you want to happen.

**Describe alternatives you've considered**

A clear and concise description of any alternative solutions or features you've considered.

**Additional context**

Add any other context or screenshots about the feature request here.
68 changes: 28 additions & 40 deletions Flow.Launcher.Core/Configuration/Portable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ public void DisablePortableMode()
try
{
MoveUserDataFolder(DataLocation.PortableDataPath, DataLocation.RoamingDataPath);
#if DEBUG
#if !DEBUG
// Create shortcuts and uninstaller are not required in debug mode,
// otherwise will repoint the path of the actual installed production version to the debug version
#else
CreateShortcuts();
CreateUninstallerEntry();
#endif
Expand All @@ -48,10 +47,7 @@ public void DisablePortableMode()
}
catch (Exception e)
{
#if !DEBUG
Log.Exception("Portable", "Error occured while disabling portable mode", e);
#endif
throw;
Log.Exception("|Portable.DisablePortableMode|Error occured while disabling portable mode", e);
}
}

Expand All @@ -60,10 +56,9 @@ public void EnablePortableMode()
try
{
MoveUserDataFolder(DataLocation.RoamingDataPath, DataLocation.PortableDataPath);
#if DEBUG
#if !DEBUG
// Remove shortcuts and uninstaller are not required in debug mode,
// otherwise will delete the actual installed production version
#else
RemoveShortcuts();
RemoveUninstallerEntry();
#endif
Expand All @@ -76,10 +71,7 @@ public void EnablePortableMode()
}
catch (Exception e)
{
#if !DEBUG
Log.Exception("Portable", "Error occured while enabling portable mode", e);
#endif
throw;
Log.Exception("|Portable.EnablePortableMode|Error occured while enabling portable mode", e);
}
}

Expand Down Expand Up @@ -125,14 +117,13 @@ public void CreateShortcuts()
public void CreateUninstallerEntry()
{
var uninstallRegSubKey = @"Software\Microsoft\Windows\CurrentVersion\Uninstall";
// NB: Sometimes the Uninstall key doesn't exist
using (var parentKey =
RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Default)
.CreateSubKey("Uninstall", RegistryKeyPermissionCheck.ReadWriteSubTree)) {; }

var key = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Default)
.CreateSubKey(uninstallRegSubKey + "\\" + Constant.FlowLauncher, RegistryKeyPermissionCheck.ReadWriteSubTree);
key.SetValue("DisplayIcon", Constant.ApplicationDirectory + "\\app.ico", RegistryValueKind.String);
using (var baseKey = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Default))
using (var subKey1 = baseKey.CreateSubKey(uninstallRegSubKey, RegistryKeyPermissionCheck.ReadWriteSubTree))
using (var subKey2 = subKey1.CreateSubKey(Constant.FlowLauncher, RegistryKeyPermissionCheck.ReadWriteSubTree))
{
subKey2.SetValue("DisplayIcon", Path.Combine(Constant.ApplicationDirectory, "app.ico"), RegistryValueKind.String);
}

using (var portabilityUpdater = NewUpdateManager())
{
Expand All @@ -142,7 +133,10 @@ public void CreateUninstallerEntry()

internal void IndicateDeletion(string filePathTodelete)
{
using (StreamWriter sw = File.CreateText(filePathTodelete + "\\" + DataLocation.DeletionIndicatorFile)){}
var deleteFilePath = Path.Combine(filePathTodelete, DataLocation.DeletionIndicatorFile);
using (var _ = File.CreateText(deleteFilePath))
{
}
}

///<summary>
Expand All @@ -152,21 +146,18 @@ internal void IndicateDeletion(string filePathTodelete)
public void PreStartCleanUpAfterPortabilityUpdate()
{
// Specify here so this method does not rely on other environment variables to initialise
var portableDataPath = Path.Combine(Directory.GetParent(Assembly.GetExecutingAssembly().Location.NonNull()).ToString(), "UserData");
var roamingDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FlowLauncher");

bool DataLocationPortableDeleteRequired = false;
bool DataLocationRoamingDeleteRequired = false;

if ((roamingDataPath + "\\" + DataLocation.DeletionIndicatorFile).FileExits())
DataLocationRoamingDeleteRequired = true;
var portableDataDir = Path.Combine(Directory.GetParent(Assembly.GetExecutingAssembly().Location.NonNull()).ToString(), "UserData");
var roamingDataDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FlowLauncher");

if ((portableDataPath + "\\" + DataLocation.DeletionIndicatorFile).FileExits())
DataLocationPortableDeleteRequired = true;
// Get full path to the .dead files for each case
var portableDataDeleteFilePath = Path.Combine(portableDataDir, DataLocation.DeletionIndicatorFile);
var roamingDataDeleteFilePath = Path.Combine(roamingDataDir, DataLocation.DeletionIndicatorFile);

if (DataLocationRoamingDeleteRequired)
// If the data folder in %appdata% is marked for deletion,
// delete it and prompt the user to pick the portable data location
if (File.Exists(roamingDataDeleteFilePath))
{
FilesFolders.RemoveFolderIfExists(roamingDataPath);
FilesFolders.RemoveFolderIfExists(roamingDataDir);

if (MessageBox.Show("Flow Launcher has detected you enabled portable mode, " +
"would you like to move it to a different location?", string.Empty,
Expand All @@ -176,18 +167,15 @@ public void PreStartCleanUpAfterPortabilityUpdate()

Environment.Exit(0);
}

return;
}

if(DataLocationPortableDeleteRequired)
// Otherwise, if the portable data folder is marked for deletion,
// delete it and notify the user about it.
else if (File.Exists(portableDataDeleteFilePath))
{
FilesFolders.RemoveFolderIfExists(portableDataPath);
FilesFolders.RemoveFolderIfExists(portableDataDir);

MessageBox.Show("Flow Launcher has detected you disabled portable mode, " +
"the relevant shortcuts and uninstaller entry have been created");

return;
}
}

Expand All @@ -196,7 +184,7 @@ public bool CanUpdatePortability()
var roamingLocationExists = DataLocation.RoamingDataPath.LocationExists();
var portableLocationExists = DataLocation.PortableDataPath.LocationExists();

if(roamingLocationExists && portableLocationExists)
if (roamingLocationExists && portableLocationExists)
{
MessageBox.Show(string.Format("Flow Launcher detected your user data exists both in {0} and " +
"{1}. {2}{2}Please delete {1} in order to proceed. No changes have occured.",
Expand Down
22 changes: 7 additions & 15 deletions Flow.Launcher.Core/Plugin/PluginConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Flow.Launcher.Infrastructure.Exception;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Plugin;

Expand All @@ -13,24 +12,16 @@ namespace Flow.Launcher.Core.Plugin

internal abstract class PluginConfig
{
private const string PluginConfigName = "plugin.json";
private static readonly List<PluginMetadata> PluginMetadatas = new List<PluginMetadata>();

/// <summary>
/// Parse plugin metadata in giving directories
/// Parse plugin metadata in the given directories
/// </summary>
/// <param name="pluginDirectories"></param>
/// <returns></returns>
public static List<PluginMetadata> Parse(string[] pluginDirectories)
{
PluginMetadatas.Clear();
var allPluginMetadata = new List<PluginMetadata>();
var directories = pluginDirectories.SelectMany(Directory.GetDirectories);
ParsePluginConfigs(directories);
return PluginMetadatas;
}

private static void ParsePluginConfigs(IEnumerable<string> directories)
{
// todo use linq when diable plugin is implmented since parallel.foreach + list is not thread saft
foreach (var directory in directories)
{
Expand All @@ -50,15 +41,17 @@ private static void ParsePluginConfigs(IEnumerable<string> directories)
PluginMetadata metadata = GetPluginMetadata(directory);
if (metadata != null)
{
PluginMetadatas.Add(metadata);
allPluginMetadata.Add(metadata);
}
}
}

return allPluginMetadata;
}

private static PluginMetadata GetPluginMetadata(string pluginDirectory)
{
string configPath = Path.Combine(pluginDirectory, PluginConfigName);
string configPath = Path.Combine(pluginDirectory, Constant.PluginMetadataFileName);
if (!File.Exists(configPath))
{
Log.Error($"|PluginConfig.GetPluginMetadata|Didn't find config file <{configPath}>");
Expand All @@ -81,7 +74,6 @@ private static PluginMetadata GetPluginMetadata(string pluginDirectory)
return null;
}


if (!AllowedLanguage.IsAllowed(metadata.Language))
{
Log.Error($"|PluginConfig.GetPluginMetadata|Invalid language <{metadata.Language}> for config <{configPath}>");
Expand Down
Loading