Exemple #1
0
        static void Main(string[] args)
        {
            Environment.SetEnvironmentVariable("css_nuget", null);
            var css_dir = Assembly.GetExecutingAssembly().Location.GetD
            (Environment.SetEnvironmentVariable("CSSCRIPT_DIR")

            if (args.Contains("-server:stop"))
                BuildServer.Stop();
            else if (args.Contains("-server") || args.Contains("-server:start"))
                BuildServer.Start();
            else
                CSExecutionClient.Main(args);
        }
Exemple #2
0
        static void Main(string[] args)
        {
            // var v1 = "10.20";
            // var v2 = "2.20";
            // var v3 = "1.20";
            // var arr = new[] { v1, v2, v3 };
            // var rrr = arr.OrderByDescending(x=>x).ToArray();

            // var t = string.Compare(v1, v2);
            //var arr = "-noref -ng:\"-IncludePrerelease –version 1.0beta\" cs-script".SplitCommandLine().ToArray();

            Environment.SetEnvironmentVariable("css_nuget", null);
            CSExecutionClient.Main(args);
        }
Exemple #3
0
        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.Main(args);
            }
        }
Exemple #4
0
        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);
            }
        }
Exemple #5
0
        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);
            }
        }
Exemple #6
0
 static void Main(string[] args)
 {
     CSExecutionClient.Main(args);
 }
Exemple #7
0
        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);
            }
        }
Exemple #8
0
 static void Main(string[] args)
 {
     CSharpCompiler.DefaultCompilerRuntime = DefaultCompilerRuntime.Standard;
     CSExecutionClient.Main(args);
 }