diff options
author | Lluis Sanchez <lluis@novell.com> | 2007-12-03 22:46:49 +0300 |
---|---|---|
committer | Lluis Sanchez <lluis@novell.com> | 2007-12-03 22:46:49 +0300 |
commit | eaf0aeb5441a491db3df8585e907ece929a2df4f (patch) | |
tree | 9ae3c9c29ffcacabad99c89684430730f3767772 /mautil | |
parent | a18e3e64d6d1259e6c95da9e9292907bc586cc94 (diff) |
* Main.cs: Added parameter for setting the startup path.
svn path=/trunk/mono-addins/; revision=90586
Diffstat (limited to 'mautil')
-rw-r--r-- | mautil/ChangeLog | 4 | ||||
-rw-r--r-- | mautil/Main.cs | 15 |
2 files changed, 18 insertions, 1 deletions
diff --git a/mautil/ChangeLog b/mautil/ChangeLog index db0ede4..e75a00d 100644 --- a/mautil/ChangeLog +++ b/mautil/ChangeLog @@ -1,3 +1,7 @@ +2007-12-03 Lluis Sanchez Gual <lluis@novell.com> + + * Main.cs: Added parameter for setting the startup path. + 2007-10-29 Lluis Sanchez Gual <lluis@novell.com> * mautil.mdp: Update paths. diff --git a/mautil/Main.cs b/mautil/Main.cs index b0d32c3..48f3945 100644 --- a/mautil/Main.cs +++ b/mautil/Main.cs @@ -15,6 +15,7 @@ namespace mautil Console.WriteLine (); Console.WriteLine ("Options:"); Console.WriteLine (" --registry (-reg) Specify add-in registry path"); + Console.WriteLine (" --path (-p) Specify startup path"); Console.WriteLine (" -v Verbose output"); } @@ -26,6 +27,7 @@ namespace mautil verbose = true; string path = null; + string startupPath = null; bool toolParam = true; while (toolParam && ppos < args.Length) @@ -38,6 +40,14 @@ namespace mautil path = args [ppos + 1]; ppos += 2; } + if (args [ppos] == "-p" || args [ppos] == "--path") { + if (ppos + 1 >= args.Length) { + Console.WriteLine ("Startup path not provided."); + return 1; + } + startupPath = args [ppos + 1]; + ppos += 2; + } else if (args [ppos] == "-v") { verbose = true; ppos++; @@ -45,7 +55,10 @@ namespace mautil toolParam = false; } - AddinRegistry reg = path != null ? new AddinRegistry (path) : AddinRegistry.GetGlobalRegistry (); + if (startupPath == null) + startupPath = Environment.CurrentDirectory; + + AddinRegistry reg = path != null ? new AddinRegistry (path, startupPath) : AddinRegistry.GetGlobalRegistry (); try { SetupTool setupTool = new SetupTool (reg); setupTool.VerboseOutput = verbose; |