fix #2932
This commit is contained in:
parent
690fb2611e
commit
ed39215d85
|
|
@ -15,7 +15,7 @@ internal static class RevisionClass
|
|||
public const string Major = "3";
|
||||
public const string Minor = "9";
|
||||
public const string Build = "0";
|
||||
public const string Revision = "3383";
|
||||
public const string Revision = "3384";
|
||||
|
||||
public const string MainVersion = Major + "." + Minor;
|
||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
%MINOR%=9
|
||||
%REVISION%=3383
|
||||
%COREVERSION%=0
|
||||
%REVISION%=3384
|
||||
%MINOR%=9
|
||||
%MAJOR%=3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.9.0.3383
|
||||
3.9.0.3384
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!define VERSION '3.9.0.3383'
|
||||
!define VERSION '3.9.0.3384'
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -43,6 +44,37 @@ namespace VisualPascalABC
|
|||
nugetProcess.WaitForExit();
|
||||
}
|
||||
|
||||
static string getDotnetDir(string startDir)
|
||||
{
|
||||
// 481 48 472 471 47 462 461 46 452 451 45 4
|
||||
var s = "481 48 472 471 47 462 461 46 452 451 45 4";
|
||||
var ss = s.Split().Reverse().Select(d => "net" + d).ToList();
|
||||
ss.Add("netstandard2.0");
|
||||
ss.Add("net");
|
||||
|
||||
string Dir = "";
|
||||
foreach (var dd in ss)
|
||||
{
|
||||
Dir = Path.Combine(startDir, dd);
|
||||
if (Directory.Exists(Dir))
|
||||
break;
|
||||
}
|
||||
|
||||
/*string Dir = Path.Combine(startDir, "net40");
|
||||
if (!Directory.Exists(Dir))
|
||||
Dir = Path.Combine(startDir, "net45");
|
||||
if (!Directory.Exists(Dir))
|
||||
Dir = Path.Combine(startDir, "net46");
|
||||
if (!Directory.Exists(Dir))
|
||||
Dir = Path.Combine(startDir, "netstandard2.0");
|
||||
if (!Directory.Exists(Dir))
|
||||
Dir = Path.Combine(startDir, "net");*/
|
||||
|
||||
if (!Directory.Exists(Dir))
|
||||
Dir = startDir;
|
||||
return Dir;
|
||||
}
|
||||
|
||||
static bool getPackage(string workingDir, out string[] dlls, out string[] xmls, out string[] ndlls)
|
||||
{
|
||||
dlls = null;
|
||||
|
|
@ -57,7 +89,9 @@ namespace VisualPascalABC
|
|||
string libDir = Path.Combine(dir, "lib");
|
||||
if (Directory.Exists(libDir))
|
||||
{
|
||||
string dotnetDir = Path.Combine(libDir, "net40");
|
||||
string dotnetDir = getDotnetDir(libDir);
|
||||
|
||||
/*string dotnetDir = Path.Combine(libDir, "net40");
|
||||
if (!Directory.Exists(dotnetDir))
|
||||
dotnetDir = Path.Combine(libDir, "net45");
|
||||
if (!Directory.Exists(dotnetDir))
|
||||
|
|
@ -67,7 +101,8 @@ namespace VisualPascalABC
|
|||
if (!Directory.Exists(dotnetDir))
|
||||
dotnetDir = Path.Combine(libDir, "net");
|
||||
if (!Directory.Exists(dotnetDir))
|
||||
dotnetDir = libDir;
|
||||
dotnetDir = libDir;*/
|
||||
|
||||
if (Directory.Exists(dotnetDir))
|
||||
{
|
||||
string[] dllFiles = Directory.GetFiles(dotnetDir, "*.dll");
|
||||
|
|
@ -88,7 +123,7 @@ namespace VisualPascalABC
|
|||
runtimesDir = Path.Combine(dir, "runtimes", "win-x64", "native");
|
||||
if (Directory.Exists(runtimesDir))
|
||||
{
|
||||
string dotnetDir = Path.Combine(runtimesDir, "net40");
|
||||
/*string dotnetDir = Path.Combine(runtimesDir, "net40");
|
||||
if (!Directory.Exists(dotnetDir))
|
||||
dotnetDir = Path.Combine(runtimesDir, "net45");
|
||||
if (!Directory.Exists(dotnetDir))
|
||||
|
|
@ -99,6 +134,9 @@ namespace VisualPascalABC
|
|||
dotnetDir = Path.Combine(runtimesDir, "net");
|
||||
if (!Directory.Exists(dotnetDir))
|
||||
dotnetDir = runtimesDir;
|
||||
*/
|
||||
string dotnetDir = getDotnetDir(runtimesDir);
|
||||
|
||||
if (Directory.Exists(dotnetDir))
|
||||
{
|
||||
string[] nativedllFiles = Directory.GetFiles(dotnetDir, "*.dll");
|
||||
|
|
|
|||
Loading…
Reference in a new issue