Fix python env issues.

This commit is contained in:
qianlifeng
2014-07-18 23:12:50 +08:00
parent 7b4d6ba57e
commit 2a86b06e0c
358 changed files with 25756 additions and 6829 deletions

View File

@@ -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>

View File

@@ -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);

View File

@@ -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"))
{