Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
{
internal class PythonEnvironment : AbstractPluginEnvironment
{
private static readonly string ClassName = nameof(PythonEnvironment);

internal override string Language => AllowedLanguage.Python;

internal override string EnvName => DataLocation.PythonEnvironmentName;
Expand All @@ -31,7 +33,7 @@

internal PythonEnvironment(List<PluginMetadata> pluginMetadataList, PluginsSettings pluginSettings) : base(pluginMetadataList, pluginSettings) { }

private JoinableTaskFactory JTF { get; } = new JoinableTaskFactory(new JoinableTaskContext());

Check warning on line 36 in Flow.Launcher.Core/ExternalPlugins/Environments/PythonEnvironment.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`JTF` is not a recognized word. (unrecognized-spelling)

internal override void InstallEnvironment()
{
Expand All @@ -39,9 +41,20 @@

// Python 3.11.4 is no longer Windows 7 compatible. If user is on Win 7 and
// uses Python plugin they need to custom install and use v3.8.9
JTF.Run(() => DroplexPackage.Drop(App.python_3_11_4_embeddable, InstallPath));
JTF.Run(async () =>

Check warning on line 44 in Flow.Launcher.Core/ExternalPlugins/Environments/PythonEnvironment.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`JTF` is not a recognized word. (unrecognized-spelling)

Check warning on line 44 in Flow.Launcher.Core/ExternalPlugins/Environments/PythonEnvironment.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`JTF` is not a recognized word. (unrecognized-spelling)
{
try
{
await DroplexPackage.Drop(App.python_3_11_4_embeddable, InstallPath);

PluginsSettingsFilePath = ExecutablePath;
PluginsSettingsFilePath = ExecutablePath;
}
catch (System.Exception e)
{
API.ShowMsgError(API.GetTranslation("failToInstallPythonEnv"));
API.LogException(ClassName, "Failed to install Python environment", e);
}
});
}

internal override PluginPair CreatePluginPair(string filePath, PluginMetadata metadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
{
internal class TypeScriptEnvironment : AbstractPluginEnvironment
{
private static readonly string ClassName = nameof(TypeScriptEnvironment);

internal override string Language => AllowedLanguage.TypeScript;

internal override string EnvName => DataLocation.NodeEnvironmentName;
Expand All @@ -28,15 +30,26 @@

internal TypeScriptEnvironment(List<PluginMetadata> pluginMetadataList, PluginsSettings pluginSettings) : base(pluginMetadataList, pluginSettings) { }

private JoinableTaskFactory JTF { get; } = new JoinableTaskFactory(new JoinableTaskContext());

Check warning on line 33 in Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptEnvironment.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`JTF` is not a recognized word. (unrecognized-spelling)

Check warning on line 33 in Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptEnvironment.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`JTF` is not a recognized word. (unrecognized-spelling)

internal override void InstallEnvironment()
{
FilesFolders.RemoveFolderIfExists(InstallPath, (s) => API.ShowMsgBox(s));

JTF.Run(() => DroplexPackage.Drop(App.nodejs_16_18_0, InstallPath));
JTF.Run(async () =>

Check warning on line 39 in Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptEnvironment.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`JTF` is not a recognized word. (unrecognized-spelling)
{
try
{
await DroplexPackage.Drop(App.nodejs_16_18_0, InstallPath);

PluginsSettingsFilePath = ExecutablePath;
PluginsSettingsFilePath = ExecutablePath;
}
catch (System.Exception e)
{
API.ShowMsgError(API.GetTranslation("failToInstallTypeScriptEnv"));
API.LogException(ClassName, "Failed to install TypeScript environment", e);
}
});
}

internal override PluginPair CreatePluginPair(string filePath, PluginMetadata metadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
{
internal class TypeScriptV2Environment : AbstractPluginEnvironment
{
private static readonly string ClassName = nameof(TypeScriptV2Environment);

internal override string Language => AllowedLanguage.TypeScriptV2;

internal override string EnvName => DataLocation.NodeEnvironmentName;
Expand All @@ -28,15 +30,26 @@

internal TypeScriptV2Environment(List<PluginMetadata> pluginMetadataList, PluginsSettings pluginSettings) : base(pluginMetadataList, pluginSettings) { }

private JoinableTaskFactory JTF { get; } = new JoinableTaskFactory(new JoinableTaskContext());

Check warning on line 33 in Flow.Launcher.Core/ExternalPlugins/Environments/TypeScriptV2Environment.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`JTF` is not a recognized word. (unrecognized-spelling)

internal override void InstallEnvironment()
{
FilesFolders.RemoveFolderIfExists(InstallPath, (s) => API.ShowMsgBox(s));

JTF.Run(() => DroplexPackage.Drop(App.nodejs_16_18_0, InstallPath));
JTF.Run(async () =>
{
try
{
await DroplexPackage.Drop(App.nodejs_16_18_0, InstallPath);

PluginsSettingsFilePath = ExecutablePath;
PluginsSettingsFilePath = ExecutablePath;
}
catch (System.Exception e)
{
API.ShowMsgError(API.GetTranslation("failToInstallTypeScriptEnv"));
API.LogException(ClassName, "Failed to install TypeScript environment", e);
}
});
}

internal override PluginPair CreatePluginPair(string filePath, PluginMetadata metadata)
Expand Down
4 changes: 4 additions & 0 deletions Flow.Launcher/Languages/en.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<system:String x:Key="restartToDisablePortableMode">Flow Launcher needs to restart to finish disabling portable mode, after the restart your portable data profile will be deleted and roaming data profile kept</system:String>
<system:String x:Key="restartToEnablePortableMode">Flow Launcher needs to restart to finish enabling portable mode, after the restart your roaming data profile will be deleted and portable data profile kept</system:String>
<system:String x:Key="moveToDifferentLocation">Flow Launcher has detected you enabled portable mode, would you like to move it to a different location?</system:String>
<system:String x:Key="shortcutsUninstallerCreated">Flow Launcher has detected you disabled portable mode, the relevant shortcuts and uninstaller entry have been created</system:String>

Check warning on line 25 in Flow.Launcher/Languages/en.xaml

View workflow job for this annotation

GitHub Actions / Check Spelling

`uninstaller` is not a recognized word. (unrecognized-spelling)
<system:String x:Key="userDataDuplicated">Flow Launcher detected your user data exists both in {0} and {1}. {2}{2}Please delete {1} in order to proceed. No changes have occurred.</system:String>

<!-- Plugin Loader -->
Expand All @@ -34,6 +34,10 @@
<system:String x:Key="pleaseTryAgain">Please try again</system:String>
<system:String x:Key="parseProxyFailed">Unable to parse Http Proxy</system:String>

<!-- AbstractPluginEnvironment -->
<system:String x:Key="failToInstallTypeScriptEnv">Failed to install TypeScript environment. Please try again later</system:String>
<system:String x:Key="failToInstallPythonEnv">Failed to install Python environment. Please try again later.</system:String>

<!-- MainWindow -->
<system:String x:Key="registerHotkeyFailed">Failed to register hotkey "{0}". The hotkey may be in use by another program. Change to a different hotkey, or exit another program.</system:String>
<system:String x:Key="unregisterHotkeyFailed">Failed to unregister hotkey "{0}". Please try again or see log for details</system:String>
Expand Down
Loading