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
Jeff Ames 2008-03-17 20:55:21 +00:00
parent 9122762dc8
commit 79209c4297
61 changed files with 5564 additions and 1253 deletions

7
Prebuild/AUTHORS Normal file
View File

@ -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)

65
Prebuild/COPYING Normal file
View File

@ -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.

374
Prebuild/ChangeLog Normal file
View File

@ -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

236
Prebuild/INSTALL Normal file
View File

@ -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.

200
Prebuild/NEWS Normal file
View File

@ -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

View File

@ -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. 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 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. Prebuild can be either be run from the command line to generate the
The Prebuild file 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 2005 (VS2005.bat)
Visual Studio .NET 2003 (VS2003.bat) Visual Studio .NET 2003 (VS2003.bat)
@ -18,70 +20,102 @@ SharpDevelop (SharpDevelop.bat) - http://www.icsharpcode.net/OpenSource/SD/
SharpDevelop2 (SharpDevelop.bat) - http://www.icsharpcode.net/OpenSource/SD/ SharpDevelop2 (SharpDevelop.bat) - http://www.icsharpcode.net/OpenSource/SD/
MonoDevelop (MonoDevelop.sh) - http://www.monodevelop.com/ MonoDevelop (MonoDevelop.sh) - http://www.monodevelop.com/
NAnt (nant.sh and nant.bat) - http://nant.sourceforge.net/ 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: 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. Makefiles are not currently supported.
_________________________________________________________________________________ _______________________________________________________________________________
Command Line Syntax: Command Line Syntax:
Example: Example:
>Prebuild /target vs2003 > 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. The syntax structure is as below, where commandParameter is optional
Note: The '>' signified the command line, do not actually enter this manually depending on the command and you can provide several option-value
pairs.
>Prebuild /<option> <commandParameter> Note: The '> ' signifies the command prompt, do not enter this literally
>Prebuild /target vs2003 /pause > Prebuild /<option> <commandParameter>
>Prebuild /target vs2003 /log ../Log.txt /pause /ppo /file ProjectConfig.xml > Prebuild /target vs2003 /pause
>Prebuild /target sharpdev /log > Prebuild /target vs2003 /log ../Log.txt /pause /ppo /file ProjectConfig.xml
>Prebuild /removedir obj|bin > Prebuild /target sharpdev /log
>Prebuild /target vs2003 /allowedgroups Group1|Group2 > Prebuild /removedir obj|bin
>Prebuild /clean > Prebuild /target vs2003 /allowedgroups Group1|Group2
>Prebuild /clean /yes > Prebuild /clean
>Prebuild /clean vs2003 > Prebuild /clean /yes
_________________________________________________________________________________ > Prebuild /clean vs2003
_______________________________________________________________________________
Command Line Options: 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. /pause - Shows the console until you press a key so that you can view
This allows you to check if an errors occurred and - if so - what it was. 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). /yes - Answer yes to any warnings (e.g. when cleaning all projects).
_________________________________________________________________________________ _______________________________________________________________________________
Example Batch Files and Shell Scripts Example Batch Files and Shell Scripts
NOTE: Common batch and shell script files are included with Prebuild source and file releases. NOTE: Common batch and shell script files are included with Prebuild source and file releases.
@ -89,9 +123,12 @@ ______________________________
MonoDevelop MonoDevelop
#!/bin/sh #!/bin/sh
# Generates a combine (.cmbx) and a set of project files (.prjx) # 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 sharpdev /pause # for MonoDevelop, a Mono port of SharpDevelop
# (http://icsharpcode.net/OpenSource/SD/Default.aspx)
./Prebuild /target monodev /pause
______________________________ ______________________________
Visual Studio .NET 2003 Visual Studio .NET 2003
@ -104,13 +141,20 @@ Notes:
Text after lines that start with @rem are comments and are not evaluated 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. You can also place pause on the last line instead of specifing the /pause command.
________________________________________________________________________________ _______________________________________________________________________________
Example XML Configuration File Example XML Configuration File
Note: 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. XML Comments (<!-- Comment -->) are used to markup the prebuild.xml
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. 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.
_________________________________ _________________________________

18
Prebuild/THANKS Normal file
View File

@ -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)

View File

@ -1,21 +1,43 @@
* monodev target should be able to detect whether the project is 1.x * monodev target should be able to detect whether the project is 1.x
or 2.x runtime 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 * Fix the autotools target so that
sub generate_project_files { ... }
if(numProjects == 1){ sub generate_solution_files { ... }
for($projectDir){ sub generate_multi_solution_files { ... }
generate_a_project_configure_dot_ac() sub generate_project {
...
generate_project_files();
}
sub generate_solution {
foreach $project ( @projects ){
mkdir "$project/";
pushd "$project/";
generate_project();
popd;
} }
}else{ generate_solution_files();
generate_a_solution_configure_dot_ac() }
sub generate_multi_solution {
foreach($project in $projectsList){ foreach $solution ( @solutions ){
mkdir $project/ mkdir "$solution/";
cd $project/ pushd "$solution/";
generate_a_project_configure_dot_ac generate_solution();
popd;
} }
generate_multi_solution_files();
}
if(numProjects == 1){
generate_project();
}elsif(numSolutions == 1){
generate_solution();
}else{
generate_multi_solution();
} }

1
Prebuild/clean.bat Executable file
View File

@ -0,0 +1 @@
NAnt.exe clean

1
Prebuild/clean.sh Executable file
View File

@ -0,0 +1 @@
nant clean

73
Prebuild/prebuild.xml Normal file
View File

@ -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>

4
Prebuild/scripts/Clean.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
./prebuild /clean /removedir obj /file ../prebuild.xml /pause
rm -rf ../Makefile

View File

@ -1,2 +1,5 @@
#!/bin/sh #!/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

4
Prebuild/scripts/makefile.bat Executable file
View File

@ -0,0 +1,4 @@
@rem Generates makefiles
@rem for make
cd ..
Prebuild.exe /target makefile /file prebuild.xml /pause

10
Prebuild/scripts/makefile.sh Executable file
View File

@ -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

4
Prebuild/scripts/xcode.bat Executable file
View File

@ -0,0 +1,4 @@
@rem Generates a Xcode files
@rem for NAnt
cd ..
Prebuild.exe /target xcode /file prebuild.xml /pause

2
Prebuild/scripts/xcode.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
prebuild /target xcode /file ../prebuild.xml /pause

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 71 $
*/ */
#endregion #endregion

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 71 $
*/ */
#endregion #endregion

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 71 $
*/ */
#endregion #endregion

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 71 $
*/ */
#endregion #endregion

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 71 $
*/ */
#endregion #endregion

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 71 $
*/ */
#endregion #endregion

View File

