Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hutchinson <mhutch@xamarin.com>2011-09-11 20:29:34 +0400
committerMichael Hutchinson <mhutch@xamarin.com>2011-09-11 20:29:34 +0400
commit65e47ec873f0805a616052be24de9c801917feff (patch)
treeba6b6a57031e9a78c95eef03ac676f1bb1830692 /main/src/core/MonoDevelop.Startup
parent063a60b00a12fee6cca6e8c02b2419e6031797f5 (diff)
[Ide] Move entry code to Monodevelop.Ide
Diffstat (limited to 'main/src/core/MonoDevelop.Startup')
-rw-r--r--main/src/core/MonoDevelop.Startup/MonoDevelop.Startup/MonoDevelopMain.cs64
1 files changed, 2 insertions, 62 deletions
diff --git a/main/src/core/MonoDevelop.Startup/MonoDevelop.Startup/MonoDevelopMain.cs b/main/src/core/MonoDevelop.Startup/MonoDevelop.Startup/MonoDevelopMain.cs
index e9186ba7d9..1d8e23b3ea 100644
--- a/main/src/core/MonoDevelop.Startup/MonoDevelop.Startup/MonoDevelopMain.cs
+++ b/main/src/core/MonoDevelop.Startup/MonoDevelop.Startup/MonoDevelopMain.cs
@@ -13,67 +13,7 @@ namespace MonoDevelop.Startup
{
public static int Main (string[] args)
{
- bool retry = false;
-
- EnableFileLogging ();
-
- do {
- try {
- Runtime.SetProcessName ("monodevelop");
- IdeStartup app = new IdeStartup ();
- return app.Run (args);
- } catch (Exception ex) {
- if (!retry && AddinManager.IsInitialized) {
- LoggingService.LogWarning (BrandingService.ApplicationName + " failed to start. Rebuilding addins registry.");
- AddinManager.Registry.Rebuild (new Mono.Addins.ConsoleProgressStatus (true));
- LoggingService.LogInfo ("Addin registry rebuilt. Restarting MonoDevelop.");
- retry = true;
- } else {
- LoggingService.LogFatalError (BrandingService.ApplicationName + " failed to start. Some of the assemblies required to run MonoDevelop (for example gtk-sharp, gnome-sharp or gtkhtml-sharp) may not be properly installed in the GAC.", ex);
- retry = false;
- }
- } finally {
- Runtime.Shutdown ();
- }
- }
- while (retry);
-
- if (logFile != null)
- logFile.Close ();
-
- return -1;
- }
-
- static StreamWriter logFile;
-
- static void EnableFileLogging ( )
- {
- if (Path.DirectorySeparatorChar != '\\')
- return;
-
- // On Windows log all output to a log file
-
- FilePath logDir = UserProfile.Current.LogDir;
- if (!Directory.Exists (logDir))
- Directory.CreateDirectory (logDir);
-
- string file = logDir.Combine ("log.txt");
- try {
- logFile = new StreamWriter (file);
- logFile.AutoFlush = true;
-
- LogTextWriter tw = new LogTextWriter ();
- tw.ChainWriter (logFile);
- tw.ChainWriter (Console.Out);
- Console.SetOut (tw);
-
- tw = new LogTextWriter ();
- tw.ChainWriter (logFile);
- tw.ChainWriter (Console.Error);
- Console.SetError (tw);
- }
- catch {
- }
+ return IdeStartup.Main (args);
}
}
-}
+} \ No newline at end of file