Add start Wox on system startup config & code refactorying.

This commit is contained in:
qianlifeng
2014-02-06 22:22:02 +08:00
parent 9e1980f843
commit 67f14d6a62
33 changed files with 818 additions and 811 deletions

View File

@@ -53,7 +53,6 @@ namespace Wox.Commands
{
if (currentPythonModulePath != thirdPlugin.Metadata.PluginDirecotry)
{
//this must initial in main thread
currentPythonModulePath = thirdPlugin.Metadata.PluginDirecotry;
if (GIL != IntPtr.Zero)
@@ -63,8 +62,8 @@ namespace Wox.Commands
}
PythonEngine.Initialize();
IntPtr pyStrPtr = Runtime.PyString_FromString(thirdPlugin.Metadata.PluginDirecotry);
IntPtr SysDotPath = Runtime.PySys_GetObject("path");
Runtime.PyList_Append(SysDotPath, pyStrPtr);
IntPtr sysDotPath = Runtime.PySys_GetObject("path");
Runtime.PyList_Append(sysDotPath, pyStrPtr);
GIL = PythonEngine.BeginAllowThreads();
}
}