Exemplo n.º 1
0
 public override bool Run(string[] args)
 {
     Debug.DefaultInitialization();
     Runner.AddCommand(new DefaultHelpCommand());
     Runner.AddCommand(new NoWrapFlagCommand());
     Runner.AddCommand(new ChangeVersionCommand());
     return(Runner.RunCommands(args));
 }
Exemplo n.º 2
0
        public static bool RunCommand(string[] args)
        {
            Console.WriteLine("Windows: " + IsWindows);
            Runner.AddCommand(new DefaultHelpCommand());
            Runner.AddAssembly(Assembly.GetExecutingAssembly());


            return(Runner.RunCommands(args));
        }
Exemplo n.º 3
0
 public void Run(string[] args)
 {
     Debug.DefaultInitialization();
     Runner.AddCommand(new LogLevelCommand());
     Runner.AddCommand(new DefaultHelpCommand());
     Runner.AddCommand(new NoWrapFlagCommand());
     Runner.AddCommand(new ToFileCommand());
     Runner.AddCommand(new GetVersionCommand());
     Runner.AddCommand(new ChangeVersionCommand());
     Runner.RunCommands(args);
 }
Exemplo n.º 4
0
        public override bool Run(string[] args)
        {
            EmbeddedFileIOManager.Initialize();
            ManifestReader.RegisterAssembly(typeof(FLScriptGenerator).Assembly);
            ManifestReader.PrepareManifestFiles(false);

            Runner.AddCommand(new HelpCommand(new DefaultHelpCommand(true)));
            Runner.AddCommand(SetSettingsCommand.CreateSettingsCommand("Settings", Settings));

            Runner.RunCommands(args);

            if (!DoExecute)
            {
                return(true);
            }

            Debug.DefaultInitialization();

            ManifestReader.RegisterAssembly(Assembly.GetExecutingAssembly());
            ManifestReader.PrepareManifestFiles(false);

            ExtPPDebugConfig.Settings.MinSeverity  = Verbosity.Silent;
            OpenFLDebugConfig.Settings.MinSeverity = Verbosity.Level1;
            OpenCLDebugConfig.Settings.MinSeverity = Verbosity.Silent;

            Directory.CreateDirectory(Settings.OutputFolder);
            Random rnd = new Random();

            for (int i = 0; i < Settings.Amount; i++)
            {
                string file = Path.Combine(Settings.OutputFolder, "genscript." + i + ".fl");
                Logger.Log(LogType.Log, "Generating Script...", 1);
                string script = FLScriptGenerator.GenerateRandomScript(
                    rnd.Next(Settings.Functions.Min, Settings.Functions.Max),
                    rnd.Next(Settings.Buffers.Min, Settings.Buffers.Max),
                    rnd.Next(Settings.Additional.Min, Settings.Additional.Max),
                    rnd.Next(Settings.AdditionalFunctions.Min, Settings.AdditionalFunctions.Max));
                Logger.Log(LogType.Log, "Finished Script. Lines: " + script.Count(x => x == '\n'), 1);
                File.WriteAllText(file, script);
            }

            return(true);
        }
Exemplo n.º 5
0
        private static void Main(string[] args)
        {
            Debug.DefaultInitialization();
            Runner.AddCommand(new DefaultCommand());
            Runner.AddCommand(new CreateCommand());
            Runner.AddCommand(new AddCommand());
            Runner.AddCommand(new SetBuildConfigCommand());
            Runner.AddCommand(new SetNameCommand());
            Runner.AddCommand(new SetTargetRuntimeCommand());
            Runner.AddCommand(new BuildConsoleFlagCommand());
            Runner.AddCommand(new BuildCommand());
            Runner.AddCommand(new DefaultHelpCommand());

            Runner.RunCommands(args);

#if DEBUG
            Console.WriteLine("Press enter to exit....");
            Console.ReadLine();
#endif
        }
