From bd6eae848e00922a01de12ad46e4de4114ed17d4 Mon Sep 17 00:00:00 2001 From: Mike Dickson Date: Fri, 17 Jun 2016 12:01:02 -0400 Subject: [PATCH] Get a copy of Prebuild into ThirdParty with the InWorldz specific changes. There are copies of Prebuild in Halcyon and LibOMV that have deviated. This takes the most up to date copy from Halcyon and puts a copy in ThirdParty. Also made a nukpkg package from it as well. I haven't removed this from Halcyon and LibOmv yet. I'll do it in LibOMV first with some other changes that are coming. --- ThirdParty/Prebuild/.gitignore | 252 ++++ ThirdParty/Prebuild/AUTHORS | 10 + ThirdParty/Prebuild/COPYING | 65 + ThirdParty/Prebuild/ChangeLog | 461 +++++++ ThirdParty/Prebuild/INSTALL | 236 ++++ ThirdParty/Prebuild/NEWS | 200 +++ ThirdParty/Prebuild/Package.nuspec | 17 + ThirdParty/Prebuild/README | 274 +++++ ThirdParty/Prebuild/THANKS | 18 + ThirdParty/Prebuild/TODO | 43 + ThirdParty/Prebuild/bin/prebuild.exe | Bin 0 -> 245760 bytes ThirdParty/Prebuild/clean.bat | 1 + ThirdParty/Prebuild/clean.sh | 1 + ThirdParty/Prebuild/doc/prebuild-example1.xml | 300 +++++ ThirdParty/Prebuild/doc/prebuild-example2.xml | 72 ++ ThirdParty/Prebuild/doc/prebuild-example3.xml | 113 ++ ThirdParty/Prebuild/doc/prebuild-example4.xml | 715 +++++++++++ ThirdParty/Prebuild/doc/prebuild-example5.xml | 187 +++ ThirdParty/Prebuild/prebuild | 2 + ThirdParty/Prebuild/prebuild.xml | 73 ++ ThirdParty/Prebuild/scripts/Clean.bat | 2 + ThirdParty/Prebuild/scripts/Clean.sh | 4 + ThirdParty/Prebuild/scripts/Help.bat | 2 + ThirdParty/Prebuild/scripts/MonoDevelop.sh | 2 + ThirdParty/Prebuild/scripts/Prebuild.nsi | 231 ++++ ThirdParty/Prebuild/scripts/SharpDevelop.bat | 4 + ThirdParty/Prebuild/scripts/SharpDevelop2.bat | 4 + ThirdParty/Prebuild/scripts/VS2002.bat | 4 + ThirdParty/Prebuild/scripts/VS2003.bat | 4 + ThirdParty/Prebuild/scripts/VS2005.bat | 4 + ThirdParty/Prebuild/scripts/VS2008.bat | 4 + ThirdParty/Prebuild/scripts/autotools.bat | 4 + ThirdParty/Prebuild/scripts/autotools.sh | 5 + ThirdParty/Prebuild/scripts/makefile.bat | 4 + ThirdParty/Prebuild/scripts/makefile.sh | 10 + ThirdParty/Prebuild/scripts/nant.bat | 4 + ThirdParty/Prebuild/scripts/nant.sh | 2 + ThirdParty/Prebuild/scripts/xcode.bat | 4 + ThirdParty/Prebuild/scripts/xcode.sh | 2 + ThirdParty/Prebuild/src/App.ico | Bin 0 -> 4286 bytes .../src/Core/Attributes/DataNodeAttribute.cs | 72 ++ .../Core/Attributes/OptionNodeAttribute.cs | 71 ++ .../src/Core/Attributes/TargetAttribute.cs | 71 ++ .../Prebuild/src/Core/FatalException.cs | 85 ++ .../Prebuild/src/Core/Interfaces/IDataNode.cs | 47 + .../Prebuild/src/Core/Interfaces/ITarget.cs | 51 + ThirdParty/Prebuild/src/Core/Kernel.cs | 832 +++++++++++++ .../Prebuild/src/Core/Nodes/AuthorNode.cs | 87 ++ .../Prebuild/src/Core/Nodes/CleanFilesNode.cs | 80 ++ .../Prebuild/src/Core/Nodes/CleanupNode.cs | 85 ++ .../src/Core/Nodes/ConfigurationNode.cs | 225 ++++ .../Core/Nodes/ConfigurationNodeCollection.cs | 71 ++ .../Prebuild/src/Core/Nodes/DataNode.cs | 117 ++ .../src/Core/Nodes/DatabaseProjectNode.cs | 93 ++ .../src/Core/Nodes/DatabaseReferenceNode.cs | 63 + .../src/Core/Nodes/DescriptionNode.cs | 87 ++ .../Prebuild/src/Core/Nodes/ExcludeNode.cs | 89 ++ .../Prebuild/src/Core/Nodes/FileNode.cs | 285 +++++ .../Prebuild/src/Core/Nodes/FilesNode.cs | 204 ++++ .../Prebuild/src/Core/Nodes/MatchNode.cs | 367 ++++++ .../Prebuild/src/Core/Nodes/OptionsNode.cs | 634 ++++++++++ .../Prebuild/src/Core/Nodes/ProcessNode.cs | 108 ++ .../Prebuild/src/Core/Nodes/ProjectNode.cs | 591 +++++++++ .../Prebuild/src/Core/Nodes/ReferenceNode.cs | 144 +++ .../src/Core/Nodes/ReferencePathNode.cs | 97 ++ .../Prebuild/src/Core/Nodes/SolutionNode.cs | 382 ++++++ .../Prebuild/src/Core/Parse/IfContext.cs | 154 +++ .../Prebuild/src/Core/Parse/Preprocessor.cs | 652 ++++++++++ .../src/Core/Targets/AutotoolsTarget.cs | 1070 +++++++++++++++++ .../Prebuild/src/Core/Targets/DebugTarget.cs | 102 ++ .../src/Core/Targets/MakefileTarget.cs | 469 ++++++++ .../src/Core/Targets/MonoDevelopTarget.cs | 515 ++++++++ .../Prebuild/src/Core/Targets/NAntTarget.cs | 795 ++++++++++++ .../src/Core/Targets/SharpDevelop2Target.cs | 82 ++ .../src/Core/Targets/SharpDevelopTarget.cs | 425 +++++++ .../Prebuild/src/Core/Targets/ToolInfo.cs | 197 +++ .../Prebuild/src/Core/Targets/VS2002Target.cs | 87 ++ .../Prebuild/src/Core/Targets/VS2003Target.cs | 593 +++++++++ .../Prebuild/src/Core/Targets/VS2005Target.cs | 147 +++ .../Prebuild/src/Core/Targets/VS2008Target.cs | 127 ++ .../Prebuild/src/Core/Targets/VS2010Target.cs | 138 +++ .../Prebuild/src/Core/Targets/VS2012Target.cs | 143 +++ .../Prebuild/src/Core/Targets/VS2015Target.cs | 143 +++ .../src/Core/Targets/VSGenericTarget.cs | 922 ++++++++++++++ .../Prebuild/src/Core/Targets/VSVersion.cs | 62 + .../Prebuild/src/Core/Targets/XcodeTarget.cs | 594 +++++++++ .../src/Core/UnknownLanguageException.cs | 63 + .../Core/Utilities/CommandLineCollection.cs | 152 +++ .../src/Core/Utilities/CurrentDirectory.cs | 68 ++ .../Prebuild/src/Core/Utilities/Helper.cs | 575 +++++++++ ThirdParty/Prebuild/src/Core/Utilities/Log.cs | 276 +++++ .../Prebuild/src/Core/WarningException.cs | 84 ++ ThirdParty/Prebuild/src/Prebuild.cs | 165 +++ ThirdParty/Prebuild/src/Prebuild.snk | Bin 0 -> 596 bytes .../Prebuild/src/Properties/AssemblyInfo.cs | 113 ++ ThirdParty/Prebuild/src/data/autotools.xml | 790 ++++++++++++ ThirdParty/Prebuild/src/data/dnpb-1.0.xsd | 183 +++ ThirdParty/Prebuild/src/data/dnpb-1.1.xsd | 184 +++ ThirdParty/Prebuild/src/data/dnpb-1.2.xsd | 198 +++ ThirdParty/Prebuild/src/data/dnpb-1.3.xsd | 206 ++++ ThirdParty/Prebuild/src/data/dnpb-1.4.xsd | 212 ++++ ThirdParty/Prebuild/src/data/dnpb-1.5.xsd | 215 ++++ ThirdParty/Prebuild/src/data/prebuild-1.6.xsd | 231 ++++ ThirdParty/Prebuild/src/data/prebuild-1.7.xsd | 350 ++++++ ThirdParty/Prebuild/src/data/prebuild-1.8.xsd | 331 +++++ ThirdParty/Prebuild/src/data/prebuild-1.9.xsd | 336 ++++++ ThirdParty/Prebuild/tests/Makefile | 24 + ThirdParty/Prebuild/tests/README.txt | 5 + .../Prebuild/tests/include-001.expected | 46 + ThirdParty/Prebuild/tests/include-001.include | 33 + .../Prebuild/tests/include-001.prebuild | 22 + .../Prebuild/tests/include-002-2.include | 8 + .../Prebuild/tests/include-002.expected | 26 + ThirdParty/Prebuild/tests/include-002.include | 14 + .../Prebuild/tests/include-002.prebuild | 7 + 115 files changed, 20712 insertions(+) create mode 100644 ThirdParty/Prebuild/.gitignore create mode 100644 ThirdParty/Prebuild/AUTHORS create mode 100644 ThirdParty/Prebuild/COPYING create mode 100644 ThirdParty/Prebuild/ChangeLog create mode 100644 ThirdParty/Prebuild/INSTALL create mode 100644 ThirdParty/Prebuild/NEWS create mode 100644 ThirdParty/Prebuild/Package.nuspec create mode 100644 ThirdParty/Prebuild/README create mode 100644 ThirdParty/Prebuild/THANKS create mode 100644 ThirdParty/Prebuild/TODO create mode 100644 ThirdParty/Prebuild/bin/prebuild.exe create mode 100644 ThirdParty/Prebuild/clean.bat create mode 100644 ThirdParty/Prebuild/clean.sh create mode 100644 ThirdParty/Prebuild/doc/prebuild-example1.xml create mode 100644 ThirdParty/Prebuild/doc/prebuild-example2.xml create mode 100644 ThirdParty/Prebuild/doc/prebuild-example3.xml create mode 100644 ThirdParty/Prebuild/doc/prebuild-example4.xml create mode 100644 ThirdParty/Prebuild/doc/prebuild-example5.xml create mode 100644 ThirdParty/Prebuild/prebuild create mode 100644 ThirdParty/Prebuild/prebuild.xml create mode 100644 ThirdParty/Prebuild/scripts/Clean.bat create mode 100644 ThirdParty/Prebuild/scripts/Clean.sh create mode 100644 ThirdParty/Prebuild/scripts/Help.bat create mode 100644 ThirdParty/Prebuild/scripts/MonoDevelop.sh create mode 100644 ThirdParty/Prebuild/scripts/Prebuild.nsi create mode 100644 ThirdParty/Prebuild/scripts/SharpDevelop.bat create mode 100644 ThirdParty/Prebuild/scripts/SharpDevelop2.bat create mode 100644 ThirdParty/Prebuild/scripts/VS2002.bat create mode 100644 ThirdParty/Prebuild/scripts/VS2003.bat create mode 100644 ThirdParty/Prebuild/scripts/VS2005.bat create mode 100644 ThirdParty/Prebuild/scripts/VS2008.bat create mode 100644 ThirdParty/Prebuild/scripts/autotools.bat create mode 100644 ThirdParty/Prebuild/scripts/autotools.sh create mode 100644 ThirdParty/Prebuild/scripts/makefile.bat create mode 100644 ThirdParty/Prebuild/scripts/makefile.sh create mode 100644 ThirdParty/Prebuild/scripts/nant.bat create mode 100644 ThirdParty/Prebuild/scripts/nant.sh create mode 100644 ThirdParty/Prebuild/scripts/xcode.bat create mode 100644 ThirdParty/Prebuild/scripts/xcode.sh create mode 100644 ThirdParty/Prebuild/src/App.ico create mode 100644 ThirdParty/Prebuild/src/Core/Attributes/DataNodeAttribute.cs create mode 100644 ThirdParty/Prebuild/src/Core/Attributes/OptionNodeAttribute.cs create mode 100644 ThirdParty/Prebuild/src/Core/Attributes/TargetAttribute.cs create mode 100644 ThirdParty/Prebuild/src/Core/FatalException.cs create mode 100644 ThirdParty/Prebuild/src/Core/Interfaces/IDataNode.cs create mode 100644 ThirdParty/Prebuild/src/Core/Interfaces/ITarget.cs create mode 100644 ThirdParty/Prebuild/src/Core/Kernel.cs create mode 100644 ThirdParty/Prebuild/src/Core/Nodes/AuthorNode.cs create mode 100644 ThirdParty/Prebuild/src/Core/Nodes/CleanFilesNode.cs create mode 100644 ThirdParty/Prebuild/src/Core/Nodes/CleanupNode.cs create mode 100644 ThirdParty/Prebuild/src/Core/Nodes/ConfigurationNode.cs create mode 100644 ThirdParty/Prebuild/src/Core/Nodes/ConfigurationNodeCollection.cs create mode 100644 ThirdParty/Prebuild/src/Core/Nodes/DataNode.cs create mode 100644 ThirdParty/Prebuild/src/Core/Nodes/DatabaseProjectNode.cs create mode 100644 ThirdParty/Prebuild/src/Core/Nodes/DatabaseReferenceNode.cs create mode 100644 ThirdParty/Prebuild/src/Core/Nodes/DescriptionNode.cs create mode 100644 ThirdParty/Prebuild/src/Core/Nodes/ExcludeNode.cs create mode 100644 ThirdParty/Prebuild/src/Core/Nodes/FileNode.cs create mode 100644 ThirdParty/Prebuild/src/Core/Nodes/FilesNode.cs create mode 100644 ThirdParty/Prebuild/src/Core/Nodes/MatchNode.cs create mode 100644 ThirdParty/Prebuild/src/Core/Nodes/OptionsNode.cs create mode 100644 ThirdParty/Prebuild/src/Core/Nodes/ProcessNode.cs create mode 100644 ThirdParty/Prebuild/src/Core/Nodes/ProjectNode.cs create mode 100644 ThirdParty/Prebuild/src/Core/Nodes/ReferenceNode.cs create mode 100644 ThirdParty/Prebuild/src/Core/Nodes/ReferencePathNode.cs create mode 100644 ThirdParty/Prebuild/src/Core/Nodes/SolutionNode.cs create mode 100644 ThirdParty/Prebuild/src/Core/Parse/IfContext.cs create mode 100644 ThirdParty/Prebuild/src/Core/Parse/Preprocessor.cs create mode 100644 ThirdParty/Prebuild/src/Core/Targets/AutotoolsTarget.cs create mode 100644 ThirdParty/Prebuild/src/Core/Targets/DebugTarget.cs create mode 100644 ThirdParty/Prebuild/src/Core/Targets/MakefileTarget.cs create mode 100644 ThirdParty/Prebuild/src/Core/Targets/MonoDevelopTarget.cs create mode 100644 ThirdParty/Prebuild/src/Core/Targets/NAntTarget.cs create mode 100644 ThirdParty/Prebuild/src/Core/Targets/SharpDevelop2Target.cs create mode 100644 ThirdParty/Prebuild/src/Core/Targets/SharpDevelopTarget.cs create mode 100644 ThirdParty/Prebuild/src/Core/Targets/ToolInfo.cs create mode 100644 ThirdParty/Prebuild/src/Core/Targets/VS2002Target.cs create mode 100644 ThirdParty/Prebuild/src/Core/Targets/VS2003Target.cs create mode 100644 ThirdParty/Prebuild/src/Core/Targets/VS2005Target.cs create mode 100644 ThirdParty/Prebuild/src/Core/Targets/VS2008Target.cs create mode 100644 ThirdParty/Prebuild/src/Core/Targets/VS2010Target.cs create mode 100644 ThirdParty/Prebuild/src/Core/Targets/VS2012Target.cs create mode 100644 ThirdParty/Prebuild/src/Core/Targets/VS2015Target.cs create mode 100644 ThirdParty/Prebuild/src/Core/Targets/VSGenericTarget.cs create mode 100644 ThirdParty/Prebuild/src/Core/Targets/VSVersion.cs create mode 100644 ThirdParty/Prebuild/src/Core/Targets/XcodeTarget.cs create mode 100644 ThirdParty/Prebuild/src/Core/UnknownLanguageException.cs create mode 100644 ThirdParty/Prebuild/src/Core/Utilities/CommandLineCollection.cs create mode 100644 ThirdParty/Prebuild/src/Core/Utilities/CurrentDirectory.cs create mode 100644 ThirdParty/Prebuild/src/Core/Utilities/Helper.cs create mode 100644 ThirdParty/Prebuild/src/Core/Utilities/Log.cs create mode 100644 ThirdParty/Prebuild/src/Core/WarningException.cs create mode 100644 ThirdParty/Prebuild/src/Prebuild.cs create mode 100644 ThirdParty/Prebuild/src/Prebuild.snk create mode 100644 ThirdParty/Prebuild/src/Properties/AssemblyInfo.cs create mode 100644 ThirdParty/Prebuild/src/data/autotools.xml create mode 100644 ThirdParty/Prebuild/src/data/dnpb-1.0.xsd create mode 100644 ThirdParty/Prebuild/src/data/dnpb-1.1.xsd create mode 100644 ThirdParty/Prebuild/src/data/dnpb-1.2.xsd create mode 100644 ThirdParty/Prebuild/src/data/dnpb-1.3.xsd create mode 100644 ThirdParty/Prebuild/src/data/dnpb-1.4.xsd create mode 100644 ThirdParty/Prebuild/src/data/dnpb-1.5.xsd create mode 100644 ThirdParty/Prebuild/src/data/prebuild-1.6.xsd create mode 100644 ThirdParty/Prebuild/src/data/prebuild-1.7.xsd create mode 100644 ThirdParty/Prebuild/src/data/prebuild-1.8.xsd create mode 100644 ThirdParty/Prebuild/src/data/prebuild-1.9.xsd create mode 100644 ThirdParty/Prebuild/tests/Makefile create mode 100644 ThirdParty/Prebuild/tests/README.txt create mode 100644 ThirdParty/Prebuild/tests/include-001.expected create mode 100644 ThirdParty/Prebuild/tests/include-001.include create mode 100644 ThirdParty/Prebuild/tests/include-001.prebuild create mode 100644 ThirdParty/Prebuild/tests/include-002-2.include create mode 100644 ThirdParty/Prebuild/tests/include-002.expected create mode 100644 ThirdParty/Prebuild/tests/include-002.include create mode 100644 ThirdParty/Prebuild/tests/include-002.prebuild diff --git a/ThirdParty/Prebuild/.gitignore b/ThirdParty/Prebuild/.gitignore new file mode 100644 index 00000000..549faea7 --- /dev/null +++ b/ThirdParty/Prebuild/.gitignore @@ -0,0 +1,252 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates +*.csproj +*.sln + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs +*.mdb +*.mdp + +# Nant +*.dll.build +*.exe.build + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +[Oo]bj/ + +# Visual Studo 2015 cache/options directory +.vs/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding addin-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +*.[Cc]ache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Produced by runprebuild.bat (prbably not used by anyone since it's an absolute hard-coded path) +compile.bat + +# Bin stuff that we don't want to commit that gets created when you run the server +*.nxs +*.maddin +*.data +*.plx +bin/estate_settings.xml +bin/hacd_hulls.cache.db3 +bin/Halcyon.vshost.exe.manifest +bin/Halcyon.vshost.exe.config +bin/trustednetworks.txt +bin/addin-db-001/ +bin/addin-db-002/ +bin/ScriptEngines/Phlox/states/script_states.db3 + +# Other files that need to be created per-installation +bin/Halcyon.ini +bin/aperture.cfg +bin/GridServer_Config.xml +bin/MessagingServer_Config.xml +bin/UserServer_Config.xml +bin/Regions + +# Other testing folder ignores +bin/*.dll +bin/Halcyon.exe +bin/Halcyon.vshost.exe +bin/OpenSim.Grid.UserServer.exe +bin/OpenSim.Grid.GridServer.exe +bin/OpenSim.Grid.MessagingServer.exe +bin/OpenSim.TestSuite.exe +bin/Physics/InWorldz.PhysxPhysics.dll +bin/Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll +bin/Physics/OpenSim.Region.Physics.Meshing.dll +bin/Terrain/OpenSim.Region.CoreModules.World.Terrain.DefaultEffects.dll +bin/crashes +bin/Grid +bin/GridLogin +bin2 +bin3 +bin4 + +#Other ignores +*.oar +bin/blacklist.old +bin/blacklist.txt diff --git a/ThirdParty/Prebuild/AUTHORS b/ThirdParty/Prebuild/AUTHORS new file mode 100644 index 00000000..9e86ac01 --- /dev/null +++ b/ThirdParty/Prebuild/AUTHORS @@ -0,0 +1,10 @@ +Dave Hudson (jendave@yahoo.com), +Matthew Holmes (matthew@wildfiregames.com) +Dan Moorehead (dan05a@gmail.com) +Rob Loach (http://www.robloach.net) +C.J. Adams-Collier (cjac@colliertech.org) + +Patch Contributers +lbsa71 +chi11ken +sdague diff --git a/ThirdParty/Prebuild/COPYING b/ThirdParty/Prebuild/COPYING new file mode 100644 index 00000000..c57c080b --- /dev/null +++ b/ThirdParty/Prebuild/COPYING @@ -0,0 +1,65 @@ +BSD License +Copyright (c)2004-2008 + +See AUTHORS file for list of copyright holders + +Dave Hudson (jendave@yahoo.com), +Matthew Holmes (matthew@wildfiregames.com) +Dan Moorehead (dan05a@gmail.com) +Rob Loach (http://www.robloach.net) +C.J. Adams-Collier (cjac@colliertech.org) + +http://dnpb.sourceforge.net +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. 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. + +3. The names of the authors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "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 + COPYRIGHT OWNER OR CONTRIBUTORS 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. + +--- + +Portions of src/Core/Targets/AutotoolsTarget.cs +// Copyright (C) 2006 Novell, Inc (http://www.novell.com) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/ThirdParty/Prebuild/ChangeLog b/ThirdParty/Prebuild/ChangeLog new file mode 100644 index 00000000..bb8e7b09 --- /dev/null +++ b/ThirdParty/Prebuild/ChangeLog @@ -0,0 +1,461 @@ +2008-12-09T02:15 D. Moonfire + * src/Core/Kernel.cs + - Added a /ppi target to get the results of processing but before + processing the actual results. + * src/Core/Preprocessor.cs + - Applied the patch from kanato with formatting changes. + - Uses the format. + * tests/ + - Added some lightweight tests to test the functionality of the + include patch. + +2008-06-19T09:37 John Anderson + * src/Core/Kernel.cs + - Only Loop through targets that are not abstract. + * src/Core/Targets/VSGenericTarget.cs + - Marked abstract and removed the Target attribute. + +2008-06-16T17:37 John Anderson + * src/Core/Nodes/ProjectNode.cs,data/prebuild-1.7.xsd + - Added the ability to hardcode guid's in the projects + +2008-05-21T0737 C.J. Adams-Collier + * src/Core/Targets/AutotoolsTarget.cs + - catch exception when unable to compile AssemblyInfo.cs + +2008-05-07T17:29 John Anderson + * src/Core/Targets/VSGenericTarget.cs + - Generate asp.net output in bin\ folder (asp.net requires it there) + +2008-04-30T17:29 John Anderson + * src/Core/Nodes/DatabaseReferenceNode.cs, + src/Core/Nodes/Datanode.cs, + src/Core/Nodes/FileNode.cs, + src/Core/Nodes/FileNodes.cs, + src/Core/Nodes/MatchNode.cs, + src/Core/Targets/VS2008Target.cs, + src/data/prebuild-1.7.xsd + - Refactored the project generation code to handle web projects and more + logically handle embedded resources and designer files. + +2008-04-30T17:29 Joseph Lombrozo + * src/Core/Nodes/SolutionNode.cs + - Had solutions inherit Configurations in the same way that Projects do. + +2008-04-29T06:35 Joseph Lombrozo + * src/Core/Targets/VS2008Target.cs, + src/Core/Nodes/DatabaseProjectNode.cs, + src/Core/Nodes/DatabaseReferenceNode.cs, + src/data/prebuild-1.7.xsd + - Added database references to database projects. + - Prevented nested solutions from being written to disk. + +2008-04-29T05:43 Joseph Lombrozo + * src/Core/Targets/VS2008Target.cs + - Enabled embedded solutions to contain Files. + +2008-04-29T04:13 Joseph Lombrozo + * src/Core/VSVersion.cs + - Fixed spelling mistake in enum comment. + * src/Core/Attributes/DataNodeAttribute.cs + - Allowed the DataNodeAttribute to be attached to a single class + more than once, allowing one class to be used to parse more than + one node at a time. + * src/Core/Kernel.cs + - Changed CacheNodeTypes() to allow for multiple DataNodeAttribute + instances in one class. Refactored ProcessFile(...) to return Solutions, + rather than adding them to the Kernel. + * src/Core/Nodes/SolutionNode.cs + - Added Guid (for embedded folders) + - Added DatabaseProjects, Solutions and Processes to the SolutionNode + when parsing. + * src/Core/Nodes/ProjectNode.cs + - Added FrameworkVersion property to allow for 2.0/3.0/3.5 differentiation. + * src/Core/Targets/VS2008Target.cs, src/data/prebuild-1.7.xsd + - Added ability to have embedded solutions, and externally referenced + prebuild scripts. + +2008-04-24T04:33 John M. Anderson + * src/Core/Targets/VS2003Target.cs, src/Core/Targets/VSVersion.cs + - Moved the VSVersion enum into its own file. + * src/Core/Targets/VS2008Target.cs + - added support for VS2008 + * src/Core/Nodes/ProjectNode.cs + - Added initial support for ASP.NET projects + * src/Core/Nodes/DatabaseProjectNode.cs + - Added support for Visual Studio database projects + +2008-02-19T07:08 C.J. Adams-Collier + * TODO + - added some tasks from Sam Hocevar + * src/Core/Targets/AutotoolsTarget.cs + - added a missing end paren + * COPYING + - Removed Randy Ridge's name from the copyright. Looks to me like + his name was present only because the file was nabbed from Tao + +2008-02-09T20:29 C.J. Adams-Collier + * COPYING + - added MIT/X11 license due to inclusion of code from Monodevelop + * THANKS + - added Lluis Sanchez Gual and Todd Berman - I yoinked code from + their pkg-config .pc file parser to build AutotoolsTarget.cs. + Sorry it took me so long to remember to add mention of you guys! + * src/Core/Targets/AutotoolsTarget.cs + - added MIT/X11 license. see above. + +2008-02-07T08:27 C.J. Adams-Collier + * AUTHORS + - consolidated names and contact info found laying around the + source + * src/Core/Kernel.cs + - updated copyright date + - re-formatted license for 80-column editor + - updated log banner to indicate new date, new authors + * src/Core/Targets/AutotoolsTarget.cs + - clarified reasoning behind use of constants in + AutotoolsTarget.ParsePCFile + - reduced length of some long lines using newline/indent + - added log messages for parsing .pc files, emitting solutions, + projects + - robustified the inter-package dependency resolution target + - log warning when we can't find assembly for + - clarified code for case of inability to find embedded + autotools.xml + * src/data/autotools.xml + - adding system lookup of resgen2 to configure.ac + - fixed .resource -> .resources typo + - added a rule to create .response file containing all sources + - using @.response on $(CSC) command line instead of listing + all source files + * src/Properties/AssemblyInfo.cs + - re-formatted license for an 80-column editor + - added more authors to the AssemblyCopyright attribute + - bumped version to 2.0.3 + * prebuild.xml + - bumped version to 2.0.3 + * scripts/autotools.sh + - if 'mono' is in the path, run Prebuild.exe with it + - using dirname to capture correct path to prebuild.xml &c + +2008-02-06T17:18 C.J. Adams-Collier + * src/Core/Targets/NAntTarget.cs + - re-formatted the license for an 80-column editor + - added myself to the copyright + - added a fix submitted by Gryc Ueusp + * src/Core/Targets/AutotoolsTarget.cs + - updated copyright to include 2008 + * THANKS + - created file, added Gryc Ueusp + +2008-01-01T14:50 C.J. Adams-Collier + * src/data/autotools.xml + - fixed .resx -> .resource compilation + - fixed failing edge case where Project is an unsigned Library + - added $(RESOURCE_SRC) to list of extra dist files + * src/Core/Targets/AutotoolsTarget.cs + - removed embeddedResources from extraDistFiles list + +2007-04-18T07:49 C.J. Adams-Collier + * src/data/prebuild-1.7.xsd + - removed default version from references + +2007-04-06T12:42 C.J. Adams-Collier + * src/data/autotools.xml + - added support for /doc: output when XmlDocFile is not empty + - not printing \t \\n on lines that have no content + - gacutil now installs the root assembly instead of the one under + bin/Debug or whatever + +2007-04-04T22:12 C.J. Adams-Collier + * src/Core/Targets/AutotoolsTarget.cs + - removed debugging Console.WriteLine() + * src/data/autotools.xml + - ensuring that install-sh and missing get distributed + - explicitly stating that the sources, snk, resources and binary + references live under $(srcdir) + - corrected uninstall target + - verified distcheck completes successfully + +2007-04-03T21:56 C.J. Adams-Collier + * src/Core/Targets/AutotoolsTarget.cs + - added a using for System.Diagnostics + - added enum ClrVersion for use with the pkg-config parser + - added class SystemPackage for use with the pkg-config parser + - removed explicit "private" property of members since it is implied + - flushing the stream-writer before it's closed + - removed excess braces around an if statement + ! NormalizeAsmName(), AddAssembly(), GetAssembliesWithLibInfo(), + GetAssembliesWithoutLibInfo(), ProcessPiece(), + GetVariableFromPkgConfig(), ParsePCFile(), + RegisterSystemAssemblies(), RunInitialization() + - pulled the above from MonoDevelop to parse the system pkgconfig + files and determine /pkg: arguments. Original sources are here: + http://svn.myrealbox.com/source/trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core/SystemAssemblyService.cs + http://svn.myrealbox.com/source/trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core/ClrVersion.cs + ! WriteProject() + - now gathering project version from AssemblyInfo.cs if it is part + of the project + - changed the declaration of the ArrayList's in the method + - now copying assembly .config files to the project, distributing, + installing + - making sure all needed files live under the Project directory + - copying strongname keys to project directory + - parsing AssemblyInfo.cs to determine assembly version + - removing all references to ".." + - removed superfluous if(project.References.Count > 0) around + for(int refNum = 0; refNum < project.References.Count; refNum++) + - removed use of runtimeLibs + - adding hook to copy sibling project's generated assemblies to + this project during Make time + - added extra dist target to ensure all files required to build + get distributed during "make dist" + - added new xslt processing args: + -- assemblyName + -- extraDistFiles + -- pkgLibs (/pkg:foo) + -- localCopyTargets (to copy sibling assemblies at Make time) + -- projectVersion (if determined from AssemblyInfo.cs) + -- hasAssemblyConfig (if there's a assembly.exe.config present) + ! Write() + - calling RunInitialization() to gather pkg-config data + * src/data/autotools.xml + - accepting new args passed from AutotoolsTarget.cs + - modernized configure.ac a bit + - using a version of tar that allows >99-char filenames + - added ASSEMBLY_NAME variable + - using assembly name rather than project name for gac installation + - generated assembly is now assembly name and not project name + - accepting /pkg: flags gathered from AutotoolsTarget.cs + - adding Makefile targets to copy sibling project assemblies to . + - fixed Debug, Release targets + - adding support for strongname key signing + - adding /unsafe support + - adding a clean make target + - only running gacutil /u if the assembly being uninstalled is in gac + - added some templates to determine each Configuration's .snk + - added explanation as to why .exe assemblies live in $prefix/lib + * src/Properties/AssemblyInfo.cs + - bumped assembly version + * prebuild.xml + - bumped assembly version + +2007-03-29T18:03 C.J. Adams-Collier + * src/Core/Targets/AutotoolsTarget.cs + ! WriteProject() + - re-named incorrectly-named variable gacLibs to systemLibs + - added another reference list, runtimeLibs which contains the + libs we will need at runtime. we use this to build a MONO_PATH + - added monoPath to the xslt args list + * src/data/autotools.xml + ! + - renamed gacLibs to systemLibs + - added the sources to the dist list + - added logic to install libs that aren't strongnamed + ! + - accepting a param to update the MONO_PATH + +2007-03-28T19:46 C.J. Adams-Collier + * src/Core/Targets/MonoDevelopTarget.cs + ! CleanProject() + - using Assembly.LoadWithPartialName to locate the assembly + * src/Core/Targets/AutotoolsTarget.cs + ! WriteCombine() + - no longer using $PWD to determine a project's source dir; this + doesn't work with elements + - passing the solution name to all templates - fixes + multi-solution prebuild systems + ! WriteProject() + - no longer using $PWD to determine a project's source dir; this + doesn't work with elements + - passing the solution name to all templates - fixes + multi-solution prebuild systems + - copying strongname key to the autotools directory + - using Assembly.LoadWithPartialName to locate assemblies + * src/data/autotools.xml + ! + - fixed the .pc AC_CONFIG_FILES macro + ! + - added solution name param + - wrapping if type=exe check around script install macro + - added type=lib check and .pc file install macro + - added support for Configuration-specific builds (Debug, Release, etc) + - added strongname keyfile code + - TODO: support non-strongnamed library installation + ! + - added space preservation attribute to stylesheet element + - added a lower-case project name variable + - added solution name param + - made for-each template more specific + ! + - added solution name param + ! + - added solution name param + ! + - added solution name param + ! + - added solution name param + +2007-03-27T09:33 C.J. Adams-Collier + * src/Core/Targets/AutotoolsTarget.cs + - now processing the wrapper script if type is "Exe" or "WinExe" + * src/data/autotools.xml + ! + - being more exact about where text escaping is used + - using the correct variable name for the GACUTIL_FLAGS template + - using correct test="" for the AC_CONFIG_FILES macros + ! + - uncommented the bin_SCRIPTS section now that the script is being + generated correctly + ! + - fixed whitespace at beginning of file, before #! + - using lower-case packageName to indicate installation location + +2007-03-27T09:33 C.J. Adams-Collier + * src/data/autotools.xml + ! + * added a lcProjectName which is $projectName lower-cased + * moved autoconf template specifier near AC_OUTPUT + * AC_OUTPUT with args is deprecated. now using AC_CONFIG_FILES + * placed AC_CONFIG_FILES() calls for wrapper script or pkg-config + file in xslt project type checks + ! + * commented out bin_SCRIPTS + * added a lcProjectName which is $projectName lower-cased + * using $lcProjectName instead of the longer version + +2007-03-27T08:39 C.J. Adams-Collier + * src/data/autotools.xml + ! + - added whitespace-preservation + - added the missing projectName param + - replaced bin_SCRIPTS with something that worked + +2007-03-27T07:56 C.J. Adams-Collier + * src/data/autotools.xml + ! + - cleaned up duplicate checks + - placed initialization macros above system check macros + - added some more messages about what's going on + - added GACUTIL_FLAGS variable including /package option + ! + - added an incomplete bin_SCRIPTS + - RCS check says "building" instead of "compiling" + ! + - removed macros that are useful only for projects + ! + - created this element on this revision + - this is a wrapper shell script that lives in the $PATH and runs + the CIL assembly + +2007-03-26T20:18 C.J. Adams-Collier + * src/Core/Targets/AutotoolsTarget.cs + - creating new template arguments to contain the list of libs to + reference: source, binary & GAC + - source libs are included as part of this solution (untested) + - binary libs are distributed with the source (untested) + - GAC libs are assumed to be in the GAC or other lib path (tested) + * src/data/autotools.xml + - created new params through which to accept reference info + - created a working $(CSC) line + - added a TODO item for ordering project dependency for + AC_CONFIG_SUBDIRS code + +2007-03-26T08:41 C.J. Adams-Collier + * src/Core/Targets/AutotoolsTarget.cs + - now creating list of source files in managed code and passing + them to the template via s + * src/data/prebuild-1.7.xsd + - updated the header comment to 2007 + * src/data/autotools.xml + ! + - copied checks from Solution-level configure.ac + - copied solution-level config status + ! + - added elements for file list to be passed through + - made a temporary target for the assembly we're building + - added this target to the deps of "all:" + ! + - changed status header/footer from "- - -" to "===" + +2007-03-23T08:33 C.J. Adams-Collier + Added version attribute handling code for Property element + Added description element handling code + * prebuild.xml + - added /Prebuild/Solution/Property/@version attribute + - added /Prebuild/Solution/Property/Description element + * src/Core/Nodes/ProjectNode.cs + - added some docs where they were missing and obvious + - added code to handle @version + * src/Core/Nodes/DescriptionNode.cs + - new file. Used to handle /Prebuild/Solution/Property/Description + * src/Core/Targets/AutotoolsTarget.cs + - added mkdirDashP(), a recursive directory creation method + - WriteProject() now copies the files to autotools/ + * src/data/prebuild-1.7.xsd + - added /Prebuild/Solution/Property/Description element + - added /Prebuild/Solution/Property/@version attribute + * src/data/autotools.xml + - removed excess + - explicitly using dnpb: prefix + +2007-03-23T04:31 C.J. Adams-Collier + Merged code from my stripped-down test + Adding support for the /Prebuild/Solution/Project/Author element + * prebuild.xml + - added Author elements + - cleaned up the really long Project element + * src/Core/Nodes/ProjectNode.cs + - added Author tag processing code + * src/Core/Nodes/AuthorNode.cs + - Created to process Author elements + - based off of ReferencePathNode.cs + * src/Core/Targets/AutotoolsTarget.cs + - merged code from https://svn.colliertech.org/mono/dnpbAutotools/dnpbAutotools/test.cs + - renamed old WriteCombine to WriteCombineOld + - renamed old WriteProject to WriteProjectOld + * src/data/prebuild-1.7.xsd + - added Author element to Project + * src/data/autotools.xml + - lower-cased utf + + +2007-03-22T13:58 C.J. Adams-Collier + Exposing an XmlDocument that represents the prebuild.xml file + passed to the program + + * src/Core/Kernel.cs + - created an object member called XmlDocument m_CurrentDoc + - created a property to access its value + - using m_CurrentDoc to load up the prebuild.xml file rather than + a local variable called "doc" + +2007-03-22 C.J. Adams-Collier + * prebuild.xml + - added autotools.xml created at https://svn.colliertech.org/mono/dnpbAutotools/dnpbAutotools/autotools.xml + * src/data/autotools.xml + - the same + * src/Core/Targets/MonoDevelopTarget.cs + - fixed bug introduced in r206 + +2007-03-07 C.J. Adams-Collier + * src/data/prebuild-1.7.xsd + - added version attribute to Solution and Project elements + +2006-11-04T00:38 C.J. Adams-Collier + * placing AssemblyInfo.cs into Properties/ + * Fixed double-mention of the package name + +2006-11-03T15:23 C.J. Adams-Collier + * corrected a problem in the Include.am generation code + * created the new .exe + * copied it to the root of the build + +2006-11-03T14:57 C.J. Adams-Collier + * Updated the .exe file + +2006-11-03 C.J. Adams-Collier + * Added a TODO file + * Added a ChangeLog file + * applied some fixes for autotools gac and pkg-config installation + problems diff --git a/ThirdParty/Prebuild/INSTALL b/ThirdParty/Prebuild/INSTALL new file mode 100644 index 00000000..23e5f25d --- /dev/null +++ b/ThirdParty/Prebuild/INSTALL @@ -0,0 +1,236 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free +Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + +These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. + +Installation Names +================== + +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + +Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). Here is a another example: + + /bin/bash ./configure CONFIG_SHELL=/bin/bash + +Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent +configuration-related scripts to be executed by `/bin/bash'. + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/ThirdParty/Prebuild/NEWS b/ThirdParty/Prebuild/NEWS new file mode 100644 index 00000000..3ab3108b --- /dev/null +++ b/ThirdParty/Prebuild/NEWS @@ -0,0 +1,200 @@ +Prebuild is an XML-driven pre-build tool allowing developers to easily generate project or make files for major IDE's and .NET development tools including: Visual Studio 2005, Visual Studio 2003, Visual Studio 2002, SharpDevelop, MonoDevelop, and NAnt. + +Documentation and downloads are available at http://dnpb.sourceforge.net. + +Prebuild is licensed under the BSD license. + +[ XXXXXXX XX, XXX - 1.3.2 ] + + Added Keyfile signing to NAnt target and VS2005 target + + Updated XSD file to 1.7 + + Boo and VisualBasic Language support in VS2005 target + + Added basic Autotools target. It creates a non-recursive Autotools system. + ! Multiple files can be excluded from the Match node + ! VS2005 now handles .resx files correctly. + ! NAnt and Autotools now handle defines + ! NAnt and Autotools now handle resources + + Conditional XML variables can be passed through the command line. + + Added /install and /remove command line flags to install and remove assemblies from the GAC + + Many fixes to VS2005 target + +[ July 21, 2006 - 1.3.1 ] + ! VS2005 fixes from Rob Loach + ! NAnt fixes from Rob Loach and David Hudson + ! XML doc fixes from Rob Loach + + Added SharpDevelop2 target (really just uses VS2005 target) + ! Fixed bug with BuildEvents in Monodevelop target + + Passing /yes will default to answering yes to any warnings + +[ February 28, 2006 - 1.3 ] + + Added MonoDevelop target. + + Added NAnt target. + + Lots of fixes to all targets. + * Cleaned up the code using FXCop. + * Updated schema to 1.6 to fix a typo and add a new parameter. + * jendave is now the maintainer of the project. RobLoach has been added as a developer. + * Removed references to 'dnpb'. + + Added rudimentary support for pre- and post- build scripts + * Updated examples. + +[ August 5, 2004 - 1.2 ] + + Added Visual Studio Express (vs2005express) target contributed by Borrillis and modified for use with different languages + + Added the allowedgroups command line option followed by a pipe-delimited list of project group filter flags (eg. Group1|Group2) allow optional filtering of all projects that dont have at least one of these flags + + Added the filterGroups XML attribute to the project node and updated the scheme to v1.5 for this addition, it is used to specified the delimited list of filter groups to which a project belongs + * Modified the removedir command line option to allow for a pipe-delimited list of directory names + ! Modified the resource loading code to search for resourced without the prepended namespace (as Visual Studio .NET does it) to allow for it to be compiled with SharpDevelop as well + + Added the GenerateXmlDocFile boolean option to the Options XML element + * Changed the behavior of the XmlDocFile option so that if not specified it uses the assemblyName (without file extension) + .xml for the file name instead of just not generating the file since the new GenerateXmlDocFile takes care of this + +[ January 3, 2004 - 1.1 ] + ! Replaced regex use for more efficient manual parsing to allow use on non-windows platforms with Mono which has Regex problems + + Added the checkOsVars attribute to the root element for enabling interpolation for Enviroment variables in the form ${var}, otherwise no checking is performed for efficiency-sake + * Make the version attribute on the root element optional as it isn't used and not needed since the schema url contains the version + +[ December 30, 2004 - 1.1 ] + ! Applied Leed's fix for SharpDevelop references + + Rewrote much of the processing for better validation and without the use of a temp file + + Added support for configurations at the project level which are named All. They now apply changes to all Solution level defined configs + * Changed all spaces into tabs + + Added support for the None build action + * Replaced all sequence's in the XML schema for all's because the order doesn't matter since the xml file is loaded into an XmlDocument + +[ December 25, 2004 - 1.0 ] + + Added the /removedir option for cleaning directories like obj before file releases + + Changed WriteTempXml() and the new DeleteTempXml() methods to be compiled only in DEBUG builds + * Made path optional for Match elements (defaults to current directory) and updates schema for it + ! Fixed XML example in the readme.txt + + Added example xml files to docs directory + * Updated license.txt to add Dan Moorehead and update copyright years + + Updated prebuild.xml to take advantage of the default path attribute for match elements + + Updated Clean to delete the obj directories + +[ December 25, 2004 - 0.13 ] + + Added dnpb.exe so that it can be used to generate the project files + + Added dnpb.ico + * Added parameterless Write statement to Log for writing a single line + * Changed scehema to version 1.3 for support of icon attribute + * Added support for All configuration name under a Project node signifying common settings for all configurations + ! Fixed the SupressWarnings by adding the corresponding field to OptionsNode + * Wrote documentation in docs/readme.txt + * Added Dan Moorehead to copyrights and extended date from 2004 to 2004-2005 + * Updated prebuild.xml + * Optimized Log class + * Updated OutputUsage() + * /clean targets all by default + * No log file is used by default, /log without value specified uses default file name + + Added support for the /pause which pauses the utility after execution to observe output + + +[ September 27, 2004 - 0.12.2a ] + ! Fixed a nasty bug when trying to delete our temp file for pre-processing. + +[ September 15, 2004 - 0.12.2 ] + + Expanded platform identification, thanks to the NAnt guys for shedding some + light on how to properly check for UNIX platforms! Thanks guys! + * POSIX OS identifier changed to UNIX. Valid OS names are now "Win32", "UNIX", + and "Unknown". + ! Fixed SharpDevelop target to properly use the 'rootNamespace' attribute of + the Project tag. + + New command-line switch, /ppo, forces DNPB to pre-process the file and write + the pre-processed file. This allows you to test/debug your pre-processor + macros. No other processing will be done. You can specify a target file as + a paramter for the /ppo switch, or DNPB will write the file 'preprocessed.xml' + if you do not specify a file. + + The Match tag now has a 'buildAction' attribute which functions exactly like + the attribute of the same name for the File tag. + +[ August 5, 2004 - 0.12.1 ] + + Added environment variable expansion for all values. Environment variables + should be listed in the form ${VAR}. + +[ July 30, 2004 - 0.12.0 ] + + Added preprocessing via XML processing information tags. Available tags + are: ?>, ?>, and . The + current expression parser is very basic, but will be replaced with a more + capable parser over time. Current operators available are: =, !=, <, >, + <=, >=. Current test variables available: OS, RuntimeVersion, RuntimeMajor, + RuntimeMinor, RuntimeRevision. + +[ July 27, 2004 - 0.11.4 ] + + Added 'useRegex' attribute to the Match tag. Matches can now use regular + expressions to match filenames. + + Added the 'assemblyName' attribute to the Project tag. Projects can now + set their output assembly name. + ! Fixed several bugs in the way that Project tags inheirt their parent + Solutions configuration options. This operation should now work fully as + intended. + ! Due to some wierdness, Project Guid's are now stored as part of the Project + node and created at parse time. + +[ May 11, 2004 - 0.11.3 ] + ! Fixed a bug where I was writing the wrong property name for a projects root + namespace. + ! Removed a DEBUG statement I had left in the code in 0.11.2. + ! Fixed a bug in the VS2002 writer which caused the version variables to not + be overriden correctly. + + Added the rootNamespace property to the element, allowing you to + specify the root namespace. + * /target and /clean are now mutually exclusive command line switches, and + they both now take the all option. In the case of /target all, all build + file for all targets will be created. In the case of /clean all, the user + will be prompted to make sure they want to do it, and if so, will clean + all build files for all targets. + +[ April 22, 2004 - 0.11.2 ] + ! Fixed a bug with the /file command-line operator. Was using the unresolved + file path rather then the resolved one, was making the attempt to open the + dnpb file fail. + ! Fixed a bug in the schema that required at least 1 solution and 1 reference + path. We can do just fine with 0 of either of these. Some files may be all + statements and not have any tags. + ! Fixed a bug that caused the project references not to be written with the + SharpDevelop target. + * Changed the schema to version 1.2, allowing for Configuration nodes to exist + under project nodes. The inheritance of values is hierarchical. Meaning, if + you define a configuration named Debug at the Soltion level, and one by the + same name at the Project level, the one at the Project level will first + inherit the options of the Solution level configuration, then set it's own + options. If you define a configuration at the Project level and it does not + exist at the Solution level, it will be created at the Solution level. + * Project references should now work correctly across the board. Note that due + to a restriction in Visual Studio, you can only reference projects in the same + solution. + +[ April 21, 2004 - 0.11.1 ] + ! Fixed a problem with resolving paths in various targets. Was not properly + setting the CWD. + * Schema updated to 1.1, moving the ReferencePath element from the Options + element to the Project element. This makes more logical sense, given that + reference paths are resolved relative to the project path. Any prebuild.xml + file referecning verison 1.0 will fail! Please update to the 1.1 schema. + +[ April 19, 2004 - 0.11.0 ] + * Added several attributes across the code to make FxCop happy + ! Fixed bugs in reference paths being written in the VS targets. + ! Fixed a bug in ProjectNode which was doing two CWDStack.Push() calls instead of + a Push/Pop pair. Was wreaking havoc with tags. + ! Fixed some bugs in the path tracking, both the Project and Solution nodes now + have a FullPath property, which is the full path to the file resolved at load + time. This should fix all path relativity problems. + + Added new /clean switch, allowing the target to clean up any files it generated. + in accordance, the ITarget interface has been updated to support a new Clean() + method. + + Completed addition of the tag, to allow the referencing of external + prebuild.xml files. + + Added the runtime attribute to the Project element. This allows the developer + to specify which runtime a project should target (Mono or Microsoft). This is + of course ignored in certain targets like the Visual Studio targets. + + Added the SharpDevelop target. + +[ April 13, 2004 - 0.10.1a ] + + Added the buildAction attribute to the File node. This is needed for dnpb + to even be able to bootstrap itself (dnpb-1.0.xsd must be an embedded resource) + +[ April 13, 2004 - 0.10.1 ] + * First Release + +[ Key ] +* = Change or information ++ = Addition +! = Bug Fix + diff --git a/ThirdParty/Prebuild/Package.nuspec b/ThirdParty/Prebuild/Package.nuspec new file mode 100644 index 00000000..f9cd3431 --- /dev/null +++ b/ThirdParty/Prebuild/Package.nuspec @@ -0,0 +1,17 @@ + + + + Inworldz-Prebuild + 1.3.2 + mdickson + mdickson + false + Prebuild is a solution builder for .NET + Built using vs2015 and packaged with NuGet. + Copyright 2016 + Prebuild + + + + + diff --git a/ThirdParty/Prebuild/README b/ThirdParty/Prebuild/README new file mode 100644 index 00000000..e8a2d695 --- /dev/null +++ b/ThirdParty/Prebuild/README @@ -0,0 +1,274 @@ +Prebuild Instructions + +Prebuild is an XML-driven pre-build tool allowing developers to easily generate project or make files for major IDE's and .NET development tools including: Visual Studio 2005, Visual Studio 2003, Visual Studio 2002, SharpDevelop, SharpDevelop2, MonoDevelop, and NAnt. + +_______________________________________________________________________________ +Overview + +Prebuild can be either be run from the command line to generate the +project and make files or you can execute the included batch (*.bat) +and Unix Shell script (*.sh) files. + +_______________________________________________________________________________ +The currently supported developement tools and their associated batch +and shell script files. + +Visual Studio .NET 2005 (VS2005.bat) +Visual Studio .NET 2003 (VS2003.bat) +Visual Studio .NET 2002 (VS2002.bat) +SharpDevelop (SharpDevelop.bat) - http://www.icsharpcode.net/OpenSource/SD/ +SharpDevelop2 (SharpDevelop.bat) - http://www.icsharpcode.net/OpenSource/SD/ +MonoDevelop (MonoDevelop.sh) - http://www.monodevelop.com/ +NAnt (nant.sh and nant.bat) - http://nant.sourceforge.net/ +Autotools (autotools.bat and autotools.sh) - http://en.wikipedia.org/wiki/GNU_build_system + +Notes: + +A Unix Shell script is provided for MonoDevelop, as it does not run on +Windows at this time. + +Visual Studio .NET 2005 and the Visual Express IDE's can import +solutions from older versions of Visual Studio .NET. + +Makefiles are not currently supported. + +_______________________________________________________________________________ +Command Line Syntax: + +Example: +> Prebuild /target vs2003 + +This will generate the project files for Visual Studio.NET 2003 and +place the redirect the log to a file named PrebuildLog.txt in the +parent directory + + +The syntax structure is as below, where commandParameter is optional +depending on the command and you can provide several option-value +pairs. + +Note: The '> ' signifies the command prompt, do not enter this literally + +> Prebuild /"); + } + #endregion + + #region User File + + ps = new StreamWriter(projectFile + ".user"); + using (ps) + { + // Get the first configuration from the project. + ConfigurationNode firstConfiguration = null; + + if (project.Configurations.Count > 0) + { + firstConfiguration = project.Configurations[0]; + } + + ps.WriteLine(""); + //ps.WriteLine( "" ); + //ps.WriteLine(" <{0}>", toolInfo.XMLTag); + //ps.WriteLine(" "); + ps.WriteLine(" "); + //ps.WriteLine(" ", MakeRefPath(project)); + + if (firstConfiguration != null) + { + ps.WriteLine(" {0}", firstConfiguration.Name); + ps.WriteLine(" {0}", firstConfiguration.Platform); + } + + ps.WriteLine(" {0}", MakeRefPath(project)); + ps.WriteLine(" {0}", ProductVersion); + ps.WriteLine(" ProjectFiles"); + ps.WriteLine(" 0"); + ps.WriteLine(" "); + foreach (ConfigurationNode conf in project.Configurations) + { + ps.Write(" "); + } + ps.WriteLine(""); + } + #endregion + + kernel.CurrentWorkingDirectory.Pop(); + } + + private void WriteSolution(SolutionNode solution, bool writeSolutionToDisk) + { + kernel.Log.Write("Creating {0} solution and project files", VersionName); + + foreach (SolutionNode child in solution.Solutions) + { + kernel.Log.Write("...Creating folder: {0}", child.Name); + WriteSolution(child, false); + } + + foreach (ProjectNode project in solution.Projects) + { + kernel.Log.Write("...Creating project: {0}", project.Name); + WriteProject(solution, project); + } + + foreach (DatabaseProjectNode project in solution.DatabaseProjects) + { + kernel.Log.Write("...Creating database project: {0}", project.Name); + WriteDatabaseProject(solution, project); + } + + if (writeSolutionToDisk) // only write main solution + { + kernel.Log.Write(""); + string solutionFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); + + using (StreamWriter ss = new StreamWriter(solutionFile)) + { + kernel.CurrentWorkingDirectory.Push(); + Helper.SetCurrentDir(Path.GetDirectoryName(solutionFile)); + + ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", SolutionVersion); + ss.WriteLine(SolutionTag); + + WriteProjectDeclarations(ss, solution, solution); + + ss.WriteLine("Global"); + + ss.WriteLine("\tGlobalSection(SolutionConfigurationPlatforms) = preSolution"); + foreach (ConfigurationNode conf in solution.Configurations) + { + ss.WriteLine("\t\t{0} = {0}", conf.NameAndPlatform); + } + ss.WriteLine("\tEndGlobalSection"); + + ss.WriteLine("\tGlobalSection(ProjectConfigurationPlatforms) = postSolution"); + WriteConfigurationLines(solution.Configurations, solution, ss); + ss.WriteLine("\tEndGlobalSection"); + + if (solution.Solutions.Count > 0) + { + ss.WriteLine("\tGlobalSection(NestedProjects) = preSolution"); + foreach (SolutionNode embeddedSolution in solution.Solutions) + { + WriteNestedProjectMap(ss, embeddedSolution); + } + ss.WriteLine("\tEndGlobalSection"); + } + + ss.WriteLine("EndGlobal"); + } + + kernel.CurrentWorkingDirectory.Pop(); + } + } + + private void WriteProjectDeclarations(TextWriter writer, SolutionNode actualSolution, SolutionNode embeddedSolution) + { + foreach (SolutionNode childSolution in embeddedSolution.Solutions) + { + WriteEmbeddedSolution(writer, childSolution); + WriteProjectDeclarations(writer, actualSolution, childSolution); + } + + foreach (ProjectNode project in embeddedSolution.Projects) + { + WriteProject(actualSolution, writer, project); + } + + foreach (DatabaseProjectNode dbProject in embeddedSolution.DatabaseProjects) + { + WriteProject(actualSolution, writer, dbProject); + } + + if (actualSolution.Guid == embeddedSolution.Guid) + { + WriteSolutionFiles(actualSolution, writer); + } + } + + private static void WriteNestedProjectMap(TextWriter writer, SolutionNode embeddedSolution) + { + foreach (ProjectNode project in embeddedSolution.Projects) + { + WriteNestedProject(writer, embeddedSolution, project.Guid); + } + + foreach (DatabaseProjectNode dbProject in embeddedSolution.DatabaseProjects) + { + WriteNestedProject(writer, embeddedSolution, dbProject.Guid); + } + + foreach (SolutionNode child in embeddedSolution.Solutions) + { + WriteNestedProject(writer, embeddedSolution, child.Guid); + WriteNestedProjectMap(writer, child); + } + } + + private static void WriteNestedProject(TextWriter writer, SolutionNode solution, Guid projectGuid) + { + WriteNestedFolder(writer, solution.Guid, projectGuid); + } + + private static void WriteNestedFolder(TextWriter writer, Guid parentGuid, Guid childGuid) + { + writer.WriteLine("\t\t{0} = {1}", + childGuid.ToString("B").ToUpper(), + parentGuid.ToString("B").ToUpper()); + } + + private static void WriteConfigurationLines(IEnumerable configurations, SolutionNode solution, TextWriter ss) + { + foreach (ProjectNode project in solution.Projects) + { + foreach (ConfigurationNode conf in configurations) + { + ss.WriteLine("\t\t{0}.{1}.ActiveCfg = {1}", + project.Guid.ToString("B").ToUpper(), + conf.NameAndPlatform); + + ss.WriteLine("\t\t{0}.{1}.Build.0 = {1}", + project.Guid.ToString("B").ToUpper(), + conf.NameAndPlatform); + } + } + + foreach (SolutionNode child in solution.Solutions) + { + WriteConfigurationLines(configurations, child, ss); + } + } + + private void WriteSolutionFiles(SolutionNode solution, TextWriter ss) + { + if(solution.Files != null && solution.Files.Count > 0) + WriteProject(ss, "Folder", solution.Guid, "Solution Files", "Solution Files", solution.Files); + } + + private void WriteEmbeddedSolution(TextWriter writer, SolutionNode embeddedSolution) + { + WriteProject(writer, "Folder", embeddedSolution.Guid, embeddedSolution.Name, embeddedSolution.Name, embeddedSolution.Files); + } + + private void WriteProject(SolutionNode solution, TextWriter ss, ProjectNode project) + { + WriteProject(ss, solution, project.Language, project.Guid, project.Name, project.FullPath); + } + + private void WriteProject(SolutionNode solution, TextWriter ss, DatabaseProjectNode dbProject) + { + if (solution.Files != null && solution.Files.Count > 0) + WriteProject(ss, solution, "Database", dbProject.Guid, dbProject.Name, dbProject.FullPath); + } + + const string ProjectDeclarationBeginFormat = "Project(\"{0}\") = \"{1}\", \"{2}\", \"{3}\""; + const string ProjectDeclarationEndFormat = "EndProject"; + + private void WriteProject(TextWriter ss, SolutionNode solution, string language, Guid guid, string name, string projectFullPath) + { + if (!tools.ContainsKey(language)) + throw new UnknownLanguageException("Unknown .NET language: " + language); + + ToolInfo toolInfo = tools[language]; + + string path = Helper.MakePathRelativeTo(solution.FullPath, projectFullPath); + + path = Helper.MakeFilePath(path, name, toolInfo.FileExtension); + + WriteProject(ss, language, guid, name, path); + } + + private void WriteProject(TextWriter writer, string language, Guid projectGuid, string name, string location) + { + WriteProject(writer, language, projectGuid, name, location, null); + } + + private void WriteProject(TextWriter writer, string language, Guid projectGuid, string name, string location, FilesNode files) + { + if (!tools.ContainsKey(language)) + throw new UnknownLanguageException("Unknown .NET language: " + language); + + ToolInfo toolInfo = tools[language]; + + writer.WriteLine(ProjectDeclarationBeginFormat, + toolInfo.Guid, + name, + location, + projectGuid.ToString("B").ToUpper()); + + if (files != null) + { + writer.WriteLine("\tProjectSection(SolutionItems) = preProject"); + + foreach (string file in files) + writer.WriteLine("\t\t{0} = {0}", file); + + writer.WriteLine("\tEndProjectSection"); + } + + writer.WriteLine(ProjectDeclarationEndFormat); + } + + private void WriteDatabaseProject(SolutionNode solution, DatabaseProjectNode project) + { + string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "dbp"); + IndentedTextWriter ps = new IndentedTextWriter(new StreamWriter(projectFile), " "); + + kernel.CurrentWorkingDirectory.Push(); + + Helper.SetCurrentDir(Path.GetDirectoryName(projectFile)); + + using (ps) + { + ps.WriteLine("# Microsoft Developer Studio Project File - Database Project"); + ps.WriteLine("Begin DataProject = \"{0}\"", project.Name); + ps.Indent++; + ps.WriteLine("MSDTVersion = \"80\""); + // TODO: Use the project.Files property + if (ContainsSqlFiles(Path.GetDirectoryName(projectFile))) + WriteDatabaseFoldersAndFiles(ps, Path.GetDirectoryName(projectFile)); + + ps.WriteLine("Begin DBRefFolder = \"Database References\""); + ps.Indent++; + foreach (DatabaseReferenceNode reference in project.References) + { + ps.WriteLine("Begin DBRefNode = \"{0}\"", reference.Name); + ps.Indent++; + ps.WriteLine("ConnectStr = \"{0}\"", reference.ConnectionString); + ps.WriteLine("Provider = \"{0}\"", reference.ProviderId.ToString("B").ToUpper()); + //ps.WriteLine("Colorizer = 5"); + ps.Indent--; + ps.WriteLine("End"); + } + ps.Indent--; + ps.WriteLine("End"); + ps.Indent--; + ps.WriteLine("End"); + + ps.Flush(); + } + + kernel.CurrentWorkingDirectory.Pop(); + } + + private static bool ContainsSqlFiles(string folder) + { + if(Directory.GetFiles(folder, "*.sql").Length > 0) + return true; // if the folder contains 1 .sql file, that's good enough + + foreach (string child in Directory.GetDirectories(folder)) + { + if (ContainsSqlFiles(child)) + return true; // if 1 child folder contains a .sql file, still good enough + } + + return false; + } + + private static void WriteDatabaseFoldersAndFiles(IndentedTextWriter writer, string folder) + { + foreach (string child in Directory.GetDirectories(folder)) + { + if (ContainsSqlFiles(child)) + { + writer.WriteLine("Begin Folder = \"{0}\"", Path.GetFileName(child)); + writer.Indent++; + WriteDatabaseFoldersAndFiles(writer, child); + writer.Indent--; + writer.WriteLine("End"); + } + } + foreach (string file in Directory.GetFiles(folder, "*.sql")) + { + writer.WriteLine("Script = \"{0}\"", Path.GetFileName(file)); + } + } + + private void CleanProject(ProjectNode project) + { + kernel.Log.Write("...Cleaning project: {0}", project.Name); + + ToolInfo toolInfo = tools[project.Language]; + string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); + string userFile = projectFile + ".user"; + + Helper.DeleteIfExists(projectFile); + Helper.DeleteIfExists(userFile); + } + + private void CleanSolution(SolutionNode solution) + { + kernel.Log.Write("Cleaning {0} solution and project files", VersionName, solution.Name); + + string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); + string suoFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "suo"); + + Helper.DeleteIfExists(slnFile); + Helper.DeleteIfExists(suoFile); + + foreach (ProjectNode project in solution.Projects) + { + CleanProject(project); + } + + kernel.Log.Write(""); + } + + #endregion + + #region ITarget Members + + /// + /// Writes the specified kern. + /// + /// The kern. + public virtual void Write(Kernel kern) + { + if (kern == null) + { + throw new ArgumentNullException("kern"); + } + kernel = kern; + foreach (SolutionNode sol in kernel.Solutions) + { + WriteSolution(sol, true); + } + kernel = null; + } + + /// + /// Cleans the specified kern. + /// + /// The kern. + public virtual void Clean(Kernel kern) + { + if (kern == null) + { + throw new ArgumentNullException("kern"); + } + kernel = kern; + foreach (SolutionNode sol in kernel.Solutions) + { + CleanSolution(sol); + } + kernel = null; + } + + #endregion + } +} diff --git a/ThirdParty/Prebuild/src/Core/Targets/VSVersion.cs b/ThirdParty/Prebuild/src/Core/Targets/VSVersion.cs new file mode 100644 index 00000000..7bc45deb --- /dev/null +++ b/ThirdParty/Prebuild/src/Core/Targets/VSVersion.cs @@ -0,0 +1,62 @@ +#region BSD License +/* +Copyright (c) 2008-2009 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com), John Anderson (sontek@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 + +namespace Prebuild.Core.Targets +{ + /// + /// + /// + public enum VSVersion + { + /// + /// Visual Studio 2002 + /// + VS70, + /// + /// Visual Studio 2003 + /// + VS71, + /// + /// Visual Studio 2005 + /// + VS80, + /// + /// Visual Studio 2008 + /// + VS90, + /// + /// Visual Studio 2010 + /// + VS10, + /// + /// Visual Studio 2012 + /// + VS12, + /// + /// VIsual Studio 2015 + /// + VS15, + } +} diff --git a/ThirdParty/Prebuild/src/Core/Targets/XcodeTarget.cs b/ThirdParty/Prebuild/src/Core/Targets/XcodeTarget.cs new file mode 100644 index 00000000..5393cec0 --- /dev/null +++ b/ThirdParty/Prebuild/src/Core/Targets/XcodeTarget.cs @@ -0,0 +1,594 @@ +#region BSD License +/* +Copyright (c) 2004 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 + +using System; +using System.IO; +using System.Reflection; +using System.Text.RegularExpressions; + +using Prebuild.Core.Attributes; +using Prebuild.Core.Interfaces; +using Prebuild.Core.Nodes; +using Prebuild.Core.Utilities; + +namespace Prebuild.Core.Targets +{ + /// + /// + /// + [Target("xcode")] + public class XcodeTarget : ITarget + { + #region Fields + + private Kernel m_Kernel; + + #endregion + + #region Private Methods + + private static string PrependPath(string path) + { + string tmpPath = Helper.NormalizePath(path, '/'); + Regex regex = new Regex(@"(\w):/(\w+)"); + Match match = regex.Match(tmpPath); + //if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/') + //{ + tmpPath = Helper.NormalizePath(tmpPath); + //} + // else + // { + // tmpPath = Helper.NormalizePath("./" + tmpPath); + // } + + return tmpPath; + } + + private static string BuildReference(SolutionNode solution, ReferenceNode refr) + { + string ret = ""; + if (solution.ProjectsTable.ContainsKey(refr.Name)) + { + ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name]; + string fileRef = FindFileReference(refr.Name, project); + string finalPath = Helper.NormalizePath(Helper.MakeFilePath(project.FullPath + "/${build.dir}/", refr.Name, "dll"), '/'); + ret += finalPath; + return ret; + } + else + { + ProjectNode project = (ProjectNode)refr.Parent; + string fileRef = FindFileReference(refr.Name, project); + + if (refr.Path != null || fileRef != null) + { + string finalPath = (refr.Path != null) ? Helper.NormalizePath(refr.Path + "/" + refr.Name + ".dll", '/') : fileRef; + ret += finalPath; + return ret; + } + + try + { + //Assembly assem = Assembly.Load(refr.Name); + //if (assem != null) + //{ + //ret += (refr.Name + ".dll"); + //} + //else + //{ + ret += (refr.Name + ".dll"); + //} + } + catch (System.NullReferenceException e) + { + e.ToString(); + ret += refr.Name + ".dll"; + } + } + return ret; + } + + private static string BuildReferencePath(SolutionNode solution, ReferenceNode refr) + { + string ret = ""; + if (solution.ProjectsTable.ContainsKey(refr.Name)) + { + ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name]; + string fileRef = FindFileReference(refr.Name, project); + string finalPath = Helper.NormalizePath(Helper.MakeReferencePath(project.FullPath + "/${build.dir}/"), '/'); + ret += finalPath; + return ret; + } + else + { + ProjectNode project = (ProjectNode)refr.Parent; + string fileRef = FindFileReference(refr.Name, project); + + if (refr.Path != null || fileRef != null) + { + string finalPath = (refr.Path != null) ? Helper.NormalizePath(refr.Path, '/') : fileRef; + ret += finalPath; + return ret; + } + + try + { + Assembly assem = Assembly.Load(refr.Name); + if (assem != null) + { + ret += ""; + } + else + { + ret += ""; + } + } + catch (System.NullReferenceException e) + { + e.ToString(); + ret += ""; + } + } + return ret; + } + + private static string FindFileReference(string refName, ProjectNode project) + { + foreach (ReferencePathNode refPath in project.ReferencePaths) + { + string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll"); + + if (File.Exists(fullPath)) + { + return fullPath; + } + } + + return null; + } + + /// + /// Gets the XML doc file. + /// + /// The project. + /// The conf. + /// + public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf) + { + if (conf == null) + { + throw new ArgumentNullException("conf"); + } + if (project == null) + { + throw new ArgumentNullException("project"); + } + string docFile = (string)conf.Options["XmlDocFile"]; + // if(docFile != null && docFile.Length == 0)//default to assembly name if not specified + // { + // return Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml"; + // } + return docFile; + } + + private void WriteProject(SolutionNode solution, ProjectNode project) + { + string projFile = Helper.MakeFilePath(project.FullPath, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"); + StreamWriter ss = new StreamWriter(projFile); + + m_Kernel.CurrentWorkingDirectory.Push(); + Helper.SetCurrentDir(Path.GetDirectoryName(projFile)); + bool hasDoc = false; + + using (ss) + { + ss.WriteLine(""); + ss.WriteLine("", project.Name); + ss.WriteLine(" ", "build"); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + foreach (ReferenceNode refr in project.References) + { + if (refr.LocalCopy) + { + ss.WriteLine(" ", '/')); + } + } + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.Write(" "); + ss.WriteLine(" ", project.RootNamespace); + foreach (string file in project.Files) + { + switch (project.Files.GetBuildAction(file)) + { + case BuildAction.EmbeddedResource: + ss.WriteLine(" {0}", ""); + break; + default: + if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings) + { + ss.WriteLine(" ", file.Substring(0, file.LastIndexOf('.')) + ".resx"); + } + break; + } + } + //if (project.Files.GetSubType(file).ToString() != "Code") + //{ + // ps.WriteLine(" ", file.Substring(0, file.LastIndexOf('.')) + ".resx"); + + ss.WriteLine(" "); + ss.WriteLine(" "); + foreach (string file in project.Files) + { + switch (project.Files.GetBuildAction(file)) + { + case BuildAction.Compile: + ss.WriteLine(" "); + break; + default: + break; + } + } + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + foreach (ReferenceNode refr in project.References) + { + ss.WriteLine(" ", '/')); + } + ss.WriteLine(" "); + + ss.WriteLine(" "); + ss.WriteLine(" "); + + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + + ss.WriteLine(" "); + if (hasDoc) + { + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.Write(" "); + } + else + { + ss.WriteLine(".exe\" />"); + } + + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + // foreach(ReferenceNode refr in project.References) + // { + // string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReferencePath(solution, refr)), '/'); + // if (path != "") + // { + // ss.WriteLine(" ", path); + // } + // } + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + } + ss.WriteLine(" "); + ss.WriteLine(""); + } + m_Kernel.CurrentWorkingDirectory.Pop(); + } + + private void WriteCombine(SolutionNode solution) + { + m_Kernel.Log.Write("Creating Xcode build files"); + foreach (ProjectNode project in solution.Projects) + { + if (m_Kernel.AllowProject(project.FilterGroups)) + { + m_Kernel.Log.Write("...Creating project: {0}", project.Name); + WriteProject(solution, project); + } + } + + m_Kernel.Log.Write(""); + DirectoryInfo directoryInfo = new DirectoryInfo(Path.Combine(solution.FullPath, solution.Name + ".xcodeproj")); + if (!directoryInfo.Exists) + { + directoryInfo.Create(); + } + string combFile = Helper.MakeFilePath(Path.Combine(solution.FullPath, solution.Name + ".xcodeproj"), "project", "pbxproj"); + StreamWriter ss = new StreamWriter(combFile); + + m_Kernel.CurrentWorkingDirectory.Push(); + Helper.SetCurrentDir(Path.GetDirectoryName(combFile)); + + using (ss) + { + ss.WriteLine(""); + ss.WriteLine("", solution.Name); + ss.WriteLine(" "); + ss.WriteLine(); + + //ss.WriteLine(" "); + //ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + + foreach (ConfigurationNode conf in solution.Configurations) + { + // Set the project.config to a non-debug configuration + if (conf.Options["DebugInformation"].ToString().ToLower() != "true") + { + ss.WriteLine(" ", conf.Name); + } + ss.WriteLine(); + ss.WriteLine(" ", conf.Name); + ss.WriteLine(" ", conf.Name); + ss.WriteLine(" ", conf.Options["DebugInformation"].ToString().ToLower()); + ss.WriteLine(" "); + ss.WriteLine(); + } + + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(); + + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(); + + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(); + + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(); + + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(); + + ss.WriteLine(" "); + ss.WriteLine(" "); + //ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(" "); + //foreach(ProjectNode project in solution.Projects) + //{ + // string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); + // ss.Write(" "); + //} + ss.WriteLine(" "); + ss.WriteLine(); + + ss.WriteLine(" "); + + foreach (ProjectNode project in solution.ProjectsTableOrder) + { + string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); + ss.Write(" "); + } + ss.WriteLine(" "); + ss.WriteLine(); + + ss.WriteLine(" "); + ss.WriteLine(); + ss.WriteLine(" "); + ss.WriteLine(); + //ss.WriteLine(" "); + ss.WriteLine(" "); + ss.WriteLine(); + + ss.WriteLine(" "); + ss.WriteLine(" "); + foreach (ProjectNode project in solution.Projects) + { + string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); + ss.Write(" "); + } + ss.WriteLine(" "); + ss.WriteLine(); + ss.WriteLine(""); + } + + m_Kernel.CurrentWorkingDirectory.Pop(); + } + + private void CleanProject(ProjectNode project) + { + m_Kernel.Log.Write("...Cleaning project: {0}", project.Name); + string projectFile = Helper.MakeFilePath(project.FullPath, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"); + Helper.DeleteIfExists(projectFile); + } + + private void CleanSolution(SolutionNode solution) + { + m_Kernel.Log.Write("Cleaning Xcode build files for", solution.Name); + + string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "build"); + Helper.DeleteIfExists(slnFile); + + foreach (ProjectNode project in solution.Projects) + { + CleanProject(project); + } + + m_Kernel.Log.Write(""); + } + + #endregion + + #region ITarget Members + + /// + /// Writes the specified kern. + /// + /// The kern. + public void Write(Kernel kern) + { + if (kern == null) + { + throw new ArgumentNullException("kern"); + } + m_Kernel = kern; + foreach (SolutionNode solution in kern.Solutions) + { + WriteCombine(solution); + } + m_Kernel = null; + } + + /// + /// Cleans the specified kern. + /// + /// The kern. + public virtual void Clean(Kernel kern) + { + if (kern == null) + { + throw new ArgumentNullException("kern"); + } + m_Kernel = kern; + foreach (SolutionNode sol in kern.Solutions) + { + CleanSolution(sol); + } + m_Kernel = null; + } + + /// + /// Gets the name. + /// + /// The name. + public string Name + { + get + { + return "xcode"; + } + } + + #endregion + } +} diff --git a/ThirdParty/Prebuild/src/Core/UnknownLanguageException.cs b/ThirdParty/Prebuild/src/Core/UnknownLanguageException.cs new file mode 100644 index 00000000..607b66c0 --- /dev/null +++ b/ThirdParty/Prebuild/src/Core/UnknownLanguageException.cs @@ -0,0 +1,63 @@ +/* + * $RCSfile$ + * Copyright (C) 2004, 2005 David Hudson (jendave@yahoo.com) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +using System; +using System.Runtime.Serialization; + +namespace Prebuild.Core +{ + /// + /// + [Serializable()] + public class UnknownLanguageException : Exception + { + /// + /// Basic exception. + /// + public UnknownLanguageException() + { + } + + /// + /// Exception with specified string + /// + /// Exception message + public UnknownLanguageException(string message): base(message) + { + } + + /// + /// + /// + /// + /// + public UnknownLanguageException(string message, Exception exception) : base(message, exception) + { + } + + /// + /// + /// + /// + /// + protected UnknownLanguageException(SerializationInfo info, StreamingContext context) : base( info, context ) + { + } + } +} diff --git a/ThirdParty/Prebuild/src/Core/Utilities/CommandLineCollection.cs b/ThirdParty/Prebuild/src/Core/Utilities/CommandLineCollection.cs new file mode 100644 index 00000000..786fa1e4 --- /dev/null +++ b/ThirdParty/Prebuild/src/Core/Utilities/CommandLineCollection.cs @@ -0,0 +1,152 @@ +#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 + +using System.Collections; +using System.Collections.Generic; + +namespace Prebuild.Core.Utilities +{ + /// + /// The CommandLine class parses and interprets the command-line arguments passed to + /// prebuild. + /// + public class CommandLineCollection : IEnumerable> + { + #region Fields + + // The raw OS arguments + private readonly string[] m_RawArgs; + + // Command-line argument storage + private readonly Dictionary m_Arguments = new Dictionary(); + + #endregion + + #region Constructors + + /// + /// Create a new CommandLine instance and set some internal variables. + /// + public CommandLineCollection(string[] args) + { + m_RawArgs = args; + + Parse(); + } + + #endregion + + #region Private Methods + + private void Parse() + { + if(m_RawArgs.Length < 1) + return; + + int idx = 0; + string lastArg = null; + + while(idx 2 && arg[0] == '/') + { + arg = arg.Substring(1); + lastArg = arg; + m_Arguments[arg] = ""; + } + else + { + if(lastArg != null) + { + m_Arguments[lastArg] = arg; + lastArg = null; + } + } + + idx++; + } + } + + #endregion + + #region Public Methods + + /// + /// Wases the passed. + /// + /// The arg. + /// + public bool WasPassed(string arg) + { + return (m_Arguments.ContainsKey(arg)); + } + + #endregion + + #region Properties + + /// + /// Gets the parameter associated with the command line option + /// + /// Returns null if option was not specified, + /// null string if no parameter was specified, and the value if a parameter was specified + public string this[string index] + { + get + { + if(m_Arguments.ContainsKey(index)) + { + return (m_Arguments[index]); + } + return null; + } + } + + #endregion + + #region IEnumerable Members + + /// + /// Returns an enumerator that can iterate through a collection. + /// + /// + /// An + /// that can be used to iterate through the collection. + /// + public IEnumerator> GetEnumerator() + { + return m_Arguments.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + #endregion + } +} diff --git a/ThirdParty/Prebuild/src/Core/Utilities/CurrentDirectory.cs b/ThirdParty/Prebuild/src/Core/Utilities/CurrentDirectory.cs new file mode 100644 index 00000000..9624c35e --- /dev/null +++ b/ThirdParty/Prebuild/src/Core/Utilities/CurrentDirectory.cs @@ -0,0 +1,68 @@ +#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 + +using System; +using System.Collections.Generic; + +namespace Prebuild.Core.Utilities +{ + /// + /// + /// + public class CurrentDirectory + { + #region Fields + + private readonly Stack m_Stack = new Stack(); + + #endregion + + #region Public Methods + + /// + /// Pushes this instance. + /// + public void Push() + { + m_Stack.Push(Environment.CurrentDirectory); + } + + /// + /// Pops this instance. + /// + public void Pop() + { + if(m_Stack.Count < 1) + { + return; + } + + string cwd = m_Stack.Pop(); + Helper.SetCurrentDir(cwd); + } + + #endregion + } +} diff --git a/ThirdParty/Prebuild/src/Core/Utilities/Helper.cs b/ThirdParty/Prebuild/src/Core/Utilities/Helper.cs new file mode 100644 index 00000000..8c3e9680 --- /dev/null +++ b/ThirdParty/Prebuild/src/Core/Utilities/Helper.cs @@ -0,0 +1,575 @@ +#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 + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Runtime.InteropServices; +using System.Text.RegularExpressions; +using System.Collections.Specialized; +using System.Xml; +using Prebuild.Core.Nodes; + +namespace Prebuild.Core.Utilities +{ + /// + /// + /// + public class Helper + { + #region Fields + + static bool checkForOSVariables; + + /// + /// + /// + public static bool CheckForOSVariables + { + get + { + return checkForOSVariables; + } + set + { + checkForOSVariables = value; + } + } + + #endregion + + #region Public Methods + + #region String Parsing + + public delegate string StringLookup(string key); + + /// + /// Gets a collection of StringLocationPair objects that represent the matches + /// + /// The target. + /// The before group. + /// The after group. + /// if set to true [include delimiters in substrings]. + /// + public static StringCollection FindGroups(string target, string beforeGroup, string afterGroup, bool includeDelimitersInSubstrings) + { + if( beforeGroup == null ) + { + throw new ArgumentNullException("beforeGroup"); + } + if( afterGroup == null ) + { + throw new ArgumentNullException("afterGroup"); + } + StringCollection results = new StringCollection(); + if(target == null || target.Length == 0) + { + return results; + } + + int beforeMod = 0; + int afterMod = 0; + if(includeDelimitersInSubstrings) + { + //be sure to not exlude the delims + beforeMod = beforeGroup.Length; + afterMod = afterGroup.Length; + } + int startIndex = 0; + while((startIndex = target.IndexOf(beforeGroup,startIndex)) != -1) { + int endIndex = target.IndexOf(afterGroup,startIndex);//the index of the char after it + if(endIndex == -1) + { + break; + } + int length = endIndex - startIndex - beforeGroup.Length;//move to the first char in the string + string substring = substring = target.Substring(startIndex + beforeGroup.Length - beforeMod, + length - afterMod); + + results.Add(substring); + //results.Add(new StringLocationPair(substring,startIndex)); + startIndex = endIndex + 1; + //the Interpolate*() methods will not work if expressions are expandded inside expression due to an optimization + //so start after endIndex + + } + return results; + } + + /// + /// Replaces the groups. + /// + /// The target. + /// The before group. + /// The after group. + /// The lookup. + /// + public static string ReplaceGroups(string target, string beforeGroup, string afterGroup, StringLookup lookup) { + if( target == null ) + { + throw new ArgumentNullException("target"); + } + //int targetLength = target.Length; + StringCollection strings = FindGroups(target,beforeGroup,afterGroup,false); + if( lookup == null ) + { + throw new ArgumentNullException("lookup"); + } + foreach(string substring in strings) + { + target = target.Replace(beforeGroup + substring + afterGroup, lookup(substring) ); + } + return target; + } + + /// + /// Replaces ${var} statements in a string with the corresonding values as detirmined by the lookup delegate + /// + /// The target. + /// The lookup. + /// + public static string InterpolateForVariables(string target, StringLookup lookup) + { + return ReplaceGroups(target, "${" , "}" , lookup); + } + + /// + /// Replaces ${var} statements in a string with the corresonding environment variable with name var + /// + /// + /// + public static string InterpolateForEnvironmentVariables(string target) + { + return InterpolateForVariables(target, new StringLookup(Environment.GetEnvironmentVariable)); + } + + #endregion + + /// + /// Translates the value. + /// + /// Type of the translate. + /// The translation item. + /// + public static object TranslateValue(Type translateType, string translationItem) + { + if(translationItem == null) + { + return null; + } + + try + { + string lowerVal = translationItem.ToLower(); + if(translateType == typeof(bool)) + { + return (lowerVal == "true" || lowerVal == "1" || lowerVal == "y" || lowerVal == "yes" || lowerVal == "on"); + } + else if(translateType == typeof(int)) + { + return (Int32.Parse(translationItem)); + } + else + { + return translationItem; + } + } + catch(FormatException) + { + return null; + } + } + + /// + /// Deletes if exists. + /// + /// The file. + /// + public static bool DeleteIfExists(string file) + { + string resFile = null; + try + { + resFile = ResolvePath(file); + } + catch(ArgumentException) + { + return false; + } + + if(!File.Exists(resFile)) + { + return false; + } + + File.Delete(resFile); + return true; + } + + static readonly char seperator = Path.DirectorySeparatorChar; + + // This little gem was taken from the NeL source, thanks guys! + /// + /// Makes a relative path + /// + /// Path to start from + /// Path to end at + /// Path that will get from startPath to endPath + public static string MakePathRelativeTo(string startPath, string endPath) + { + string tmp = NormalizePath(startPath, seperator); + string src = NormalizePath(endPath, seperator); + string prefix = ""; + + while(true) + { + if((String.Compare(tmp, 0, src, 0, tmp.Length) == 0)) + { + string ret; + int size = tmp.Length; + if(size == src.Length) + { + return "./"; + } + if((src.Length > tmp.Length) && src[tmp.Length - 1] != seperator) + { + } + else + { + ret = prefix + endPath.Substring(size, endPath.Length - size); + ret = ret.Trim(); + if(ret[0] == seperator) + { + ret = "." + ret; + } + + return NormalizePath(ret); + } + + } + + if(tmp.Length < 2) + { + break; + } + + int lastPos = tmp.LastIndexOf(seperator, tmp.Length - 2); + int prevPos = tmp.IndexOf(seperator); + + if((lastPos == prevPos) || (lastPos == -1)) + { + break; + } + + tmp = tmp.Substring(0, lastPos + 1); + prefix += ".." + seperator.ToString(); + } + + return endPath; + } + + /// + /// Resolves the path. + /// + /// The path. + /// + public static string ResolvePath(string path) + { + string tmpPath = NormalizePath(path); + if(tmpPath.Length < 1) + { + tmpPath = "."; + } + + tmpPath = Path.GetFullPath(tmpPath); + if(!File.Exists(tmpPath) && !Directory.Exists(tmpPath)) + { + throw new ArgumentException("Path could not be resolved: " + tmpPath); + } + + return tmpPath; + } + + /// + /// Normalizes the path. + /// + /// The path. + /// The separator character. + /// + public static string NormalizePath(string path, char separatorCharacter) + { + if(path == null || path == "" || path.Length < 1) + { + return ""; + } + + string tmpPath = path.Replace('\\', '/'); + tmpPath = tmpPath.Replace('/', separatorCharacter); + return tmpPath; + } + + /// + /// Normalizes the path. + /// + /// The path. + /// + public static string NormalizePath(string path) + { + return NormalizePath(path, Path.DirectorySeparatorChar); + } + + /// + /// Ends the path. + /// + /// The path. + /// The separator character. + /// + public static string EndPath(string path, char separatorCharacter) + { + if(path == null || path == "" || path.Length < 1) + { + return ""; + } + + if(!path.EndsWith(separatorCharacter.ToString())) + { + return (path + separatorCharacter); + } + + return path; + } + + /// + /// Ends the path. + /// + /// The path. + /// + public static string EndPath(string path) + { + return EndPath(path, Path.DirectorySeparatorChar); + } + + /// + /// Makes the file path. + /// + /// The path. + /// The name. + /// The ext. + /// + public static string MakeFilePath(string path, string name, string ext) + { + string ret = EndPath(NormalizePath(path)); + + if( name == null ) + { + throw new ArgumentNullException("name"); + } + + ret += name; + if(!name.EndsWith("." + ext)) + { + ret += "." + ext; + } + + //foreach(char c in Path.GetInvalidPathChars()) + //{ + // ret = ret.Replace(c, '_'); + //} + + return ret; + } + + /// + /// Makes the file path. + /// + /// The path. + /// The name. + /// + public static string MakeFilePath(string path, string name) + { + string ret = EndPath(NormalizePath(path)); + + if( name == null ) + { + throw new ArgumentNullException("name"); + } + + ret += name; + + //foreach (char c in Path.GetInvalidPathChars()) + //{ + // ret = ret.Replace(c, '_'); + //} + + return ret; + } + + /// + /// + /// + /// + /// + public static string MakeReferencePath(string path) + { + string ret = EndPath(NormalizePath(path)); + + //foreach (char c in Path.GetInvalidPathChars()) + //{ + // ret = ret.Replace(c, '_'); + //} + + return ret; + } + + /// + /// Sets the current dir. + /// + /// The path. + public static void SetCurrentDir(string path) + { + if( path == null ) + { + throw new ArgumentNullException("path"); + } + if(path.Length < 1) + { + return; + } + + Environment.CurrentDirectory = path; + } + + /// + /// Checks the type. + /// + /// The type to check. + /// The attr. + /// The inter. + /// + public static object CheckType(Type typeToCheck, Type attr, Type inter) + { + if(typeToCheck == null || attr == null) + { + return null; + } + + object[] attrs = typeToCheck.GetCustomAttributes(attr, false); + if(attrs == null || attrs.Length < 1) + { + return null; + } + if( inter == null ) + { + throw new ArgumentNullException("inter"); + } + + if(typeToCheck.GetInterface(inter.FullName) == null) + { + return null; + } + + return attrs[0]; + } + + /// + /// Attributes the value. + /// + /// The node. + /// The attr. + /// The def. + /// + public static string AttributeValue(XmlNode node, string attr, string def) + { + if( node == null ) + { + throw new ArgumentNullException("node"); + } + if(node.Attributes[attr] == null) + { + return def; + } + string val = node.Attributes[attr].Value; + if(!CheckForOSVariables) + { + return val; + } + + return InterpolateForEnvironmentVariables(val); + } + + /// + /// Parses the boolean. + /// + /// The node. + /// The attr. + /// if set to true [default value]. + /// + public static bool ParseBoolean(XmlNode node, string attr, bool defaultValue) + { + if( node == null ) + { + throw new ArgumentNullException("node"); + } + if(node.Attributes[attr] == null) + { + return defaultValue; + } + return bool.Parse(node.Attributes[attr].Value); + } + + /// + /// Enums the attribute value. + /// + /// The node. + /// The attr. + /// Type of the enum. + /// The def. + /// + public static object EnumAttributeValue(XmlNode node, string attr, Type enumType, object def) + { + if( def == null ) + { + throw new ArgumentNullException("def"); + } + string val = AttributeValue(node, attr, def.ToString()); + return Enum.Parse(enumType, val, true); + } + + /// + /// + /// + /// + /// + /// + public static string AssemblyFullName(string assemblyName, ProjectType projectType) + { + return assemblyName + (projectType == ProjectType.Library ? ".dll" : ".exe"); + } + + #endregion + } +} diff --git a/ThirdParty/Prebuild/src/Core/Utilities/Log.cs b/ThirdParty/Prebuild/src/Core/Utilities/Log.cs new file mode 100644 index 00000000..4df3defd --- /dev/null +++ b/ThirdParty/Prebuild/src/Core/Utilities/Log.cs @@ -0,0 +1,276 @@ +#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 + +using System; +using System.IO; + +namespace Prebuild.Core.Utilities +{ + /// + /// + /// + public enum LogType + { + /// + /// + /// + None, + /// + /// + /// + Info, + /// + /// + /// + Warning, + /// + /// + /// + Error + } + + /// + /// + /// + [Flags] + public enum LogTargets + { + /// + /// + /// + None = 0, + /// + /// + /// + Null = 1, + /// + /// + /// + File = 2, + /// + /// + /// + Console = 4 + } + + /// + /// Summary description for Log. + /// + public class Log : IDisposable + { + #region Fields + + private TextWriter m_Writer; + private LogTargets m_Target = LogTargets.Null; + bool disposed; + + #endregion + + #region Constructors + + /// + /// Initializes a new instance of the class. + /// + /// The target. + /// Name of the file. + public Log(LogTargets target, string fileName) + { + m_Target = target; + + if ((m_Target & LogTargets.File) != 0) + { + m_Writer = new StreamWriter(fileName, false); + } + else if ((m_Target & LogTargets.Console) != 0) + { + // Prevents null reference exceptions when outputing to the log file. + // This seems to only happen when running on a network drive. + m_Writer = Console.Out; + } + } + + #endregion + + #region Public Methods + + /// + /// Writes this instance. + /// + public void Write() + { + Write(string.Empty); + } + + /// + /// Writes the specified MSG. + /// + /// The MSG. + public void Write(string msg) + { + if((m_Target & LogTargets.Null) != 0) + { + return; + } + + if((m_Target & LogTargets.Console) != 0) + { + Console.WriteLine(msg); + } + if((m_Target & LogTargets.File) != 0 && m_Writer != null) + { + m_Writer.WriteLine(msg); + } + } + + /// + /// Writes the specified format. + /// + /// The format. + /// The args. + public void Write(string format, params object[] args) + { + Write(string.Format(format,args)); + } + + /// + /// Writes the specified type. + /// + /// The type. + /// The format. + /// The args. + public void Write(LogType type, string format, params object[] args) + { + if((m_Target & LogTargets.Null) != 0) + { + return; + } + + string str = ""; + switch(type) + { + case LogType.Info: + str = "[I] "; + break; + case LogType.Warning: + str = "[!] "; + break; + case LogType.Error: + str = "[X] "; + break; + } + + Write(str + format,args); + } + + /// + /// Writes the exception. + /// + /// The type. + /// The ex. + public void WriteException(LogType type, Exception ex) + { + if(ex != null) + { + Write(type, ex.Message); + //#if DEBUG + m_Writer.WriteLine("Exception @{0} stack trace [[", ex.TargetSite.Name); + m_Writer.WriteLine(ex.StackTrace); + m_Writer.WriteLine("]]"); + //#endif + } + } + + /// + /// Flushes this instance. + /// + public void Flush() + { + if(m_Writer != null) + { + m_Writer.Flush(); + } + } + + #endregion + + #region IDisposable Members + + /// + /// Performs application-defined tasks associated with freeing, releasing, or + /// resetting unmanaged resources. + /// + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + /// + /// Dispose objects + /// + /// + /// If true, it will dispose close the handle + /// + /// + /// Will dispose managed and unmanaged resources. + /// + protected virtual void Dispose(bool disposing) + { + if (!this.disposed) + { + if (disposing) + { + if (m_Writer != null) + { + m_Writer.Close(); + m_Writer = null; + } + } + } + this.disposed = true; + } + + /// + /// + /// + ~Log() + { + this.Dispose(false); + } + + /// + /// Closes and destroys this object + /// + /// + /// Same as Dispose(true) + /// + public void Close() + { + Dispose(); + } + + #endregion + } +} diff --git a/ThirdParty/Prebuild/src/Core/WarningException.cs b/ThirdParty/Prebuild/src/Core/WarningException.cs new file mode 100644 index 00000000..b7c3668c --- /dev/null +++ b/ThirdParty/Prebuild/src/Core/WarningException.cs @@ -0,0 +1,84 @@ +#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 + +using System; +using System.Runtime.Serialization; + +namespace Prebuild.Core +{ + /// + /// + /// + [Serializable] + public class WarningException : Exception + { + #region Constructors + + /// + /// + /// + public WarningException() + { + } + + /// + /// + /// + /// + /// + public WarningException(string format, params object[] args) + : base(String.Format(format, args)) + { + } + + /// + /// Exception with specified string + /// + /// Exception message + public WarningException(string message): base(message) + { + } + + /// + /// + /// + /// + /// + public WarningException(string message, Exception exception) : base(message, exception) + { + } + + /// + /// + /// + /// + /// + protected WarningException(SerializationInfo info, StreamingContext context) : base( info, context ) + { + } + + #endregion + } +} diff --git a/ThirdParty/Prebuild/src/Prebuild.cs b/ThirdParty/Prebuild/src/Prebuild.cs new file mode 100644 index 00000000..081c89c4 --- /dev/null +++ b/ThirdParty/Prebuild/src/Prebuild.cs @@ -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: kunnis $ + * $Date: 2009-04-15 02:33:14 +0100 (Wed, 15 Apr 2009) $ + * $Revision: 308 $ + */ +#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/ThirdParty/Prebuild/src/Prebuild.snk b/ThirdParty/Prebuild/src/Prebuild.snk new file mode 100644 index 0000000000000000000000000000000000000000..f9dce054ffae7c79dce7d3ba0b790904bdb36831 GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50097%QdipZe+P78+gioe1FL>Pm`A%NYNJjT zvr&utrO*Bz`;(~1&v7SLbo#8h8*Eu!T1$f&*Z!JD(@sjU;6;rE+#4q{`Ci_P6X~Os zsqTl*?$f+z`P@h&-Z=SV9gYc!udqrVAH@hG`xHwT1SMQBX^U%@gPO$V6JX)9KT9Ww>?9GKft(b~3CsqH2^BHX{_&xGMn ztAW9|iLO>;#yB;wrHus##d%AZDeNPu@F_TTzUscSGU=aLSyvelLiSJps^FvCxcYHV z4Y1$J$Wu2ek`e>_>d43PbVJq8mILALAW%&DDsyb=|xUms2{~U~!hI$4*kXem7!Hk=k zc1qQS!>`bZbL}5fr*. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyName("")] diff --git a/ThirdParty/Prebuild/src/data/autotools.xml b/ThirdParty/Prebuild/src/data/autotools.xml new file mode 100644 index 00000000..ee4b0643 --- /dev/null +++ b/ThirdParty/Prebuild/src/data/autotools.xml @@ -0,0 +1,790 @@ + + + + + #!/bin/sh +# Run this to generate all the initial makefiles, etc. +# Ripped off from Mono, which ripped off from GNOME macros version + +DIE=0 + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +if [ -n "$MONO_PATH" ]; then + # from -> /mono/lib:/another/mono/lib + # to -> /mono /another/mono + for i in `echo ${MONO_PATH} | tr ":" " "`; do + i=`dirname ${i}` + if [ -n "{i}" -a -d "${i}/share/aclocal" ]; then + ACLOCAL_FLAGS="-I ${i}/share/aclocal $ACLOCAL_FLAGS" + fi + if [ -n "{i}" -a -d "${i}/bin" ]; then + PATH="${i}/bin:$PATH" + fi + done + export PATH +fi + +(autoconf --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`autoconf' installed to compile Mono." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +if [ -z "$LIBTOOL" ]; then + LIBTOOL=`which glibtool 2>/dev/null` + if [ ! -x "$LIBTOOL" ]; then + LIBTOOL=`which libtool` + fi +fi + +(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && { + ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`libtool' installed to compile Mono." + echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + } +} + +grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && { + grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \ + (gettext --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`gettext' installed to compile Mono." + echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + } +} + +(automake --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`automake' installed to compile Mono." + echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + NO_AUTOMAKE=yes +} + +# if no automake, don't bother testing for aclocal +test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: Missing \`aclocal'. The version of \`automake'" + echo "installed doesn't appear recent enough." + echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 +} + +if test "$DIE" -eq 1; then + exit 1 +fi + +if test -z "$NOCONFIGURE"; then + +if test -z "$*"; then + echo "**Warning**: I am going to run \`configure' with no arguments." + echo "If you wish to pass any to it, please specify them on the" + echo \`$0\'" command line." + echo +fi + +fi + +case $CC in +xlc ) + am_opt=--include-deps;; +esac + + +if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then + if test -z "$NO_LIBTOOLIZE" ; then + echo "Running libtoolize..." + ${LIBTOOL}ize --force --copy + fi +fi + +echo "Running aclocal $ACLOCAL_FLAGS ..." +aclocal $ACLOCAL_FLAGS || { + echo + echo "**Error**: aclocal failed. This may mean that you have not" + echo "installed all of the packages you need, or you may need to" + echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\"" + echo "for the prefix where you installed the packages whose" + echo "macros were not found" + exit 1 +} + +if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then + echo "Running autoheader..." + autoheader || { echo "**Error**: autoheader failed."; exit 1; } +fi + +echo "Running automake --gnu $am_opt ..." +automake --add-missing --gnu $am_opt || + { echo "**Error**: automake failed."; exit 1; } +echo "Running autoconf ..." +autoconf || { echo "**Error**: autoconf failed."; exit 1; } + +conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c + +if test x$NOCONFIGURE = x; then + echo Running $srcdir/configure $conf_flags "$@" ... + $srcdir/configure $conf_flags "$@" \ + && echo Now type \`make\' to compile $PKG_NAME || exit 1 +else + echo Skipping configure process. +fi + + + + + + + + + + + + + + + + AC_INIT([],[]) + +AC_PREREQ(2.60) +AC_CANONICAL_SYSTEM +AC_CONFIG_AUX_DIR(.) +AM_INIT_AUTOMAKE([1.9 tar-ustar foreign]) +AM_MAINTAINER_MODE +dnl AC_PROG_INTLTOOL([0.25]) +AC_PROG_INSTALL + +ASSEMBLY_NAME= +PROJECT_NAME= +PROJECT_VERSION=$VERSION +PROJECT_DESCRIPTION="" +PROJECT_TYPE="" + +AC_SUBST(ASSEMBLY_NAME) +AC_SUBST(PROJECT_NAME) +AC_SUBST(PROJECT_VERSION) +AC_SUBST(DESCRIPTION) + +AC_MSG_CHECKING([assembly type]) +case $PROJECT_TYPE in + *Exe) + ASSEMBLY_EXTENSION=exe + ;; + *Library) + ASSEMBLY_EXTENSION=dll + ;; + *) + AC_MSG_ERROR([*** Please add support for project type $PROJECT_TYPE to configure.ac checks!]) + ;; +esac +AC_MSG_RESULT([$PROJECT_TYPE]) + +AC_SUBST(ASSEMBLY_EXTENSION) + +AC_MSG_CHECKING([whether we're compiling from an RCS]) +if test -f "$srcdir/.cvs_version" ; then + from_rcs=cvs +else + if test -f "$srcdir/.svn/entries" ; then + from_rcs=svn + else + from_rcs=no + fi +fi + +AC_MSG_RESULT($from_rcs) + +MONO_REQUIRED_VERSION=1.1 + +PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false) + +if test "x$has_mono" = "xtrue"; then + AC_PATH_PROG(RUNTIME, mono, no) + AC_PATH_PROG(CSC, gmcs, no) + AC_PATH_PROG(RESGEN, resgen2, no) + if test `uname -s` = "Darwin"; then + LIB_PREFIX= + LIB_SUFFIX=.dylib + else + LIB_PREFIX=.so + LIB_SUFFIX= + fi +else + AC_PATH_PROG(CSC, csc.exe, no) + if test x$CSC = "xno"; then + AC_MSG_ERROR([You need to install either mono or .Net]) + else + RUNTIME= + LIB_PREFIX= + LIB_SUFFIX= + fi +fi + +AC_PATH_PROG(GACUTIL, gacutil) +if test "x$GACUTIL" = "xno" ; then + AC_MSG_ERROR([No gacutil tool found]) +fi + +GACUTIL_FLAGS='/package /gacdir $(DESTDIR)$(prefix)/lib' +AC_SUBST(GACUTIL_FLAGS) + +AC_SUBST(PATH) +AC_SUBST(LD_LIBRARY_PATH) + +AC_SUBST(LIB_PREFIX) +AC_SUBST(LIB_SUFFIX) +AC_SUBST(RUNTIME) +AC_SUBST(CSC) +AC_SUBST(RESGEN) +AC_SUBST(GACUTIL) + +AC_SUBST(BASE_DEPENDENCIES_CFLAGS) +AC_SUBST(BASE_DEPENDENCIES_LIBS) + +dnl Find monodoc +MONODOC_REQUIRED_VERSION=1.0 +AC_SUBST(MONODOC_REQUIRED_VERSION) + +PKG_CHECK_MODULES(MONODOC_DEPENDENCY, monodoc >= $MONODOC_REQUIRED_VERSION, enable_monodoc=yes, enable_monodoc=no) + +if test "x$enable_monodoc" = "xyes"; then + AC_PATH_PROG(MONODOC, monodoc, no) + if test x$MONODOC = xno; then + enable_monodoc=no + fi +else + MONODOC= +fi + +AC_SUBST(MONODOC) +AM_CONDITIONAL(ENABLE_MONODOC, test "x$enable_monodoc" = "xyes") + +winbuild=no +case "$host" in + *-*-mingw*|*-*-cygwin*) + winbuild=yes + ;; +esac +AM_CONDITIONAL(WINBUILD, test x$winbuild = xyes) + +AC_CONFIG_FILES() +AC_CONFIG_FILES(.pc) + +AC_CONFIG_FILES(Makefile) +AC_OUTPUT + +echo "===" +echo "" +echo "Project configuration summary" +echo "" +echo " * Installation prefix: $prefix" +echo " * compiler: $CSC" +echo " * Documentation: $enable_monodoc ($MONODOC)" +echo " * Project Name: $PROJECT_NAME" +echo " * Version: $PROJECT_VERSION" +echo "" +echo "===" + + + + + + + + + + + + + + + + + + + + + + + + + + +ASSEMBLY=$(ASSEMBLY_NAME).$(ASSEMBLY_EXTENSION) + + +dir = $(prefix)/lib/ +_DATA = $(ASSEMBLY) $(ASSEMBLY).config + +bin_SCRIPTS= + +pkgconfigdir = $(prefix)/lib/pkgconfig +pkgconfig_DATA = .pc + +dir = $(prefix)/lib/mono/ +_DATA = $(ASSEMBLY).config + +noinst_DATA = $(ASSEMBLY) + + +PACKAGES = +BINARY_LIBS = +SYSTEM_LIBS = +RESOURCES_SRC = +RESOURCES = $(RESOURCES_SRC:.resx=.resources) +SOURCES = + +EXTRA_DIST=$(SOURCES) $(BINARY_LIBS) $(RESOURCES_SRC) install-sh missing + +CLEANFILES=$(ASSEMBLY) + + + + + + + +/$(ASSEMBLY): $(srcdir)/$(ASSEMBLY).response $(RESOURCES) $(SOURCES) $(BINARY_LIBS) + mkdir -p doc && mkdir -p && $(CSC) /out:$@ \ + /target: \ + $(addprefix /resource:$(srcdir)/, $(RESOURCES)) \ + $(addprefix /pkg:, $(PACKAGES)) \ + $(addprefix /r:, $(SYSTEM_LIBS)) \ + $(addprefix /r:$(srcdir)/, $(BINARY_LIBS)) \ + @$(srcdir)/$(ASSEMBLY).response \ + /doc:doc/ \ + /keyfile:$(srcdir)/ \ + /unsafe \ + && rm -f $(ASSEMBLY) \ + && ln $@ $(ASSEMBLY) + +CLEANFILES+=/$(ASSEMBLY) + + +EXTRA_DIST+= + +: /$(ASSEMBLY) + rm -f $(ASSEMBLY) \ + && ln /$(ASSEMBLY) $(ASSEMBLY) + + + + + +_install-data-local: /$(ASSEMBLY) + echo "$(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS)"; \ + $(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) || exit 1; + +_uninstall-local: + if [`gacutil -l | grep "Number" | awk -F= '{print $$2}'` -gt "0" ] ; \ + then \ + echo "$(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS)"; \ + $(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS) || exit 1; \ + fi + + + +noinst__dir = $(prefix)/lib/mono/ +noinst___DATA = /$(ASSEMBLY) + + + + + + +$(ASSEMBLY): + + +$(srcdir)/$(ASSEMBLY).response: $(srcdir)/Makefile + echo "$(addprefix $(srcdir)/, $(SOURCES))" > $@ + + +all: $(ASSEMBLY) + +# rule to compile .resx files to .resources +%.resources: %.resx + $(RESGEN) /useSourcePath /compile $(@:.resources=.resx) + + + + + +install-data-local: _install-data-local + +uninstall-local: _uninstall-local + + + +#dir+=$(noinst__dir) +#_DATA+=$(noinst___DATA) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +prefix=@prefix@ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib/mono/@PROJECT_NAME@ + +Name: +Description: +Version: @PROJECT_VERSION@ +Requires: +Libs: -r:${libdir}/@PROJECT_NAME@.dll + + + + + + + + + + + #!/bin/sh +# Run this to generate all the initial makefiles, etc. +# Ripped off from Mono, which ripped off from GNOME macros version + +DIE=0 + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +if [ -n "$MONO_PATH" ]; then + # from -> /mono/lib:/another/mono/lib + # to -> /mono /another/mono + for i in `echo ${MONO_PATH} | tr ":" " "`; do + i=`dirname ${i}` + if [ -n "{i}" -a -d "${i}/share/aclocal" ]; then + ACLOCAL_FLAGS="-I ${i}/share/aclocal $ACLOCAL_FLAGS" + fi + if [ -n "{i}" -a -d "${i}/bin" ]; then + PATH="${i}/bin:$PATH" + fi + done + export PATH +fi + +(autoconf --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`autoconf' installed to compile Mono." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +if [ -z "$LIBTOOL" ]; then + LIBTOOL=`which glibtool 2>/dev/null` + if [ ! -x "$LIBTOOL" ]; then + LIBTOOL=`which libtool` + fi +fi + +(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && { + ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`libtool' installed to compile Mono." + echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + } +} + +grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && { + grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \ + (gettext --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`gettext' installed to compile Mono." + echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + } +} + +(automake --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`automake' installed to compile Mono." + echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + NO_AUTOMAKE=yes +} + + +# if no automake, don't bother testing for aclocal +test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: Missing \`aclocal'. The version of \`automake'" + echo "installed doesn't appear recent enough." + echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 +} + +if test "$DIE" -eq 1; then + exit 1 +fi + +if test -z "$*"; then + echo "**Warning**: I am going to run \`configure' with no arguments." + echo "If you wish to pass any to it, please specify them on the" + echo \`$0\'" command line." + echo +fi + +case $CC in +xlc ) + am_opt=--include-deps;; +esac + + +if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then + if test -z "$NO_LIBTOOLIZE" ; then + echo "Running libtoolize..." + ${LIBTOOL}ize --force --copy + fi +fi + +echo "Running aclocal $ACLOCAL_FLAGS ..." +aclocal $ACLOCAL_FLAGS || { + echo + echo "**Error**: aclocal failed. This may mean that you have not" + echo "installed all of the packages you need, or you may need to" + echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\"" + echo "for the prefix where you installed the packages whose" + echo "macros were not found" + exit 1 +} + +if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then + echo "Running autoheader..." + autoheader || { echo "**Error**: autoheader failed."; exit 1; } +fi + +echo "Running automake --gnu $am_opt ..." +automake --add-missing --gnu $am_opt || + { echo "**Error**: automake failed."; exit 1; } +echo "Running autoconf ..." +autoconf || { echo "**Error**: autoconf failed."; exit 1; } + + +echo Running /autogen.sh ... +(cd $srcdir/ ; NOCONFIGURE=1 /bin/sh ./autogen.sh "$@") +echo Done running /autogen.sh ... + + +conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c + +if test x$NOCONFIGURE = x; then + echo Running $srcdir/configure $conf_flags "$@" ... + $srcdir/configure $conf_flags "$@" \ + && echo Now type \`make\' to compile $PKG_NAME || exit 1 +else + echo Skipping configure process. +fi + + + + + + + + + + +AC_INIT([]-solution,[]) +AC_CONFIG_AUX_DIR(.) +AM_INIT_AUTOMAKE([1.9 tar-ustar foreign]) +EXTRA_DIST="install-sh missing" +SOLUTION_NAME= +SOLUTION_VERSION=$VERSION +SOLUTION_DESCRIPTION="" +AC_SUBST(DESCRIPTION) + +AM_MAINTAINER_MODE + +dnl AC_PROG_INTLTOOL([0.25]) + +AC_PROG_INSTALL + +AC_MSG_CHECKING([whether we're building from an RCS]) +if test -f "$srcdir/.cvs_version" ; then + from_rcs=cvs +else + if test -f "$srcdir/.svn/entries" ; then + from_rcs=svn + else + from_rcs=no + fi +fi + +AC_MSG_RESULT($from_rcs) + +CONFIG="Release" +AC_SUBST(CONFIG) + +AC_CONFIG_SUBDIRS( +) + + +AC_OUTPUT([ +Makefile +]) + +echo "===" +echo "" +echo "Solution configuration summary" +echo "" +echo " * Solution Name: $SOLUTION_NAME" +echo " * Version: $SOLUTION_VERSION" +echo " * Packages:" +echo " - " +echo "" +echo "===" + + + + + + + + + SUBDIRS = + + + + + + + + + + + + +#! /bin/sh + +PACKAGE= +prefix=@prefix@ +exec_prefix=@exec_prefix@ + +# %%$@%$# why oh why isn't it $sharedir/ +# Day changed to 30 Mar 2007 +# ... +# 07:50 < cj> why are we installing .exe assemblies to $prefix/lib/$package/ and +# not $prefix/share/$package ? +# 07:50 < jonp> momentum. +# 07:50 < jonp> and it's hard to say that a .exe isn't platform specific +# 07:50 < jonp> as it can still contain DllImport's which make platform +# assumptions + +packagedir=$prefix/lib/ +export MONO_PATH=$MONO_PATH + +exec @RUNTIME@ $packagedir/$PACKAGE.exe "$@" + + + + + diff --git a/ThirdParty/Prebuild/src/data/dnpb-1.0.xsd b/ThirdParty/Prebuild/src/data/dnpb-1.0.xsd new file mode 100644 index 00000000..b9e0e4ea --- /dev/null +++ b/ThirdParty/Prebuild/src/data/dnpb-1.0.xsd @@ -0,0 +1,183 @@ + + + + + Copyright (c) 2004 Matthew Holmes (kerion@houston.rr.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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ThirdParty/Prebuild/src/data/dnpb-1.1.xsd b/ThirdParty/Prebuild/src/data/dnpb-1.1.xsd new file mode 100644 index 00000000..2c065a32 --- /dev/null +++ b/ThirdParty/Prebuild/src/data/dnpb-1.1.xsd @@ -0,0 +1,184 @@ + + + + + Copyright (c) 2004 Matthew Holmes (kerion@houston.rr.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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ThirdParty/Prebuild/src/data/dnpb-1.2.xsd b/ThirdParty/Prebuild/src/data/dnpb-1.2.xsd new file mode 100644 index 00000000..d694ab43 --- /dev/null +++ b/ThirdParty/Prebuild/src/data/dnpb-1.2.xsd @@ -0,0 +1,198 @@ + + + + + Copyright (c) 2004 Matthew Holmes (calefaction _at_ houston _._ rr _._ 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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ThirdParty/Prebuild/src/data/dnpb-1.3.xsd b/ThirdParty/Prebuild/src/data/dnpb-1.3.xsd new file mode 100644 index 00000000..8f31a544 --- /dev/null +++ b/ThirdParty/Prebuild/src/data/dnpb-1.3.xsd @@ -0,0 +1,206 @@ + + + + + Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com) + + .NET Pre-Build is an XML-driven pre-build tool allowing developers to + easily generate project or make files for major IDE's and .NET + development tools including: Visual Studio 2003, Visual Studio 2002, + SharpDevelop, MonoDevelop, and NAnt. + + BSD License: + + 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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ThirdParty/Prebuild/src/data/dnpb-1.4.xsd b/ThirdParty/Prebuild/src/data/dnpb-1.4.xsd new file mode 100644 index 00000000..1da50fcc --- /dev/null +++ b/ThirdParty/Prebuild/src/data/dnpb-1.4.xsd @@ -0,0 +1,212 @@ + + + + + Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com) + + .NET Prebuild is a cross-platform XML-driven pre-build tool which + allows developers to easily generate project or make files for major + IDE's and .NET development tools including: Visual Studio .NET 2002 and + 2003, SharpDevelop, MonoDevelop, and NAnt. + + BSD License: + + 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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ThirdParty/Prebuild/src/data/dnpb-1.5.xsd b/ThirdParty/Prebuild/src/data/dnpb-1.5.xsd new file mode 100644 index 00000000..e2b21f0c --- /dev/null +++ b/ThirdParty/Prebuild/src/data/dnpb-1.5.xsd @@ -0,0 +1,215 @@ + + + + + Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com) + + .NET Prebuild is a cross-platform XML-driven pre-build tool which + allows developers to easily generate project or make files for major + IDE's and .NET development tools including: Visual Studio .NET 2002 and + 2003, SharpDevelop, MonoDevelop, and NAnt. + + BSD License: + + 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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ThirdParty/Prebuild/src/data/prebuild-1.6.xsd b/ThirdParty/Prebuild/src/data/prebuild-1.6.xsd new file mode 100644 index 00000000..57ebd2eb --- /dev/null +++ b/ThirdParty/Prebuild/src/data/prebuild-1.6.xsd @@ -0,0 +1,231 @@ + + + + + Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com) + + .NET Prebuild is a cross-platform XML-driven pre-build tool which + allows developers to easily generate project or make files for major + IDE's and .NET development tools including: Visual Studio .NET 2002 and + 2003, SharpDevelop, MonoDevelop, and NAnt. + + BSD License: + + 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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ThirdParty/Prebuild/src/data/prebuild-1.7.xsd b/ThirdParty/Prebuild/src/data/prebuild-1.7.xsd new file mode 100644 index 00000000..3675503b --- /dev/null +++ b/ThirdParty/Prebuild/src/data/prebuild-1.7.xsd @@ -0,0 +1,350 @@ + + + + + Copyright (c) 2004-2007 + Matthew Holmes (calefaction at houston . rr . com), + Dan Moorehead (dan05a at gmail . com), + David Hudson (jendave at yahoo dot com), + C.J. Adams-Collier (cjac at colliertech dot com) + + .NET Prebuild is a cross-platform XML-driven pre-build tool which + allows developers to easily generate project or make files for major + IDE's and .NET development tools including: Visual Studio .NET 2002, + 2003, and 2005, SharpDevelop, MonoDevelop, NAnt, Xcode and the GNU Autotools. + + BSD License: + + 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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ThirdParty/Prebuild/src/data/prebuild-1.8.xsd b/ThirdParty/Prebuild/src/data/prebuild-1.8.xsd new file mode 100644 index 00000000..8f5c1a45 --- /dev/null +++ b/ThirdParty/Prebuild/src/data/prebuild-1.8.xsd @@ -0,0 +1,331 @@ + + + + + Copyright (c) 2004-2007 + Matthew Holmes (calefaction at houston . rr . com), + Dan Moorehead (dan05a at gmail . com), + David Hudson (jendave at yahoo dot com), + C.J. Adams-Collier (cjac at colliertech dot com) + + .NET Prebuild is a cross-platform XML-driven pre-build tool which + allows developers to easily generate project or make files for major + IDE's and .NET development tools including: Visual Studio .NET 2002, + 2003, and 2005, SharpDevelop, MonoDevelop, NAnt, Xcode and the GNU Autotools. + + BSD License: + + 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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ThirdParty/Prebuild/src/data/prebuild-1.9.xsd b/ThirdParty/Prebuild/src/data/prebuild-1.9.xsd new file mode 100644 index 00000000..fbca556f --- /dev/null +++ b/ThirdParty/Prebuild/src/data/prebuild-1.9.xsd @@ -0,0 +1,336 @@ + + + + + Copyright (c) 2004-2007 + Matthew Holmes (calefaction at houston . rr . com), + Dan Moorehead (dan05a at gmail . com), + David Hudson (jendave at yahoo dot com), + C.J. Adams-Collier (cjac at colliertech dot com) + + .NET Prebuild is a cross-platform XML-driven pre-build tool which + allows developers to easily generate project or make files for major + IDE's and .NET development tools including: Visual Studio .NET 2002, + 2003, and 2005, SharpDevelop, MonoDevelop, NAnt, Xcode and the GNU Autotools. + + BSD License: + + 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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ThirdParty/Prebuild/tests/Makefile b/ThirdParty/Prebuild/tests/Makefile new file mode 100644 index 00000000..4a8ddf45 --- /dev/null +++ b/ThirdParty/Prebuild/tests/Makefile @@ -0,0 +1,24 @@ +# +# Executable +# + +# Executables +PREBUILD = mono ../src/bin/Release/prebuild.exe /target makefile + +# Files +PREBUILDS = $(wildcard *.prebuild) +RESULTS = $(PREBUILDS:prebuild=results) +TESTS = $(PREBUILDS:prebuild=test) + +all: $(TESTS) + +clean: + rm -f *~ *.log + rm -f $(RESULTS) + +%.test: %.prebuild + $(PREBUILD) /log $*.log /file $*.prebuild /ppi $*.results >& /dev/null + if ! cmp $*.expected $*.results; then \ + echo $*.prebuild failed; \ + false; \ + fi diff --git a/ThirdParty/Prebuild/tests/README.txt b/ThirdParty/Prebuild/tests/README.txt new file mode 100644 index 00000000..2c2de3bc --- /dev/null +++ b/ThirdParty/Prebuild/tests/README.txt @@ -0,0 +1,5 @@ +There are some tests that are run via a Makfile in this +directory. They haven't been included in any form of unit tests, but +they are there to help test the functionality in some what. Simply +build prebuild (so there is a src/bin/Release/prebuild.exe) and type +`make` in this directory. Everything should pass without errors. diff --git a/ThirdParty/Prebuild/tests/include-001.expected b/ThirdParty/Prebuild/tests/include-001.expected new file mode 100644 index 00000000..26374b5b --- /dev/null +++ b/ThirdParty/Prebuild/tests/include-001.expected @@ -0,0 +1,46 @@ + + + + + DEBUG;TRACE + false + bin/Debug + true + + + + + TRACE + bin/Release + true + false + + + + + + DEBUG;TRACE + false + bin/Debug + true + Prebuild.snk + 1595 + + + + + TRACE + bin/Release + true + false + Prebuild.snk + 1595 + + + + + + + + + diff --git a/ThirdParty/Prebuild/tests/include-001.include b/ThirdParty/Prebuild/tests/include-001.include new file mode 100644 index 00000000..7f75962a --- /dev/null +++ b/ThirdParty/Prebuild/tests/include-001.include @@ -0,0 +1,33 @@ + + + + DEBUG;TRACE + false + bin/Debug + true + Prebuild.snk + 1595 + + + + + TRACE + bin/Release + true + false + Prebuild.snk + 1595 + + + + + + + diff --git a/ThirdParty/Prebuild/tests/include-001.prebuild b/ThirdParty/Prebuild/tests/include-001.prebuild new file mode 100644 index 00000000..80470089 --- /dev/null +++ b/ThirdParty/Prebuild/tests/include-001.prebuild @@ -0,0 +1,22 @@ + + + + + + DEBUG;TRACE + false + bin/Debug + true + + + + + TRACE + bin/Release + true + false + + + + + diff --git a/ThirdParty/Prebuild/tests/include-002-2.include b/ThirdParty/Prebuild/tests/include-002-2.include new file mode 100644 index 00000000..661b7f3b --- /dev/null +++ b/ThirdParty/Prebuild/tests/include-002-2.include @@ -0,0 +1,8 @@ + + + DEBUG;TRACE + false + bin/Debug + true + + diff --git a/ThirdParty/Prebuild/tests/include-002.expected b/ThirdParty/Prebuild/tests/include-002.expected new file mode 100644 index 00000000..9849658b --- /dev/null +++ b/ThirdParty/Prebuild/tests/include-002.expected @@ -0,0 +1,26 @@ + + + + + DEBUG;TRACE + false + bin/Debug + true + + + + + + DEBUG;TRACE + false + bin/Debug + true + + + + + + + + + diff --git a/ThirdParty/Prebuild/tests/include-002.include b/ThirdParty/Prebuild/tests/include-002.include new file mode 100644 index 00000000..64f4058d --- /dev/null +++ b/ThirdParty/Prebuild/tests/include-002.include @@ -0,0 +1,14 @@ + + + + + + + diff --git a/ThirdParty/Prebuild/tests/include-002.prebuild b/ThirdParty/Prebuild/tests/include-002.prebuild new file mode 100644 index 00000000..9e85f20f --- /dev/null +++ b/ThirdParty/Prebuild/tests/include-002.prebuild @@ -0,0 +1,7 @@ + + + + + + +