@ -1,34 +1,47 @@
#region BSD License #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 Redistribution and use in source and binary forms, with or without
provided that the following conditions are met: modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright notice, this list of conditions * Redistributions of source code must retain the above copyright
and the following disclaimer. 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 * Redistributions in binary form must reproduce the above copyright
distribution. notice, this list of conditions and the following disclaimer in the
* The name of the author may not be used to endorse or promote products derived from this software documentation and/or other materials provided with the distribution.
without specific prior written permission.
* 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 #endregion
#region CVS Information #region CVS Information
/* /*
* $Source$ * $Source$
* $Author: robloach $ * $Author: cjcollier $
* $Date: 2006-09-26 00:30:53 +0200 (ti, 26 sep 2006) $ * $Date: 2008-02-08 01:31:29 +0900 (Fri, 08 Feb 2008) $
* $Revision: 165 $ * $Revision: 256 $
*/ */
#endregion #endregion
@ -91,6 +104,7 @@ namespace Prebuild.Core
string m_Clean; string m_Clean;
string[] m_RemoveDirectories; string[] m_RemoveDirectories;
string m_CurrentFile; string m_CurrentFile;
XmlDocument m_CurrentDoc;
bool m_PauseAfterFinish; bool m_PauseAfterFinish;
string[] m_ProjectGroups; string[] m_ProjectGroups;
StringCollection m_Refs; StringCollection m_Refs;
@ -203,6 +217,19 @@ namespace Prebuild.Core
return m_Solutions; return m_Solutions;
} }
} }
/// <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 #endregion
@ -304,10 +331,16 @@ namespace Prebuild.Core
private void LogBanner() private void LogBanner()
{ {
m_Log.Write("Prebuild v" + this.Version); 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("See 'prebuild /usage' for help"); m_Log.Write("Matthew Holmes (matthew@wildfiregames.com),");
m_Log.Write(); 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();
} }
private void ProcessFile(string file) private void ProcessFile(string file)
@ -330,7 +363,6 @@ namespace Prebuild.Core
m_CurrentFile = path; m_CurrentFile = path;
Helper.SetCurrentDir(Path.GetDirectoryName(path)); Helper.SetCurrentDir(Path.GetDirectoryName(path));
XmlTextReader reader = new XmlTextReader(path); XmlTextReader reader = new XmlTextReader(path);
@ -348,7 +380,7 @@ namespace Prebuild.Core
string xml = pre.Process(reader);//remove script and evaulate pre-proccessing to get schema-conforming XML 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 try
{ {
XmlValidatingReader validator = new XmlValidatingReader(new XmlTextReader(new StringReader(xml))); XmlValidatingReader validator = new XmlValidatingReader(new XmlTextReader(new StringReader(xml)));
@ -358,7 +390,7 @@ namespace Prebuild.Core
{ {
validator.Schemas.Add(schema); validator.Schemas.Add(schema);
} }
doc.Load(validator); m_CurrentDoc.Load(validator);
} }
catch(XmlException e) catch(XmlException e)
{ {
@ -394,7 +426,7 @@ namespace Prebuild.Core
return; return;
} }
//start reading the xml config file //start reading the xml config file
XmlElement rootNode = doc.DocumentElement; XmlElement rootNode = m_CurrentDoc.DocumentElement;
//string suggestedVersion = Helper.AttributeValue(rootNode,"version","1.0"); //string suggestedVersion = Helper.AttributeValue(rootNode,"version","1.0");
Helper.CheckForOSVariables = Helper.ParseBoolean(rootNode,"checkOsVars",false); Helper.CheckForOSVariables = Helper.ParseBoolean(rootNode,"checkOsVars",false);
@ -681,17 +713,21 @@ namespace Prebuild.Core
} }
else else
{ {
ITarget targ = (ITarget)m_Targets[target]; if (!m_Targets.Contains(target)) {
m_Log.Write(LogType.Error, "Unknown Target \"{0}\"", target);
return;
}
ITarget targ = (ITarget)m_Targets[target];
if(clean) if(clean)
{ {
targ.Clean(this); targ.Clean(this);
} }
else else
{ {
targ.Write(this); targ.Write(this);
} }
} }
m_Log.Flush(); m_Log.Flush();
} }
@ -755,4 +791,4 @@ namespace Prebuild.Core
#endregion #endregion
} }
} }

View File

@ -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
}
}

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 71 $
*/ */
#endregion #endregion
@ -183,5 +183,5 @@ namespace Prebuild.Core.Nodes
} }
#endregion #endregion
} }
} }

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 71 $
*/ */
#endregion #endregion

View File

@ -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
}
}

View File

@ -26,9 +26,9 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
#region CVS Information #region CVS Information
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $Author: borrillis $
* $Date: 2006-01-31 16:35:39 +0100 (ti, 31 jan 2006) $ * $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $
* $Revision: 74 $ * $Revision: 243 $
*/ */
#endregion #endregion
@ -49,7 +49,7 @@ namespace Prebuild.Core.Nodes
{ {
#region Fields #region Fields
private string m_Name = "unknown"; private string m_Pattern = "";
#endregion #endregion
@ -63,11 +63,23 @@ namespace Prebuild.Core.Nodes
{ {
get get
{ {
return m_Name; return m_Pattern;
} }
} }
#endregion /// <summary>
/// Gets the pattern.
/// </summary>
/// <value>The pattern.</value>
public string Pattern
{
get
{
return m_Pattern;
}
}
#endregion
#region Public Methods #region Public Methods
@ -77,7 +89,8 @@ namespace Prebuild.Core.Nodes
/// <param name="node">The node.</param> /// <param name="node">The node.</param>
public override void Parse(XmlNode node) 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 #endregion

View File

@ -26,9 +26,9 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
#region CVS Information #region CVS Information
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $Author: borrillis $
* $Date: 2007-01-08 17:55:40 +0100 (må, 08 jan 2007) $ * $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $
* $Revision: 197 $ * $Revision: 243 $
*/ */
#endregion #endregion
@ -118,6 +118,8 @@ namespace Prebuild.Core.Nodes
private SubType m_SubType = SubType.Code; private SubType m_SubType = SubType.Code;
private CopyToOutput m_CopyToOutput = CopyToOutput.Never; private CopyToOutput m_CopyToOutput = CopyToOutput.Never;
private bool m_Link = false; private bool m_Link = false;
private string m_LinkPath = string.Empty;
private bool m_PreservePath = false;
#endregion #endregion
@ -173,6 +175,13 @@ namespace Prebuild.Core.Nodes
} }
} }
public string LinkPath
{
get
{
return this.m_LinkPath;
}
}
/// <summary> /// <summary>
/// ///
/// </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 #endregion
#region Public Methods #region Public Methods
@ -211,7 +233,12 @@ namespace Prebuild.Core.Nodes
Helper.AttributeValue(node, "subType", m_SubType.ToString())); Helper.AttributeValue(node, "subType", m_SubType.ToString()));
m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString()); m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString());
this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); 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_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 ) if( node == null )
{ {

View File

@ -26,9 +26,9 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
#region CVS Information #region CVS Information
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $Author: borrillis $
* $Date: 2006-09-20 09:42:51 +0200 (on, 20 sep 2006) $ * $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $
* $Revision: 164 $ * $Revision: 243 $
*/ */
#endregion #endregion
@ -56,7 +56,8 @@ namespace Prebuild.Core.Nodes
private Hashtable m_ResourceNames; private Hashtable m_ResourceNames;
private Hashtable m_CopyToOutputs; private Hashtable m_CopyToOutputs;
private Hashtable m_Links; private Hashtable m_Links;
private Hashtable m_LinkPaths;
private Hashtable m_PreservePaths;
#endregion #endregion
@ -73,7 +74,9 @@ namespace Prebuild.Core.Nodes
m_ResourceNames = new Hashtable(); m_ResourceNames = new Hashtable();
m_CopyToOutputs = new Hashtable(); m_CopyToOutputs = new Hashtable();
m_Links = new Hashtable(); m_Links = new Hashtable();
} m_LinkPaths = new Hashtable();
m_PreservePaths = new Hashtable();
}
#endregion #endregion
@ -127,6 +130,15 @@ namespace Prebuild.Core.Nodes
return (bool) this.m_Links[file]; 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>
/// ///
/// </summary> /// </summary>
@ -157,6 +169,21 @@ namespace Prebuild.Core.Nodes
return (string)m_ResourceNames[file]; 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>
/// ///
/// </summary> /// </summary>
@ -181,8 +208,10 @@ namespace Prebuild.Core.Nodes
m_BuildActions[fileNode.Path] = fileNode.BuildAction; m_BuildActions[fileNode.Path] = fileNode.BuildAction;
m_SubTypes[fileNode.Path] = fileNode.SubType; m_SubTypes[fileNode.Path] = fileNode.SubType;
m_ResourceNames[fileNode.Path] = fileNode.ResourceName; m_ResourceNames[fileNode.Path] = fileNode.ResourceName;
this.m_Links[fileNode.Path] = fileNode.IsLink; this.m_PreservePaths[ fileNode.Path ] = fileNode.PreservePath;
this.m_CopyToOutputs[fileNode.Path] = fileNode.CopyToOutput; 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) foreach(string file in ((MatchNode)dataNode).Files)
{ {
MatchNode matchNode = (MatchNode)dataNode;
if (!m_Files.Contains(file)) if (!m_Files.Contains(file))
{ {
m_Files.Add(file); m_Files.Add(file);
m_BuildActions[file] = ((MatchNode)dataNode).BuildAction; m_BuildActions[ file ] = matchNode.BuildAction;
m_SubTypes[file] = ((MatchNode)dataNode).SubType; m_SubTypes[ file ] = matchNode.SubType;
m_ResourceNames[file] = ((MatchNode)dataNode).ResourceName; m_ResourceNames[ file ] = matchNode.ResourceName;
this.m_Links[file] = ((MatchNode) dataNode).IsLink; this.m_PreservePaths[ file ] = matchNode.PreservePath;
this.m_CopyToOutputs[file] = ((MatchNode) dataNode).CopyToOutput; this.m_Links[ file ] = matchNode.IsLink;
this.m_LinkPaths[ file ] = matchNode.LinkPath;
this.m_CopyToOutputs[ file ] = matchNode.CopyToOutput;
} }
} }