Exemplo n.º 6
0
        public override bool Run(string[] args)
        {
            Wc.DownloadFileCompleted += WcOnDownloadFileCompleted;


            Console.CancelKeyPress += ConsoleOnCancelKeyPress;
            if (!Directory.Exists(EngineDir))
            {
                Directory.CreateDirectory(EngineDir);
            }

            EngineVersions = Directory.GetFiles(EngineDir, "*.engine", SearchOption.TopDirectoryOnly)
                             .Select(x => Path.GetFileNameWithoutExtension(x)).ToList();

            Runner.AddCommand(new DefaultHelpCommand());
            Runner.AddAssembly(Assembly.GetExecutingAssembly());
            bool ret = Runner.RunCommands(args);

            ConsoleReadLine();
            return(ret);
        }
Exemplo n.º 7
0
        private static void StartServer(string[] args)
        {
            Assembly s = Assembly.GetExecutingAssembly();

            Directory.SetCurrentDirectory(Path.GetDirectoryName(s.Location));



            Runner.AddCommand(new DefaultHelpCommand());
            Runner.AddCommand(new LoadSettingsCommand());
            Runner.AddCommand(new ServerOperationModeCommand());
            Runner.AddCommand(new SaveSettingsCommand());
            Runner.AddCommand(new ResetServerCommand());
            Runner.AddCommand(new StartServerCommand());
            Runner.AddCommand(new StopServerCommand());
            Runner.AddCommand(new ExitCLICommand());
            Runner.AddCommand(new KillInstancesCommand());
            Runner.AddCommand(new ListClientQueueCommand());
            Runner.AddCommand(new ListInstancesCommand());

            Logger.DefaultLogger("Console Initialized..");


            Runner.RunCommands(args);
            FirstArgs = false;
            while (!Exit)
            {
                string input = Console.ReadLine();
                if (input == null)
                {
                    continue;
                }
                Runner.RunCommands(input.Split(' ', StringSplitOptions.RemoveEmptyEntries));
            }

            if (MatchMaker != null && MatchMaker.IsRunning)
            {
                MatchMaker.StopServer();
            }
        }
Exemplo n.º 8
0
        public override bool Run(string[] args)
        {
            Debug.DefaultInitialization();
            Runner.AddCommand(new DefaultCommand());
            Runner.AddCommand(new CreateCommand());
            Runner.AddCommand(new AddCommand());
            Runner.AddCommand(new SetBuildConfigCommand());
            Runner.AddCommand(new SetNameCommand());
            Runner.AddCommand(new SetTargetRuntimeCommand());
            Runner.AddCommand(new BuildConsoleFlagCommand());
            Runner.AddCommand(new SetOutputFolderCommand());
            Runner.AddCommand(new BuildCommand());
            Runner.AddCommand(new DefaultHelpCommand());

            bool ret = Runner.RunCommands(args);

#if DEBUG
            System.Console.WriteLine("Press Enter to Exit.");
            System.Console.ReadLine();
#endif
            return(ret);
        }
Exemplo n.º 9
0
    private void ProcessArgs()
    {
        ReflectionDataCommand refCmd = new ReflectionDataCommand(
            ReflectionDataCommand.Create(
                ReflectionDataCommand.Create("Game", Data),
                ReflectionDataCommand.Create("Master", Master.Info)));

        AllPaths = refCmd.AllPaths;

        Runner.RemoveAllCommands();
        Runner.AddCommand(refCmd);

        if (!Application.isEditor)
        {
            Runner.RunCommands(Environment.GetCommandLineArgs());
        }
        else if (StartupArguments != "")
        {
            string[] args = StartupArguments.Split(' ', '\n');
            Runner.RunCommands(args);
        }
        Runner.RemoveAllCommands();
    }
Exemplo n.º 10
0
        public override bool Run(string[] args)

        {
            Debug.DefaultInitialization();

            Runner.AddCommand(new DefaultHelpCommand(true));
            Runner.AddCommand(new ExitAfterFlagCommand());
            Runner.AddCommand(new EngineTimeoutFlagCommand());
            Runner.AddCommand(new EngineSceneRunCommand());

            Logger.Log(LogType.Log, "exit = Exit Current Shell", 1);


            if (args.Length != 0)
            {
                Runner.RunCommands(args);
                if (Exit)
                {
                    return(true);
                }
            }

            while (true)
            {
                Console.Write("root/testing>");
                string command = Console.ReadLine();
                if (command == "exit")
                {
                    break;
                }

                Runner.RunCommands(command.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries));
            }

            return(true);
        }
