From 7e65590a55ba575d0086bdfc25addaf1051d799b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 11 Sep 2010 01:13:08 +0100 Subject: Update Prebuild.exe with Prebuild r323 + an existing OpenSim specific nant hack to correctly clean up chosen OpenSim exes and dlls in bin/ on a "nant clean" Source code is included for reference. This can go away again once Prebuild is updated with a more general mechanism for cleaning up files. The Prebuild source code here can be built with nant, or regnerated for other tools using the prebuild at {root}/bin/Prebuild.exe --- Prebuild/src/.svn/all-wcprops | 23 +++ Prebuild/src/.svn/dir-prop-base | 16 +++ Prebuild/src/.svn/entries | 139 ++++++++++++++++++ Prebuild/src/.svn/prop-base/App.ico.svn-base | 5 + Prebuild/src/.svn/prop-base/Prebuild.cs.svn-base | 9 ++ Prebuild/src/.svn/prop-base/Prebuild.snk.svn-base | 5 + Prebuild/src/.svn/text-base/App.ico.svn-base | Bin 0 -> 4286 bytes Prebuild/src/.svn/text-base/Prebuild.cs.svn-base | 165 ++++++++++++++++++++++ Prebuild/src/.svn/text-base/Prebuild.snk.svn-base | Bin 0 -> 596 bytes 9 files changed, 362 insertions(+) create mode 100644 Prebuild/src/.svn/all-wcprops create mode 100644 Prebuild/src/.svn/dir-prop-base create mode 100644 Prebuild/src/.svn/entries create mode 100644 Prebuild/src/.svn/prop-base/App.ico.svn-base create mode 100644 Prebuild/src/.svn/prop-base/Prebuild.cs.svn-base create mode 100644 Prebuild/src/.svn/prop-base/Prebuild.snk.svn-base create mode 100644 Prebuild/src/.svn/text-base/App.ico.svn-base create mode 100644 Prebuild/src/.svn/text-base/Prebuild.cs.svn-base create mode 100644 Prebuild/src/.svn/text-base/Prebuild.snk.svn-base (limited to 'Prebuild/src/.svn') diff --git a/Prebuild/src/.svn/all-wcprops b/Prebuild/src/.svn/all-wcprops new file mode 100644 index 0000000..bafaca9 --- /dev/null +++ b/Prebuild/src/.svn/all-wcprops @@ -0,0 +1,23 @@ +K 25 +svn:wc:ra_dav:version-url +V 45 +/svnroot/dnpb/!svn/ver/323/trunk/Prebuild/src +END +Prebuild.snk +K 25 +svn:wc:ra_dav:version-url +V 57 +/svnroot/dnpb/!svn/ver/96/trunk/Prebuild/src/Prebuild.snk +END +App.ico +K 25 +svn:wc:ra_dav:version-url +V 52 +/svnroot/dnpb/!svn/ver/96/trunk/Prebuild/src/App.ico +END +Prebuild.cs +K 25 +svn:wc:ra_dav:version-url +V 57 +/svnroot/dnpb/!svn/ver/308/trunk/Prebuild/src/Prebuild.cs +END diff --git a/Prebuild/src/.svn/dir-prop-base b/Prebuild/src/.svn/dir-prop-base new file mode 100644 index 0000000..68e5483 --- /dev/null +++ b/Prebuild/src/.svn/dir-prop-base @@ -0,0 +1,16 @@ +K 10 +svn:ignore +V 121 +*.mdp +*.mds +*.pidb +bin +obj +Include.am +Prebuild.csproj +Prebuild.csproj.user +Prebuild.exe.build +Prebuild.prjx +Prebuild.xml + +END diff --git a/Prebuild/src/.svn/entries b/Prebuild/src/.svn/entries new file mode 100644 index 0000000..8284966 --- /dev/null +++ b/Prebuild/src/.svn/entries @@ -0,0 +1,139 @@ +10 + +dir +323 +https://dnpb.svn.sourceforge.net/svnroot/dnpb/trunk/Prebuild/src +https://dnpb.svn.sourceforge.net/svnroot/dnpb + + + +2010-09-10T17:51:36.189738Z +323 +jhurliman +has-props + + + + + + + + + + + + + +3355ff64-970d-0410-bbe8-d0fbd18be4fb + +Prebuild.snk +file + + + + +2010-09-10T22:51:45.000000Z +89097ad015e09b35fc896e2128dea94d +2006-01-19T19:45:13.000000Z +45 +jendave +has-props + + + + + + + + + + + + + + + + + + + + +596 + +Core +dir + +data +dir + +App.ico +file + + + + +2010-09-10T22:51:45.000000Z +4ee5c8b292635af0bf1247d425ba2c0d +2006-01-27T21:30:44.000000Z +68 +jendave +has-props + + + + + + + + + + + + + + + + + + + + +4286 + +Prebuild.cs +file + + + + +2010-09-10T22:51:45.000000Z +55ae2c874ce7e9ab7f33cd6f75926733 +2009-04-15T01:33:14.373570Z +308 +kunnis +has-props + + + + + + + + + + + + + + + + + + + + +5040 + +Properties +dir + diff --git a/Prebuild/src/.svn/prop-base/App.ico.svn-base b/Prebuild/src/.svn/prop-base/App.ico.svn-base new file mode 100644 index 0000000..5e9587e --- /dev/null +++ b/Prebuild/src/.svn/prop-base/App.ico.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/Prebuild/src/.svn/prop-base/Prebuild.cs.svn-base b/Prebuild/src/.svn/prop-base/Prebuild.cs.svn-base new file mode 100644 index 0000000..7b57b30 --- /dev/null +++ b/Prebuild/src/.svn/prop-base/Prebuild.cs.svn-base @@ -0,0 +1,9 @@ +K 13 +svn:eol-style +V 6 +native +K 12 +svn:keywords +V 23 +Author Date Id Revision +END diff --git a/Prebuild/src/.svn/prop-base/Prebuild.snk.svn-base b/Prebuild/src/.svn/prop-base/Prebuild.snk.svn-base new file mode 100644 index 0000000..5e9587e --- /dev/null +++ b/Prebuild/src/.svn/prop-base/Prebuild.snk.svn-base @@ -0,0 +1,5 @@ +K 13 +svn:mime-type +V 24 +application/octet-stream +END diff --git a/Prebuild/src/.svn/text-base/App.ico.svn-base b/Prebuild/src/.svn/text-base/App.ico.svn-base new file mode 100644 index 0000000..ac4ea6f Binary files /dev/null and b/Prebuild/src/.svn/text-base/App.ico.svn-base differ diff --git a/Prebuild/src/.svn/text-base/Prebuild.cs.svn-base b/Prebuild/src/.svn/text-base/Prebuild.cs.svn-base new file mode 100644 index 0000000..c485665 --- /dev/null +++ b/Prebuild/src/.svn/text-base/Prebuild.cs.svn-base @@ -0,0 +1,165 @@ +#region BSD License +/* +Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) + +Redistribution and use in source and binary forms, with or without modification, are permitted +provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions + and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions + and the following disclaimer in the documentation and/or other materials provided with the + distribution. +* The name of the author may not be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +#endregion + +#region CVS Information +/* + * $Source$ + * $Author$ + * $Date$ + * $Revision$ + */ +#endregion + +using System; +using System.Collections.Specialized; +using System.IO; +using System.Reflection; +using System.Runtime.InteropServices; +using System.EnterpriseServices.Internal; + +using Prebuild.Core; +using Prebuild.Core.Utilities; + +namespace Prebuild +{ + /// + /// + /// + class Prebuild + { + #region Main + + [STAThread] + static void Main(string[] args) + { + Kernel kernel = null; + try + { + kernel = Kernel.Instance; + kernel.Initialize(LogTargets.File | LogTargets.Console, args); + bool exit = false; + + if(kernel.CommandLine.WasPassed("usage")) + { + exit = true; + OutputUsage(); + } + if(kernel.CommandLine.WasPassed("showtargets")) + { + exit = true; + OutputTargets(kernel); + } + if(kernel.CommandLine.WasPassed("install")) + { + exit = true; + InstallAssembly(kernel); + } + if(kernel.CommandLine.WasPassed("remove")) + { + exit = true; + RemoveAssembly(kernel); + } + + if(!exit) + { + kernel.Process(); + } + } +#if !DEBUG + catch (Exception ex) + { + Console.WriteLine("Unhandled error: {0}", ex.Message); + Console.WriteLine("{0}", ex.StackTrace); + } +#endif + finally + { + if(kernel != null && kernel.PauseAfterFinish) + { + Console.WriteLine("\nPress enter to continue..."); + Console.ReadLine(); + } + } + } + + #endregion + + #region Private Methods + + private static void InstallAssembly(Kernel kernel) + { + Publish publish = new Publish(); + string file = kernel.CommandLine["install"]; + //Console.WriteLine(".."+file+".."); + publish.GacInstall(file); + } + + private static void RemoveAssembly(Kernel kernel) + { + Publish publish = new Publish(); + string file = kernel.CommandLine["remove"]; + publish.GacRemove(file); + } + + private static void OutputUsage() + { + Console.WriteLine("Usage: prebuild /target [options]"); + Console.WriteLine("Available command-line switches:"); + Console.WriteLine(); + Console.WriteLine("/target Target for Prebuild"); + Console.WriteLine("/clean Clean the build files for the given target"); + Console.WriteLine("/file XML file to process"); + Console.WriteLine("/log Log file to write to"); + Console.WriteLine("/ppo Pre-process the file, but perform no other processing"); + Console.WriteLine("/pause Pauses the application after execution to view the output"); + Console.WriteLine("/yes Default to yes to any questions asked"); + Console.WriteLine("/install Install assembly into the GAC"); + Console.WriteLine("/remove Remove assembly from the GAC"); + Console.WriteLine(); + Console.WriteLine("See 'prebuild /showtargets for a list of available targets"); + Console.WriteLine("See readme.txt or check out http://dnpb.sourceforge.net for more information"); + Console.WriteLine(); + } + + private static void OutputTargets(Kernel kern) + { + Console.WriteLine("Targets available in Prebuild:"); + Console.WriteLine(""); + if(kern.Targets.Keys.Count > 0) + { + string[] targs = new string[kern.Targets.Keys.Count]; + kern.Targets.Keys.CopyTo(targs, 0); + Array.Sort(targs); + foreach(string target in targs) + { + Console.WriteLine(target); + } + } + Console.WriteLine(""); + } + + #endregion + } +} diff --git a/Prebuild/src/.svn/text-base/Prebuild.snk.svn-base b/Prebuild/src/.svn/text-base/Prebuild.snk.svn-base new file mode 100644 index 0000000..f9dce05 Binary files /dev/null and b/Prebuild/src/.svn/text-base/Prebuild.snk.svn-base differ -- cgit v1.1