View File

@ -26,9 +26,9 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
#region CVS Information #region CVS Information
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $Author: borrillis $
* $Date: 2006-09-20 09:42:51 +0200 (on, 20 sep 2006) $ * $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $
* $Revision: 164 $ * $Revision: 243 $
*/ */
#endregion #endregion
@ -41,6 +41,7 @@ using System.Xml;
using Prebuild.Core.Attributes; using Prebuild.Core.Attributes;
using Prebuild.Core.Interfaces; using Prebuild.Core.Interfaces;
using Prebuild.Core.Utilities; using Prebuild.Core.Utilities;
using System.Collections;
namespace Prebuild.Core.Nodes namespace Prebuild.Core.Nodes
{ {
@ -59,7 +60,9 @@ namespace Prebuild.Core.Nodes
string m_ResourceName = ""; string m_ResourceName = "";
private CopyToOutput m_CopyToOutput; private CopyToOutput m_CopyToOutput;
private bool m_Link; private bool m_Link;
private string m_LinkPath;
private bool m_PreservePath;
private ArrayList m_Exclusions;
#endregion #endregion
@ -71,6 +74,7 @@ namespace Prebuild.Core.Nodes
public MatchNode() public MatchNode()
{ {
m_Files = new StringCollection(); m_Files = new StringCollection();
m_Exclusions = new ArrayList();
} }
#endregion #endregion
@ -126,6 +130,13 @@ namespace Prebuild.Core.Nodes
} }
} }
public string LinkPath
{
get
{
return this.m_LinkPath;
}
}
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
@ -137,6 +148,13 @@ namespace Prebuild.Core.Nodes
} }
} }
public bool PreservePath
{
get
{
return m_PreservePath;
}
}
#endregion #endregion
@ -149,8 +167,10 @@ namespace Prebuild.Core.Nodes
/// <param name="pattern">The pattern.</param> /// <param name="pattern">The pattern.</param>
/// <param name="recurse">if set to <c>true</c> [recurse].</param> /// <param name="recurse">if set to <c>true</c> [recurse].</param>
/// <param name="useRegex">if set to <c>true</c> [use regex].</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 try
{ {
string[] files; string[] files;
@ -163,6 +183,7 @@ namespace Prebuild.Core.Nodes
string fileTemp; string fileTemp;
foreach (string file in files) foreach (string file in files)
{ {
excludeFile = false;
if (file.Substring(0,2) == "./" || file.Substring(0,2) == ".\\") if (file.Substring(0,2) == "./" || file.Substring(0,2) == ".\\")
{ {
fileTemp = file.Substring(2); fileTemp = file.Substring(2);
@ -171,8 +192,20 @@ namespace Prebuild.Core.Nodes
{ {
fileTemp = file; fileTemp = file;
} }
m_Files.Add(fileTemp); // 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 else
@ -182,14 +215,26 @@ namespace Prebuild.Core.Nodes
} }
else else
{ {
Match match;
files = Directory.GetFiles(path); files = Directory.GetFiles(path);
foreach(string file in files) foreach(string file in files)
{ {
excludeFile = false;
match = m_Regex.Match(file); match = m_Regex.Match(file);
if(match.Success) if(match.Success)
{ {
m_Files.Add(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( file );
}
} }
} }
} }
@ -201,7 +246,7 @@ namespace Prebuild.Core.Nodes
{ {
foreach(string str in dirs) 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()); 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_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)); 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) 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); throw new WarningException("Could not compile regex pattern: {0}", ex.Message);
} }
RecurseDirectories(path, pattern, recurse, useRegex);
foreach(XmlNode child in node.ChildNodes) foreach(XmlNode child in node.ChildNodes)
{ {
@ -280,13 +329,12 @@ namespace Prebuild.Core.Nodes
if(dataNode is ExcludeNode) if(dataNode is ExcludeNode)
{ {
ExcludeNode excludeNode = (ExcludeNode)dataNode; ExcludeNode excludeNode = (ExcludeNode)dataNode;
if (m_Files.Contains(Helper.NormalizePath(excludeNode.Name))) m_Exclusions.Add( dataNode );
{
m_Files.Remove(Helper.NormalizePath(excludeNode.Name));
}
} }
} }
RecurseDirectories( path, pattern, recurse, useRegex, m_Exclusions );
if(m_Files.Count < 1) if(m_Files.Count < 1)
{ {
throw new WarningException("Match returned no files: {0}{1}", Helper.EndPath(path), pattern); throw new WarningException("Match returned no files: {0}{1}", Helper.EndPath(path), pattern);

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 197 $
*/ */
#endregion #endregion

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 71 $
*/ */
#endregion #endregion

View File

@ -27,8 +27,8 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $Author: jendave $
* $Date: 2006-11-11 05:43:20 +0100 (lö, 11 nov 2006) $ * $Date: 2007-05-26 06:58:26 +0900 (Sat, 26 May 2007) $
* $Revision: 192 $ * $Revision: 244 $
*/ */
#endregion #endregion
@ -44,20 +44,20 @@ using Prebuild.Core.Utilities;
namespace Prebuild.Core.Nodes namespace Prebuild.Core.Nodes
{ {
/// <summary> /// <summary>
/// /// A set of values that the Project's type can be
/// </summary> /// </summary>
public enum ProjectType public enum ProjectType
{ {
/// <summary> /// <summary>
/// /// The project is a console executable
/// </summary> /// </summary>
Exe, Exe,
/// <summary> /// <summary>
/// /// The project is a windows executable
/// </summary> /// </summary>
WinExe, WinExe,
/// <summary> /// <summary>
/// /// The project is a library
/// </summary> /// </summary>
Library Library
} }
@ -78,7 +78,7 @@ namespace Prebuild.Core.Nodes
} }
/// <summary> /// <summary>
/// /// The Node object representing /Prebuild/Solution/Project elements
/// </summary> /// </summary>
[DataNode("Project")] [DataNode("Project")]
public class ProjectNode : DataNode, IComparable public class ProjectNode : DataNode, IComparable
@ -90,6 +90,7 @@ namespace Prebuild.Core.Nodes
private string m_FullPath = ""; private string m_FullPath = "";
private string m_AssemblyName; private string m_AssemblyName;
private string m_AppIcon = ""; private string m_AppIcon = "";
private string m_ConfigFile = "";
private string m_DesignerFolder = ""; private string m_DesignerFolder = "";
private string m_Language = "C#"; private string m_Language = "C#";
private ProjectType m_Type = ProjectType.Exe; private ProjectType m_Type = ProjectType.Exe;
@ -97,11 +98,13 @@ namespace Prebuild.Core.Nodes
private string m_StartupObject = ""; private string m_StartupObject = "";
private string m_RootNamespace; private string m_RootNamespace;
private string m_FilterGroups = ""; private string m_FilterGroups = "";
private string m_Version = "";
private Guid m_Guid; private Guid m_Guid;
private Hashtable m_Configurations; private Hashtable m_Configurations;
private ArrayList m_ReferencePaths; private ArrayList m_ReferencePaths;
private ArrayList m_References; private ArrayList m_References;
private ArrayList m_Authors;
private FilesNode m_Files; private FilesNode m_Files;
#endregion #endregion
@ -116,6 +119,7 @@ namespace Prebuild.Core.Nodes
m_Configurations = new Hashtable(); m_Configurations = new Hashtable();
m_ReferencePaths = new ArrayList(); m_ReferencePaths = new ArrayList();
m_References = new ArrayList(); m_References = new ArrayList();
m_Authors = new ArrayList();
} }
#endregion #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> /// <summary>
/// Gets the full path. /// Gets the full path.
/// </summary> /// </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>
/// ///
/// </summary> /// </summary>
@ -290,9 +318,9 @@ namespace Prebuild.Core.Nodes
{ {
get get
{ {
ArrayList tmp = new ArrayList( ConfigurationsTable.Values); ArrayList tmp = new ArrayList(ConfigurationsTable.Values);
tmp.Sort(); tmp.Sort();
return tmp; return tmp;
} }
} }
@ -319,7 +347,7 @@ namespace Prebuild.Core.Nodes
ArrayList tmp = new ArrayList(m_ReferencePaths); ArrayList tmp = new ArrayList(m_ReferencePaths);
tmp.Sort(); tmp.Sort();
return tmp; return tmp;
} }
} }
/// <summary> /// <summary>
@ -335,6 +363,18 @@ namespace Prebuild.Core.Nodes
return tmp; return tmp;
} }
} }
/// <summary>
/// Gets the Authors list.
/// </summary>
/// <value>The list of the project's authors.</value>
public ArrayList Authors
{
get
{
return m_Authors;
}
}
/// <summary> /// <summary>
/// Gets the files. /// Gets the files.
@ -422,7 +462,9 @@ namespace Prebuild.Core.Nodes
m_Name = Helper.AttributeValue(node, "name", m_Name); m_Name = Helper.AttributeValue(node, "name", m_Name);
m_Path = Helper.AttributeValue(node, "path", m_Path); m_Path = Helper.AttributeValue(node, "path", m_Path);
m_FilterGroups = Helper.AttributeValue(node, "filterGroups", m_FilterGroups); 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_AppIcon = Helper.AttributeValue(node, "icon", m_AppIcon);
m_ConfigFile = Helper.AttributeValue(node, "configFile", m_ConfigFile);
m_DesignerFolder = Helper.AttributeValue(node, "designerFolder", m_DesignerFolder); m_DesignerFolder = Helper.AttributeValue(node, "designerFolder", m_DesignerFolder);
m_AssemblyName = Helper.AttributeValue(node, "assemblyName", m_AssemblyName); m_AssemblyName = Helper.AttributeValue(node, "assemblyName", m_AssemblyName);
m_Language = Helper.AttributeValue(node, "language", m_Language); 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_Runtime = (ClrRuntime)Helper.EnumAttributeValue(node, "runtime", typeof(ClrRuntime), m_Runtime);
m_StartupObject = Helper.AttributeValue(node, "startupObject", m_StartupObject); m_StartupObject = Helper.AttributeValue(node, "startupObject", m_StartupObject);
m_RootNamespace = Helper.AttributeValue(node, "rootNamespace", m_RootNamespace); m_RootNamespace = Helper.AttributeValue(node, "rootNamespace", m_RootNamespace);
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); 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);
if(m_AssemblyName == null || m_AssemblyName.Length < 1) if(m_AssemblyName == null || m_AssemblyName.Length < 1)
{ {
m_AssemblyName = m_Name; m_AssemblyName = m_Name;
@ -482,6 +522,10 @@ namespace Prebuild.Core.Nodes
{ {
m_References.Add(dataNode); m_References.Add(dataNode);
} }
else if(dataNode is AuthorNode)
{
m_Authors.Add(dataNode);
}
else if(dataNode is FilesNode) else if(dataNode is FilesNode)
{ {
m_Files = (FilesNode)dataNode; m_Files = (FilesNode)dataNode;
@ -494,7 +538,6 @@ namespace Prebuild.Core.Nodes
} }
} }
#endregion #endregion
#region IComparable Members #region IComparable Members
@ -506,5 +549,5 @@ namespace Prebuild.Core.Nodes
} }
#endregion #endregion
} }
} }

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 132 $
*/ */
#endregion #endregion
@ -149,5 +149,5 @@ namespace Prebuild.Core.Nodes
} }
#endregion #endregion
} }
} }

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 71 $
*/ */
#endregion #endregion
@ -104,5 +104,5 @@ namespace Prebuild.Core.Nodes
} }
#endregion #endregion
} }
} }

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 92 $
*/ */
#endregion #endregion
@ -53,11 +53,11 @@ namespace Prebuild.Core.Nodes
#region Fields #region Fields
private string m_Name = "unknown"; private string m_Name = "unknown";
private string m_Version = "1.0.0";
private string m_Path = ""; private string m_Path = "";
private string m_FullPath = ""; private string m_FullPath = "";
private string m_ActiveConfig = "Debug"; private string m_ActiveConfig = "Debug";
private string m_Version = "1.0.0";
private OptionsNode m_Options; private OptionsNode m_Options;
private FilesNode m_Files; private FilesNode m_Files;
private Hashtable m_Configurations; private Hashtable m_Configurations;
@ -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> /// <summary>
/// Gets the path. /// Gets the path.
/// </summary> /// </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> /// <summary>
/// Gets the options. /// Gets the options.
/// </summary> /// </summary>
@ -181,7 +181,7 @@ namespace Prebuild.Core.Nodes
ArrayList tmp = new ArrayList(ConfigurationsTable.Values); ArrayList tmp = new ArrayList(ConfigurationsTable.Values);
tmp.Sort(); tmp.Sort();
return tmp; return tmp;
} }
} }
/// <summary> /// <summary>
@ -245,9 +245,9 @@ namespace Prebuild.Core.Nodes
public override void Parse(XmlNode node) public override void Parse(XmlNode node)
{ {
m_Name = Helper.AttributeValue(node, "name", m_Name); 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_ActiveConfig = Helper.AttributeValue(node, "activeConfig", m_ActiveConfig);
m_Path = Helper.AttributeValue(node, "path", m_Path); m_Path = Helper.AttributeValue(node, "path", m_Path);
m_Version = Helper.AttributeValue(node, "version", m_Version);
m_FullPath = m_Path; m_FullPath = m_Path;
try try

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 71 $
*/ */
#endregion #endregion

View File

@ -27,8 +27,8 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $Author: jendave $
* $Date: 2006-09-01 19:55:06 +0200 (fr, 01 sep 2006) $ * $Date: 2007-04-26 17:10:27 +0900 (Thu, 26 Apr 2007) $
* $Revision: 147 $ * $Revision: 236 $
*/ */
#endregion #endregion

File diff suppressed because it is too large Load Diff

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 164 $
*/ */
#endregion #endregion

View File

@ -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
}
}