Exemplo n.º 11
0
        public override bool Run(string[] args)
        {
            TypeAccumulator.RegisterAssembly(typeof(OpenFLDebugConfig).Assembly);

            Debug.DefaultInitialization();
            Runner.AddCommand(new HelpCommand(new DefaultHelpCommand(true)));
            SetSettingsCommand cmd = SetSettingsCommand.CreateSettingsCommand("Settings", Settings);

            Runner.AddCommand(new ListSettingsCommand(cmd));
            Runner.AddCommand(cmd);
            Runner.AddCommand(new MultiThreadFlagCommand());
            Runner.AddCommand(new AddToCheckPipelineCommand());

            Runner.RunCommands(args);

            if (!DoExecute)
            {
                Console.ReadLine();
                return(true);
            }

            string[]    checkTypesStr = Settings.CheckPipeline.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
            List <Type> checkTypes    = new List <Type>();

            foreach (string s in checkTypesStr)
            {
                List <Type> r = TypeAccumulator <FLProgramCheck> .GetTypesByName(s);

                if (r.Count != 1)
                {
                    Console.Write("");
                }
                checkTypes.AddRange(r);
            }



            ExtPPDebugConfig.Settings.MinSeverity  = Verbosity.Silent;
            OpenFLDebugConfig.Settings.MinSeverity = Verbosity.Level1;
            OpenCLDebugConfig.Settings.MinSeverity = Verbosity.Silent;


            List <string> files = GetFileList();

            Logger.Log(LogType.Log, "------------------------Run Execution Started------------------------", 1);

            for (int i = 0; i < Settings.TotalRepetitions; i++)
            {
                OpenFLBenchmarks.InitializeTestRun(Settings.PerformanceFolder);
                Logger.Log(LogType.Log, $"------------------------Run {i} Started------------------------", 1);
                Logger.Log(LogType.Log,
                           OpenFLBenchmarks.RunParserInitBenchmark("_run" + i, Settings.InitIterations,
                                                                   Settings.PerformanceFolder, true, true), 1);
                Logger.Log(LogType.Log,
                           OpenFLBenchmarks.RunParserProcessBenchmark("_run" + i, files, Settings.ParsingIterations,
                                                                      Settings.PerformanceFolder,
                                                                      checkTypes.ToArray(), UseMultiThread), 1);
                Logger.Log(LogType.Log,
                           OpenFLBenchmarks.RunProgramInitBenchmark("_run" + i, files, Settings.InitIterations,
                                                                    Settings.PerformanceFolder,
                                                                    checkTypes.ToArray(), true), 1);
                Logger.Log(LogType.Log,
                           OpenFLBenchmarks.RunProgramSerializationBenchmark("_run" + i, files, Settings.IOIterations,
                                                                             Settings.ExtraSteps.Split(new[] { ';' }),
                                                                             Settings.PerformanceFolder, checkTypes.ToArray(), true), 1);
                Logger.Log(LogType.Log,
                           OpenFLBenchmarks.RunProgramDeserializationBenchmark("_run" + i, files, Settings.IOIterations,
                                                                               Settings.PerformanceFolder, checkTypes.ToArray(), true), 1);
                Logger.Log(LogType.Log,
                           OpenFLBenchmarks.RunParsedFLExecutionBenchmark(Settings.WarmProgram, "_run" + i, files, Settings.ExecutionIterations,
                                                                          Settings.PerformanceFolder, checkTypes.ToArray(), true, 2), 1);
                Logger.Log(LogType.Log,
                           OpenFLBenchmarks.RunDeserializedFLExecutionBenchmark("_run" + i, files,
                                                                                Settings.ExecutionIterations,
                                                                                Settings.PerformanceFolder, checkTypes.ToArray(), true, 2), 1);
                OpenFLBenchmarks.FinalizeTestRun(Settings.PerformanceFolder);
                Logger.Log(LogType.Log, $"------------------------Run {i} Finished------------------------", 1);
            }


            Logger.Log(LogType.Log, "------------------------Run Execution Finished------------------------", 1);
            return(true);
        }