mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-12 05:25:35 +00:00
Added logic to copy the Data directory to the Examples output directory.
This commit is contained in:
parent
a78449d6f2
commit
d96ce82416
|
@ -22,10 +22,12 @@ namespace OpenTK.Build
|
||||||
static string SourcePath;
|
static string SourcePath;
|
||||||
static string ToolPath = "Build";
|
static string ToolPath = "Build";
|
||||||
static string PrebuildPath = Path.Combine(ToolPath, "Prebuild.exe");
|
static string PrebuildPath = Path.Combine(ToolPath, "Prebuild.exe");
|
||||||
static string BinPath = "Binaries";
|
static string BinPath;
|
||||||
static string ExePath = Path.Combine(BinPath, "Exe");
|
static string ExePath;
|
||||||
static string LibPath = Path.Combine(BinPath, "Libraries");
|
static string LibPath;
|
||||||
static string ExamplePath = Path.Combine(BinPath, "Examples");
|
static string ExamplePath;
|
||||||
|
static string DataSourcePath;
|
||||||
|
static string DataPath;
|
||||||
|
|
||||||
static string PrebuildXml = Path.Combine(ToolPath, "Prebuild.xml");
|
static string PrebuildXml = Path.Combine(ToolPath, "Prebuild.xml");
|
||||||
|
|
||||||
|
@ -68,6 +70,7 @@ namespace OpenTK.Build
|
||||||
Directory.GetCurrentDirectory().LastIndexOf("Build"));
|
Directory.GetCurrentDirectory().LastIndexOf("Build"));
|
||||||
Directory.SetCurrentDirectory(RootPath);
|
Directory.SetCurrentDirectory(RootPath);
|
||||||
SourcePath = Path.Combine(RootPath, "Source");
|
SourcePath = Path.Combine(RootPath, "Source");
|
||||||
|
DataSourcePath = Path.Combine(SourcePath, "Examples\\Data");
|
||||||
|
|
||||||
// Workaroung for nant on x64 windows (safe for other platforms too, as this affects
|
// Workaroung for nant on x64 windows (safe for other platforms too, as this affects
|
||||||
// only the current process).
|
// only the current process).
|
||||||
|
@ -145,15 +148,11 @@ namespace OpenTK.Build
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ExePath = Path.Combine(
|
BinPath = Path.Combine("Binaries", mode == BuildMode.Debug ? "Debug" : "Release");
|
||||||
BinPath,
|
ExePath = Path.Combine(BinPath, "Exe");
|
||||||
Path.Combine(mode == BuildMode.Debug ? "Debug" : "Release", "Exe"));
|
LibPath = Path.Combine(BinPath, "Libraries");
|
||||||
LibPath = Path.Combine(
|
ExamplePath = Path.Combine(BinPath, "Examples");
|
||||||
BinPath,
|
DataPath = Path.Combine(ExamplePath, "Data");
|
||||||
Path.Combine(mode == BuildMode.Debug ? "Debug" : "Release", "Libraries"));
|
|
||||||
ExamplePath = Path.Combine(
|
|
||||||
BinPath,
|
|
||||||
Path.Combine(mode == BuildMode.Debug ? "Debug" : "Release", "Examples"));
|
|
||||||
|
|
||||||
switch (target)
|
switch (target)
|
||||||
{
|
{
|
||||||
|
@ -250,6 +249,11 @@ namespace OpenTK.Build
|
||||||
Directory.CreateDirectory(ExePath);
|
Directory.CreateDirectory(ExePath);
|
||||||
Directory.CreateDirectory(LibPath);
|
Directory.CreateDirectory(LibPath);
|
||||||
Directory.CreateDirectory(ExamplePath);
|
Directory.CreateDirectory(ExamplePath);
|
||||||
|
Directory.CreateDirectory(DataPath);
|
||||||
|
|
||||||
|
// Copy Data files for the Examples.
|
||||||
|
foreach (string file in Directory.GetFiles(DataSourcePath))
|
||||||
|
File.Copy(file, Path.Combine(DataPath, Path.GetFileName(file)));
|
||||||
|
|
||||||
// Move the libraries and the config files.
|
// Move the libraries and the config files.
|
||||||
FindFiles(SourcePath, "*.dll", dll_matches);
|
FindFiles(SourcePath, "*.dll", dll_matches);
|
||||||
|
|
Loading…
Reference in a new issue