View File

@ -26,9 +26,9 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
#region CVS Information #region CVS Information
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $Author: cjcollier $
* $Date: 2007-02-13 22:07:07 +0100 (ti, 13 feb 2007) $ * $Date: 2007-04-11 07:10:35 +0900 (Wed, 11 Apr 2007) $
* $Revision: 206 $ * $Revision: 231 $
*/ */
#endregion #endregion
@ -106,9 +106,24 @@ namespace Prebuild.Core.Targets
ret += " refto=\""; ret += " refto=\"";
try try
{ {
//Assembly assem = Assembly.Load(refr.Name); /*
//ret += assem.FullName; Day changed to 28 Mar 2007
ret += refr.Name; ...
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) catch (System.NullReferenceException e)
{ {

View File

@ -1,34 +1,46 @@
#region BSD License #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 Redistribution and use in source and binary forms, with or without
provided that the following conditions are met: modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright notice, this list of conditions * Redistributions of source code must retain the above copyright
and the following disclaimer. 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, * Redistributions in binary form must reproduce the above copyright
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE notice, this list of conditions and the following disclaimer in the
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, documentation and/or other materials provided with the distribution.
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 * The name of the author may not be used to endorse or promote
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING products derived from this software without specific prior written
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 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 #endregion
#region CVS Information #region CVS Information
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $Author: cjcollier $
* $Date: 2007-02-13 21:58:03 +0100 (ti, 13 feb 2007) $ * $Date: 2008-02-07 10:22:36 +0900 (Thu, 07 Feb 2008) $
* $Revision: 205 $ * $Revision: 255 $
*/ */
#endregion #endregion
@ -83,9 +95,7 @@ namespace Prebuild.Core.Targets
if (solution.ProjectsTable.ContainsKey(refr.Name)) if (solution.ProjectsTable.ContainsKey(refr.Name))
{ {
ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name]; ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name];
string finalPath = Helper.NormalizePath(((ReferencePathNode)currentProject.ReferencePaths[0]).Path + refr.Name + GetProjectExtension(project), '/'); string finalPath = Helper.NormalizePath(((ReferencePathNode)currentProject.ReferencePaths[0]).Path + refr.Name + GetProjectExtension(project), '/');
return finalPath; return finalPath;
} }
else else
@ -122,7 +132,6 @@ namespace Prebuild.Core.Targets
{ {
ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name]; ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name];
string finalPath = Helper.NormalizePath(((ReferencePathNode)project.ReferencePaths[0]).Path, '/'); string finalPath = Helper.NormalizePath(((ReferencePathNode)project.ReferencePaths[0]).Path, '/');
return finalPath; return finalPath;
} }
else else
@ -213,7 +222,7 @@ namespace Prebuild.Core.Targets
ss.WriteLine(" <target name=\"{0}\">", "build"); ss.WriteLine(" <target name=\"{0}\">", "build");
ss.WriteLine(" <echo message=\"Build Directory is ${project::get-base-directory()}/${build.dir}\" />"); 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(" <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()}\">"); ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}\">");
foreach (ReferenceNode refr in project.References) 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(" <include name=\"{0}", Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, project, refr)) + "\" />", '/'));
} }
} }
ss.WriteLine(" </fileset>"); ss.WriteLine(" </fileset>");
ss.WriteLine(" </copy>"); 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(" <csc");
ss.Write(" target=\"{0}\"", project.Type.ToString().ToLower()); ss.Write(" target=\"{0}\"", project.Type.ToString().ToLower());
ss.Write(" debug=\"{0}\"", "${build.debug}"); ss.Write(" debug=\"{0}\"", "${build.debug}");
@ -245,6 +287,8 @@ namespace Prebuild.Core.Targets
ss.Write(" define=\"{0}\"", conf.Options.CompilerDefines); ss.Write(" define=\"{0}\"", conf.Options.CompilerDefines);
break; break;
} }
ss.Write(" main=\"{0}\"", project.StartupObject);
foreach (ConfigurationNode conf in project.Configurations) foreach (ConfigurationNode conf in project.Configurations)
{ {
if (GetXmlDocFile(project, conf) != "") if (GetXmlDocFile(project, conf) != "")
@ -476,14 +520,15 @@ namespace Prebuild.Core.Targets
ss.WriteLine(" <target name=\"init\" description=\"\">"); ss.WriteLine(" <target name=\"init\" description=\"\">");
ss.WriteLine(" <call target=\"${project.config}\" />"); 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(" <echo message=\"Platform ${sys.os.platform}\" />");
ss.WriteLine(" <property name=\"build.dir\" value=\"${bin.dir}/${project.config}\" />"); ss.WriteLine(" <property name=\"build.dir\" value=\"${bin.dir}/${project.config}\" />");
ss.WriteLine(" </target>"); ss.WriteLine(" </target>");
ss.WriteLine(); ss.WriteLine();
// sdague - ok, this is an ugly hack, but what it lets // sdague - ok, this is an ugly hack, but what it lets
// us do is native include of files into the nant // us do is native include of files into the nant
// created files from all .nant/*include files. This // created files from all .nant/*include files. This

View File

@ -53,7 +53,7 @@ namespace Prebuild.Core.Targets
} }
#region Public Methods #region Public Methods
/// <summary> /// <summary>
/// Gets the name. /// Gets the name.
/// </summary> /// </summary>

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 205 $
*/ */
#endregion #endregion

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 71 $
*/ */
#endregion #endregion

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 177 $
*/ */
#endregion #endregion

