diff options
author | Lluis Sanchez <lluis@novell.com> | 2007-03-23 19:04:39 +0300 |
---|---|---|
committer | Lluis Sanchez <lluis@novell.com> | 2007-03-23 19:04:39 +0300 |
commit | 12fbd74b695dac72bde1a7ea9f88350bcd9a40ed (patch) | |
tree | 3b6b2e97b03d5de76ab7a0ba7da06ff296834825 /mautil |
Initial import of Mono.Addins
svn path=/trunk/mono-addins/; revision=74886
Diffstat (limited to 'mautil')
-rw-r--r-- | mautil/AssemblyInfo.cs | 32 | ||||
-rw-r--r-- | mautil/Main.cs | 61 | ||||
-rw-r--r-- | mautil/Makefile.am | 35 | ||||
-rw-r--r-- | mautil/mautil.in | 9 | ||||
-rw-r--r-- | mautil/mautil.mdp | 31 |
5 files changed, 168 insertions, 0 deletions
diff --git a/mautil/AssemblyInfo.cs b/mautil/AssemblyInfo.cs new file mode 100644 index 0000000..af4e275 --- /dev/null +++ b/mautil/AssemblyInfo.cs @@ -0,0 +1,32 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following +// attributes. +// +// change them to the information which is associated with the assembly +// you compile. + +[assembly: AssemblyTitle("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all values by your own or you can build default build and revision +// numbers with the '*' character (the default): + +[assembly: AssemblyVersion("1.0.*")] + +// The following attributes specify the key for the sign of your assembly. See the +// .NET Framework documentation for more information about signing. +// This is not required, if you don't want signing let these attributes like they're. +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] diff --git a/mautil/Main.cs b/mautil/Main.cs new file mode 100644 index 0000000..33086ff --- /dev/null +++ b/mautil/Main.cs @@ -0,0 +1,61 @@ +// project created on 16/07/2006 at 13:33 +using System; +using Mono.Addins; +using Mono.Addins.Setup; + +namespace mautil +{ + class MainClass + { + public static int Main(string[] args) + { + if (args.Length == 0 || args [0] == "--help" || args [0] == "help") { + Console.WriteLine ("Mono.Addins Setup Utility"); + Console.WriteLine ("Usage: mautil [options] <command> [arguments]"); + Console.WriteLine (); + Console.WriteLine ("Options:"); + Console.WriteLine (" --registry (-reg) Specify add-in registry path"); + Console.WriteLine (" -v Verbose output"); + } + + int ppos = 0; + + bool verbose = false; + foreach (string a in args) + if (a == "-v") + verbose = true; + + string path = null; + bool toolParam = true; + + while (toolParam && ppos < args.Length) + { + if (args [ppos] == "-reg" || args [ppos] == "--registry") { + if (ppos + 1 >= args.Length) { + Console.WriteLine ("Registry path not provided."); + return 1; + } + path = args [ppos + 1]; + ppos += 2; + } + else if (args [ppos] == "-v") + verbose = true; + else + toolParam = false; + } + + AddinRegistry reg = path != null ? new AddinRegistry (path) : AddinRegistry.GetGlobalRegistry (); + try { + SetupTool setupTool = new SetupTool (reg); + setupTool.VerboseOutput = verbose; + return setupTool.Run (args, ppos); + } catch (Exception ex) { + Console.WriteLine (ex); + return -1; + } + finally { + reg.Dispose (); + } + } + } +}
\ No newline at end of file diff --git a/mautil/Makefile.am b/mautil/Makefile.am new file mode 100644 index 0000000..1ecb086 --- /dev/null +++ b/mautil/Makefile.am @@ -0,0 +1,35 @@ + +ASSEMBLY_COMPILER_COMMAND = mcs +ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -debug -d:DEBUG +ASSEMBLY = ../bin/mautil.exe +COMPILE_TARGET = exe +ASSEMBLY_WRAPPER = mautil +ASSEMBLY_WRAPPER_IN = mautil.in +PROJECT_REFERENCES = \ + ../bin/Mono.Addins.dll \ + ../bin/Mono.Addins.Setup.dll +BUILD_DIR = ../bin + + +all: $(ASSEMBLY) + +FILES = \ + AssemblyInfo.cs \ + Main.cs + +DATA_FILES = + +RESOURCES = + +EXTRAS = + +REFERENCES = -r:System + +DLL_REFERENCES = + +$(ASSEMBLY) $(ASSEMBLY).mdb: $(build_sources) $(build_resources) $(build_datafiles) + mkdir -p $(dir $(ASSEMBLY)) + + $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$@ -target:$(COMPILE_TARGET) $(build_sources) $(build_resources_embed) $(build_references_ref) + +include $(top_srcdir)/Makefile.include diff --git a/mautil/mautil.in b/mautil/mautil.in new file mode 100644 index 0000000..fa84b55 --- /dev/null +++ b/mautil/mautil.in @@ -0,0 +1,9 @@ +#!/bin/sh + +prefix="@prefix@" +exec_prefix="@exec_prefix@" +libdir="@libdir@/@PACKAGE@" + +cd ${libdir} + +exec mono "mautil.exe" "$@"
\ No newline at end of file diff --git a/mautil/mautil.mdp b/mautil/mautil.mdp new file mode 100644 index 0000000..53adc83 --- /dev/null +++ b/mautil/mautil.mdp @@ -0,0 +1,31 @@ +<Project name="mautil" fileversion="2.0" language="C#" clr-version="Net_1_1" ctype="DotNetProject"> + <Configurations active="Default"> + <Configuration name="Default" ctype="DotNetProjectConfiguration"> + <Output directory="../bin" assembly="mautil" /> + <Build debugmode="True" target="Exe" /> + <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_1_1" /> + <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" /> + </Configuration> + </Configurations> + <Contents> + <File name="./Main.cs" subtype="Code" buildaction="Compile" /> + <File name="./AssemblyInfo.cs" subtype="Code" buildaction="Compile" /> + </Contents> + <References> + <ProjectReference type="Gac" localcopy="True" refto="System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> + <ProjectReference type="Project" localcopy="True" refto="Mono.Addins" /> + <ProjectReference type="Project" localcopy="True" refto="Mono.Addins.Setup" /> + </References> + <MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="True" RelativeMakefileName="./Makefile.am" BuildTargetName="" CleanTargetName="" SyncReferences="True"> + <BuildFilesVar Sync="True" Name="FILES" /> + <DeployFilesVar Sync="True" Name="DATA_FILES" /> + <ResourcesVar Sync="True" Name="RESOURCES" /> + <OthersVar /> + <GacRefVar Sync="True" Name="REFERENCES" Prefix="-r:" /> + <AsmRefVar Sync="True" Name="DLL_REFERENCES" /> + <ProjectRefVar Sync="True" Name="PROJECT_REFERENCES" /> + </MonoDevelop.Autotools.MakefileInfo> + <DeploymentInformation strategy="File"> + <excludeFiles /> + </DeploymentInformation> +</Project>
\ No newline at end of file |