@@ -20,75 +20,12 @@ public Diagnose(string pythonbin)
2020 this . python_bin = pythonbin ;
2121 }
2222
23-
24- /// <summary>
25- /// Result [["continuity.dll", "Plugin load failed, namespace edgefixer already populated (D:\\xy\\plugins64\\continuity.dll)"],
26- /// ["cublas64_80.dll", "No entry point found in D:\\xy\\plugins64\\cublas64_80.dll"], ... ]]
27- /// </summary>
28- /// <param name="path"></param>
29- /// <returns></returns>
30- public async Task < Dictionary < string , List < string > > > CheckPluginsAsync ( string path )
31- {
32- Dictionary < string , List < string > > dllfiles = new Dictionary < string , List < string > > ( ) ;
33- string code = GetDllCheckCode ( path ) ;
34- string result = await Task . Run ( ( ) => run_python ( code ) ) ;
35- Console . WriteLine ( result ) ;
36- string [ ] [ ] packages ;
37- try
38- {
39- packages = JsonConvert . DeserializeObject < string [ ] [ ] > ( result ) ;
40- if ( packages == null )
41- return null ;
42- }
43- catch
44- {
45- return null ;
46- }
47- dllfiles . Add ( "no_problems" , ( from file in packages
48- where file [ 1 ] . Contains ( "already loaded" )
49- select Path . Combine ( path , file [ 0 ] ) ) . OrderBy ( f => f ) . ToList ( ) ) ;
50-
51- dllfiles . Add ( "not_a_vsplugin" , ( from file in packages
52- where file [ 1 ] . Contains ( "No entry point found" )
53- select Path . Combine ( path , file [ 0 ] ) ) . OrderBy ( f => f ) . ToList ( ) ) ;
54-
55- dllfiles . Add ( "wrong_arch" , ( from file in packages
56- where file [ 1 ] . Contains ( "returned 193" )
57- select Path . Combine ( path , file [ 0 ] ) ) . OrderBy ( f => f ) . ToList ( ) ) ;
58-
59- dllfiles . Add ( "incompatible_dependency" , ( from file in packages
60- where file [ 1 ] . Contains ( "returned 127" )
61- select Path . Combine ( path , file [ 0 ] ) ) . OrderBy ( f => f ) . ToList ( ) ) ;
62-
63- dllfiles . Add ( "missing_dependency" , ( from file in packages
64- where file [ 1 ] . Contains ( "returned 126" )
65- select Path . Combine ( path , file [ 0 ] ) ) . OrderBy ( f => f ) . ToList ( ) ) ;
66-
67- dllfiles . Add ( "namespace" , ( from file in packages
68- where file [ 1 ] . Contains ( "already populated" )
69- select Path . Combine ( path , file [ 0 ] ) ) . OrderBy ( f => f ) . ToList ( ) ) ;
70-
71- dllfiles . Add ( "others" , ( from file in packages
72- where ! ( file [ 1 ] . Contains ( "returned 193" ) || file [ 1 ] . Contains ( "No entry point found" ) || file [ 1 ] . Contains ( "already loaded" ) || file [ 1 ] . Contains ( "returned 126" ) || file [ 1 ] . Contains ( "returned 127" ) || file [ 1 ] . Contains ( "already populated" ) )
73- select Path . Combine ( path , file [ 0 ] ) ) . OrderBy ( f => f ) . ToList ( ) ) ;
74- return dllfiles ;
75- }
76-
7723 public async Task < string > GetVapoursynthVersion ( )
7824 {
7925 return await Task . Run ( ( ) => run_python ( "import vapoursynth as vs; core = vs.get_core(); print(core.version())" ) ) ;
8026 }
8127
8228
83- public async Task < string > GetLoadedVapoursynthDll ( )
84- {
85- var result = await Task . Run ( ( ) => run_python ( "import vapoursynth; print(vapoursynth.__file__)" ) . Trim ( ) ) ;
86- if ( String . IsNullOrEmpty ( result ) )
87- return null ;
88- return result . Split ( '.' ) [ 0 ] + ".dll" ;
89- }
90-
91-
9229 public async Task < string > GetPythonLocation ( )
9330 {
9431 return await Task . Run ( ( ) => run_python ( "import sys; print(sys.executable)" ) . Trim ( ) ) ;
0 commit comments