Example #1
0
        static void Main(string[] args)
        {
            WindowsRuntimePlatformInfo.Initialize();

            GameApp app = null;

            try
            {
                app = new GameApp(new Startup());
                app.PrimaryArchivePath = "C:\\Development\\Anomalous\\RpgArt";
                app.run();
            }
            catch (Exception e)
            {
                Log.Default.printException(e);
                if (app != null)
                {
                    app.saveCrashLog();
                }
                String errorMessage = e.Message + "\n" + e.StackTrace;
                while (e.InnerException != null)
                {
                    e             = e.InnerException;
                    errorMessage += "\n" + e.Message + "\n" + e.StackTrace;
                }
                MessageDialog.showErrorDialog(errorMessage, "Exception");
            }
            finally
            {
                if (app != null)
                {
                    app.Dispose();
                }
            }
        }
Example #2
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            WindowsRuntimePlatformInfo.Initialize();

            OgreModelEditorApp app = null;

            try
            {
                app = new OgreModelEditorApp();
                app.run();
            }
            catch (Exception e)
            {
                Logging.Log.Default.printException(e);
                if (app != null)
                {
                    app.saveCrashLog();
                }
                String errorMessage = e.Message + "\n" + e.StackTrace;
                while (e.InnerException != null)
                {
                    e             = e.InnerException;
                    errorMessage += "\n" + e.Message + "\n" + e.StackTrace;
                }
                MessageDialog.showErrorDialog(errorMessage, "Exception");
            }
            finally
            {
                if (app != null)
                {
                    app.Dispose();
                }
            }
        }
Example #3
0
        static void Main(string[] args)
        {
            try
            {
                String        sourceDirectory = args[0];
                String        destDirectory   = args[1];
                OutputFormats outFormats      = OutputFormats.Uncompressed;
                if (args.Length > 2)
                {
                    Enum.TryParse(args[2], out outFormats);
                }

                int maxSize = int.MaxValue;
                if (args.Length > 3)
                {
                    if (!int.TryParse(args[3], out maxSize))
                    {
                        maxSize = int.MaxValue;
                    }
                }

                Environment.CurrentDirectory = sourceDirectory;

                Logging.Log.Default.addLogListener(new Logging.LogConsoleListener());
                WindowsRuntimePlatformInfo.Initialize();
                PluginManager pluginManager = new PluginManager(new ConfigFile("woot.txt"), new ServiceCollection());
                VirtualFileSystem.Instance.addArchive(destDirectory);

                TextureCompilerInterface.CompileTextures(sourceDirectory, destDirectory, pluginManager, outFormats, maxSize);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Example #4
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        public static void Run(IAnomalyImplementation implementation)
        {
            WindowsRuntimePlatformInfo.Initialize();
            OgrePlugin.OgreInterface.CompressedTextureSupport = OgrePlugin.CompressedTextureSupport.None;

            //Parse command line
            String projectFileName = null;

            String[] commandArgs = Environment.GetCommandLineArgs();
            bool     startGUI    = false;

            if (commandArgs.Length > 1)
            {
                //Handle the os passing a file name
                if (commandArgs.Length == 2)
                {
                    projectFileName = commandArgs[1];
                    startGUI        = File.Exists(projectFileName);
                }
                //Process a command from the command line
                else
                {
                    if (commandArgs[1].ToLower() == "publish")
                    {
                        publishMode = new PublishMode();
                        publishMode.getSettingsFromCommandLine(commandArgs);
                        projectFileName = publishMode.SolutionFile;
                        startGUI        = File.Exists(projectFileName);
                    }
                }
            }
            else
            {
                //Handle no arguments
            }
            if (startGUI)
            {
                AnomalyConfig.RecentDocuments.addDocument(projectFileName);
                runGui(projectFileName, implementation);
            }
        }
Example #5
0
        public static void Main()
        {
            WindowsRuntimePlatformInfo.Initialize();
            OgrePlugin.OgreInterface.CompressedTextureSupport = OgrePlugin.CompressedTextureSupport.None;

            AnomalousController anomalous = null;

            try
            {
                anomalous = new AnomalousController();
                anomalous.AddAdditionalPlugins += HandleAddAdditionalPlugins;
                anomalous.run();
            }
            catch (Exception e)
            {
                Logging.Log.Default.printException(e);
                if (anomalous != null)
                {
                    anomalous.saveCrashLog();
                }
                String errorMessage = e.Message + "\n" + e.StackTrace;
                while (e.InnerException != null)
                {
                    e             = e.InnerException;
                    errorMessage += "\n" + e.Message + "\n" + e.StackTrace;
                }
                MessageDialog.showErrorDialog(errorMessage, "Exception");
            }
            finally
            {
                if (anomalous != null)
                {
                    anomalous.Dispose();
                }
            }
        }