mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Fix python env issues.
This commit is contained in:
@@ -45,7 +45,7 @@ namespace Wox.JsonRPC
|
||||
public new List<JsonRPCResult> Result { get; set; }
|
||||
}
|
||||
|
||||
public abstract class JsonRPCRequestModel : JsonRPCModelBase
|
||||
public class JsonRPCRequestModel : JsonRPCModelBase
|
||||
{
|
||||
public string Method { get; set; }
|
||||
|
||||
@@ -108,11 +108,17 @@ namespace Wox.JsonRPC
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Json RPC Request that client sent to Wox
|
||||
/// Json RPC Request(in query response) that client sent to Wox
|
||||
/// </summary>
|
||||
public class JsonRPCClientRequestModel : JsonRPCRequestModel
|
||||
{
|
||||
public bool DontHideAfterAction { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
string rpc = base.ToString();
|
||||
return rpc + "}";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace Wox.PluginLoader
|
||||
List<Result> results = new List<Result>();
|
||||
|
||||
JsonRPCQueryResponseModel queryResponseModel = JsonConvert.DeserializeObject<JsonRPCQueryResponseModel>(output);
|
||||
if (queryResponseModel.Result == null) return null;
|
||||
|
||||
foreach (JsonRPCResult result in queryResponseModel.Result)
|
||||
{
|
||||
JsonRPCResult result1 = result;
|
||||
@@ -53,7 +55,7 @@ namespace Wox.PluginLoader
|
||||
string actionReponse = ExecuteAction(result1.JsonRPCAction);
|
||||
JsonRPCRequestModel jsonRpcRequestModel = JsonConvert.DeserializeObject<JsonRPCRequestModel>(actionReponse);
|
||||
if (jsonRpcRequestModel != null
|
||||
&& string.IsNullOrEmpty(jsonRpcRequestModel.Method)
|
||||
&& !string.IsNullOrEmpty(jsonRpcRequestModel.Method)
|
||||
&& jsonRpcRequestModel.Method.StartsWith("Wox."))
|
||||
{
|
||||
ExecuteWoxAPI(jsonRpcRequestModel.Method.Substring(4), jsonRpcRequestModel.Parameters);
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Wox.PluginLoader
|
||||
};
|
||||
string additionalPythonPath = string.Format("{0};{1}",
|
||||
Path.Combine(woxDirectory, "PythonHome\\DLLs"),
|
||||
Path.Combine(woxDirectory, "PythonHome\\thirdparty"));
|
||||
Path.Combine(woxDirectory, "PythonHome\\Lib\\site-packages"));
|
||||
if (!startInfo.EnvironmentVariables.ContainsKey("PYTHONPATH"))
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user