Build.cs now uses mono to invoke Prebuild.exe on Unix systems.

This commit is contained in:
the_fiddler 2007-06-30 07:01:04 +00:00
parent f09db9a2c8
commit df23e096ab
3 changed files with 14 additions and 4 deletions

Binary file not shown.

View file

@ -29,7 +29,7 @@
<File>.\Instructions.txt</File> <File>.\Instructions.txt</File>
</Files> </Files>
<Project name="OpenTK.Build" path=".\Source\Build" language="C#" type="Exe"> <Project name="Build" path=".\Source\Build" language="C#" type="Exe">
<Configuration name="Debug"> <Configuration name="Debug">
<Options> <Options>

View file

@ -158,7 +158,8 @@ namespace OpenTK.Build
ExecuteProcess(PrebuildPath, "/clean /yes /file " + PrebuildXml); ExecuteProcess(PrebuildPath, "/clean /yes /file " + PrebuildXml);
DeleteDirectories(RootPath, "obj"); DeleteDirectories(RootPath, "obj");
DeleteDirectories(RootPath, "bin"); DeleteDirectories(RootPath, "bin");
Directory.Delete(RootPath + "Binaries", true); if (Directory.Exists(RootPath + "Binaries"))
Directory.Delete(RootPath + "Binaries", true);
break; break;
case BuildTarget.SVNClean: case BuildTarget.SVNClean:
@ -209,8 +210,17 @@ namespace OpenTK.Build
static void ExecuteProcess(string path, string args) static void ExecuteProcess(string path, string args)
{ {
Process p = new Process(); Process p = new Process();
p.StartInfo.FileName = path; if (Environment.OSVersion.Platform == PlatformID.Unix)
p.StartInfo.Arguments = args; {
p.StartInfo.FileName = "mono";
p.StartInfo.Arguments = path + " " + args;
}
else
{
p.StartInfo.FileName = path;
p.StartInfo.Arguments = args;
}
p.StartInfo.WorkingDirectory = RootPath; p.StartInfo.WorkingDirectory = RootPath;
p.StartInfo.CreateNoWindow = true; p.StartInfo.CreateNoWindow = true;
p.StartInfo.RedirectStandardOutput = true; p.StartInfo.RedirectStandardOutput = true;