View File

@ -26,9 +26,9 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
#region CVS Information #region CVS Information
/* /*
* $Source$ * $Source$
* $Author: robloach $ * $Author: borrillis $
* $Date: 2007-02-27 19:52:34 +0100 (ti, 27 feb 2007) $ * $Date: 2007-05-25 01:03:16 +0900 (Fri, 25 May 2007) $
* $Revision: 207 $ * $Revision: 243 $
*/ */
#endregion #endregion
@ -36,6 +36,7 @@ using System;
using System.Collections; using System.Collections;
using System.Collections.Specialized; using System.Collections.Specialized;
using System.IO; using System.IO;
using System.Text;
using Prebuild.Core.Attributes; using Prebuild.Core.Attributes;
using Prebuild.Core.Interfaces; using Prebuild.Core.Interfaces;
@ -235,7 +236,7 @@ namespace Prebuild.Core.Targets
Hashtable tools; Hashtable tools;
Kernel kernel; Kernel kernel;
protected virtual string ToolsVersionXml protected virtual string ToolsVersionXml
{ {
get get
@ -249,7 +250,7 @@ namespace Prebuild.Core.Targets
get { return "# Visual Studio 2005"; } get { return "# Visual Studio 2005"; }
} }
/// <summary> /// <summary>
/// Gets or sets the solution version. /// Gets or sets the solution version.
/// </summary> /// </summary>
/// <value>The solution version.</value> /// <value>The solution version.</value>
@ -260,6 +261,7 @@ namespace Prebuild.Core.Targets
return "9.00"; return "9.00";
} }
} }
/// <summary> /// <summary>
/// Gets or sets the product version. /// Gets or sets the product version.
/// </summary> /// </summary>
@ -287,6 +289,7 @@ namespace Prebuild.Core.Targets
this.schemaVersion = value; this.schemaVersion = value;
} }
} }
/// <summary> /// <summary>
/// Gets or sets the name of the version. /// Gets or sets the name of the version.
/// </summary> /// </summary>
@ -298,6 +301,7 @@ namespace Prebuild.Core.Targets
return "Visual C# 2005"; return "Visual C# 2005";
} }
} }
/// <summary> /// <summary>
/// Gets or sets the version. /// Gets or sets the version.
/// </summary> /// </summary>
@ -377,7 +381,7 @@ namespace Prebuild.Core.Targets
#region Project File #region Project File
using (ps) using (ps)
{ {
ps.WriteLine("<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\"{0}>", ToolsVersionXml ); ps.WriteLine("<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\"{0}>", ToolsVersionXml);
//ps.WriteLine(" <{0}", toolInfo.XMLTag); //ps.WriteLine(" <{0}", toolInfo.XMLTag);
ps.WriteLine(" <PropertyGroup>"); ps.WriteLine(" <PropertyGroup>");
ps.WriteLine(" <ProjectType>Local</ProjectType>"); ps.WriteLine(" <ProjectType>Local</ProjectType>");
@ -431,7 +435,7 @@ namespace Prebuild.Core.Targets
ps.WriteLine(" <ConfigurationOverrideFile>"); ps.WriteLine(" <ConfigurationOverrideFile>");
ps.WriteLine(" </ConfigurationOverrideFile>"); ps.WriteLine(" </ConfigurationOverrideFile>");
ps.WriteLine(" <DefineConstants>{0}</DefineConstants>", conf.Options["CompilerDefines"]); 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(" <DebugSymbols>{0}</DebugSymbols>", conf.Options["DebugInformation"]);
ps.WriteLine(" <FileAlignment>{0}</FileAlignment>", conf.Options["FileAlignment"]); ps.WriteLine(" <FileAlignment>{0}</FileAlignment>", conf.Options["FileAlignment"]);
// ps.WriteLine(" <IncrementalBuild = \"{0}\"", conf.Options["IncrementalBuild"]); // ps.WriteLine(" <IncrementalBuild = \"{0}\"", conf.Options["IncrementalBuild"]);
@ -458,7 +462,7 @@ namespace Prebuild.Core.Targets
// Assembly References // Assembly References
ps.WriteLine(" <ItemGroup>"); ps.WriteLine(" <ItemGroup>");
string refPath = ((ReferencePathNode) project.ReferencePaths[0]).Path; string refPath = ((ReferencePathNode) project.ReferencePaths[0]).Path;
foreach (ReferenceNode refr in project.References) foreach (ReferenceNode refr in project.References)
{ {
if (!solution.ProjectsTable.ContainsKey(refr.Name)) if (!solution.ProjectsTable.ContainsKey(refr.Name))
@ -471,7 +475,7 @@ namespace Prebuild.Core.Targets
string path; string path;
if( refr.Name.EndsWith(".dll", StringComparison.InvariantCultureIgnoreCase )) if (refr.Name.EndsWith(".dll", StringComparison.InvariantCultureIgnoreCase))
{ {
path = Helper.NormalizePath(Path.Combine( refPath, refr.Name), '\\'); path = Helper.NormalizePath(Path.Combine( refPath, refr.Name), '\\');
} }
@ -479,7 +483,7 @@ namespace Prebuild.Core.Targets
{ {
path = refr.Name + ".dll"; path = refr.Name + ".dll";
} }
// TODO: Allow reference to *.exe files // TODO: Allow reference to *.exe files
ps.WriteLine(" <HintPath>{0}</HintPath>", path ); ps.WriteLine(" <HintPath>{0}</HintPath>", path );
ps.WriteLine(" <Private>{0}</Private>", refr.LocalCopy); ps.WriteLine(" <Private>{0}</Private>", refr.LocalCopy);
@ -602,35 +606,53 @@ namespace Prebuild.Core.Targets
{ {
if (!list.Contains(file)) if (!list.Contains(file))
{ {
ps.Write(" <{0} ", project.Files.GetBuildAction(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++;
if (file.Contains("Designer.cs"))
{
ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", file.Substring(0, file.IndexOf(".Designer.cs")) + ".cs");
}
if (project.Files.GetIsLink(file))
{
ps.WriteLine(" <Link>{0}</Link>", Path.GetFileName(file));
}
else if (project.Files.GetBuildAction(file) != BuildAction.None)
{
if (project.Files.GetBuildAction(file) != BuildAction.EmbeddedResource)
{
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));
}
ps.WriteLine(" </{0}>", project.Files.GetBuildAction(file));
} }
else
{
startPos = file.LastIndexOf( Path.GetFileName( file ) );
}
ps.WriteLine("Include=\"{0}\">", Helper.NormalizePath(file));
if (file.Contains("Designer.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))
{
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)
{
if (project.Files.GetBuildAction(file) != BuildAction.EmbeddedResource)
{
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));
}
ps.WriteLine(" </{0}>", project.Files.GetBuildAction(file));
} }
} }
}
// ps.WriteLine(" </Include>"); // ps.WriteLine(" </Include>");
ps.WriteLine(" </ItemGroup>"); ps.WriteLine(" </ItemGroup>");
@ -658,15 +680,14 @@ namespace Prebuild.Core.Targets
ps.WriteLine(" <PropertyGroup>"); ps.WriteLine(" <PropertyGroup>");
//ps.WriteLine(" <Settings ReferencePath=\"{0}\">", MakeRefPath(project)); //ps.WriteLine(" <Settings ReferencePath=\"{0}\">", MakeRefPath(project));
ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>"); ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>");
ps.WriteLine(" <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>");
if (projectFile.Contains( "OpenSim.csproj" )) if (projectFile.Contains( "OpenSim.csproj" ))
{ {
ps.WriteLine(" <StartArguments>-loginserver -sandbox -accounts</StartArguments>"); ps.WriteLine(" <StartArguments>-loginserver -sandbox -accounts</StartArguments>");
} }
ps.WriteLine(" <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>");
ps.WriteLine(" <ReferencePath>{0}</ReferencePath>", MakeRefPath(project)); ps.WriteLine(" <ReferencePath>{0}</ReferencePath>", MakeRefPath(project));
ps.WriteLine(" <LastOpenVersion>{0}</LastOpenVersion>", this.ProductVersion); ps.WriteLine(" <LastOpenVersion>{0}</LastOpenVersion>", this.ProductVersion);
ps.WriteLine(" <ProjectView>ProjectFiles</ProjectView>"); ps.WriteLine(" <ProjectView>ProjectFiles</ProjectView>");
@ -678,7 +699,7 @@ namespace Prebuild.Core.Targets
ps.Write(" Condition = \" '$(Configuration)|$(Platform)' == '{0}|AnyCPU' \"", conf.Name); ps.Write(" Condition = \" '$(Configuration)|$(Platform)' == '{0}|AnyCPU' \"", conf.Name);
ps.WriteLine(" />"); ps.WriteLine(" />");
} }
ps.WriteLine("</Project>"); ps.WriteLine("</Project>");
} }
#endregion #endregion

