From 07bc2a70b6e14c1ef5b5fa0f10d41fb43cde472a Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Mon, 28 Nov 2022 21:22:49 +1100 Subject: [PATCH] remove PythonEmbeddable location --- .../Environments/AbstractPluginEnvironment.cs | 9 +++++++++ .../UserSettings/PluginSettings.cs | 3 +++ Flow.Launcher/Languages/es.xaml | 1 - 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs b/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs index f72543a90..87a6aa5f3 100644 --- a/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs +++ b/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs @@ -5,6 +5,7 @@ using Flow.Launcher.Plugin; using Flow.Launcher.Plugin.SharedCommands; using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Windows.Forms; @@ -41,6 +42,14 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments if (!PluginMetadataList.Any(o => o.Language.Equals(Language, StringComparison.OrdinalIgnoreCase))) return new List(); + // TODO: Remove. This is backwards compatibility for 1.10.0 release- changed PythonEmbeded to Environments/Python + if (!string.IsNullOrEmpty(PluginSettings.PythonDirectory) && PluginSettings.PythonDirectory.StartsWith(Path.Combine(DataLocation.DataDirectory(), "PythonEmbeddable"))) + { + FilesFolders.RemoveFolderIfExists(PluginSettings.PythonDirectory); + InstallEnvironment(); + PluginSettings.PythonDirectory = string.Empty; + } + if (!string.IsNullOrEmpty(PluginsSettingsFilePath) && FilesFolders.FileExists(PluginsSettingsFilePath)) { // Ensure latest only if user is using Flow's environment setup. diff --git a/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs b/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs index a6ee735c3..8f088c3f6 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/PluginSettings.cs @@ -26,6 +26,9 @@ namespace Flow.Launcher.Infrastructure.UserSettings } } + // TODO: Remove. This is backwards compatibility for 1.10.0 release. + public string PythonDirectory { get; set; } + public Dictionary Plugins { get; set; } = new Dictionary(); public void UpdatePluginSettings(List metadatas) diff --git a/Flow.Launcher/Languages/es.xaml b/Flow.Launcher/Languages/es.xaml index 74abd5e39..b158dbb57 100644 --- a/Flow.Launcher/Languages/es.xaml +++ b/Flow.Launcher/Languages/es.xaml @@ -53,7 +53,6 @@ Selecciona el administrador de archivos que se desea utilizar para abrir la carpeta. Navegador web predeterminado Configuración para Nueva Pestaña, Nueva Ventana, Modo Privado. - Carpeta de Python Actualización automática Seleccionar Ocultar Flow Launcher al inicio