Files
sbox-public/engine/Tools/SboxBuild/Constants.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

63 lines
1.1 KiB
C#

namespace Facepunch;
internal static class Constants
{
internal enum Solutions
{
Engine,
Toolbase,
Menu,
BuildTools,
All,
}
/// <summary>
/// Specifies the target environment for a build
/// </summary>
internal enum BuildTarget
{
/// <summary>
/// Staging environment for testing
/// </summary>
Staging,
/// <summary>
/// Production release environment
/// </summary>
Release
}
internal enum ExitCode
{
Success = 0,
Failure = 1,
}
internal static string GetSolutionDir( Solutions solution )
{
switch ( solution )
{
case Solutions.Engine:
return "engine/";
case Solutions.Toolbase:
return "game/addons/tools/";
case Solutions.Menu:
return "game/addons/menu/";
case Solutions.BuildTools:
return "engine/tools/";
default:
throw new ArgumentOutOfRangeException( nameof( solution ), solution, null );
}
}
internal static string BuildTargetToSteamBranch( BuildTarget target )
{
return target switch
{
BuildTarget.Staging => "staging",
BuildTarget.Release => "release",
_ => throw new ArgumentOutOfRangeException( nameof( target ), target, null )
};
}
}