View File

@ -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
}
}

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: robloach $ * $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 $ * $Revision: 165 $
*/ */
#endregion #endregion

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 71 $
*/ */
#endregion #endregion

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 205 $
*/ */
#endregion #endregion

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 71 $
*/ */
#endregion #endregion

View File

@ -23,15 +23,6 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
*/ */
#endregion #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;
using System.Runtime.Serialization; using System.Runtime.Serialization;

View File

@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $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 $ * $Revision: 168 $
*/ */
#endregion #endregion

View File

@ -1,34 +1,49 @@
#region BSD License #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 Copyright (c) 2004 - 2008
provided that the following conditions are met: 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 Redistribution and use in source and binary forms, with or without
and the following disclaimer. modification, are permitted provided that the following conditions are
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions met:
and the following disclaimer in the documentation and/or other materials provided with the
distribution. * Redistributions of source code must retain the above copyright
* The name of the author may not be used to endorse or promote products derived from this software notice, this list of conditions and the following disclaimer.
without specific prior written permission.
* 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 #endregion
#region CVS Information #region CVS Information
/* /*
* $Source$ * $Source$
* $Author: jendave $ * $Author: cjcollier $
* $Date: 2007-01-26 19:31:34 +0100 (fr, 26 jan 2007) $ * $Date: 2008-02-08 01:31:29 +0900 (Fri, 08 Feb 2008) $
* $Revision: 203 $ * $Revision: 256 $
*/ */
#endregion #endregion
@ -55,11 +70,16 @@ using System.Resources;
[assembly: AssemblyConfiguration(".NET CLR")] [assembly: AssemblyConfiguration(".NET CLR")]
[assembly: AssemblyCompany("The Prebuild Project")] [assembly: AssemblyCompany("The Prebuild Project")]
[assembly: AssemblyProduct("")] [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: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguageAttribute("en-US")] [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: // Version information for an assembly consists of the following four values:

View File

@ -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" &amp;&amp; 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) &lt; /dev/null > /dev/null 2>&amp;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) &amp;&amp; {
($LIBTOOL --version) &lt; /dev/null > /dev/null 2>&amp;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 &amp;&amp; {
grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \
(gettext --version) &lt; /dev/null > /dev/null 2>&amp;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) &lt; /dev/null > /dev/null 2>&amp;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) &lt; /dev/null > /dev/null 2>&amp;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 "$@" \
&amp;&amp; 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">&amp;&amp;</xsl:text> </xsl:if>mkdir -p <xsl:value-of select="$outputPath" /> <xsl:text disable-output-escaping="yes">&amp;&amp;</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">
&amp;&amp; rm -f $(ASSEMBLY) \
&amp;&amp; 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) \
&amp;&amp;</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))" &gt; $@
</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" &amp;&amp; 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) &lt; /dev/null > /dev/null 2>&amp;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) &amp;&amp; {
($LIBTOOL --version) &lt; /dev/null > /dev/null 2>&amp;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 &amp;&amp; {
grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \
(gettext --version) &lt; /dev/null > /dev/null 2>&amp;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) &lt; /dev/null > /dev/null 2>&amp;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) &lt; /dev/null > /dev/null 2>&amp;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 "$@" \
&amp;&amp; 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 &lt; cj> why are we installing .exe assemblies to $prefix/lib/$package/ and
# not $prefix/share/$package ?
# 07:50 &lt; jonp> momentum.
# 07:50 &lt; jonp> and it's hard to say that a .exe isn't platform specific
# 07:50 &lt; 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>

