Merged changes in Prebuild trunk up to r258 into OpenSim's Prebuild.
Hopefully this should make merging upstream easier. Building with NAnt should still work, but Visual Studio is untested.0.6.0-stable
parent
9122762dc8
commit
79209c4297
|
@ -0,0 +1,7 @@
|
|||
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)
|
||||
|
||||
|
|
@ -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.
|
|
@ -0,0 +1,374 @@
|
|||
2008-02-19T07:08 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* 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 <cjac@colliertech.org>
|
||||
* 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 <cjac@colliertech.org>
|
||||
* 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 <Reference />
|
||||
- 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 <foo>.response file containing all sources
|
||||
- using @<foo>.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 <cjac@colliertech.org>
|
||||
* 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 <gryc.ueusp@gmail.com>
|
||||
* src/Core/Targets/AutotoolsTarget.cs
|
||||
- updated copyright to include 2008
|
||||
* THANKS
|
||||
- created file, added Gryc Ueusp <gryc.ueusp@gmail.com>
|
||||
|
||||
2008-01-01T14:50 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* 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 <cjac@colliertech.org>
|
||||
* src/data/prebuild-1.7.xsd
|
||||
- removed default version from references
|
||||
|
||||
2007-04-06T12:42 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* 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 <cjac@colliertech.org>
|
||||
* 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 <cjac@colliertech.org>
|
||||
* 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 <cjac@colliertech.org>
|
||||
* 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
|
||||
! <ProjectMakefileAm />
|
||||
- renamed gacLibs to systemLibs
|
||||
- added the sources to the dist list
|
||||
- added logic to install libs that aren't strongnamed
|
||||
! <ProjectWrapperScriptIn />
|
||||
- accepting a param to update the MONO_PATH
|
||||
|
||||
2007-03-28T19:46 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* 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 <Process /> 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 <Process /> 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
|
||||
! <ProjectConfigureAc />
|
||||
- fixed the .pc AC_CONFIG_FILES macro
|
||||
! <ProjectMakefileAm />
|
||||
- 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
|
||||
! <ProjectWrapperScriptIn />
|
||||
- added space preservation attribute to stylesheet element
|
||||
- added a lower-case project name variable
|
||||
- added solution name param
|
||||
- made for-each template more specific
|
||||
! <SolutionAutogenSh />
|
||||
- added solution name param
|
||||
! <SolutionConfigureAc />
|
||||
- added solution name param
|
||||
! <SolutionMakefileAm />
|
||||
- added solution name param
|
||||
! <ProjectPcIn />
|
||||
- added solution name param
|
||||
|
||||
2007-03-27T09:33 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* src/Core/Targets/AutotoolsTarget.cs
|
||||
- now processing the wrapper script if type is "Exe" or "WinExe"
|
||||
* src/data/autotools.xml
|
||||
! <ProjectConfigureAc />
|
||||
- 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
|
||||
! <ProjectMakefileAm />
|
||||
- uncommented the bin_SCRIPTS section now that the script is being
|
||||
generated correctly
|
||||
! <ProjectWrapperScriptIn />
|
||||
- fixed whitespace at beginning of file, before #!
|
||||
- using lower-case packageName to indicate installation location
|
||||
|
||||
2007-03-27T09:33 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* src/data/autotools.xml
|
||||
! <ProjectConfigureAc />
|
||||
* 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
|
||||
! <ProjectMakefileAm />
|
||||
* 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 <cjac@colliertech.org>
|
||||
* src/data/autotools.xml
|
||||
! <ProjectMakefileAm />
|
||||
- added whitespace-preservation
|
||||
- added the missing projectName param
|
||||
- replaced bin_SCRIPTS with something that worked
|
||||
|
||||
2007-03-27T07:56 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
* src/data/autotools.xml
|
||||
! <ProjectConfigureAc />
|
||||
- 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
|
||||
! <ProjectMakefileAm />
|
||||
- added an incomplete bin_SCRIPTS
|
||||
- RCS check says "building" instead of "compiling"
|
||||
! <SolutionConfigureAc />
|
||||
- removed macros that are useful only for projects
|
||||
! <ProjectWrapperScriptIn />
|
||||
- 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 <cjac@colliertech.org>
|
||||
* 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 <cjac@colliertech.org>
|
||||
* src/Core/Targets/AutotoolsTarget.cs
|
||||
- now creating list of source files in managed code and passing
|
||||
them to the template via <xsl:param>s
|
||||
* src/data/prebuild-1.7.xsd
|
||||
- updated the header comment to 2007
|
||||
* src/data/autotools.xml
|
||||
! <ProjectConfigureAc>
|
||||
- copied checks from Solution-level configure.ac
|
||||
- copied solution-level config status
|
||||
! <ProjectMakefileAm>
|
||||
- added <xsl:param> 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:"
|
||||
! <SolutionConfigureAc>
|
||||
- changed status header/footer from "- - -" to "==="
|
||||
|
||||
2007-03-23T08:33 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
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 <xsl:value-of select="$projectName"/>
|
||||
- explicitly using dnpb: prefix
|
||||
|
||||
2007-03-23T04:31 C.J. Adams-Collier <cjac@colliertech.org>
|
||||
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 <cjac@colliertech.org>
|
||||
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 <cjac@colliertech.org>
|
||||
* 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 <cjcollier@colliertech.org>
|
||||
* src/data/prebuild-1.7.xsd
|
||||
- added version attribute to Solution and Project elements
|
||||
|
||||
2006-11-04T00:38 C.J. Adams-Collier <cjcollier@colliertech.org>
|
||||
* placing AssemblyInfo.cs into Properties/
|
||||
* Fixed double-mention of the package name
|
||||
|
||||
2006-11-03T15:23 C.J. Adams-Collier <cjcollier@colliertech.org>
|
||||
* 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 <cjcollier@colliertech.org>
|
||||
* Updated the .exe file
|
||||
|
||||
2006-11-03 C.J. Adams-Collier <cjcollier@colliertech.org>
|
||||
* Added a TODO file
|
||||
* Added a ChangeLog file
|
||||
* applied some fixes for autotools gac and pkg-config installation
|
||||
problems
|
|
@ -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.
|
||||
|
|
@ -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: <?if <exp> ?>, <?elseif <exp> ?>, <?else ?> and <?endif ?>. 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 <Project> 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
|
||||
<Process> statements and not have any <Solution> 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 <Process> 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 <Process> 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
|
||||
|
108
Prebuild/README
108
Prebuild/README
|
@ -2,14 +2,16 @@ 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 Prebuild file
|
||||
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.
|
||||
_______________________________________________________________________________
|
||||
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)
|
||||
|
@ -18,24 +20,34 @@ 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://www.gnu.org. Only partial support
|
||||
Autotools (autotools.bat and autotools.sh) - http://en.wikipedia.org/wiki/GNU_build_system
|
||||
|
||||
Notes:
|
||||
A Unix Shell script is provided for MonoDevelop, as this is more appropriate than a windows batch file.
|
||||
Visual Studio .NET 2005 and the Visual Express IDE's can import solutions from older versions of Visual Studio .NET.
|
||||
|
||||
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
|
||||
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 '>' signified the command line, do not actually enter this manually
|
||||
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 /<option> <commandParameter>
|
||||
|
||||
|
@ -55,33 +67,55 @@ Note: The '>' signified the command line, do not actually enter this manually
|
|||
|
||||
> Prebuild /clean vs2003
|
||||
|
||||
_________________________________________________________________________________
|
||||
_______________________________________________________________________________
|
||||
Command Line Options:
|
||||
|
||||
/usage - Shows the help information on how to use Prebuild and what the different options are and what they do
|
||||
/usage - Shows the help information on how to use Prebuild and what
|
||||
the different options are and what they do
|
||||
|
||||
/clean - The project files generated for the target type specified as a parameter for this option will be deleted. If no value is specified or if 'all' is specified, then project files for all the target types will be deleted.
|
||||
/clean - The project files generated for the target type specified as
|
||||
a parameter for this option will be deleted. If no value is specified
|
||||
or if 'all' is specified, then project files for all the target types
|
||||
will be deleted.
|
||||
|
||||
/target - Specified the name of the development tool for which project or make files will be generated. Possible parameter values include: vs2003, vs2002, sharpdev
|
||||
/target - Specified the name of the development tool for which project
|
||||
or make files will be generated. Possible parameter values include:
|
||||
vs2003, vs2002, sharpdev
|
||||
|
||||
/file - Specifies the name of the XML which defines what files are to be referenced by the generated project files as well as configures the options for them. If not specified, prebuild.xml will be used as the default.
|
||||
/file - Specifies the name of the XML which defines what files are to
|
||||
be referenced by the generated project files as well as configures the
|
||||
options for them. If not specified, prebuild.xml in the current
|
||||
directory will be used as the default.
|
||||
|
||||
/log - Specified the log file that should be written to for build errors. If this option is not specified, no log file is generated, but if just no value is specified, then the defaul filename will be used for the log (Prebuild.log).
|
||||
/log - Specified the log file that should be written to for build
|
||||
errors. If this option is not specified, no log file is generated,
|
||||
but if just no value is specified, then the defaul filename will be
|
||||
used for the log (Prebuild.log).
|
||||
|
||||
/ppo - Preprocesses the xml file to test for syntax errors or problems but doesn't generate the files
|
||||
/ppo - Preprocesses the xml file to test for syntax errors or problems
|
||||
but doesn't generate the files
|
||||
|
||||
/pause - Shows the console until you press a key so that you can view the messages written while performing the specified actions.
|
||||
This allows you to check if an errors occurred and - if so - what it was.
|
||||
/pause - Shows the console until you press a key so that you can view
|
||||
the messages written while performing the specified actions.
|
||||
|
||||
/showtargets - Shows a list of all the targets that can be specified as values for the /clean and /target commands.
|
||||
This allows you to check if an errors occurred and - if so - what it
|
||||
was.
|
||||
|
||||
/allowedgroups - This is 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
|
||||
/showtargets - Shows a list of all the targets that can be specified
|
||||
as values for the /clean and /target commands.
|
||||
|
||||
/removedir - This is followed by a pipe-delimited list of directory names that will be deleted while recursivly searching the directory of the prebuild application and its child directories (eg. use obj|bin to delete all output and temporary directories before file releases)
|
||||
/allowedgroups - This is 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
|
||||
|
||||
/removedir - This is followed by a pipe-delimited list of directory
|
||||
names that will be deleted while recursivly searching the directory of
|
||||
the prebuild application and its child directories (eg. use obj|bin to
|
||||
delete all output and temporary directories before file releases)
|
||||
|
||||
/yes - Answer yes to any warnings (e.g. when cleaning all projects).
|
||||
|
||||
_________________________________________________________________________________
|
||||
_______________________________________________________________________________
|
||||
Example Batch Files and Shell Scripts
|
||||
|
||||
NOTE: Common batch and shell script files are included with Prebuild source and file releases.
|
||||
|
@ -89,9 +123,12 @@ ______________________________
|
|||
MonoDevelop
|
||||
|
||||
#!/bin/sh
|
||||
# Generates a combine (.cmbx) and a set of project files (.prjx)
|
||||
# for MonoDevelop, a Mono port of SharpDevelop (http://icsharpcode.net/OpenSource/SD/Default.aspx)
|
||||
./Prebuild /target sharpdev /pause
|
||||
# Generates a solution (.mds) and a set of project files (.mdp)
|
||||
|
||||
# for MonoDevelop, a Mono port of SharpDevelop
|
||||
# (http://icsharpcode.net/OpenSource/SD/Default.aspx)
|
||||
|
||||
./Prebuild /target monodev /pause
|
||||
|
||||
______________________________
|
||||
Visual Studio .NET 2003
|
||||
|
@ -104,13 +141,20 @@ Notes:
|
|||
Text after lines that start with @rem are comments and are not evaluated
|
||||
You can also place pause on the last line instead of specifing the /pause command.
|
||||
|
||||
________________________________________________________________________________
|
||||
_______________________________________________________________________________
|
||||
Example XML Configuration File
|
||||
|
||||
Note:
|
||||
XML Comments (<!-- Comment -->) are used to markup the prebuild.xml file with notes
|
||||
The below file may be out-of-date, however the RealmForge Prebuild file serves as an up-to-date and extensive example.
|
||||
It can be viewed using Tigris.org's WebSVN (http://realmforge.tigris.org/source/browse/realmforge/trunk/src/prebuild.xml) by just clicking on the "view file" link for the latest revision.
|
||||
|
||||
XML Comments (<!-- Comment -->) are used to markup the prebuild.xml
|
||||
file with notes
|
||||
|
||||
The below file may be out-of-date, however the RealmForge Prebuild
|
||||
file serves as an up-to-date and extensive example.
|
||||
|
||||
It can be viewed using Tigris.org's WebSVN
|
||||
(http://realmforge.tigris.org/source/browse/realmforge/trunk/src/prebuild.xml)
|
||||
by just clicking on the "view file" link for the latest revision.
|
||||
|
||||
_________________________________
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
Gryc Ueusp <gryc.ueusp@gmail.com>
|
||||
|
||||
caught a problem with the NAnt target's .build output which caused
|
||||
the Ubuntu build servers to choke on prebuild-generated packages
|
||||
|
||||
Todd Berman <tberman@sevenl.net>
|
||||
Lluis Sanchez Gual <lluis@novell.com>
|
||||
|
||||
pkg-config .pc file parser used in AutotoolsTarget.cs was ripped off
|
||||
from work contributed to MonoDevelop by Lluis and Todd. It came
|
||||
from
|
||||
|
||||
src/core/MonoDevelop.Core/MonoDevelop.Core/SystemPackage.cs (Lluis)
|
||||
|
||||
and
|
||||
|
||||
src/core/MonoDevelop.Core/MonoDevelop.Core/SystemAssemblyService.cs
|
||||
(Lluis && Todd)
|
|
@ -1,21 +1,43 @@
|
|||
* monodev target should be able to detect whether the project is 1.x
|
||||
or 2.x runtime
|
||||
|
||||
* make an autotools install target for .exe files
|
||||
* remove target which links ../project/foo.dll to each project's build
|
||||
root
|
||||
|
||||
* generate .config files
|
||||
|
||||
* Fix the autotools target so that
|
||||
sub generate_project_files { ... }
|
||||
sub generate_solution_files { ... }
|
||||
sub generate_multi_solution_files { ... }
|
||||
sub generate_project {
|
||||
...
|
||||
generate_project_files();
|
||||
}
|
||||
sub generate_solution {
|
||||
foreach $project ( @projects ){
|
||||
mkdir "$project/";
|
||||
pushd "$project/";
|
||||
generate_project();
|
||||
popd;
|
||||
}
|
||||
generate_solution_files();
|
||||
}
|
||||
sub generate_multi_solution {
|
||||
foreach $solution ( @solutions ){
|
||||
mkdir "$solution/";
|
||||
pushd "$solution/";
|
||||
generate_solution();
|
||||
popd;
|
||||
}
|
||||
generate_multi_solution_files();
|
||||
}
|
||||
|
||||
if(numProjects == 1){
|
||||
for($projectDir){
|
||||
generate_a_project_configure_dot_ac()
|
||||
}
|
||||
generate_project();
|
||||
}elsif(numSolutions == 1){
|
||||
generate_solution();
|
||||
}else{
|
||||
generate_a_solution_configure_dot_ac()
|
||||
|
||||
foreach($project in $projectsList){
|
||||
mkdir $project/
|
||||
cd $project/
|
||||
generate_a_project_configure_dot_ac
|
||||
}
|
||||
generate_multi_solution();
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
NAnt.exe clean
|
|
@ -0,0 +1 @@
|
|||
nant clean
|
|
@ -0,0 +1,73 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" version="1.7">
|
||||
<Solution name="Prebuild" version="2.0.3">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<OutputPath>bin/Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OutputPath>bin/Release</OutputPath>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Files>
|
||||
<File>prebuild.xml</File>
|
||||
<File>prebuild</File>
|
||||
</Files>
|
||||
<Project name="Prebuild"
|
||||
path="src"
|
||||
language="C#"
|
||||
assemblyName="prebuild"
|
||||
icon="App.ico"
|
||||
type="Exe"
|
||||
rootNamespace="Prebuild"
|
||||
startupObject="Prebuild.Prebuild"
|
||||
version="2.0.3"
|
||||
>
|
||||
<Author>Matthew Holmes (matthew@wildfiregames.com)</Author>
|
||||
<Author>Dan Moorehead (dan05a@gmail.com)</Author>
|
||||
<Author>Dave Hudson (jendave@yahoo.com)</Author>
|
||||
<Author>Rob Loach (http://robloach.net)</Author>
|
||||
<Author>C.J. Adams-Collier (cjac@colliertech.org)</Author>
|
||||
<Description>The Prebuild project generator</Description>
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<OutputPath>bin/Debug</OutputPath>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
<KeyFile>Prebuild.snk</KeyFile>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE</CompilerDefines>
|
||||
<OutputPath>bin/Release</OutputPath>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
<KeyFile>Prebuild.snk</KeyFile>
|
||||
<SuppressWarnings>1595</SuppressWarnings>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System.EnterpriseServices" />
|
||||
<Reference name="System.Xml" />
|
||||
<Reference name="System" />
|
||||
<Files>
|
||||
<Match pattern="App.ico" buildAction="EmbeddedResource"/>
|
||||
<Match path="data" pattern="prebuild-1.7.xsd" buildAction="EmbeddedResource"/>
|
||||
<Match path="data" pattern="autotools.xml" buildAction="EmbeddedResource"/>
|
||||
<Match pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
</Solution>
|
||||
</Prebuild>
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
./prebuild /clean /removedir obj /file ../prebuild.xml /pause
|
||||
rm -rf ../Makefile
|
|
@ -1,2 +1,5 @@
|
|||
#!/bin/sh
|
||||
prebuild /target autotools /file ../prebuild.xml /build NET_2_0 /pause
|
||||
RUNTIME=`which mono`
|
||||
|
||||
SCRIPTDIR=`dirname $0`
|
||||
${RUNTIME} ${SCRIPTDIR}/../Prebuild.exe /target autotools /file ${SCRIPTDIR}/../prebuild.xml /build NET_2_0
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
@rem Generates makefiles
|
||||
@rem for make
|
||||
cd ..
|
||||
Prebuild.exe /target makefile /file prebuild.xml /pause
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
./prebuild /target makefile /file ../prebuild.xml /pause
|
||||
|
||||
if [ -f ../Makefile ]
|
||||
then
|
||||
rm -rf ../Makefile
|
||||
fi
|
||||
|
||||
mv ../Prebuild.make ../Makefile
|
|
@ -0,0 +1,4 @@
|
|||
@rem Generates a Xcode files
|
||||
@rem for NAnt
|
||||
cd ..
|
||||
Prebuild.exe /target xcode /file prebuild.xml /pause
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
prebuild /target xcode /file ../prebuild.xml /pause
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
|
||||
* $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $
|
||||
* $Revision: 71 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
|
||||
* $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $
|
||||
* $Revision: 71 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
|
||||
* $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $
|
||||
* $Revision: 71 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
|
||||
* $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $
|
||||
* $Revision: 71 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
|
||||
* $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $
|
||||
* $Revision: 71 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
|
||||
* $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $
|
||||
* $Revision: 71 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -1,34 +1,47 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
Copyright (c) 2004-2008
|
||||
Matthew Holmes (matthew@wildfiregames.com),
|
||||
Dan Moorehead (dan05a@gmail.com),
|
||||
Rob Loach (http://www.robloach.net),
|
||||
C.J. Adams-Collier (cjac@colliertech.org)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
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.
|
||||
* 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.
|
||||
|
||||
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: robloach $
|
||||
* $Date: 2006-09-26 00:30:53 +0200 (ti, 26 sep 2006) $
|
||||
* $Revision: 165 $
|
||||
* $Author: cjcollier $
|
||||
* $Date: 2008-02-08 01:31:29 +0900 (Fri, 08 Feb 2008) $
|
||||
* $Revision: 256 $
|
||||
*/
|
||||
#endregion
|
||||
|
||||
|
@ -91,6 +104,7 @@ namespace Prebuild.Core
|
|||
string m_Clean;
|
||||
string[] m_RemoveDirectories;
|
||||
string m_CurrentFile;
|
||||
XmlDocument m_CurrentDoc;
|
||||
bool m_PauseAfterFinish;
|
||||
string[] m_ProjectGroups;
|
||||
StringCollection m_Refs;
|
||||
|
@ -204,6 +218,19 @@ namespace Prebuild.Core
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the XmlDocument object representing the prebuild.xml
|
||||
/// being processed
|
||||
/// </summary>
|
||||
/// <value>The XmlDocument object</value>
|
||||
public XmlDocument CurrentDoc
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_CurrentDoc;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
@ -305,7 +332,13 @@ namespace Prebuild.Core
|
|||
private void LogBanner()
|
||||
{
|
||||
m_Log.Write("Prebuild v" + this.Version);
|
||||
m_Log.Write("Copyright (c) Matthew Holmes, Dan Moorehead and David Hudson");
|
||||
m_Log.Write("Copyright (c) 2004-2008");
|
||||
m_Log.Write("Matthew Holmes (matthew@wildfiregames.com),");
|
||||
m_Log.Write("Dan Moorehead (dan05a@gmail.com),");
|
||||
m_Log.Write("David Hudson (jendave@yahoo.com),");
|
||||
m_Log.Write("Rob Loach (http://www.robloach.net),");
|
||||
m_Log.Write("C.J. Adams-Collier (cjac@colliertech.org),");
|
||||
|
||||
m_Log.Write("See 'prebuild /usage' for help");
|
||||
m_Log.Write();
|
||||
}
|
||||
|
@ -331,7 +364,6 @@ namespace Prebuild.Core
|
|||
m_CurrentFile = path;
|
||||
Helper.SetCurrentDir(Path.GetDirectoryName(path));
|
||||
|
||||
|
||||
XmlTextReader reader = new XmlTextReader(path);
|
||||
|
||||
Core.Parse.Preprocessor pre = new Core.Parse.Preprocessor();
|
||||
|
@ -348,7 +380,7 @@ namespace Prebuild.Core
|
|||
string xml = pre.Process(reader);//remove script and evaulate pre-proccessing to get schema-conforming XML
|
||||
|
||||
|
||||
XmlDocument doc = new XmlDocument();
|
||||
m_CurrentDoc = new XmlDocument();
|
||||
try
|
||||
{
|
||||
XmlValidatingReader validator = new XmlValidatingReader(new XmlTextReader(new StringReader(xml)));
|
||||
|
@ -358,7 +390,7 @@ namespace Prebuild.Core
|
|||
{
|
||||
validator.Schemas.Add(schema);
|
||||
}
|
||||
doc.Load(validator);
|
||||
m_CurrentDoc.Load(validator);
|
||||
}
|
||||
catch(XmlException e)
|
||||
{
|
||||
|
@ -394,7 +426,7 @@ namespace Prebuild.Core
|
|||
return;
|
||||
}
|
||||
//start reading the xml config file
|
||||
XmlElement rootNode = doc.DocumentElement;
|
||||
XmlElement rootNode = m_CurrentDoc.DocumentElement;
|
||||
//string suggestedVersion = Helper.AttributeValue(rootNode,"version","1.0");
|
||||
Helper.CheckForOSVariables = Helper.ParseBoolean(rootNode,"checkOsVars",false);
|
||||
|
||||
|
@ -681,6 +713,10 @@ namespace Prebuild.Core
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!m_Targets.Contains(target)) {
|
||||
m_Log.Write(LogType.Error, "Unknown Target \"{0}\"", target);
|
||||
return;
|
||||
}
|
||||
ITarget targ = (ITarget)m_Targets[target];
|
||||
|
||||
if(clean)
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2007 C.J. Adams-Collier (cjac@colliertech.org)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
#region CVS Information
|
||||
/*
|
||||
* $Source $
|
||||
* $Author: $
|
||||
* $Date: $
|
||||
* $Revision: $
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using System.Xml;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[DataNode("Author")]
|
||||
public class AuthorNode : DataNode
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private string m_Signature;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the signature.
|
||||
/// </summary>
|
||||
/// <value>The signature.</value>
|
||||
public string Signature
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Signature;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Parses the specified node.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
public override void Parse(XmlNode node)
|
||||
{
|
||||
if( node == null )
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
|
||||
m_Signature = Helper.InterpolateForEnvironmentVariables(node.InnerText);
|
||||
if(m_Signature == null)
|
||||
{
|
||||
m_Signature = "";
|
||||
}
|
||||
|
||||
m_Signature = m_Signature.Trim();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
|
||||
* $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $
|
||||
* $Revision: 71 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
|
||||
* $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $
|
||||
* $Revision: 71 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2007 C.J. Adams-Collier (cjac@colliertech.org)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
and the following disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* The name of the author may not be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
#region CVS Information
|
||||
/*
|
||||
* $Source $
|
||||
* $Author: $
|
||||
* $Date: $
|
||||
* $Revision: $
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using System.Xml;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Utilities;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
/// <summary>
|
||||
/// The object representing the /Prebuild/Solution/Project/Description element
|
||||
/// </summary>
|
||||
[DataNode("Description")]
|
||||
public class DescriptionNode : DataNode
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private string m_Value;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the description Value.
|
||||
/// </summary>
|
||||
/// <value>The description Value.</value>
|
||||
public string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Parses the specified node.
|
||||
/// </summary>
|
||||
/// <param name="node">The node.</param>
|
||||
public override void Parse(XmlNode node)
|
||||
{
|
||||
if( node == null )
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
|
||||
m_Value = Helper.InterpolateForEnvironmentVariables(node.InnerText);
|
||||
if(m_Value == null)
|
||||
{
|
||||
m_Value = "";
|
||||
}
|
||||
|
||||
m_Value = m_Value.Trim();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -26,9 +26,9 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
#region CVS Information
|
||||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-01-31 16:35:39 +0100 (ti, 31 jan 2006) $
|
||||
* $Revision: 74 $
|
||||
* $Author: borrillis $
|
||||
* $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $
|
||||
* $Revision: 243 $
|
||||
*/
|
||||
#endregion
|
||||
|
||||
|
@ -49,7 +49,7 @@ namespace Prebuild.Core.Nodes
|
|||
{
|
||||
#region Fields
|
||||
|
||||
private string m_Name = "unknown";
|
||||
private string m_Pattern = "";
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -63,7 +63,19 @@ namespace Prebuild.Core.Nodes
|
|||
{
|
||||
get
|
||||
{
|
||||
return m_Name;
|
||||
return m_Pattern;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the pattern.
|
||||
/// </summary>
|
||||
/// <value>The pattern.</value>
|
||||
public string Pattern
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Pattern;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,7 +89,8 @@ namespace Prebuild.Core.Nodes
|
|||
/// <param name="node">The node.</param>
|
||||
public override void Parse(XmlNode node)
|
||||
{
|
||||
m_Name = Helper.AttributeValue(node, "name", m_Name);
|
||||
m_Pattern = Helper.AttributeValue( node, "name", m_Pattern );
|
||||
m_Pattern = Helper.AttributeValue(node, "pattern", m_Pattern );
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -26,9 +26,9 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
#region CVS Information
|
||||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2007-01-08 17:55:40 +0100 (må, 08 jan 2007) $
|
||||
* $Revision: 197 $
|
||||
* $Author: borrillis $
|
||||
* $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $
|
||||
* $Revision: 243 $
|
||||
*/
|
||||
#endregion
|
||||
|
||||
|
@ -118,6 +118,8 @@ namespace Prebuild.Core.Nodes
|
|||
private SubType m_SubType = SubType.Code;
|
||||
private CopyToOutput m_CopyToOutput = CopyToOutput.Never;
|
||||
private bool m_Link = false;
|
||||
private string m_LinkPath = string.Empty;
|
||||
private bool m_PreservePath = false;
|
||||
|
||||
|
||||
#endregion
|
||||
|
@ -173,6 +175,13 @@ namespace Prebuild.Core.Nodes
|
|||
}
|
||||
}
|
||||
|
||||
public string LinkPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_LinkPath;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -195,6 +204,19 @@ namespace Prebuild.Core.Nodes
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="file"></param>
|
||||
/// <returns></returns>
|
||||
public bool PreservePath
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_PreservePath;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
@ -211,7 +233,12 @@ namespace Prebuild.Core.Nodes
|
|||
Helper.AttributeValue(node, "subType", m_SubType.ToString()));
|
||||
m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString());
|
||||
this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString));
|
||||
if ( this.m_Link == true )
|
||||
{
|
||||
this.m_LinkPath = Helper.AttributeValue( node, "linkPath", string.Empty );
|
||||
}
|
||||
this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString()));
|
||||
this.m_PreservePath = bool.Parse( Helper.AttributeValue( node, "preservePath", bool.FalseString ) );
|
||||
|
||||
if( node == null )
|
||||
{
|
||||
|
|
|
@ -26,9 +26,9 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
#region CVS Information
|
||||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-09-20 09:42:51 +0200 (on, 20 sep 2006) $
|
||||
* $Revision: 164 $
|
||||
* $Author: borrillis $
|
||||
* $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $
|
||||
* $Revision: 243 $
|
||||
*/
|
||||
#endregion
|
||||
|
||||
|
@ -56,7 +56,8 @@ namespace Prebuild.Core.Nodes
|
|||
private Hashtable m_ResourceNames;
|
||||
private Hashtable m_CopyToOutputs;
|
||||
private Hashtable m_Links;
|
||||
|
||||
private Hashtable m_LinkPaths;
|
||||
private Hashtable m_PreservePaths;
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -73,6 +74,8 @@ namespace Prebuild.Core.Nodes
|
|||
m_ResourceNames = new Hashtable();
|
||||
m_CopyToOutputs = new Hashtable();
|
||||
m_Links = new Hashtable();
|
||||
m_LinkPaths = new Hashtable();
|
||||
m_PreservePaths = new Hashtable();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -127,6 +130,15 @@ namespace Prebuild.Core.Nodes
|
|||
return (bool) this.m_Links[file];
|
||||
}
|
||||
|
||||
public string GetLinkPath( string file )
|
||||
{
|
||||
if ( !this.m_LinkPaths.ContainsKey( file ) )
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
return (string)this.m_LinkPaths[ file ];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -157,6 +169,21 @@ namespace Prebuild.Core.Nodes
|
|||
return (string)m_ResourceNames[file];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="file"></param>
|
||||
/// <returns></returns>
|
||||
public bool GetPreservePath( string file )
|
||||
{
|
||||
if ( !m_PreservePaths.ContainsKey( file ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return (bool)m_PreservePaths[ file ];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -181,7 +208,9 @@ namespace Prebuild.Core.Nodes
|
|||
m_BuildActions[fileNode.Path] = fileNode.BuildAction;
|
||||
m_SubTypes[fileNode.Path] = fileNode.SubType;
|
||||
m_ResourceNames[fileNode.Path] = fileNode.ResourceName;
|
||||
this.m_PreservePaths[ fileNode.Path ] = fileNode.PreservePath;
|
||||
this.m_Links[ fileNode.Path ] = fileNode.IsLink;
|
||||
this.m_LinkPaths[ fileNode.Path ] = fileNode.LinkPath;
|
||||
this.m_CopyToOutputs[ fileNode.Path ] = fileNode.CopyToOutput;
|
||||
|
||||
}
|
||||
|
@ -191,14 +220,17 @@ namespace Prebuild.Core.Nodes
|
|||
{
|
||||
foreach(string file in ((MatchNode)dataNode).Files)
|
||||
{
|
||||
MatchNode matchNode = (MatchNode)dataNode;
|
||||
if (!m_Files.Contains(file))
|
||||
{
|
||||
m_Files.Add(file);
|
||||
m_BuildActions[file] = ((MatchNode)dataNode).BuildAction;
|
||||
m_SubTypes[file] = ((MatchNode)dataNode).SubType;
|
||||
m_ResourceNames[file] = ((MatchNode)dataNode).ResourceName;
|
||||
this.m_Links[file] = ((MatchNode) dataNode).IsLink;
|
||||
this.m_CopyToOutputs[file] = ((MatchNode) dataNode).CopyToOutput;
|
||||
m_BuildActions[ file ] = matchNode.BuildAction;
|
||||
m_SubTypes[ file ] = matchNode.SubType;
|
||||
m_ResourceNames[ file ] = matchNode.ResourceName;
|
||||
this.m_PreservePaths[ file ] = matchNode.PreservePath;
|
||||
this.m_Links[ file ] = matchNode.IsLink;
|
||||
this.m_LinkPaths[ file ] = matchNode.LinkPath;
|
||||
this.m_CopyToOutputs[ file ] = matchNode.CopyToOutput;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,9 +26,9 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
#region CVS Information
|
||||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-09-20 09:42:51 +0200 (on, 20 sep 2006) $
|
||||
* $Revision: 164 $
|
||||
* $Author: borrillis $
|
||||
* $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $
|
||||
* $Revision: 243 $
|
||||
*/
|
||||
#endregion
|
||||
|
||||
|
@ -41,6 +41,7 @@ using System.Xml;
|
|||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
using Prebuild.Core.Utilities;
|
||||
using System.Collections;
|
||||
|
||||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
|
@ -59,7 +60,9 @@ namespace Prebuild.Core.Nodes
|
|||
string m_ResourceName = "";
|
||||
private CopyToOutput m_CopyToOutput;
|
||||
private bool m_Link;
|
||||
|
||||
private string m_LinkPath;
|
||||
private bool m_PreservePath;
|
||||
private ArrayList m_Exclusions;
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -71,6 +74,7 @@ namespace Prebuild.Core.Nodes
|
|||
public MatchNode()
|
||||
{
|
||||
m_Files = new StringCollection();
|
||||
m_Exclusions = new ArrayList();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -126,6 +130,13 @@ namespace Prebuild.Core.Nodes
|
|||
}
|
||||
}
|
||||
|
||||
public string LinkPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_LinkPath;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -137,6 +148,13 @@ namespace Prebuild.Core.Nodes
|
|||
}
|
||||
}
|
||||
|
||||
public bool PreservePath
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_PreservePath;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -149,8 +167,10 @@ namespace Prebuild.Core.Nodes
|
|||
/// <param name="pattern">The pattern.</param>
|
||||
/// <param name="recurse">if set to <c>true</c> [recurse].</param>
|
||||
/// <param name="useRegex">if set to <c>true</c> [use regex].</param>
|
||||
private void RecurseDirectories(string path, string pattern, bool recurse, bool useRegex)
|
||||
private void RecurseDirectories(string path, string pattern, bool recurse, bool useRegex, ArrayList exclusions)
|
||||
{
|
||||
Match match;
|
||||
Boolean excludeFile;
|
||||
try
|
||||
{
|
||||
string[] files;
|
||||
|
@ -163,6 +183,7 @@ namespace Prebuild.Core.Nodes
|
|||
string fileTemp;
|
||||
foreach (string file in files)
|
||||
{
|
||||
excludeFile = false;
|
||||
if (file.Substring(0,2) == "./" || file.Substring(0,2) == ".\\")
|
||||
{
|
||||
fileTemp = file.Substring(2);
|
||||
|
@ -172,7 +193,19 @@ namespace Prebuild.Core.Nodes
|
|||
fileTemp = file;
|
||||
}
|
||||
|
||||
// Check all excludions and set flag if there are any hits.
|
||||
foreach ( ExcludeNode exclude in exclusions )
|
||||
{
|
||||
Regex exRegEx = new Regex( exclude.Pattern );
|
||||
match = exRegEx.Match( file );
|
||||
excludeFile |= match.Success;
|
||||
}
|
||||
|
||||
if ( !excludeFile )
|
||||
{
|
||||
m_Files.Add( fileTemp );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -182,17 +215,29 @@ namespace Prebuild.Core.Nodes
|
|||
}
|
||||
else
|
||||
{
|
||||
Match match;
|
||||
files = Directory.GetFiles(path);
|
||||
foreach(string file in files)
|
||||
{
|
||||
excludeFile = false;
|
||||
|
||||
match = m_Regex.Match(file);
|
||||
if(match.Success)
|
||||
{
|
||||
// Check all excludions and set flag if there are any hits.
|
||||
foreach ( ExcludeNode exclude in exclusions )
|
||||
{
|
||||
Regex exRegEx = new Regex( exclude.Pattern );
|
||||
match = exRegEx.Match( file );
|
||||
excludeFile |= !match.Success;
|
||||
}
|
||||
|
||||
if ( !excludeFile )
|
||||
{
|
||||
m_Files.Add( file );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(recurse)
|
||||
{
|
||||
|
@ -201,7 +246,7 @@ namespace Prebuild.Core.Nodes
|
|||
{
|
||||
foreach(string str in dirs)
|
||||
{
|
||||
RecurseDirectories(Helper.NormalizePath(str), pattern, recurse, useRegex);
|
||||
RecurseDirectories(Helper.NormalizePath(str), pattern, recurse, useRegex, exclusions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -241,6 +286,11 @@ namespace Prebuild.Core.Nodes
|
|||
m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString());
|
||||
this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString()));
|
||||
this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString));
|
||||
if ( this.m_Link == true )
|
||||
{
|
||||
this.m_LinkPath = Helper.AttributeValue( node, "linkPath", string.Empty );
|
||||
}
|
||||
this.m_PreservePath = bool.Parse( Helper.AttributeValue( node, "preservePath", bool.FalseString ) );
|
||||
|
||||
|
||||
if(path != null && path.Length == 0)
|
||||
|
@ -272,7 +322,6 @@ namespace Prebuild.Core.Nodes
|
|||
throw new WarningException("Could not compile regex pattern: {0}", ex.Message);
|
||||
}
|
||||
|
||||
RecurseDirectories(path, pattern, recurse, useRegex);
|
||||
|
||||
foreach(XmlNode child in node.ChildNodes)
|
||||
{
|
||||
|
@ -280,13 +329,12 @@ namespace Prebuild.Core.Nodes
|
|||
if(dataNode is ExcludeNode)
|
||||
{
|
||||
ExcludeNode excludeNode = (ExcludeNode)dataNode;
|
||||
if (m_Files.Contains(Helper.NormalizePath(excludeNode.Name)))
|
||||
{
|
||||
m_Files.Remove(Helper.NormalizePath(excludeNode.Name));
|
||||
}
|
||||
m_Exclusions.Add( dataNode );
|
||||
}
|
||||
}
|
||||
|
||||
RecurseDirectories( path, pattern, recurse, useRegex, m_Exclusions );
|
||||
|
||||
if(m_Files.Count < 1)
|
||||
{
|
||||
throw new WarningException("Match returned no files: {0}{1}", Helper.EndPath(path), pattern);
|
||||
|
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2007-01-08 17:55:40 +0100 (må, 08 jan 2007) $
|
||||
* $Date: 2007-01-09 01:55:40 +0900 (Tue, 09 Jan 2007) $
|
||||
* $Revision: 197 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
|
||||
* $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $
|
||||
* $Revision: 71 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -27,8 +27,8 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-11-11 05:43:20 +0100 (lö, 11 nov 2006) $
|
||||
* $Revision: 192 $
|
||||
* $Date: 2007-05-26 06:58:26 +0900 (Sat, 26 May 2007) $
|
||||
* $Revision: 244 $
|
||||
*/
|
||||
#endregion
|
||||
|
||||
|
@ -44,20 +44,20 @@ using Prebuild.Core.Utilities;
|
|||
namespace Prebuild.Core.Nodes
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// A set of values that the Project's type can be
|
||||
/// </summary>
|
||||
public enum ProjectType
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// The project is a console executable
|
||||
/// </summary>
|
||||
Exe,
|
||||
/// <summary>
|
||||
///
|
||||
/// The project is a windows executable
|
||||
/// </summary>
|
||||
WinExe,
|
||||
/// <summary>
|
||||
///
|
||||
/// The project is a library
|
||||
/// </summary>
|
||||
Library
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ namespace Prebuild.Core.Nodes
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// The Node object representing /Prebuild/Solution/Project elements
|
||||
/// </summary>
|
||||
[DataNode("Project")]
|
||||
public class ProjectNode : DataNode, IComparable
|
||||
|
@ -90,6 +90,7 @@ namespace Prebuild.Core.Nodes
|
|||
private string m_FullPath = "";
|
||||
private string m_AssemblyName;
|
||||
private string m_AppIcon = "";
|
||||
private string m_ConfigFile = "";
|
||||
private string m_DesignerFolder = "";
|
||||
private string m_Language = "C#";
|
||||
private ProjectType m_Type = ProjectType.Exe;
|
||||
|
@ -97,11 +98,13 @@ namespace Prebuild.Core.Nodes
|
|||
private string m_StartupObject = "";
|
||||
private string m_RootNamespace;
|
||||
private string m_FilterGroups = "";
|
||||
private string m_Version = "";
|
||||
private Guid m_Guid;
|
||||
|
||||
private Hashtable m_Configurations;
|
||||
private ArrayList m_ReferencePaths;
|
||||
private ArrayList m_References;
|
||||
private ArrayList m_Authors;
|
||||
private FilesNode m_Files;
|
||||
|
||||
#endregion
|
||||
|
@ -116,6 +119,7 @@ namespace Prebuild.Core.Nodes
|
|||
m_Configurations = new Hashtable();
|
||||
m_ReferencePaths = new ArrayList();
|
||||
m_References = new ArrayList();
|
||||
m_Authors = new ArrayList();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -158,6 +162,18 @@ namespace Prebuild.Core.Nodes
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the project's version
|
||||
/// </summary>
|
||||
/// <value>The project's version.</value>
|
||||
public string Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Version;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the full path.
|
||||
/// </summary>
|
||||
|
@ -194,6 +210,18 @@ namespace Prebuild.Core.Nodes
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the app icon.
|
||||
/// </summary>
|
||||
/// <value>The app icon.</value>
|
||||
public string ConfigFile
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ConfigFile;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
@ -336,6 +364,18 @@ namespace Prebuild.Core.Nodes
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Authors list.
|
||||
/// </summary>
|
||||
/// <value>The list of the project's authors.</value>
|
||||
public ArrayList Authors
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Authors;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the files.
|
||||
/// </summary>
|
||||
|
@ -422,7 +462,9 @@ namespace Prebuild.Core.Nodes
|
|||
m_Name = Helper.AttributeValue(node, "name", m_Name);
|
||||
m_Path = Helper.AttributeValue(node, "path", m_Path);
|
||||
m_FilterGroups = Helper.AttributeValue(node, "filterGroups", m_FilterGroups);
|
||||
m_Version = Helper.AttributeValue(node, "version", m_Version);
|
||||
m_AppIcon = Helper.AttributeValue(node, "icon", m_AppIcon);
|
||||
m_ConfigFile = Helper.AttributeValue(node, "configFile", m_ConfigFile);
|
||||
m_DesignerFolder = Helper.AttributeValue(node, "designerFolder", m_DesignerFolder);
|
||||
m_AssemblyName = Helper.AttributeValue(node, "assemblyName", m_AssemblyName);
|
||||
m_Language = Helper.AttributeValue(node, "language", m_Language);
|
||||
|
@ -430,13 +472,11 @@ namespace Prebuild.Core.Nodes
|
|||
m_Runtime = (ClrRuntime)Helper.EnumAttributeValue(node, "runtime", typeof(ClrRuntime), m_Runtime);
|
||||
m_StartupObject = Helper.AttributeValue(node, "startupObject", m_StartupObject);
|
||||
m_RootNamespace = Helper.AttributeValue(node, "rootNamespace", m_RootNamespace);
|
||||
m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false);
|
||||
|
||||
int hash = m_Name.GetHashCode();
|
||||
|
||||
m_Guid = new Guid(hash, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
|
||||
m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false);
|
||||
|
||||
if(m_AssemblyName == null || m_AssemblyName.Length < 1)
|
||||
{
|
||||
m_AssemblyName = m_Name;
|
||||
|
@ -482,6 +522,10 @@ namespace Prebuild.Core.Nodes
|
|||
{
|
||||
m_References.Add(dataNode);
|
||||
}
|
||||
else if(dataNode is AuthorNode)
|
||||
{
|
||||
m_Authors.Add(dataNode);
|
||||
}
|
||||
else if(dataNode is FilesNode)
|
||||
{
|
||||
m_Files = (FilesNode)dataNode;
|
||||
|
@ -494,7 +538,6 @@ namespace Prebuild.Core.Nodes
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region IComparable Members
|
||||
|
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-07-25 18:56:49 +0200 (ti, 25 jul 2006) $
|
||||
* $Date: 2006-07-26 01:56:49 +0900 (Wed, 26 Jul 2006) $
|
||||
* $Revision: 132 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
|
||||
* $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $
|
||||
* $Revision: 71 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-02-28 17:15:42 +0100 (ti, 28 feb 2006) $
|
||||
* $Date: 2006-03-01 01:15:42 +0900 (Wed, 01 Mar 2006) $
|
||||
* $Revision: 92 $
|
||||
*/
|
||||
#endregion
|
||||
|
@ -53,10 +53,10 @@ namespace Prebuild.Core.Nodes
|
|||
#region Fields
|
||||
|
||||
private string m_Name = "unknown";
|
||||
private string m_Version = "1.0.0";
|
||||
private string m_Path = "";
|
||||
private string m_FullPath = "";
|
||||
private string m_ActiveConfig = "Debug";
|
||||
private string m_Version = "1.0.0";
|
||||
|
||||
private OptionsNode m_Options;
|
||||
private FilesNode m_Files;
|
||||
|
@ -110,18 +110,6 @@ namespace Prebuild.Core.Nodes
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the version.
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
public string Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Version;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path.
|
||||
/// </summary>
|
||||
|
@ -146,6 +134,18 @@ namespace Prebuild.Core.Nodes
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the version.
|
||||
/// </summary>
|
||||
/// <value>The version.</value>
|
||||
public string Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Version;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the options.
|
||||
/// </summary>
|
||||
|
@ -245,9 +245,9 @@ namespace Prebuild.Core.Nodes
|
|||
public override void Parse(XmlNode node)
|
||||
{
|
||||
m_Name = Helper.AttributeValue(node, "name", m_Name);
|
||||
m_Version = Helper.AttributeValue(node, "version", m_Version);
|
||||
m_ActiveConfig = Helper.AttributeValue(node, "activeConfig", m_ActiveConfig);
|
||||
m_Path = Helper.AttributeValue(node, "path", m_Path);
|
||||
m_Version = Helper.AttributeValue(node, "version", m_Version);
|
||||
|
||||
m_FullPath = m_Path;
|
||||
try
|
||||
|
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
|
||||
* $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $
|
||||
* $Revision: 71 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -27,8 +27,8 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-09-01 19:55:06 +0200 (fr, 01 sep 2006) $
|
||||
* $Revision: 147 $
|
||||
* $Date: 2007-04-26 17:10:27 +0900 (Thu, 26 Apr 2007) $
|
||||
* $Revision: 236 $
|
||||
*/
|
||||
#endregion
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-09-20 09:42:51 +0200 (on, 20 sep 2006) $
|
||||
* $Date: 2006-09-20 16:42:51 +0900 (Wed, 20 Sep 2006) $
|
||||
* $Revision: 164 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -0,0 +1,471 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004 Crestez Leonard (cleonard@go.ro)
|
||||
|
||||
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;
|
||||
using System.Collections.Specialized;
|
||||
using System.IO;
|
||||
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("makefile")]
|
||||
public class MakefileTarget : ITarget
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private Kernel m_Kernel = null;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
// This converts a path relative to the path of a project to
|
||||
// a path relative to the solution path.
|
||||
private string NicePath(ProjectNode proj, string path)
|
||||
{
|
||||
string res;
|
||||
SolutionNode solution = (SolutionNode)proj.Parent;
|
||||
res = Path.Combine(Helper.NormalizePath(proj.FullPath, '/'), Helper.NormalizePath(path, '/'));
|
||||
res = Helper.NormalizePath(res, '/');
|
||||
res = res.Replace("/./", "/");
|
||||
while (res.IndexOf("/../") >= 0)
|
||||
{
|
||||
int a = res.IndexOf("/../");
|
||||
int b = res.LastIndexOf("/", a - 1);
|
||||
res = res.Remove(b, a - b + 3);
|
||||
}
|
||||
res = Helper.MakePathRelativeTo(solution.FullPath, res);
|
||||
if (res.StartsWith("./"))
|
||||
res = res.Substring(2, res.Length - 2);
|
||||
res = Helper.NormalizePath(res, '/');
|
||||
return res;
|
||||
}
|
||||
|
||||
private void WriteProjectFiles(StreamWriter f, SolutionNode solution, ProjectNode project)
|
||||
{
|
||||
// Write list of source code files
|
||||
f.WriteLine("SOURCES_{0} = \\", project.Name);
|
||||
foreach (string file in project.Files)
|
||||
if (project.Files.GetBuildAction(file) == BuildAction.Compile)
|
||||
f.WriteLine("\t{0} \\", NicePath(project, file));
|
||||
f.WriteLine();
|
||||
|
||||
// Write list of resource files
|
||||
f.WriteLine("RESOURCES_{0} = \\", project.Name);
|
||||
foreach (string file in project.Files)
|
||||
if (project.Files.GetBuildAction(file) == BuildAction.EmbeddedResource)
|
||||
{
|
||||
string path = NicePath(project, file);
|
||||
f.WriteLine("\t-resource:{0},{1} \\", path, Path.GetFileName(path));
|
||||
}
|
||||
f.WriteLine();
|
||||
|
||||
// There's also Content and None in BuildAction.
|
||||
// What am I supposed to do with that?
|
||||
}
|
||||
|
||||
private string FindFileReference(string refName, ProjectNode project)
|
||||
{
|
||||
foreach (ReferencePathNode refPath in project.ReferencePaths)
|
||||
{
|
||||
string fullPath = NicePath(project, Helper.MakeFilePath(refPath.Path, refName, "dll"));
|
||||
if (File.Exists(fullPath))
|
||||
return fullPath;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void WriteProjectReferences(StreamWriter f, SolutionNode solution, ProjectNode project)
|
||||
{
|
||||
f.WriteLine("REFERENCES_{0} = \\", project.Name);
|
||||
foreach (ReferenceNode refr in project.References)
|
||||
{
|
||||
string path;
|
||||
// Project references change with configurations.
|
||||
if (solution.ProjectsTable.Contains(refr.Name))
|
||||
continue;
|
||||
path = FindFileReference(refr.Name, project);
|
||||
if (path != null)
|
||||
f.WriteLine("\t-r:{0} \\", path);
|
||||
else
|
||||
f.WriteLine("\t-r:{0} \\", refr.Name);
|
||||
}
|
||||
f.WriteLine();
|
||||
}
|
||||
|
||||
private void WriteProjectDependencies(StreamWriter f, SolutionNode solution, ProjectNode project)
|
||||
{
|
||||
f.WriteLine("DEPENDENCIES_{0} = \\", project.Name);
|
||||
f.WriteLine("\t$(SOURCES_{0}) \\", project.Name);
|
||||
foreach (string file in project.Files)
|
||||
if (project.Files.GetBuildAction(file) == BuildAction.EmbeddedResource)
|
||||
f.WriteLine("\t{0} \\", NicePath(project, file));
|
||||
f.WriteLine();
|
||||
}
|
||||
|
||||
private string ProjectTypeToExtension(ProjectType t)
|
||||
{
|
||||
if (t == ProjectType.Exe || t == ProjectType.WinExe)
|
||||
{
|
||||
return "exe";
|
||||
}
|
||||
else if (t == ProjectType.Library)
|
||||
{
|
||||
return "dll";
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FatalException("Bad ProjectType: {0}", t);
|
||||
}
|
||||
}
|
||||
|
||||
private string ProjectTypeToTarget(ProjectType t)
|
||||
{
|
||||
if (t == ProjectType.Exe)
|
||||
{
|
||||
return "exe";
|
||||
}
|
||||
else if (t == ProjectType.WinExe)
|
||||
{
|
||||
return "winexe";
|
||||
}
|
||||
else if (t == ProjectType.Library)
|
||||
{
|
||||
return "library";
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new FatalException("Bad ProjectType: {0}", t);
|
||||
}
|
||||
}
|
||||
|
||||
private string ProjectOutput(ProjectNode project, ConfigurationNode config)
|
||||
{
|
||||
string filepath;
|
||||
filepath = Helper.MakeFilePath((string)config.Options["OutputPath"],
|
||||
project.AssemblyName, ProjectTypeToExtension(project.Type));
|
||||
return NicePath(project, filepath);
|
||||
}
|
||||
|
||||
// Returns true if two configs in one project have the same output.
|
||||
private bool ProjectClashes(ProjectNode project)
|
||||
{
|
||||
foreach (ConfigurationNode conf1 in project.Configurations)
|
||||
foreach (ConfigurationNode conf2 in project.Configurations)
|
||||
if (ProjectOutput(project, conf1) == ProjectOutput(project, conf2) && conf1 != conf2)
|
||||
{
|
||||
m_Kernel.Log.Write("Warning: Configurations {0} and {1} for project {2} output the same file",
|
||||
conf1.Name, conf2.Name, project.Name);
|
||||
m_Kernel.Log.Write("Warning: I'm going to use some timestamps(extra empty files).");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void WriteProject(StreamWriter f, SolutionNode solution, ProjectNode project)
|
||||
{
|
||||
f.WriteLine("# This is for project {0}", project.Name);
|
||||
f.WriteLine();
|
||||
|
||||
WriteProjectFiles(f, solution, project);
|
||||
WriteProjectReferences(f, solution, project);
|
||||
WriteProjectDependencies(f, solution, project);
|
||||
|
||||
bool clash = ProjectClashes(project);
|
||||
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
string outpath = ProjectOutput(project, conf);
|
||||
string filesToClean = outpath;
|
||||
|
||||
if (clash)
|
||||
{
|
||||
f.WriteLine("{0}-{1}: .{0}-{1}-timestamp", project.Name, conf.Name);
|
||||
f.WriteLine();
|
||||
f.Write(".{0}-{1}-timestamp: $(DEPENDENCIES_{0})", project.Name, conf.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
f.WriteLine("{0}-{1}: {2}", project.Name, conf.Name, outpath);
|
||||
f.WriteLine();
|
||||
f.Write("{2}: $(DEPENDENCIES_{0})", project.Name, conf.Name, outpath);
|
||||
}
|
||||
// Dependencies on other projects.
|
||||
foreach (ReferenceNode refr in project.References)
|
||||
if (solution.ProjectsTable.Contains(refr.Name))
|
||||
{
|
||||
ProjectNode refProj = (ProjectNode)solution.ProjectsTable[refr.Name];
|
||||
if (ProjectClashes(refProj))
|
||||
f.Write(" .{0}-{1}-timestamp", refProj.Name, conf.Name);
|
||||
else
|
||||
f.Write(" {0}", ProjectOutput(refProj, conf));
|
||||
}
|
||||
f.WriteLine();
|
||||
|
||||
// make directory for output.
|
||||
if (Path.GetDirectoryName(outpath) != "")
|
||||
{
|
||||
f.WriteLine("\tmkdir -p {0}", Path.GetDirectoryName(outpath));
|
||||
}
|
||||
// mcs command line.
|
||||
f.Write("\tgmcs", project.Name);
|
||||
f.Write(" -warn:{0}", conf.Options["WarningLevel"]);
|
||||
if ((bool)conf.Options["DebugInformation"])
|
||||
f.Write(" -debug");
|
||||
if ((bool)conf.Options["AllowUnsafe"])
|
||||
f.Write(" -unsafe");
|
||||
if ((bool)conf.Options["CheckUnderflowOverflow"])
|
||||
f.Write(" -checked");
|
||||
if (project.StartupObject != "")
|
||||
f.Write(" -main:{0}", project.StartupObject);
|
||||
if ((string)conf.Options["CompilerDefines"] != "")
|
||||
{
|
||||
f.Write(" -define:\"{0}\"", conf.Options["CompilerDefines"]);
|
||||
}
|
||||
|
||||
f.Write(" -target:{0} -out:{1}", ProjectTypeToTarget(project.Type), outpath);
|
||||
|
||||
// Build references to other projects. Now that sux.
|
||||
// We have to reference the other project in the same conf.
|
||||
foreach (ReferenceNode refr in project.References)
|
||||
if (solution.ProjectsTable.Contains(refr.Name))
|
||||
{
|
||||
ProjectNode refProj;
|
||||
refProj = (ProjectNode)solution.ProjectsTable[refr.Name];
|
||||
f.Write(" -r:{0}", ProjectOutput(refProj, conf));
|
||||
}
|
||||
|
||||
f.Write(" $(REFERENCES_{0})", project.Name);
|
||||
f.Write(" $(RESOURCES_{0})", project.Name);
|
||||
f.Write(" $(SOURCES_{0})", project.Name);
|
||||
f.WriteLine();
|
||||
|
||||
// Copy references with localcopy.
|
||||
foreach (ReferenceNode refr in project.References)
|
||||
if (refr.LocalCopy)
|
||||
{
|
||||
string outPath, srcPath, destPath;
|
||||
outPath = Helper.NormalizePath((string)conf.Options["OutputPath"]);
|
||||
if (solution.ProjectsTable.Contains(refr.Name))
|
||||
{
|
||||
ProjectNode refProj;
|
||||
refProj = (ProjectNode)solution.ProjectsTable[refr.Name];
|
||||
srcPath = ProjectOutput(refProj, conf);
|
||||
destPath = Path.Combine(outPath, Path.GetFileName(srcPath));
|
||||
destPath = NicePath(project, destPath);
|
||||
if (srcPath != destPath)
|
||||
{
|
||||
f.WriteLine("\tcp -f {0} {1}", srcPath, destPath);
|
||||
filesToClean += " " + destPath;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
srcPath = FindFileReference(refr.Name, project);
|
||||
if (srcPath != null)
|
||||
{
|
||||
destPath = Path.Combine(outPath, Path.GetFileName(srcPath));
|
||||
destPath = NicePath(project, destPath);
|
||||
f.WriteLine("\tcp -f {0} {1}", srcPath, destPath);
|
||||
filesToClean += " " + destPath;
|
||||
}
|
||||
}
|
||||
|
||||
if (clash)
|
||||
{
|
||||
filesToClean += String.Format(" .{0}-{1}-timestamp", project.Name, conf.Name);
|
||||
f.WriteLine("\ttouch .{0}-{1}-timestamp", project.Name, conf.Name);
|
||||
f.Write("\trm -rf");
|
||||
foreach (ConfigurationNode otherConf in project.Configurations)
|
||||
if (otherConf != conf)
|
||||
f.WriteLine(" .{0}-{1}-timestamp", project.Name, otherConf.Name);
|
||||
f.WriteLine();
|
||||
}
|
||||
f.WriteLine();
|
||||
f.WriteLine("{0}-{1}-clean:", project.Name, conf.Name);
|
||||
f.WriteLine("\trm -rf {0}", filesToClean);
|
||||
f.WriteLine();
|
||||
}
|
||||
}
|
||||
|
||||
private void WriteIntro(StreamWriter f, SolutionNode solution)
|
||||
{
|
||||
f.WriteLine("# Makefile for {0} generated by Prebuild ( http://dnpb.sf.net )", solution.Name);
|
||||
f.WriteLine("# Do not edit.");
|
||||
f.WriteLine("#");
|
||||
|
||||
f.Write("# Configurations:");
|
||||
foreach (ConfigurationNode conf in solution.Configurations)
|
||||
f.Write(" {0}", conf.Name);
|
||||
f.WriteLine();
|
||||
|
||||
f.WriteLine("# Projects:");
|
||||
foreach (ProjectNode proj in solution.Projects)
|
||||
f.WriteLine("#\t{0}", proj.Name);
|
||||
|
||||
f.WriteLine("#");
|
||||
f.WriteLine("# Building:");
|
||||
f.WriteLine("#\t\"make\" to build everything under the default(first) configuration");
|
||||
f.WriteLine("#\t\"make CONF\" to build every project under configuration CONF");
|
||||
f.WriteLine("#\t\"make PROJ\" to build project PROJ under the default(first) configuration");
|
||||
f.WriteLine("#\t\"make PROJ-CONF\" to build project PROJ under configuration CONF");
|
||||
f.WriteLine("#");
|
||||
f.WriteLine("# Cleaning (removing results of build):");
|
||||
f.WriteLine("#\t\"make clean\" to clean everything, that's what you probably want");
|
||||
f.WriteLine("#\t\"make CONF\" to clean everything for a configuration");
|
||||
f.WriteLine("#\t\"make PROJ\" to clean everything for a project");
|
||||
f.WriteLine("#\t\"make PROJ-CONF\" to clea project PROJ under configuration CONF");
|
||||
f.WriteLine();
|
||||
}
|
||||
|
||||
private void WritePhony(StreamWriter f, SolutionNode solution)
|
||||
{
|
||||
string defconf = "";
|
||||
foreach (ConfigurationNode conf in solution.Configurations)
|
||||
{
|
||||
defconf = conf.Name;
|
||||
break;
|
||||
}
|
||||
|
||||
f.Write(".PHONY: all");
|
||||
foreach (ProjectNode proj in solution.Projects)
|
||||
f.Write(" {0} {0}-clean", proj.Name);
|
||||
foreach (ConfigurationNode conf in solution.Configurations)
|
||||
f.Write(" {0} {0}-clean", conf.Name);
|
||||
foreach (ProjectNode proj in solution.Projects)
|
||||
foreach (ConfigurationNode conf in solution.Configurations)
|
||||
f.Write(" {0}-{1} {0}-{1}-clean", proj.Name, conf.Name);
|
||||
f.WriteLine();
|
||||
f.WriteLine();
|
||||
|
||||
f.WriteLine("all: {0}", defconf);
|
||||
f.WriteLine();
|
||||
|
||||
f.Write("clean:");
|
||||
foreach (ConfigurationNode conf in solution.Configurations)
|
||||
f.Write(" {0}-clean", conf.Name);
|
||||
f.WriteLine();
|
||||
f.WriteLine();
|
||||
|
||||
foreach (ConfigurationNode conf in solution.Configurations)
|
||||
{
|
||||
f.Write("{0}: ", conf.Name);
|
||||
foreach (ProjectNode proj in solution.Projects)
|
||||
f.Write(" {0}-{1}", proj.Name, conf.Name);
|
||||
f.WriteLine();
|
||||
f.WriteLine();
|
||||
|
||||
f.Write("{0}-clean: ", conf.Name);
|
||||
foreach (ProjectNode proj in solution.Projects)
|
||||
f.Write(" {0}-{1}-clean", proj.Name, conf.Name);
|
||||
f.WriteLine();
|
||||
f.WriteLine();
|
||||
}
|
||||
|
||||
foreach (ProjectNode proj in solution.Projects)
|
||||
{
|
||||
f.WriteLine("{0}: {0}-{1}", proj.Name, defconf);
|
||||
f.WriteLine();
|
||||
|
||||
f.Write("{0}-clean:", proj.Name);
|
||||
foreach (ConfigurationNode conf in proj.Configurations)
|
||||
f.Write(" {0}-{1}-clean", proj.Name, conf.Name);
|
||||
f.WriteLine();
|
||||
f.WriteLine();
|
||||
}
|
||||
}
|
||||
|
||||
private void WriteSolution(SolutionNode solution)
|
||||
{
|
||||
m_Kernel.Log.Write("Creating makefile for {0}", solution.Name);
|
||||
m_Kernel.CurrentWorkingDirectory.Push();
|
||||
|
||||
string file = "Makefile";// Helper.MakeFilePath(solution.FullPath, solution.Name, "make");
|
||||
StreamWriter f = new StreamWriter(file);
|
||||
|
||||
Helper.SetCurrentDir(Path.GetDirectoryName(file));
|
||||
|
||||
using (f)
|
||||
{
|
||||
WriteIntro(f, solution);
|
||||
WritePhony(f, solution);
|
||||
|
||||
foreach (ProjectNode project in solution.Projects)
|
||||
{
|
||||
m_Kernel.Log.Write("...Creating Project: {0}", project.Name);
|
||||
WriteProject(f, solution, project);
|
||||
}
|
||||
}
|
||||
|
||||
m_Kernel.Log.Write("");
|
||||
m_Kernel.CurrentWorkingDirectory.Pop();
|
||||
}
|
||||
|
||||
private void CleanSolution(SolutionNode solution)
|
||||
{
|
||||
m_Kernel.Log.Write("Cleaning makefile for {0}", solution.Name);
|
||||
|
||||
string file = Helper.MakeFilePath(solution.FullPath, solution.Name, "make");
|
||||
Helper.DeleteIfExists(file);
|
||||
|
||||
m_Kernel.Log.Write("");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ITarget Members
|
||||
|
||||
public void Write(Kernel kern)
|
||||
{
|
||||
m_Kernel = kern;
|
||||
foreach (SolutionNode solution in kern.Solutions)
|
||||
WriteSolution(solution);
|
||||
m_Kernel = null;
|
||||
}
|
||||
|
||||
public virtual void Clean(Kernel kern)
|
||||
{
|
||||
m_Kernel = kern;
|
||||
foreach (SolutionNode sol in kern.Solutions)
|
||||
CleanSolution(sol);
|
||||
m_Kernel = null;
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "makefile";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -26,9 +26,9 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
#region CVS Information
|
||||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2007-02-13 22:07:07 +0100 (ti, 13 feb 2007) $
|
||||
* $Revision: 206 $
|
||||
* $Author: cjcollier $
|
||||
* $Date: 2007-04-11 07:10:35 +0900 (Wed, 11 Apr 2007) $
|
||||
* $Revision: 231 $
|
||||
*/
|
||||
#endregion
|
||||
|
||||
|
@ -106,9 +106,24 @@ namespace Prebuild.Core.Targets
|
|||
ret += " refto=\"";
|
||||
try
|
||||
{
|
||||
//Assembly assem = Assembly.Load(refr.Name);
|
||||
//ret += assem.FullName;
|
||||
ret += refr.Name;
|
||||
/*
|
||||
Day changed to 28 Mar 2007
|
||||
...
|
||||
08:09 < cj> is there anything that replaces Assembly.LoadFromPartialName() ?
|
||||
08:09 < jonp> no
|
||||
08:10 < jonp> in their infinite wisdom [sic], microsoft decided that the
|
||||
ability to load any assembly version by-name was an inherently
|
||||
bad idea
|
||||
08:11 < cj> I'm thinking of a bunch of four-letter words right now...
|
||||
08:11 < cj> security through making it difficult for the developer!!!
|
||||
08:12 < jonp> just use the Obsolete API
|
||||
08:12 < jonp> it should still work
|
||||
08:12 < cj> alrighty.
|
||||
08:12 < jonp> you just get warnings when using it
|
||||
*/
|
||||
Assembly assem = Assembly.LoadWithPartialName(refr.Name);
|
||||
ret += assem.FullName;
|
||||
//ret += refr.Name;
|
||||
}
|
||||
catch (System.NullReferenceException e)
|
||||
{
|
||||
|
|
|
@ -1,34 +1,46 @@
|
|||
#region BSD License
|
||||
/*
|
||||
Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
|
||||
Copyright (c) 2004 - 2008
|
||||
Matthew Holmes (matthew@wildfiregames.com),
|
||||
Dan Moorehead (dan05a@gmail.com),
|
||||
C.J. Adams-Collier (cjac@colliertech.org),
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
provided that the following conditions are met:
|
||||
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.
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
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.
|
||||
* 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: jendave $
|
||||
* $Date: 2007-02-13 21:58:03 +0100 (ti, 13 feb 2007) $
|
||||
* $Revision: 205 $
|
||||
* $Author: cjcollier $
|
||||
* $Date: 2008-02-07 10:22:36 +0900 (Thu, 07 Feb 2008) $
|
||||
* $Revision: 255 $
|
||||
*/
|
||||
#endregion
|
||||
|
||||
|
@ -83,9 +95,7 @@ namespace Prebuild.Core.Targets
|
|||
if (solution.ProjectsTable.ContainsKey(refr.Name))
|
||||
{
|
||||
ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name];
|
||||
|
||||
string finalPath = Helper.NormalizePath(((ReferencePathNode)currentProject.ReferencePaths[0]).Path + refr.Name + GetProjectExtension(project), '/');
|
||||
|
||||
return finalPath;
|
||||
}
|
||||
else
|
||||
|
@ -122,7 +132,6 @@ namespace Prebuild.Core.Targets
|
|||
{
|
||||
ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name];
|
||||
string finalPath = Helper.NormalizePath(((ReferencePathNode)project.ReferencePaths[0]).Path, '/');
|
||||
|
||||
return finalPath;
|
||||
}
|
||||
else
|
||||
|
@ -213,7 +222,7 @@ namespace Prebuild.Core.Targets
|
|||
ss.WriteLine(" <target name=\"{0}\">", "build");
|
||||
ss.WriteLine(" <echo message=\"Build Directory is ${project::get-base-directory()}/${build.dir}\" />");
|
||||
ss.WriteLine(" <mkdir dir=\"${project::get-base-directory()}/${build.dir}\" />");
|
||||
ss.WriteLine(" <copy todir=\"${project::get-base-directory()}/${build.dir}\">");
|
||||
ss.WriteLine(" <copy todir=\"${project::get-base-directory()}/${build.dir}\" flatten=\"true\">");
|
||||
ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}\">");
|
||||
foreach (ReferenceNode refr in project.References)
|
||||
{
|
||||
|
@ -222,8 +231,41 @@ namespace Prebuild.Core.Targets
|
|||
ss.WriteLine(" <include name=\"{0}", Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, project, refr)) + "\" />", '/'));
|
||||
}
|
||||
}
|
||||
|
||||
ss.WriteLine(" </fileset>");
|
||||
ss.WriteLine(" </copy>");
|
||||
if (project.ConfigFile != null && project.ConfigFile.Length!=0)
|
||||
{
|
||||
ss.Write(" <copy file=\"" + project.ConfigFile + "\" tofile=\"${project::get-base-directory()}/${build.dir}/${project::get-name()}");
|
||||
|
||||
if (project.Type == ProjectType.Library)
|
||||
{
|
||||
ss.Write(".dll.config\"");
|
||||
}
|
||||
else
|
||||
{
|
||||
ss.Write(".exe.config\"");
|
||||
}
|
||||
ss.WriteLine(" />");
|
||||
}
|
||||
|
||||
// Add the content files to just be copied
|
||||
ss.WriteLine(" {0}", "<copy todir=\"${project::get-base-directory()}/${build.dir}\">");
|
||||
ss.WriteLine(" {0}", "<fileset basedir=\".\">");
|
||||
|
||||
foreach (string file in project.Files)
|
||||
{
|
||||
// Ignore if we aren't content
|
||||
if (project.Files.GetBuildAction(file) != BuildAction.Content)
|
||||
continue;
|
||||
|
||||
// Create a include tag
|
||||
ss.WriteLine(" {0}", "<include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />");
|
||||
}
|
||||
|
||||
ss.WriteLine(" {0}", "</fileset>");
|
||||
ss.WriteLine(" {0}", "</copy>");
|
||||
|
||||
ss.Write(" <csc");
|
||||
ss.Write(" target=\"{0}\"", project.Type.ToString().ToLower());
|
||||
ss.Write(" debug=\"{0}\"", "${build.debug}");
|
||||
|
@ -245,6 +287,8 @@ namespace Prebuild.Core.Targets
|
|||
ss.Write(" define=\"{0}\"", conf.Options.CompilerDefines);
|
||||
break;
|
||||
}
|
||||
ss.Write(" main=\"{0}\"", project.StartupObject);
|
||||
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
if (GetXmlDocFile(project, conf) != "")
|
||||
|
@ -476,14 +520,15 @@ namespace Prebuild.Core.Targets
|
|||
|
||||
ss.WriteLine(" <target name=\"init\" description=\"\">");
|
||||
ss.WriteLine(" <call target=\"${project.config}\" />");
|
||||
ss.WriteLine(" <sysinfo />");
|
||||
ss.WriteLine(" <property name=\"sys.os.platform\"");
|
||||
ss.WriteLine(" value=\"${platform::get-name()}\"");
|
||||
ss.WriteLine(" />");
|
||||
ss.WriteLine(" <echo message=\"Platform ${sys.os.platform}\" />");
|
||||
ss.WriteLine(" <property name=\"build.dir\" value=\"${bin.dir}/${project.config}\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
|
||||
|
||||
// sdague - ok, this is an ugly hack, but what it lets
|
||||
// us do is native include of files into the nant
|
||||
// created files from all .nant/*include files. This
|
||||
|
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2007-02-13 21:58:03 +0100 (ti, 13 feb 2007) $
|
||||
* $Date: 2007-02-14 05:58:03 +0900 (Wed, 14 Feb 2007) $
|
||||
* $Revision: 205 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
|
||||
* $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $
|
||||
* $Revision: 71 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-09-29 21:11:40 +0200 (fr, 29 sep 2006) $
|
||||
* $Date: 2006-09-30 04:11:40 +0900 (Sat, 30 Sep 2006) $
|
||||
* $Revision: 177 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -26,9 +26,9 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
#region CVS Information
|
||||
/*
|
||||
* $Source$
|
||||
* $Author: robloach $
|
||||
* $Date: 2007-02-27 19:52:34 +0100 (ti, 27 feb 2007) $
|
||||
* $Revision: 207 $
|
||||
* $Author: borrillis $
|
||||
* $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $
|
||||
* $Revision: 243 $
|
||||
*/
|
||||
#endregion
|
||||
|
||||
|
@ -36,6 +36,7 @@ using System;
|
|||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
using Prebuild.Core.Attributes;
|
||||
using Prebuild.Core.Interfaces;
|
||||
|
@ -260,6 +261,7 @@ namespace Prebuild.Core.Targets
|
|||
return "9.00";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the product version.
|
||||
/// </summary>
|
||||
|
@ -287,6 +289,7 @@ namespace Prebuild.Core.Targets
|
|||
this.schemaVersion = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the version.
|
||||
/// </summary>
|
||||
|
@ -298,6 +301,7 @@ namespace Prebuild.Core.Targets
|
|||
return "Visual C# 2005";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the version.
|
||||
/// </summary>
|
||||
|
@ -431,7 +435,7 @@ namespace Prebuild.Core.Targets
|
|||
ps.WriteLine(" <ConfigurationOverrideFile>");
|
||||
ps.WriteLine(" </ConfigurationOverrideFile>");
|
||||
ps.WriteLine(" <DefineConstants>{0}</DefineConstants>", conf.Options["CompilerDefines"]);
|
||||
ps.WriteLine(" <DocumentationFile>{0}</DocumentationFile>", conf.Options["XmlDocFile"]);
|
||||
ps.WriteLine(" <DocumentationFile>{0}</DocumentationFile>", Helper.NormalizePath(conf.Options["XmlDocFile"].ToString()));
|
||||
ps.WriteLine(" <DebugSymbols>{0}</DebugSymbols>", conf.Options["DebugInformation"]);
|
||||
ps.WriteLine(" <FileAlignment>{0}</FileAlignment>", conf.Options["FileAlignment"]);
|
||||
// ps.WriteLine(" <IncrementalBuild = \"{0}\"", conf.Options["IncrementalBuild"]);
|
||||
|
@ -603,17 +607,34 @@ namespace Prebuild.Core.Targets
|
|||
if (!list.Contains(file))
|
||||
{
|
||||
ps.Write(" <{0} ", project.Files.GetBuildAction(file));
|
||||
ps.WriteLine("Include=\"{0}\">", file);
|
||||
|
||||
int startPos = 0;
|
||||
if ( project.Files.GetPreservePath( file ) )
|
||||
{
|
||||
while ( ( @"./\" ).IndexOf( file.Substring( startPos, 1 ) ) != -1 )
|
||||
startPos++;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
startPos = file.LastIndexOf( Path.GetFileName( file ) );
|
||||
}
|
||||
ps.WriteLine("Include=\"{0}\">", Helper.NormalizePath(file));
|
||||
|
||||
|
||||
if (file.Contains("Designer.cs"))
|
||||
{
|
||||
ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", file.Substring(0, file.IndexOf(".Designer.cs")) + ".cs");
|
||||
string d = ".Designer.cs";
|
||||
int index = file.Contains("\\") ? file.IndexOf("\\") + 1 : 0;
|
||||
ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", file.Substring(index, file.Length - index - d.Length) + ".cs");
|
||||
}
|
||||
|
||||
if (project.Files.GetIsLink(file))
|
||||
{
|
||||
ps.WriteLine(" <Link>{0}</Link>", Path.GetFileName(file));
|
||||
string alias = project.Files.GetLinkPath( file );
|
||||
alias += file.Substring( startPos );
|
||||
alias = Helper.NormalizePath( alias );
|
||||
ps.WriteLine( " <Link>{0}</Link>", alias );
|
||||
}
|
||||
else if (project.Files.GetBuildAction(file) != BuildAction.None)
|
||||
{
|
||||
|
@ -622,6 +643,7 @@ namespace Prebuild.Core.Targets
|
|||
ps.WriteLine(" <SubType>{0}</SubType>", project.Files.GetSubType(file));
|
||||
}
|
||||
}
|
||||
|
||||
if (project.Files.GetCopyToOutput(file) != CopyToOutput.Never)
|
||||
{
|
||||
ps.WriteLine(" <CopyToOutputDirectory>{0}</CopyToOutputDirectory>", project.Files.GetCopyToOutput(file));
|
||||
|
@ -658,15 +680,14 @@ namespace Prebuild.Core.Targets
|
|||
ps.WriteLine(" <PropertyGroup>");
|
||||
//ps.WriteLine(" <Settings ReferencePath=\"{0}\">", MakeRefPath(project));
|
||||
|
||||
|
||||
ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>");
|
||||
ps.WriteLine(" <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>");
|
||||
|
||||
if (projectFile.Contains( "OpenSim.csproj" ))
|
||||
{
|
||||
ps.WriteLine(" <StartArguments>-loginserver -sandbox -accounts</StartArguments>");
|
||||
}
|
||||
|
||||
ps.WriteLine(" <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>");
|
||||
ps.WriteLine(" <ReferencePath>{0}</ReferencePath>", MakeRefPath(project));
|
||||
ps.WriteLine(" <LastOpenVersion>{0}</LastOpenVersion>", this.ProductVersion);
|
||||
ps.WriteLine(" <ProjectView>ProjectFiles</ProjectView>");
|
||||
|
|
|
@ -0,0 +1,605 @@
|
|||
#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
|
||||
|
||||
#region CVS Information
|
||||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2007-02-13 12:58:03 -0800 (Tue, 13 Feb 2007) $
|
||||
* $Revision: 205 $
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
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
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the XML doc file.
|
||||
/// </summary>
|
||||
/// <param name="project">The project.</param>
|
||||
/// <param name="conf">The conf.</param>
|
||||
/// <returns></returns>
|
||||
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("<?xml version=\"1.0\" ?>");
|
||||
ss.WriteLine("<project name=\"{0}\" default=\"build\">", project.Name);
|
||||
ss.WriteLine(" <target name=\"{0}\">", "build");
|
||||
ss.WriteLine(" <echo message=\"Build Directory is ${project::get-base-directory()}/${build.dir}\" />");
|
||||
ss.WriteLine(" <mkdir dir=\"${project::get-base-directory()}/${build.dir}\" />");
|
||||
ss.WriteLine(" <copy todir=\"${project::get-base-directory()}/${build.dir}\">");
|
||||
ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}\">");
|
||||
foreach (ReferenceNode refr in project.References)
|
||||
{
|
||||
if (refr.LocalCopy)
|
||||
{
|
||||
ss.WriteLine(" <include name=\"{0}", Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, refr)) + "\" />", '/'));
|
||||
}
|
||||
}
|
||||
ss.WriteLine(" </fileset>");
|
||||
ss.WriteLine(" </copy>");
|
||||
ss.Write(" <csc");
|
||||
ss.Write(" target=\"{0}\"", project.Type.ToString().ToLower());
|
||||
ss.Write(" debug=\"{0}\"", "${build.debug}");
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
if (conf.Options.KeyFile != "")
|
||||
{
|
||||
ss.Write(" keyfile=\"{0}\"", conf.Options.KeyFile);
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
ss.Write(" unsafe=\"{0}\"", conf.Options.AllowUnsafe);
|
||||
break;
|
||||
}
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
ss.Write(" define=\"{0}\"", conf.Options.CompilerDefines);
|
||||
break;
|
||||
}
|
||||
foreach (ConfigurationNode conf in project.Configurations)
|
||||
{
|
||||
if (GetXmlDocFile(project, conf) != "")
|
||||
{
|
||||
ss.Write(" doc=\"{0}\"", "${project::get-base-directory()}/${build.dir}/" + GetXmlDocFile(project, conf));
|
||||
hasDoc = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
ss.Write(" output=\"{0}", "${project::get-base-directory()}/${build.dir}/${project::get-name()}");
|
||||
if (project.Type == ProjectType.Library)
|
||||
{
|
||||
ss.Write(".dll\"");
|
||||
}
|
||||
else
|
||||
{
|
||||
ss.Write(".exe\"");
|
||||
}
|
||||
if (project.AppIcon != null && project.AppIcon.Length != 0)
|
||||
{
|
||||
ss.Write(" win32icon=\"{0}\"", Helper.NormalizePath(project.AppIcon, '/'));
|
||||
}
|
||||
ss.WriteLine(">");
|
||||
ss.WriteLine(" <resources prefix=\"{0}\" dynamicprefix=\"true\" >", project.RootNamespace);
|
||||
foreach (string file in project.Files)
|
||||
{
|
||||
switch (project.Files.GetBuildAction(file))
|
||||
{
|
||||
case BuildAction.EmbeddedResource:
|
||||
ss.WriteLine(" {0}", "<include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />");
|
||||
break;
|
||||
default:
|
||||
if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings)
|
||||
{
|
||||
ss.WriteLine(" <include name=\"{0}\" />", file.Substring(0, file.LastIndexOf('.')) + ".resx");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
//if (project.Files.GetSubType(file).ToString() != "Code")
|
||||
//{
|
||||
// ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx");
|
||||
|
||||
ss.WriteLine(" </resources>");
|
||||
ss.WriteLine(" <sources failonempty=\"true\">");
|
||||
foreach (string file in project.Files)
|
||||
{
|
||||
switch (project.Files.GetBuildAction(file))
|
||||
{
|
||||
case BuildAction.Compile:
|
||||
ss.WriteLine(" <include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
ss.WriteLine(" </sources>");
|
||||
ss.WriteLine(" <references basedir=\"${project::get-base-directory()}\">");
|
||||
ss.WriteLine(" <lib>");
|
||||
ss.WriteLine(" <include name=\"${project::get-base-directory()}\" />");
|
||||
ss.WriteLine(" <include name=\"${project::get-base-directory()}/${build.dir}\" />");
|
||||
ss.WriteLine(" </lib>");
|
||||
foreach (ReferenceNode refr in project.References)
|
||||
{
|
||||
ss.WriteLine(" <include name=\"{0}", Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, refr)) + "\" />", '/'));
|
||||
}
|
||||
ss.WriteLine(" </references>");
|
||||
|
||||
ss.WriteLine(" </csc>");
|
||||
ss.WriteLine(" </target>");
|
||||
|
||||
ss.WriteLine(" <target name=\"clean\">");
|
||||
ss.WriteLine(" <delete dir=\"${bin.dir}\" failonerror=\"false\" />");
|
||||
ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
|
||||
ss.WriteLine(" <target name=\"doc\" description=\"Creates documentation.\">");
|
||||
if (hasDoc)
|
||||
{
|
||||
ss.WriteLine(" <property name=\"doc.target\" value=\"\" />");
|
||||
ss.WriteLine(" <if test=\"${platform::is-unix()}\">");
|
||||
ss.WriteLine(" <property name=\"doc.target\" value=\"Web\" />");
|
||||
ss.WriteLine(" </if>");
|
||||
ss.WriteLine(" <ndoc failonerror=\"false\" verbose=\"true\">");
|
||||
ss.WriteLine(" <assemblies basedir=\"${project::get-base-directory()}\">");
|
||||
ss.Write(" <include name=\"${build.dir}/${project::get-name()}");
|
||||
if (project.Type == ProjectType.Library)
|
||||
{
|
||||
ss.WriteLine(".dll\" />");
|
||||
}
|
||||
else
|
||||
{
|
||||
ss.WriteLine(".exe\" />");
|
||||
}
|
||||
|
||||
ss.WriteLine(" </assemblies>");
|
||||
ss.WriteLine(" <summaries basedir=\"${project::get-base-directory()}\">");
|
||||
ss.WriteLine(" <include name=\"${build.dir}/${project::get-name()}.xml\"/>");
|
||||
ss.WriteLine(" </summaries>");
|
||||
ss.WriteLine(" <referencepaths basedir=\"${project::get-base-directory()}\">");
|
||||
ss.WriteLine(" <include name=\"${build.dir}\" />");
|
||||
// foreach(ReferenceNode refr in project.References)
|
||||
// {
|
||||
// string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReferencePath(solution, refr)), '/');
|
||||
// if (path != "")
|
||||
// {
|
||||
// ss.WriteLine(" <include name=\"{0}\" />", path);
|
||||
// }
|
||||
// }
|
||||
ss.WriteLine(" </referencepaths>");
|
||||
ss.WriteLine(" <documenters>");
|
||||
ss.WriteLine(" <documenter name=\"MSDN\">");
|
||||
ss.WriteLine(" <property name=\"OutputDirectory\" value=\"${project::get-base-directory()}/${build.dir}/doc/${project::get-name()}\" />");
|
||||
ss.WriteLine(" <property name=\"OutputTarget\" value=\"${doc.target}\" />");
|
||||
ss.WriteLine(" <property name=\"HtmlHelpName\" value=\"${project::get-name()}\" />");
|
||||
ss.WriteLine(" <property name=\"IncludeFavorites\" value=\"False\" />");
|
||||
ss.WriteLine(" <property name=\"Title\" value=\"${project::get-name()} SDK Documentation\" />");
|
||||
ss.WriteLine(" <property name=\"SplitTOCs\" value=\"False\" />");
|
||||
ss.WriteLine(" <property name=\"DefaulTOC\" value=\"\" />");
|
||||
ss.WriteLine(" <property name=\"ShowVisualBasic\" value=\"True\" />");
|
||||
ss.WriteLine(" <property name=\"AutoDocumentConstructors\" value=\"True\" />");
|
||||
ss.WriteLine(" <property name=\"ShowMissingSummaries\" value=\"${build.debug}\" />");
|
||||
ss.WriteLine(" <property name=\"ShowMissingRemarks\" value=\"${build.debug}\" />");
|
||||
ss.WriteLine(" <property name=\"ShowMissingParams\" value=\"${build.debug}\" />");
|
||||
ss.WriteLine(" <property name=\"ShowMissingReturns\" value=\"${build.debug}\" />");
|
||||
ss.WriteLine(" <property name=\"ShowMissingValues\" value=\"${build.debug}\" />");
|
||||
ss.WriteLine(" <property name=\"DocumentInternals\" value=\"False\" />");
|
||||
ss.WriteLine(" <property name=\"DocumentPrivates\" value=\"False\" />");
|
||||
ss.WriteLine(" <property name=\"DocumentProtected\" value=\"True\" />");
|
||||
ss.WriteLine(" <property name=\"DocumentEmptyNamespaces\" value=\"${build.debug}\" />");
|
||||
ss.WriteLine(" <property name=\"IncludeAssemblyVersion\" value=\"True\" />");
|
||||
ss.WriteLine(" </documenter>");
|
||||
ss.WriteLine(" </documenters>");
|
||||
ss.WriteLine(" </ndoc>");
|
||||
}
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine("</project>");
|
||||
}
|
||||
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("<?xml version=\"1.0\" ?>");
|
||||
ss.WriteLine("<project name=\"{0}\" default=\"build\">", solution.Name);
|
||||
ss.WriteLine(" <echo message=\"Using '${nant.settings.currentframework}' Framework\"/>");
|
||||
ss.WriteLine();
|
||||
|
||||
//ss.WriteLine(" <property name=\"dist.dir\" value=\"dist\" />");
|
||||
//ss.WriteLine(" <property name=\"source.dir\" value=\"source\" />");
|
||||
ss.WriteLine(" <property name=\"bin.dir\" value=\"bin\" />");
|
||||
ss.WriteLine(" <property name=\"obj.dir\" value=\"obj\" />");
|
||||
ss.WriteLine(" <property name=\"doc.dir\" value=\"doc\" />");
|
||||
ss.WriteLine(" <property name=\"project.main.dir\" value=\"${project::get-base-directory()}\" />");
|
||||
|
||||
foreach (ConfigurationNode conf in solution.Configurations)
|
||||
{
|
||||
// Set the project.config to a non-debug configuration
|
||||
if (conf.Options["DebugInformation"].ToString().ToLower() != "true")
|
||||
{
|
||||
ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", conf.Name);
|
||||
}
|
||||
ss.WriteLine();
|
||||
ss.WriteLine(" <target name=\"{0}\" description=\"\">", conf.Name);
|
||||
ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", conf.Name);
|
||||
ss.WriteLine(" <property name=\"build.debug\" value=\"{0}\" />", conf.Options["DebugInformation"].ToString().ToLower());
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
}
|
||||
|
||||
ss.WriteLine(" <target name=\"net-1.1\" description=\"Sets framework to .NET 1.1\">");
|
||||
ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-1.1\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"net-2.0\" description=\"Sets framework to .NET 2.0\">");
|
||||
ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-2.0\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"mono-2.0\" description=\"Sets framework to mono 2.0\">");
|
||||
ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-2.0\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"mono-1.0\" description=\"Sets framework to mono 1.0\">");
|
||||
ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-1.0\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"init\" description=\"\">");
|
||||
ss.WriteLine(" <call target=\"${project.config}\" />");
|
||||
ss.WriteLine(" <sysinfo />");
|
||||
ss.WriteLine(" <echo message=\"Platform ${sys.os.platform}\" />");
|
||||
ss.WriteLine(" <property name=\"build.dir\" value=\"${bin.dir}/${project.config}\" />");
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"clean\" description=\"\">");
|
||||
ss.WriteLine(" <echo message=\"Deleting all builds from all configurations\" />");
|
||||
//ss.WriteLine(" <delete dir=\"${dist.dir}\" failonerror=\"false\" />");
|
||||
ss.WriteLine(" <delete dir=\"${bin.dir}\" failonerror=\"false\" />");
|
||||
ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />");
|
||||
//foreach(ProjectNode project in solution.Projects)
|
||||
//{
|
||||
// string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
|
||||
// ss.Write(" <nant buildfile=\"{0}\"",
|
||||
// Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"),'/'));
|
||||
// ss.WriteLine(" target=\"clean\" />");
|
||||
//}
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"build\" depends=\"init\" description=\"\">");
|
||||
|
||||
foreach (ProjectNode project in solution.ProjectsTableOrder)
|
||||
{
|
||||
string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
|
||||
ss.Write(" <nant buildfile=\"{0}\"",
|
||||
Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"), '/'));
|
||||
ss.WriteLine(" target=\"build\" />");
|
||||
}
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"build-release\" depends=\"Release, init, build\" description=\"Builds in Release mode\" />");
|
||||
ss.WriteLine();
|
||||
ss.WriteLine(" <target name=\"build-debug\" depends=\"Debug, init, build\" description=\"Builds in Debug mode\" />");
|
||||
ss.WriteLine();
|
||||
//ss.WriteLine(" <target name=\"package\" depends=\"clean, doc, copyfiles, zip\" description=\"Builds in Release mode\" />");
|
||||
ss.WriteLine(" <target name=\"package\" depends=\"clean, doc\" description=\"Builds all\" />");
|
||||
ss.WriteLine();
|
||||
|
||||
ss.WriteLine(" <target name=\"doc\" depends=\"build-release\">");
|
||||
ss.WriteLine(" <echo message=\"Generating all documentation from all builds\" />");
|
||||
foreach (ProjectNode project in solution.Projects)
|
||||
{
|
||||
string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
|
||||
ss.Write(" <nant buildfile=\"{0}\"",
|
||||
Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"), '/'));
|
||||
ss.WriteLine(" target=\"doc\" />");
|
||||
}
|
||||
ss.WriteLine(" </target>");
|
||||
ss.WriteLine();
|
||||
ss.WriteLine("</project>");
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
/// <summary>
|
||||
/// Writes the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cleans the specified kern.
|
||||
/// </summary>
|
||||
/// <param name="kern">The kern.</param>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "xcode";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: robloach $
|
||||
* $Date: 2006-09-26 00:30:53 +0200 (ti, 26 sep 2006) $
|
||||
* $Date: 2006-09-26 07:30:53 +0900 (Tue, 26 Sep 2006) $
|
||||
* $Revision: 165 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
|
||||
* $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $
|
||||
* $Revision: 71 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2007-02-13 21:58:03 +0100 (ti, 13 feb 2007) $
|
||||
* $Date: 2007-02-14 05:58:03 +0900 (Wed, 14 Feb 2007) $
|
||||
* $Revision: 205 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
|
||||
* $Date: 2006-01-28 09:49:58 +0900 (Sat, 28 Jan 2006) $
|
||||
* $Revision: 71 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -23,15 +23,6 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
*/
|
||||
#endregion
|
||||
|
||||
#region CVS Information
|
||||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
|
||||
* $Revision: 71 $
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
|
|||
/*
|
||||
* $Source$
|
||||
* $Author: jendave $
|
||||
* $Date: 2006-09-26 23:43:35 +0200 (ti, 26 sep 2006) $
|
||||
* $Date: 2006-09-27 06:43:35 +0900 (Wed, 27 Sep 2006) $
|
||||
* $Revision: 168 $
|
||||
*/
|
||||
#endregion
|
||||
|
|
|
@ -1,34 +1,49 @@
|
|||
#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:
|
||||
Copyright (c) 2004 - 2008
|
||||
Matthew Holmes (matthew@wildfiregames.com),
|
||||
Dan Moorehead (dan05a@gmail.com),
|
||||
Dave Hudson (jendave@yahoo.com),
|
||||
Rob Loach (http://www.robloach.net),
|
||||
C.J. Adams-Collier (cjac@colliertech.org),
|
||||
|
||||
* 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.
|
||||
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.
|
||||
|
||||
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: jendave $
|
||||
* $Date: 2007-01-26 19:31:34 +0100 (fr, 26 jan 2007) $
|
||||
* $Revision: 203 $
|
||||
* $Author: cjcollier $
|
||||
* $Date: 2008-02-08 01:31:29 +0900 (Fri, 08 Feb 2008) $
|
||||
* $Revision: 256 $
|
||||
*/
|
||||
#endregion
|
||||
|
||||
|
@ -55,11 +70,16 @@ using System.Resources;
|
|||
[assembly: AssemblyConfiguration(".NET CLR")]
|
||||
[assembly: AssemblyCompany("The Prebuild Project")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("Copyright 2004-2006 Matthew Holmes, Dan Moorehead and David Hudson")]
|
||||
[assembly: AssemblyCopyright("Copyright 2004-2008 " +
|
||||
"Matthew Holmes, " +
|
||||
"Dan Moorehead, " +
|
||||
"C.J. Adams-Collier, " +
|
||||
"Rob Loach, " +
|
||||
"David Hudson,")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en-US")]
|
||||
[assembly: AssemblyVersion("2.0.0.*")]
|
||||
[assembly: AssemblyVersion("2.0.3.*")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
|
|
|
@ -0,0 +1,790 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Autotools>
|
||||
<ProjectAutogenSh>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"
|
||||
exclude-result-prefixes="dnpb"
|
||||
>
|
||||
<xsl:template match="/"><xsl:text disable-output-escaping="yes">#!/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
|
||||
</xsl:text>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
</ProjectAutogenSh>
|
||||
|
||||
<ProjectConfigureAc>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"
|
||||
exclude-result-prefixes="dnpb"
|
||||
xml:space="preserve"
|
||||
>
|
||||
<!-- Removes the xml version header in the generated file -->
|
||||
<xsl:output method="text"/>
|
||||
<xsl:param name="solutionName" />
|
||||
<xsl:param name="projectName" />
|
||||
<xsl:param name="projectVersion" />
|
||||
<xsl:param name="assemblyName" />
|
||||
<xsl:variable name="lcProjectName"><xsl:value-of select="translate($projectName, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/></xsl:variable>
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]"
|
||||
>AC_INIT([<xsl:value-of select="$projectName" />],[<xsl:value-of select="$projectVersion" />])
|
||||
|
||||
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=<xsl:value-of select="$assemblyName" />
|
||||
PROJECT_NAME=<xsl:value-of select="$projectName" />
|
||||
PROJECT_VERSION=$VERSION
|
||||
PROJECT_DESCRIPTION="<xsl:value-of select="dnpb:Description/text()" />"
|
||||
PROJECT_TYPE="<xsl:value-of select="@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
|
||||
<xsl:text disable-output-escaping="yes">
|
||||
PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false)
|
||||
</xsl:text>
|
||||
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 <xsl:value-of select="$assemblyName" /> /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)
|
||||
<xsl:text disable-output-escaping="yes">
|
||||
PKG_CHECK_MODULES(MONODOC_DEPENDENCY, monodoc >= $MONODOC_REQUIRED_VERSION, enable_monodoc=yes, enable_monodoc=no)
|
||||
</xsl:text>
|
||||
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)
|
||||
|
||||
<xsl:if test="@type='Exe' or @type='WinExe'">AC_CONFIG_FILES(<xsl:value-of select="$lcProjectName" />)</xsl:if>
|
||||
<xsl:if test="@type='Library'">AC_CONFIG_FILES(<xsl:value-of select="$projectName" />.pc)</xsl:if>
|
||||
|
||||
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 "==="
|
||||
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
</ProjectConfigureAc>
|
||||
|
||||
<ProjectMakefileAm>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"
|
||||
exclude-result-prefixes="dnpb"
|
||||
xml:space="preserve"
|
||||
>
|
||||
<xsl:param name="projectName" />
|
||||
<xsl:param name="solutionName" />
|
||||
<xsl:param name="assemblyName" />
|
||||
<xsl:variable name="lcProjectName"><xsl:value-of select="translate($projectName, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/></xsl:variable>
|
||||
<xsl:param name="embeddedFiles" />
|
||||
<xsl:param name="compiledFiles" />
|
||||
<xsl:param name="contentFiles" />
|
||||
<xsl:param name="extraDistFiles" />
|
||||
<xsl:param name="pkgLibs" />
|
||||
<xsl:param name="binaryLibs" />
|
||||
<xsl:param name="systemLibs" />
|
||||
<xsl:param name="localCopyTargets" />
|
||||
<xsl:param name="hasAssemblyConfig" />
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:for-each select="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]">
|
||||
<xsl:variable name="lcType"><xsl:value-of select="translate(@type, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" /></xsl:variable>
|
||||
|
||||
ASSEMBLY=$(ASSEMBLY_NAME).$(ASSEMBLY_EXTENSION)
|
||||
<!--
|
||||
If the project is an application, create targets for the wrapper script
|
||||
-->
|
||||
<xsl:if test="@type='Exe' or @type='WinExe'">
|
||||
<xsl:value-of select="$lcProjectName" />dir = $(prefix)/lib/<xsl:value-of select="$lcProjectName" />
|
||||
<xsl:value-of select="$lcProjectName" />_DATA = $(ASSEMBLY)<xsl:if test="$hasAssemblyConfig='true'"> $(ASSEMBLY).config</xsl:if>
|
||||
|
||||
bin_SCRIPTS=<xsl:value-of select="$lcProjectName" />
|
||||
</xsl:if><xsl:if test="@type='Library'">
|
||||
pkgconfigdir = $(prefix)/lib/pkgconfig
|
||||
pkgconfig_DATA = <xsl:value-of select="$projectName" />.pc
|
||||
<xsl:if test="$hasAssemblyConfig='true'">
|
||||
<xsl:value-of select="translate($lcProjectName, '.', '_')" />dir = $(prefix)/lib/mono/<xsl:value-of select="$projectName" />
|
||||
<xsl:value-of select="translate($lcProjectName, '.', '_')" />_DATA = $(ASSEMBLY).config
|
||||
</xsl:if>
|
||||
noinst_DATA = $(ASSEMBLY)
|
||||
</xsl:if>
|
||||
|
||||
PACKAGES =<xsl:value-of select="$pkgLibs" />
|
||||
BINARY_LIBS =<xsl:value-of select="$binaryLibs" />
|
||||
SYSTEM_LIBS =<xsl:value-of select="$systemLibs" />
|
||||
RESOURCES_SRC =<xsl:value-of select="$embeddedFiles" />
|
||||
RESOURCES = $(RESOURCES_SRC:.resx=.resources)
|
||||
SOURCES =<xsl:value-of select="$compiledFiles" />
|
||||
|
||||
EXTRA_DIST=$(SOURCES) $(BINARY_LIBS) $(RESOURCES_SRC) install-sh missing <xsl:value-of select="$extraDistFiles" />
|
||||
|
||||
CLEANFILES=$(ASSEMBLY)
|
||||
|
||||
<xsl:value-of select="$localCopyTargets" />
|
||||
|
||||
<xsl:for-each select="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]/dnpb:Configuration">
|
||||
<xsl:variable name="outputPath"><xsl:value-of select="dnpb:Options/dnpb:OutputPath/text()" /></xsl:variable>
|
||||
<xsl:variable name="keyFile"><xsl:value-of select="dnpb:Options/dnpb:KeyFile/text()" /></xsl:variable>
|
||||
<xsl:variable name="docFile"><xsl:value-of select="dnpb:Options/dnpb:XmlDocFile/text()" /></xsl:variable>
|
||||
<xsl:value-of select="$outputPath"/>/$(ASSEMBLY): $(srcdir)/$(ASSEMBLY).response $(RESOURCES) $(SOURCES) $(BINARY_LIBS) <xsl:call-template name="substring-after-last-mod"><xsl:with-param name="input" select="$keyFile" /><xsl:with-param name="substr" select="'/'" /></xsl:call-template>
|
||||
<xsl:if test="$docFile!=''">mkdir -p doc <xsl:text disable-output-escaping="yes">&&</xsl:text> </xsl:if>mkdir -p <xsl:value-of select="$outputPath" /> <xsl:text disable-output-escaping="yes">&&</xsl:text> $(CSC) /out:$@ \
|
||||
/target:<xsl:value-of select="$lcType" /> \<xsl:if test="$embeddedFiles!=''">
|
||||
$(addprefix /resource:$(srcdir)/, $(RESOURCES)) \</xsl:if><xsl:if test="$pkgLibs!=''">
|
||||
$(addprefix /pkg:, $(PACKAGES)) \</xsl:if><xsl:if test="$systemLibs!=''">
|
||||
$(addprefix /r:, $(SYSTEM_LIBS)) \</xsl:if><xsl:if test="$binaryLibs!=''">
|
||||
$(addprefix /r:$(srcdir)/, $(BINARY_LIBS)) \</xsl:if>
|
||||
@$(srcdir)/$(ASSEMBLY).response \<xsl:if test="$docFile!=''">
|
||||
/doc:doc/<xsl:value-of select="$docFile" /> \</xsl:if><xsl:if test="$keyFile!=''">
|
||||
/keyfile:$(srcdir)/<xsl:call-template name="substring-after-last-mod"><xsl:with-param name="input" select="$keyFile" /><xsl:with-param name="substr" select="'/'" /></xsl:call-template> \</xsl:if><xsl:if test="dnpb:Options/dnpb:AllowUnsafe/text()='true'">
|
||||
/unsafe \</xsl:if><xsl:text disable-output-escaping="yes">
|
||||
&& rm -f $(ASSEMBLY) \
|
||||
&& ln $@ $(ASSEMBLY)</xsl:text>
|
||||
|
||||
CLEANFILES+=<xsl:value-of select="$outputPath"/>/$(ASSEMBLY)
|
||||
|
||||
<!-- if this project config has a KeyFile -->
|
||||
<xsl:if test="$keyFile!=''">EXTRA_DIST+=<xsl:call-template name="substring-after-last-mod"><xsl:with-param name="input" select="$keyFile" /><xsl:with-param name="substr" select="'/'" /></xsl:call-template></xsl:if>
|
||||
|
||||
<xsl:value-of select="@name" />: <xsl:value-of select="$outputPath"/>/$(ASSEMBLY)<xsl:text disable-output-escaping="yes">
|
||||
rm -f $(ASSEMBLY) \
|
||||
&&</xsl:text> ln <xsl:value-of select="$outputPath"/>/$(ASSEMBLY) $(ASSEMBLY)
|
||||
<!-- If the project is a library, create library-specific targets -->
|
||||
<xsl:if test="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]/@type='Library'">
|
||||
<xsl:choose>
|
||||
<!--
|
||||
If the project has a keyfile, make a gac install/uninstall target
|
||||
-->
|
||||
<xsl:when test="dnpb:Options/dnpb:KeyFile/text()!=''">
|
||||
<xsl:value-of select="@name" />_install-data-local: <xsl:value-of select="$outputPath"/>/$(ASSEMBLY)
|
||||
echo "$(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS)"; \
|
||||
$(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) || exit 1;
|
||||
|
||||
<xsl:value-of select="@name" />_uninstall-local:
|
||||
if [`gacutil -l <xsl:value-of select="$projectName" /> | 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
|
||||
</xsl:when>
|
||||
<!--
|
||||
If there is no keyfile for the project, define a filesystem
|
||||
install target
|
||||
-->
|
||||
<xsl:otherwise>
|
||||
noinst_<xsl:value-of select="@name" />_<xsl:value-of select="translate($lcProjectName, '.', '_')" />dir = $(prefix)/lib/mono/<xsl:value-of select="$projectName" />
|
||||
noinst_<xsl:value-of select="@name" />_<xsl:value-of select="translate($lcProjectName, '.', '_')" />_DATA = <xsl:value-of select="$outputPath"/>/$(ASSEMBLY)
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
|
||||
<xsl:variable name="defaultConfig"><xsl:value-of select="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]/dnpb:Configuration/@name" /></xsl:variable>
|
||||
$(ASSEMBLY): <xsl:value-of select="$defaultConfig" />
|
||||
|
||||
<xsl:text disable-output-escaping="yes">
|
||||
$(srcdir)/$(ASSEMBLY).response: $(srcdir)/Makefile
|
||||
echo "$(addprefix $(srcdir)/, $(SOURCES))" > $@
|
||||
</xsl:text>
|
||||
|
||||
all: $(ASSEMBLY)
|
||||
|
||||
# rule to compile .resx files to .resources
|
||||
%.resources: %.resx
|
||||
$(RESGEN) /useSourcePath /compile $(@:.resources=.resx)
|
||||
|
||||
<xsl:if test="@type='Library'">
|
||||
<!-- if the default config has a KeyFile -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]/dnpb:Configuration[@name=$defaultConfig]/dnpb:Options/dnpb:KeyFile/text()!=''">
|
||||
install-data-local: <xsl:value-of select="$defaultConfig" />_install-data-local
|
||||
|
||||
uninstall-local: <xsl:value-of select="$defaultConfig" />_uninstall-local
|
||||
</xsl:when>
|
||||
<!--
|
||||
If the default config does not have a KeyFile, don't really do
|
||||
anything
|
||||
-->
|
||||
<xsl:otherwise>
|
||||
#<xsl:value-of select="translate($lcProjectName, '.', '_')" />dir+=$(noinst_<xsl:value-of select="$defaultConfig" />_<xsl:value-of select="translate($lcProjectName, '.', '_')" />dir)
|
||||
#<xsl:value-of select="translate($lcProjectName, '.', '_')" />_DATA+=$(noinst_<xsl:value-of select="$defaultConfig" />_<xsl:value-of select="translate($lcProjectName, '.', '_')" />_DATA)
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="substring-after-last" xml:space="default">
|
||||
<xsl:param name="input" />
|
||||
<xsl:param name="substr" />
|
||||
|
||||
<!-- Extract the string which comes after the first occurence -->
|
||||
<xsl:variable name="temp" select="substring-after($input,$substr)" />
|
||||
|
||||
<xsl:choose>
|
||||
<!-- If it still contains the search string then recursively process -->
|
||||
<xsl:when test="$substr and contains($temp,$substr)">
|
||||
<xsl:call-template name="substring-after-last">
|
||||
<xsl:with-param name="input" select="$temp" />
|
||||
<xsl:with-param name="substr" select="$substr" />
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$temp" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="substring-after-last-mod" xml:space="default">
|
||||
<xsl:param name="input" />
|
||||
<xsl:param name="substr" />
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($input,$substr)">
|
||||
<xsl:call-template name="substring-after-last">
|
||||
<xsl:with-param name="input" select="$input" />
|
||||
<xsl:with-param name="substr" select="$substr" />
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$input" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
</ProjectMakefileAm>
|
||||
|
||||
<ProjectPcIn>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"
|
||||
exclude-result-prefixes="dnpb"
|
||||
xml:space="preserve"
|
||||
>
|
||||
<!-- Removes the xml version header in the generated file -->
|
||||
<xsl:output method="text"/>
|
||||
<xsl:param name="projectName" />
|
||||
<xsl:param name="solutionName" />
|
||||
<xsl:variable name="lcProjectName"><xsl:value-of select="translate($projectName, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/></xsl:variable>
|
||||
<xsl:template match="/"><xsl:for-each select="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]">prefix=@prefix@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib/mono/@PROJECT_NAME@
|
||||
|
||||
Name: <xsl:value-of select="@name" />
|
||||
Description: <xsl:value-of select="Description/text()" />
|
||||
Version: @PROJECT_VERSION@
|
||||
Requires:<xsl:for-each select="Reference"><xsl:if test="@localCopy=false"><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@name" /></xsl:if></xsl:for-each>
|
||||
Libs: -r:${libdir}/@PROJECT_NAME@.dll
|
||||
|
||||
</xsl:for-each>
|
||||
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
</ProjectPcIn>
|
||||
|
||||
<SolutionAutogenSh>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"
|
||||
exclude-result-prefixes="dnpb"
|
||||
>
|
||||
<xsl:param name="solutionName" />
|
||||
<xsl:template match="/"><xsl:text disable-output-escaping="yes">#!/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; }
|
||||
</xsl:text>
|
||||
<xsl:for-each select="/dnpb:Prebuild/dnpb:Solution[@name=$solutionName]/dnpb:Project">
|
||||
echo Running <xsl:value-of select="@name" />/autogen.sh ...
|
||||
(cd $srcdir/<xsl:value-of select="@name" /> ; NOCONFIGURE=1 /bin/sh ./autogen.sh "$@")
|
||||
echo Done running <xsl:value-of select="@name" />/autogen.sh ...
|
||||
</xsl:for-each>
|
||||
<xsl:text disable-output-escaping="yes">
|
||||
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
|
||||
</xsl:text>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
</SolutionAutogenSh>
|
||||
|
||||
<SolutionConfigureAc>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"
|
||||
exclude-result-prefixes="dnpb"
|
||||
xml:space="preserve"
|
||||
>
|
||||
<!-- Removes the xml version header in the generated file -->
|
||||
<xsl:output method="text"/>
|
||||
<xsl:param name="solutionName" />
|
||||
<xsl:template match="/"
|
||||
>AC_INIT([<xsl:value-of select="$solutionName" />]-solution,[<xsl:value-of select="/dnpb:Prebuild/dnpb:Solution[@name=$solutionName]/@version" />])
|
||||
AC_CONFIG_AUX_DIR(.)
|
||||
AM_INIT_AUTOMAKE([1.9 tar-ustar foreign])
|
||||
EXTRA_DIST="install-sh missing"
|
||||
SOLUTION_NAME=<xsl:value-of select="$solutionName" />
|
||||
SOLUTION_VERSION=$VERSION
|
||||
SOLUTION_DESCRIPTION="<xsl:value-of select="/dnpb:Prebuild/dnpb:Solution[@name=$solutionName]/dnpb: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)
|
||||
<!-- TODO: Ensure that these SUBDIRS are processed in dependency order -->
|
||||
AC_CONFIG_SUBDIRS(<xsl:for-each select="/dnpb:Prebuild/dnpb:Solution[@name=$solutionName]/dnpb:Project"><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@name" />
|
||||
</xsl:for-each>)
|
||||
<xsl:text disable-output-escaping="yes">
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
])
|
||||
|
||||
echo "==="
|
||||
echo ""
|
||||
echo "Solution configuration summary"
|
||||
echo ""
|
||||
echo " * Solution Name: $SOLUTION_NAME"
|
||||
echo " * Version: $SOLUTION_VERSION"
|
||||
echo " * Packages:"</xsl:text>
|
||||
<xsl:for-each select="/dnpb:Prebuild/dnpb:Solution[@name=$solutionName]/dnpb:Project">echo " - <xsl:value-of select="@name" />"
|
||||
</xsl:for-each><xsl:text disable-output-escaping="yes">echo ""
|
||||
echo "==="
|
||||
</xsl:text>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
</SolutionConfigureAc>
|
||||
|
||||
<SolutionMakefileAm>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"
|
||||
exclude-result-prefixes="dnpb"
|
||||
xml:space="preserve"
|
||||
>
|
||||
<xsl:param name="solutionName" />
|
||||
<xsl:template match="/">SUBDIRS =<xsl:for-each select="//dnpb:Solution[@name=$solutionName]/dnpb:Project"><xsl:text disable-output-escaping="yes"> </xsl:text><xsl:value-of select="@name" /></xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
</SolutionMakefileAm>
|
||||
<ProjectWrapperScriptIn>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:dnpb="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"
|
||||
exclude-result-prefixes="dnpb"
|
||||
xml:space="preserve"
|
||||
>
|
||||
<!-- Removes the xml version header in the generated file -->
|
||||
<xsl:output method="text"/>
|
||||
<xsl:param name="projectName" />
|
||||
<xsl:param name="assemblyName" />
|
||||
<xsl:param name="solutionName" />
|
||||
<xsl:param name="monoPath" />
|
||||
<xsl:variable name="lcProjectName"><xsl:value-of select="translate($projectName, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/></xsl:variable>
|
||||
<xsl:template match="/"><xsl:for-each select="//dnpb:Solution[@name=$solutionName]/dnpb:Project[@name=$projectName]">#! /bin/sh
|
||||
|
||||
PACKAGE=<xsl:value-of select="$assemblyName" />
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
|
||||
# %%$@%$# why oh why isn't it $sharedir/<xsl:value-of select="$lcProjectName" />
|
||||
# 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/<xsl:value-of select="$lcProjectName" />
|
||||
export MONO_PATH=$MONO_PATH<xsl:value-of select="$monoPath" />
|
||||
|
||||
exec @RUNTIME@ $packagedir/$PACKAGE.exe "$@"
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
</ProjectWrapperScriptIn>
|
||||
</Autotools>
|
|
@ -1,14 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"
|
||||
xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd">
|
||||
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com), David Hudson (jendave at yahoo dot com)
|
||||
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 and
|
||||
2003, SharpDevelop, MonoDevelop, and NAnt.
|
||||
IDE's and .NET development tools including: Visual Studio .NET 2002,
|
||||
2003, and 2005, SharpDevelop, MonoDevelop, NAnt, Xcode and the GNU Autotools.
|
||||
|
||||
BSD License:
|
||||
|
||||
|
@ -60,6 +63,8 @@
|
|||
<xs:element name="Project">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Author" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xs:element name="Description" type="xs:string" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xs:element name="Reference" minOccurs="0" maxOccurs="unbounded">
|
||||
|
@ -67,7 +72,7 @@
|
|||
<xs:attribute name="name" type="xs:string" use="required" />
|
||||
<xs:attribute name="path" type="xs:string" />
|
||||
<xs:attribute name="localCopy" type="xs:boolean" />
|
||||
<xs:attribute name="version" type="xs:string" default="1.0.0"/>
|
||||
<xs:attribute name="version" type="xs:string" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element ref="Files" />
|
||||
|
@ -77,6 +82,8 @@
|
|||
<xs:attribute name="filterGroups" type="xs:string" default="" />
|
||||
<xs:attribute name="path" type="xs:string" default="" />
|
||||
<xs:attribute name="icon" type="xs:string" default="" />
|
||||
<xs:attribute name="configFile" type="xs:string" default="" />
|
||||
<xs:attribute name="version" type="xs:string" default="1.0.0" />
|
||||
<xs:attribute name="language" default="C#">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
|
@ -205,6 +212,8 @@
|
|||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="preservePath" type="xs:boolean" />
|
||||
<xs:attribute name="linkPath" type="xs:string" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
|
@ -251,11 +260,14 @@
|
|||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="preservePath" type="xs:boolean" />
|
||||
<xs:attribute name="linkPath" type="xs:string" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="Exclude">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" use="required" />
|
||||
<xs:attribute name="name" type="xs:string" />
|
||||
<xs:attribute name="pattern" type="xs:string" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
|
|
BIN
bin/Prebuild.exe
BIN
bin/Prebuild.exe
Binary file not shown.
Loading…
Reference in New Issue