remove PythonEmbeddable location

This commit is contained in:
Jeremy Wu 2022-11-28 21:22:49 +11:00
parent 9eb5489863
commit 07bc2a70b6
3 changed files with 12 additions and 1 deletions

View file

@ -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<PluginPair>();
// 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.

View file

@ -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<string, Plugin> Plugins { get; set; } = new Dictionary<string, Plugin>();
public void UpdatePluginSettings(List<PluginMetadata> metadatas)

View file

@ -53,7 +53,6 @@
<system:String x:Key="defaultFileManagerToolTip">Selecciona el administrador de archivos que se desea utilizar para abrir la carpeta.</system:String>
<system:String x:Key="defaultBrowser">Navegador web predeterminado</system:String>
<system:String x:Key="defaultBrowserToolTip">Configuración para Nueva Pestaña, Nueva Ventana, Modo Privado.</system:String>
<system:String x:Key="pythonDirectory">Carpeta de Python</system:String>
<system:String x:Key="autoUpdates">Actualización automática</system:String>
<system:String x:Key="select">Seleccionar</system:String>
<system:String x:Key="hideOnStartup">Ocultar Flow Launcher al inicio</system:String>