- Added build configurations
- Configured csprojects - CopyLibs functionality in builder
This commit is contained in:
@@ -25,6 +25,8 @@ public class Builder : IDisposable
|
||||
Stopwatch stopwatch = new Stopwatch();
|
||||
stopwatch.Start();
|
||||
|
||||
CopyLibs(args.ProjectPath);
|
||||
|
||||
List<string> contentFiles = args.ContentFiles;
|
||||
string absContentPath = $"{args.ProjectPath}/{PathUtil.ContentFolderName}";
|
||||
|
||||
@@ -91,6 +93,34 @@ public class Builder : IDisposable
|
||||
Console.WriteLine($"Build content completed in {stopwatch.Elapsed.TotalSeconds:F2} seconds");
|
||||
}
|
||||
|
||||
private void CopyLibs(string projectPath)
|
||||
{
|
||||
string libDir = $"{Directory.GetCurrentDirectory()}/../../Native/";
|
||||
if (OperatingSystem.IsWindows())
|
||||
{
|
||||
libDir += "x64";
|
||||
}
|
||||
else if (OperatingSystem.IsLinux())
|
||||
{
|
||||
libDir += "lib64";
|
||||
}
|
||||
else if (OperatingSystem.IsMacOS())
|
||||
{
|
||||
libDir += "osx";
|
||||
}
|
||||
|
||||
libDir = Path.GetFullPath(libDir);
|
||||
foreach (string libFile in Directory.EnumerateFiles(libDir))
|
||||
{
|
||||
FileInfo srcFileInfo = new FileInfo(libFile);
|
||||
FileInfo dstFileInfo = new FileInfo($"{projectPath}/{PathUtil.BuildFolderName}/{Path.GetFileName(libFile)}");
|
||||
if (FileUtil.IsNewer(srcFileInfo, dstFileInfo))
|
||||
{
|
||||
FileUtil.Copy(srcFileInfo, dstFileInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CollectAssetFiles(string assetDir, string dir, ref List<string> files)
|
||||
{
|
||||
foreach (string file in Directory.EnumerateFiles(dir))
|
||||
|
||||
Reference in New Issue
Block a user