View File

@ -1,14 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?> <?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" <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">
xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"> <xs:annotation>
<xs:annotation> <xs:documentation>
<xs:documentation> Copyright (c) 2004-2007
Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com), David Hudson (jendave at yahoo dot com) 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 .NET Prebuild is a cross-platform XML-driven pre-build tool which
allows developers to easily generate project or make files for major allows developers to easily generate project or make files for major
IDE's and .NET development tools including: Visual Studio .NET 2002 and IDE's and .NET development tools including: Visual Studio .NET 2002,
2003, SharpDevelop, MonoDevelop, and NAnt. 2003, and 2005, SharpDevelop, MonoDevelop, NAnt, Xcode and the GNU Autotools.
BSD License: BSD License:
@ -31,231 +34,240 @@
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 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. IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
<xs:element name="Prebuild"> <xs:element name="Prebuild">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
<xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" /> <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence> </xs:sequence>
<xs:attribute name="version" /> <xs:attribute name="version" />
<xs:attribute name="checkOsVars" /> <xs:attribute name="checkOsVars" />
</xs:complexType>
</xs:element>
<xs:element name="Process" type="xs:string" />
<xs:element name="Solution">
<xs:complexType>
<xs:sequence>
<xs:element ref="Options" minOccurs="0" />
<xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
<xs:element ref="Files" minOccurs="0" />
<xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="activeConfig" type="xs:string" default="Debug" />
<xs:attribute name="path" type="xs:string" default="" />
<xs:attribute name="version" type="xs:string" default="1.0.0" />
</xs:complexType>
</xs:element>
<xs:element name="Project">
<xs:complexType>
<xs:sequence>
<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">
<xs:complexType>
<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:complexType>
</xs:element>
<xs:element ref="Files" />
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="designerFolder" type="xs:string" default="" />
<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="language" default="C#">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="C#" />
<xs:enumeration value="VB.NET" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="type" default="Exe">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Exe" />
<xs:enumeration value="WinExe" />
<xs:enumeration value="Library" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="runtime" default="Microsoft">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Microsoft" />
<xs:enumeration value="Mono" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="startupObject" type="xs:string" default="" />
<xs:attribute name="rootNamespace" type="xs:string" />
<xs:attribute name="assemblyName" type="xs:string" />
<xs:attribute name="generateAssemblyInfoFile" type="xs:boolean" default="false"/>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="Configuration"> <xs:element name="Process" type="xs:string" />
<xs:complexType> <xs:element name="Solution">
<xs:sequence> <xs:complexType>
<xs:element ref="Options" minOccurs="0" /> <xs:sequence>
</xs:sequence> <xs:element ref="Options" minOccurs="0" />
<xs:attribute name="name" type="xs:string" use="required" /> <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
</xs:complexType> <xs:element ref="Files" minOccurs="0" />
</xs:element> <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" />
<xs:element name="Options"> </xs:sequence>
<xs:complexType> <xs:attribute name="name" type="xs:string" use="required" />
<xs:all> <xs:attribute name="activeConfig" type="xs:string" default="Debug" />
<xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> <xs:attribute name="path" type="xs:string" default="" />
<xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> <xs:attribute name="version" type="xs:string" default="1.0.0" />
<xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> </xs:complexType>
<xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> </xs:element>
<xs:element name="PreBuildEvent" type="xs:string" minOccurs="0" /> <xs:element name="Project">
<xs:element name="PostBuildEvent" type="xs:string" minOccurs="0" /> <xs:complexType>
<xs:element name="RunPostBuildEvent" minOccurs="0" default="OnBuildSuccess"> <xs:sequence>
<xs:simpleType> <xs:element name="Author" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
<xs:restriction base="xs:string"> <xs:element name="Description" type="xs:string" minOccurs="0" maxOccurs="1" />
<xs:enumeration value="OnBuildSuccess" /> <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" />
<xs:enumeration value="Always" /> <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
<xs:enumeration value="OnOutputUpdated" /> <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded">
</xs:restriction> <xs:complexType>
</xs:simpleType> <xs:attribute name="name" type="xs:string" use="required" />
</xs:element> <xs:attribute name="path" type="xs:string" />
<xs:element name="RunScript" type="xs:string" minOccurs="0" /> <xs:attribute name="localCopy" type="xs:boolean" />
<xs:element name="PreBuildEventArgs" type="xs:string" minOccurs="0" /> <xs:attribute name="version" type="xs:string" />
<xs:element name="PostBuildEventArgs" type="xs:string" minOccurs="0" /> </xs:complexType>
<xs:element name="WarningLevel" minOccurs="0"> </xs:element>
<xs:simpleType> <xs:element ref="Files" />
<xs:restriction base="xs:integer"> </xs:sequence>
<xs:minInclusive value="0" /> <xs:attribute name="name" type="xs:string" use="required" />
<xs:maxInclusive value="4" /> <xs:attribute name="designerFolder" type="xs:string" default="" />
</xs:restriction> <xs:attribute name="filterGroups" type="xs:string" default="" />
</xs:simpleType> <xs:attribute name="path" type="xs:string" default="" />
</xs:element> <xs:attribute name="icon" type="xs:string" default="" />
<xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> <xs:attribute name="configFile" type="xs:string" default="" />
<xs:element name="SuppressWarnings" type="xs:string" minOccurs="0" /> <xs:attribute name="version" type="xs:string" default="1.0.0" />
<xs:element name="OutputPath" type="xs:string" minOccurs="0" /> <xs:attribute name="language" default="C#">
<xs:element name="GenerateDocumentation" type="xs:boolean" minOccurs="0" /> <xs:simpleType>
<xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> <xs:restriction base="xs:string">
<xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> <xs:enumeration value="C#" />
<xs:element name="RegisterComInterop" type="xs:boolean" minOccurs="0" /> <xs:enumeration value="VB.NET" />
<xs:element name="RemoveIntegerChecks" type="xs:boolean" minOccurs="0" /> </xs:restriction>
<xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> </xs:simpleType>
<xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> </xs:attribute>
<xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> <xs:attribute name="type" default="Exe">
<xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> <xs:simpleType>
<xs:element name="KeyFile" type="xs:string" minOccurs="0" /> <xs:restriction base="xs:string">
</xs:all> <xs:enumeration value="Exe" />
</xs:complexType> <xs:enumeration value="WinExe" />
</xs:element> <xs:enumeration value="Library" />
<xs:element name="Files"> </xs:restriction>
<xs:complexType> </xs:simpleType>
<xs:sequence> </xs:attribute>
<xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> <xs:attribute name="runtime" default="Microsoft">
<xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> <xs:simpleType>
</xs:sequence> <xs:restriction base="xs:string">
</xs:complexType> <xs:enumeration value="Microsoft" />
</xs:element> <xs:enumeration value="Mono" />
<xs:element name="File"> </xs:restriction>
<xs:complexType> </xs:simpleType>
<xs:simpleContent> </xs:attribute>
<xs:extension base="xs:string"> <xs:attribute name="startupObject" type="xs:string" default="" />
<xs:attribute name="resourceName" type="xs:string" default="" /> <xs:attribute name="rootNamespace" type="xs:string" />
<xs:attribute name="buildAction" default="Compile"> <xs:attribute name="assemblyName" type="xs:string" />
<xs:simpleType> <xs:attribute name="generateAssemblyInfoFile" type="xs:boolean" default="false" />
<xs:restriction base="xs:string"> </xs:complexType>
<xs:enumeration value="None" /> </xs:element>
<xs:enumeration value="Compile" /> <xs:element name="Configuration">
<xs:enumeration value="Content" /> <xs:complexType>
<xs:enumeration value="EmbeddedResource" /> <xs:sequence>
</xs:restriction> <xs:element ref="Options" minOccurs="0" />
</xs:simpleType> </xs:sequence>
</xs:attribute> <xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="subType" default="Code"> </xs:complexType>
<xs:simpleType> </xs:element>
<xs:restriction base="xs:string"> <xs:element name="Options">
<xs:enumeration value="Code" /> <xs:complexType>
<xs:enumeration value="Component" /> <xs:all>
<xs:enumeration value="Form" /> <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" />
<xs:enumeration value="Settings" /> <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
<xs:enumeration value="UserControl" /> <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
</xs:restriction> <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" />
</xs:simpleType> <xs:element name="PreBuildEvent" type="xs:string" minOccurs="0" />
</xs:attribute> <xs:element name="PostBuildEvent" type="xs:string" minOccurs="0" />
<xs:attribute name="link" type="xs:boolean" /> <xs:element name="RunPostBuildEvent" minOccurs="0" default="OnBuildSuccess">
<xs:attribute name="copyToOutput" default="Never"> <xs:simpleType>
<xs:simpleType> <xs:restriction base="xs:string">
<xs:restriction base="xs:string"> <xs:enumeration value="OnBuildSuccess" />
<xs:enumeration value="Never" /> <xs:enumeration value="Always" />
<xs:enumeration value="Always" /> <xs:enumeration value="OnOutputUpdated" />
<xs:enumeration value="PreserveNewest" /> </xs:restriction>
</xs:restriction> </xs:simpleType>
</xs:simpleType> </xs:element>
</xs:attribute> <xs:element name="RunScript" type="xs:string" minOccurs="0" />
</xs:extension> <xs:element name="PreBuildEventArgs" type="xs:string" minOccurs="0" />
</xs:simpleContent> <xs:element name="PostBuildEventArgs" type="xs:string" minOccurs="0" />
</xs:complexType> <xs:element name="WarningLevel" minOccurs="0">
</xs:element> <xs:simpleType>
<xs:element name="Match"> <xs:restriction base="xs:integer">
<xs:complexType> <xs:minInclusive value="0" />
<xs:sequence> <xs:maxInclusive value="4" />
<xs:element ref="Exclude" minOccurs="0" maxOccurs="unbounded" /> </xs:restriction>
</xs:sequence> </xs:simpleType>
<xs:attribute name="path" type="xs:string" /> </xs:element>
<xs:attribute name="pattern" type="xs:string" use="required" /> <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" />
<xs:attribute name="recurse" type="xs:boolean" default="false" /> <xs:element name="SuppressWarnings" type="xs:string" minOccurs="0" />
<xs:attribute name="useRegex" type="xs:boolean" default="false" /> <xs:element name="OutputPath" type="xs:string" minOccurs="0" />
<xs:attribute name="buildAction" default="Compile"> <xs:element name="GenerateDocumentation" type="xs:boolean" minOccurs="0" />
<xs:simpleType> <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" />
<xs:restriction base="xs:string"> <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" />
<xs:enumeration value="None" /> <xs:element name="RegisterComInterop" type="xs:boolean" minOccurs="0" />
<xs:enumeration value="Compile" /> <xs:element name="RemoveIntegerChecks" type="xs:boolean" minOccurs="0" />
<xs:enumeration value="Content" /> <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" />
<xs:enumeration value="EmbeddedResource" /> <xs:element name="BaseAddress" type="xs:string" minOccurs="0" />
</xs:restriction> <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" />
</xs:simpleType> <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" />
</xs:attribute> <xs:element name="KeyFile" type="xs:string" minOccurs="0" />
<xs:attribute name="resourceName" type="xs:string" default="" /> </xs:all>
<xs:attribute name="subType" default="Code"> </xs:complexType>
<xs:simpleType> </xs:element>
<xs:restriction base="xs:string"> <xs:element name="Files">
<xs:enumeration value="Code" /> <xs:complexType>
<xs:enumeration value="Component" /> <xs:sequence>
<xs:enumeration value="Designer" /> <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" />
<xs:enumeration value="Form" /> <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" />
<xs:enumeration value="Settings" /> </xs:sequence>
<xs:enumeration value="UserControl" /> </xs:complexType>
</xs:restriction> </xs:element>
</xs:simpleType> <xs:element name="File">
</xs:attribute> <xs:complexType>
<xs:attribute name="link" type="xs:boolean" /> <xs:simpleContent>
<xs:attribute name="copyToOutput" default="Never"> <xs:extension base="xs:string">
<xs:simpleType> <xs:attribute name="resourceName" type="xs:string" default="" />
<xs:restriction base="xs:string"> <xs:attribute name="buildAction" default="Compile">
<xs:enumeration value="Never" /> <xs:simpleType>
<xs:enumeration value="Always" /> <xs:restriction base="xs:string">
<xs:enumeration value="PreserveNewest" /> <xs:enumeration value="None" />
</xs:restriction> <xs:enumeration value="Compile" />
</xs:simpleType> <xs:enumeration value="Content" />
</xs:attribute> <xs:enumeration value="EmbeddedResource" />
</xs:complexType> </xs:restriction>
</xs:element> </xs:simpleType>
<xs:element name="Exclude"> </xs:attribute>
<xs:complexType> <xs:attribute name="subType" default="Code">
<xs:attribute name="name" type="xs:string" use="required" /> <xs:simpleType>
</xs:complexType> <xs:restriction base="xs:string">
</xs:element> <xs:enumeration value="Code" />
<xs:enumeration value="Component" />
<xs:enumeration value="Form" />
<xs:enumeration value="Settings" />
<xs:enumeration value="UserControl" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="link" type="xs:boolean" />
<xs:attribute name="copyToOutput" default="Never">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Never" />
<xs:enumeration value="Always" />
<xs:enumeration value="PreserveNewest" />
</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>
</xs:element>
<xs:element name="Match">
<xs:complexType>
<xs:sequence>
<xs:element ref="Exclude" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="path" type="xs:string" />
<xs:attribute name="pattern" type="xs:string" use="required" />
<xs:attribute name="recurse" type="xs:boolean" default="false" />
<xs:attribute name="useRegex" type="xs:boolean" default="false" />
<xs:attribute name="buildAction" default="Compile">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="None" />
<xs:enumeration value="Compile" />
<xs:enumeration value="Content" />
<xs:enumeration value="EmbeddedResource" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="resourceName" type="xs:string" default="" />
<xs:attribute name="subType" default="Code">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Code" />
<xs:enumeration value="Component" />
<xs:enumeration value="Designer" />
<xs:enumeration value="Form" />
<xs:enumeration value="Settings" />
<xs:enumeration value="UserControl" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="link" type="xs:boolean" />
<xs:attribute name="copyToOutput" default="Never">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Never" />
<xs:enumeration value="Always" />
<xs:enumeration value="PreserveNewest" />
</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" />
<xs:attribute name="pattern" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:schema> </xs:schema>

Binary file not shown.