Пример #1
0
        static void Main(string[] args)
        {
            // parse args
            if (args.Contains("--gen"))
            {
                Console.WriteLine("Writing scripts to AppData folder...");
                string[] paths =
                {
                    Shelf.EmbeddedScriptToDisk(Shelf.PyScript.GetProjectInfo),
                    Shelf.EmbeddedScriptToDisk(Shelf.PyScript.MixdownAudio),
                };

                Console.WriteLine(string.Join("\n", paths));

                return;
            }
            else if (args.Contains("--clear"))
            {
                Console.WriteLine("Clearing existing scripts...");
                Directory.Delete(Dirs.Scripts, true);
            }

            Services.Settings.InitSettings();

            NlogSetup();

            var cmdFile = args.Where(a => Path.GetExtension(a) == ".blend")
                          .FirstOrDefault();


            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            BrcForm form;

            if (cmdFile != null)
            {
                form = new BrcForm(cmdFile);
            }
            else
            {
                form = new BrcForm();
            }

            Application.Run(form);
        }