static void Main(string[] args) { Environment.SetEnvironmentVariable(@$ "css_nuget", null); if (args.Contains("-server:stop")) { BuildServer.Stop(); } else if (args.Contains("-server") || args.Contains("-server:start")) { BuildServer.Start(); } else { CSExecutionClient.Run(args); } }
static void Main(string[] args) { Environment.SetEnvironmentVariable("DOTNET_SHARED", typeof(string).Assembly.Location.GetDirName().GetDirName()); Environment.SetEnvironmentVariable("WINDOWS_DESKTOP_APP", typeof(string).Assembly.Location.GetDirName().Replace("Microsoft.NETCore.App", "Microsoft.WindowsDesktop.App")); Environment.SetEnvironmentVariable("css_nuget", null); if (args.Contains("-server:stop")) { BuildServer.Stop(); } else if (args.Contains("-server") || args.Contains("-server:start")) { BuildServer.Start(); } else { CSExecutionClient.Run(args); } }
static void Main(string[] args) { // var tt = Project.GenerateProjectFor(@"e:\PrivateData\Galos\Projects\cs-script.core\src\cscs\bin\Debug\netcoreapp3.1\.temp..cs"); Environment.SetEnvironmentVariable("DOTNET_SHARED", typeof(string).Assembly.Location.GetDirName().GetDirName()); Environment.SetEnvironmentVariable("WINDOWS_DESKTOP_APP", typeof(string).Assembly.Location.GetDirName().Replace("Microsoft.NETCore.App", "Microsoft.WindowsDesktop.App")); Environment.SetEnvironmentVariable("css_nuget", null); if (args.Contains("-server:stop")) { BuildServer.Stop(); } else if (args.Contains("-server") || args.Contains("-server:start")) { BuildServer.Start(); } else { CSExecutionClient.Run(args); } }
static int Main(string[] args) { //Debug.Assert(false); try { try { SetEnvironmentVariable("Console.WindowWidth", Console.WindowWidth.ToString()); } catch { } SetEnvironmentVariable("ENTRY_ASM", Assembly.GetEntryAssembly().GetName().Name); SetEnvironmentVariable("DOTNET_SHARED", typeof(string).Assembly.Location.GetDirName().GetDirName()); SetEnvironmentVariable("WINDOWS_DESKTOP_APP", Runtime.DesktopAssembliesDir); SetEnvironmentVariable("css_nuget", null); Runtime.GlobalIncludsDir?.EnsureDir(); Runtime.CustomCommandsDir.EnsureDir(); var serverCommand = args.LastOrDefault(x => x.StartsWith("-server")); if (serverCommand.HasText() && !args.Any(x => x == "?")) { if (serverCommand == "-server:stop") { Globals.StopBuildServer(); } else if (serverCommand == "-server:start") { Globals.StartBuildServer(); } else if (serverCommand == "-server:restart") { Globals.RestartBuildServer(); } else if (serverCommand == "-server:ping") { Globals.Ping(); } else if (serverCommand == "-server:reset") { Globals.ResetBuildServer(); } else if (serverCommand == "-server:add") { Globals.DeployBuildServer(); } else if (serverCommand == "-server:remove") { Globals.RemoveBuildServer(); } else { Globals.PrintBuildServerInfo(); } } else { CSExecutionClient.Run(args); } // Process.GetCurrentProcess().Kill(); // some background monitors may keep the app alive too long return(0); } catch (Exception e) { Console.WriteLine(e.ToString()); return(1); } }