Author: lluis
Date: 2007-12-03 14:46:49 -0500 (Mon, 03 Dec 2007)
New Revision: 90586
Modified:
trunk/mono-addins/mautil/ChangeLog
trunk/mono-addins/mautil/Main.cs
Log:
* Main.cs: Added parameter for setting the startup path.
Modified: trunk/mono-addins/mautil/ChangeLog
===================================================================
--- trunk/mono-addins/mautil/ChangeLog 2007-12-03 19:46:27 UTC (rev 90585)
+++ trunk/mono-addins/mautil/ChangeLog 2007-12-03 19:46:49 UTC (rev 90586)
@@ -1,3 +1,7 @@
+2007-12-03 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
+ * Main.cs: Added parameter for setting the startup path.
+
2007-10-29 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* mautil.mdp: Update paths.
Modified: trunk/mono-addins/mautil/Main.cs
===================================================================
--- trunk/mono-addins/mautil/Main.cs 2007-12-03 19:46:27 UTC (rev 90585)
+++ trunk/mono-addins/mautil/Main.cs 2007-12-03 19:46:49 UTC (rev 90586)
@@ -15,6 +15,7 @@
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 @@
verbose = true;
string path = null;
+ string startupPath = null;
bool toolParam = true;
while (toolParam && ppos < args.Length)
@@ -38,6 +40,14 @@
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 @@
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;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches