mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-24 04:26:57 +00:00
Updated Build.exe and Prebuild.xml to copy data files and dll.config files in all cases.
This commit is contained in:
parent
81ba27da98
commit
5b7c1e2384
|
@ -251,9 +251,10 @@ namespace OpenTK.Build
|
||||||
Directory.CreateDirectory(ExamplePath);
|
Directory.CreateDirectory(ExamplePath);
|
||||||
Directory.CreateDirectory(DataPath);
|
Directory.CreateDirectory(DataPath);
|
||||||
|
|
||||||
|
// Handled by Prebuild.exe now.
|
||||||
// Copy Data files for the Examples.
|
// Copy Data files for the Examples.
|
||||||
foreach (string file in Directory.GetFiles(DataSourcePath))
|
//foreach (string file in Directory.GetFiles(DataSourcePath))
|
||||||
File.Copy(file, Path.Combine(DataPath, Path.GetFileName(file)));
|
// 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);
|
||||||
|
@ -330,35 +331,43 @@ namespace OpenTK.Build
|
||||||
{
|
{
|
||||||
using (Process p = new Process())
|
using (Process p = new Process())
|
||||||
{
|
{
|
||||||
ProcessStartInfo sinfo = new ProcessStartInfo();
|
try
|
||||||
if (Environment.OSVersion.Platform == PlatformID.Unix && !path.ToLower().Contains("nant"))
|
|
||||||
{
|
{
|
||||||
sinfo.FileName = "mono";
|
ProcessStartInfo sinfo = new ProcessStartInfo();
|
||||||
sinfo.Arguments = path + " " + args;
|
if (Environment.OSVersion.Platform == PlatformID.Unix && !path.ToLower().Contains("nant"))
|
||||||
|
{
|
||||||
|
sinfo.FileName = "mono";
|
||||||
|
sinfo.Arguments = path + " " + args;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sinfo.FileName = path;
|
||||||
|
sinfo.Arguments = args;
|
||||||
|
}
|
||||||
|
|
||||||
|
sinfo.WorkingDirectory = RootPath;
|
||||||
|
sinfo.CreateNoWindow = true;
|
||||||
|
sinfo.RedirectStandardOutput = true;
|
||||||
|
sinfo.UseShellExecute = false;
|
||||||
|
p.StartInfo = sinfo;
|
||||||
|
p.OutputDataReceived += new DataReceivedEventHandler(p_OutputDataReceived);
|
||||||
|
p.Start();
|
||||||
|
p.BeginOutputReadLine();
|
||||||
|
//StreamReader sr = p.StandardOutput;
|
||||||
|
//while (!p.HasExited)
|
||||||
|
//{
|
||||||
|
// Console.WriteLine(sr.ReadLine());
|
||||||
|
// Console.Out.Flush();
|
||||||
|
//}
|
||||||
|
|
||||||
|
p.WaitForExit();
|
||||||
}
|
}
|
||||||
else
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
sinfo.FileName = path;
|
Console.WriteLine("Failed to execute process: {0}", p.ProcessName);
|
||||||
sinfo.Arguments = args;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sinfo.WorkingDirectory = RootPath;
|
|
||||||
sinfo.CreateNoWindow = true;
|
|
||||||
sinfo.RedirectStandardOutput = true;
|
|
||||||
sinfo.UseShellExecute = false;
|
|
||||||
p.StartInfo = sinfo;
|
|
||||||
p.OutputDataReceived += new DataReceivedEventHandler(p_OutputDataReceived);
|
|
||||||
p.Start();
|
|
||||||
p.BeginOutputReadLine();
|
|
||||||
//StreamReader sr = p.StandardOutput;
|
|
||||||
//while (!p.HasExited)
|
|
||||||
//{
|
|
||||||
// Console.WriteLine(sr.ReadLine());
|
|
||||||
// Console.Out.Flush();
|
|
||||||
//}
|
|
||||||
|
|
||||||
p.WaitForExit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void p_OutputDataReceived(object sender, DataReceivedEventArgs e)
|
static void p_OutputDataReceived(object sender, DataReceivedEventArgs e)
|
||||||
|
|
Loading…
Reference in a new issue