예제 #1
0
        public static void Main(string[] args)
        {
            var appInfo   = new AppInfo(args);
            var installer = new Installer(appInfo);

            if (args.Contains("/uninstall"))
            {
                installer.Uninstall();
                return;
            }
            else if (args.Contains("/install"))
            {
                installer.Install();
                return;
            }
            else
            {
                var installedState = installer.GetStatus();

                if (installedState == InstalledState.NotInstalled || installedState == InstalledState.OlderVersionPresent)
                {
                    installer.Install();
                }
#if DEBUG
#else
                else if (installedState == InstalledState.NewerVersionPresent)
                {
                    MessageBox.Show($"There is already a newer version of {appInfo.Name} installed, use that version", "Version conflict", MessageBoxButton.OK, MessageBoxImage.Error);
                    return;
                }
#endif
            }

            if (args.Contains("/nodebug"))
            {
                LaunchApp(appInfo);
            }
            else
            {
                ProgramDebugger.Run(appInfo);
            }
        }
예제 #2
0
        internal static void Run(AppInfo appInfo)
        {
            var debugger = new ProgramDebugger(appInfo);

            debugger.Run();
        }