diff options
author | Alan McGovern <alan@xamarin.com> | 2013-08-21 05:50:17 +0400 |
---|---|---|
committer | Alan McGovern <alan@xamarin.com> | 2013-08-21 05:55:29 +0400 |
commit | 5091ec6ae936035f5419e727e5948b4bb2c36d29 (patch) | |
tree | df8ea3fdacc9f66bcd3b6c6e4f2953ef4ad12d13 /main/src | |
parent | 82b050a922807cbe61479be4240f6be80d6be58f (diff) |
[Core] Add a way to override the config directory for MD
This allows us to redefine the directory where we store the
mono-addins addin cache.
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Core/Runtime.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Runtime.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Runtime.cs index 3f60d38687..962a9cb47c 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Runtime.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Runtime.cs @@ -81,6 +81,10 @@ namespace MonoDevelop.Core AddinManager.AddinUnloaded += OnUnload; //provides a development-time way to load addins that are being developed in a asperate solution + var devConfigDir = Environment.GetEnvironmentVariable ("MONODEVELOP_DEV_CONFIG"); + if (devConfigDir != null && devConfigDir.Length == 0) + devConfigDir = null; + var devAddinDir = Environment.GetEnvironmentVariable ("MONODEVELOP_DEV_ADDINS"); if (devAddinDir != null && devAddinDir.Length == 0) devAddinDir = null; @@ -88,7 +92,7 @@ namespace MonoDevelop.Core try { Counters.RuntimeInitialization.Trace ("Initializing Addin Manager"); AddinManager.Initialize ( - UserProfile.Current.ConfigDir, + devConfigDir ?? UserProfile.Current.ConfigDir, devAddinDir ?? UserProfile.Current.LocalInstallDir.Combine ("Addins"), devAddinDir ?? UserProfile.Current.CacheDir); AddinManager.InitializeDefaultLocalizer (new DefaultAddinLocalizer ()); |