mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-03-29 18:06:52 +00:00
Re-enabled nant support (necessary for commandline builds on Linux until xbuild matures).
Use Directory.GetParent() instead of manually calculating the parent directory.
This commit is contained in:
parent
324008ca39
commit
7c95a25c52
BIN
Build/Build.exe
BIN
Build/Build.exe
Binary file not shown.
|
@ -62,8 +62,8 @@ namespace OpenTK.Build
|
||||||
static void PrintUsage()
|
static void PrintUsage()
|
||||||
{
|
{
|
||||||
Console.WriteLine("Usage: Build.exe BuildTarget [BuildMode]");
|
Console.WriteLine("Usage: Build.exe BuildTarget [BuildMode]");
|
||||||
|
Console.WriteLine("\tBuildTarget: vs (recommended) or one of clean/distclean/mono/net");
|
||||||
Console.WriteLine("\tBuildMode: debug/release");
|
Console.WriteLine("\tBuildMode: debug/release");
|
||||||
Console.WriteLine("\tBuildTarget: vs/vs2005 or clean/distclean");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
|
@ -75,21 +75,21 @@ namespace OpenTK.Build
|
||||||
args = new string[2];
|
args = new string[2];
|
||||||
Console.Write("Select build target: ");
|
Console.Write("Select build target: ");
|
||||||
args[0] = Console.ReadLine();
|
args[0] = Console.ReadLine();
|
||||||
|
if (args[0] == String.Empty)
|
||||||
|
args[0] = "vs";
|
||||||
|
|
||||||
//Console.Write("Select build mode (optional): ");
|
Console.Write("Select build mode (optional): ");
|
||||||
//args[1] = Console.ReadLine();
|
args[1] = Console.ReadLine();
|
||||||
|
if (args[0] == String.Empty)
|
||||||
|
args[0] = "release";
|
||||||
}
|
}
|
||||||
|
|
||||||
RootPath = Directory.GetCurrentDirectory();
|
RootPath = Directory.GetParent(Directory.GetCurrentDirectory()).FullName;
|
||||||
RootPath = RootPath.Substring(
|
|
||||||
0,
|
|
||||||
Directory.GetCurrentDirectory().LastIndexOf("Build"));
|
|
||||||
Directory.SetCurrentDirectory(RootPath);
|
Directory.SetCurrentDirectory(RootPath);
|
||||||
SourcePath = Path.Combine(RootPath, "Source");
|
SourcePath = Path.Combine(RootPath, "Source");
|
||||||
DataSourcePath = Path.Combine(SourcePath, Path.Combine("Examples", "Data"));
|
DataSourcePath = Path.Combine(SourcePath, Path.Combine("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).
|
|
||||||
Environment.SetEnvironmentVariable("CommonProgramFiles(x86)", String.Empty, EnvironmentVariableTarget.Process);
|
Environment.SetEnvironmentVariable("CommonProgramFiles(x86)", String.Empty, EnvironmentVariableTarget.Process);
|
||||||
Environment.SetEnvironmentVariable("ProgramFiles(x86)", String.Empty, EnvironmentVariableTarget.Process);
|
Environment.SetEnvironmentVariable("ProgramFiles(x86)", String.Empty, EnvironmentVariableTarget.Process);
|
||||||
|
|
||||||
|
@ -98,23 +98,23 @@ namespace OpenTK.Build
|
||||||
string arg = s.ToLower();
|
string arg = s.ToLower();
|
||||||
switch (arg)
|
switch (arg)
|
||||||
{
|
{
|
||||||
//case "debug":
|
case "debug":
|
||||||
//case "d":
|
case "d":
|
||||||
// mode = BuildMode.Debug;
|
mode = BuildMode.Debug;
|
||||||
// break;
|
break;
|
||||||
|
|
||||||
//case "release":
|
case "release":
|
||||||
//case "r":
|
case "r":
|
||||||
// mode = BuildMode.Release;
|
mode = BuildMode.Release;
|
||||||
// break;
|
break;
|
||||||
|
|
||||||
//case "mono":
|
case "mono":
|
||||||
// target = BuildTarget.Mono;
|
target = BuildTarget.Mono;
|
||||||
// break;
|
break;
|
||||||
|
|
||||||
//case "net":
|
case "net":
|
||||||
// target = BuildTarget.Net;
|
target = BuildTarget.Net;
|
||||||
// break;
|
break;
|
||||||
|
|
||||||
case "monodev":
|
case "monodev":
|
||||||
case "monodevelop":
|
case "monodevelop":
|
||||||
|
@ -143,10 +143,6 @@ namespace OpenTK.Build
|
||||||
target = BuildTarget.Clean;
|
target = BuildTarget.Clean;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//case "svnclean":
|
|
||||||
// target = BuildTarget.SVNClean;
|
|
||||||
// break;
|
|
||||||
|
|
||||||
case "distclean":
|
case "distclean":
|
||||||
target = BuildTarget.DistClean;
|
target = BuildTarget.DistClean;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue