UppercuT.config
All of the bat files call this file to get the properties to set. To make sure we are DRY, we want one file to set up everything in and use those settings from all of the other batch files.
Setup
We need to answer a series of questions about your application so that uppercut can automatically build it for you. To get up and running fast, we have already included a series of conventions so that you will only need to answer questions when things are different.
Here are the three questions most people need to answer.
<property name="project.name" value="__SOLUTION_NAME_WITHOUT_SLN_EXTENSION__" overwrite="false" />
<property name="path_to_solution" value="." overwrite="false" />
<property name="repository.path" value="__REPOSITORY_PATH__" overwrite="false" />
<property name="company.name" value="__COMPANY_NAME__" overwrite="false" />
becomes
<property name="project.name" value="UppercuT" overwrite="false" />
<property name="path_to_solution" value="." overwrite="false" />
<property name="repository.path" value="http://uppercut.googlecode.com/svn/" overwrite="false" />
<property name="company.name" value="FerventCoder Software and ACuriousMind Software" overwrite="false" />
My solution name is uppercut.sln, so I include it as the project name without the .sln extension. The repository path is not down to a trunk or a branch, but at the very top level of the repository. The company is either a company you work for or your own personal company if you are open source.
Here is the contents of the UppercuT.config file:
-----
<?xmlversion="1.0"encoding="utf-8" ?>
<projectname="BuildSettings">
<!-- Project UppercuT - http://projectuppercut.org -->
<!-- Learn how to edit this file at http://uppercut.pbwiki.com -->
<!-- Required Items -->
<propertyname="project.name"value="__SOLUTION_NAME_WITHOUT_SLN_EXTENSION__"overwrite="false"/>
<propertyname="path_to_solution"value="."overwrite="false"/>
<propertyname="repository.path"value="__REPOSITORY_PATH__"overwrite="false"/>
<propertyname="company.name"value="__COMPANY_NAME__"overwrite="false"/>
<!-- folders -->
<propertyname="folder.database"value="${project.name}.Database"overwrite="false"/>
<propertyname="folder.reports"value="${project.name}.Reports"overwrite="false"/>
<propertyname="folder.deployment"value="deployment"overwrite="false"/>
<propertyname="folder.documentation"value="docs"overwrite="false"/>
<propertyname="folder.references"value="lib"overwrite="false"/>
<propertyname="folder.build_scripts"value="build"overwrite="false"/>
<propertyname="folder.build_scripts_custom"value="build.custom"overwrite="false"/>
<propertyname="folder.code_build"value="build_output"overwrite="false"/>
<propertyname="folder.code_drop"value="code_drop"overwrite="false"/>
<propertyname="folder.app.drop"value="${project.name}"overwrite="false"/>
<propertyname="folder.environment_files"value="environment.files"overwrite="false"/>
<propertyname="folder.file_server"value="file.server"overwrite="false"/>
<!-- FRAMEWORKS -->
<!-- microsoft.framework: vb6, net-1.1, net-2.0, net-3.5, net-4.0 -->
<propertyname="microsoft.framework"value="net-3.5"overwrite="false"/>
<!-- language.short: vb,cs -->
<propertyname="language.short"value="cs"overwrite="false"/>
<!-- test.framework: none, mbunit2, nunit, gallio - with gallio it must be installed in program files on every computer. Alternatively you can add 26MB to your repo and put it there. Little much for my tastes. -->
<propertyname="test.framework"value="mbunit2"overwrite="false"/>
<!-- source_control_type: svn, vss, tfs, vault, git, hg -->
<propertyname="source_control_type"value="svn"overwrite="false"/>
<!-- ASSEMBLY VARIABLES -->
<propertyname="version.major"value="0"overwrite="false"/>
<propertyname="version.minor"value="0"overwrite="false"/>
<propertyname="assembly.description"value="${project.name} is a product of ${company.name} - ${repository.path}."overwrite="false"/>
<!-- partially trusted callers doesn't set correctly with assembly generator - Leave false for now-->
<propertyname="allow.partially_trusted_callers"value="false"overwrite="false"/>
<propertyname="sign.project_with_key"value="false"overwrite="false"/>
<!-- To use relative pathing your projects all need to be at the same level. -->
<propertyname="sign.key.use_relative_pathing"value="false"overwrite="false"/>
<propertyname="sign.key.relative_path_from_projects"value="..\..\"overwrite="false"/>
<!-- COMPILE VARIABLES -->
<propertyname="msbuild.configuration"value="Release"overwrite="false"/>
<propertyname="msbuild.platform"value="Any CPU"overwrite="false"/>
<!-- POLICIES -->
<propertyname="file.installation_document"value="..\${folder.documentation}\Installation\${project.name}Installation.doc"overwrite="false"/>
<propertyname="fail.if_no_installation_document"value="false"overwrite="false"/>
<!-- EXTERNAL TOOLS -->
<!-- These are run two folders down from the top level folder, so figure out the relative path from there and add "..\..\" -->
<!-- In example, if from the top level directory, you have an item that is in lib\NCover\NCover.Console.exe you should add it here as ..\..\lib\NCover\NCover.Console.exe -->
<!-- To not use the tool, change to a location that doesn't exist -->
<propertyname="app.ncover"value="..\..\${folder.references}\NCover\NCover.Console.exe"overwrite="false"/>
<propertyname="app.ncover_explorer"value="..\..\${folder.references}\NCover\NCoverExplorer.Console.exe"overwrite="false"/>
<propertyname="app.ncover.tester"value="..\..\${folder.references}\MbUnit2\MbUnit.Cons.exe"overwrite="false"if="${test.framework=='mbunit2'}"/>
<propertyname="app.ncover.tester"value="..\..\${folder.references}\NUnit\nunit-console.exe"overwrite="false"if="${test.framework=='nunit'}"/>
<propertyname="app.ncover.tester"value="C:\Program Files (x86)\Gallio\bin\Gallio.Host.exe"overwrite="false"if="${test.framework=='gallio'}"/>
<propertyname="app.ndepend"value="C:\Program Files\NDepend\NDepend.Console.exe"overwrite="false"/>
<propertyname="app.moma"value="..\..\${folder.references}\MoMA\MoMA.exe"overwrite="false"/>
<propertyname="allow.powershell.unrestricted"value="false"overwrite="false"/>
</project>
----
- Required Items
- project.name = This is your solution file name (minus the .sln). This is also used in quite a few other places like with NCover and the assembly file.
- path_to_solution = This is the RELATIVE PATH to the folder your solution file in. For most people this might be src. This is used to locate your solution file and also used for where to put the assembly file (i.e. SolutionVersion.cs).
- respository.path = This is the path to the top level of your repository. Not to a trunk or a branch. This is used to attempt to get revision information.
- company.name = This is the name of your company, the company you work for, or something else. This is currently used as part of the assembly file.
- Folders
- folder.database = This is the folder name of where you keep your database scripts. Some people keep them in a folder named db. This is only used during packaging to bring the folder into the code_drop for deployment. If you have more than one, you need to use custom build scripts.
- folder.reports = This is the folder name where you keep your reports. This is only used during packaging to bring the folder into the code_drop for deployment. If you have more than one, you will need to use custom build scripts.
- folder.documentation = This is the folder name where your documentation is located
- folder.references = This is the folder name where you keep your external references (dlls)
- folder.build_scripts = This is the folder name where the build is located. Only advanced users would usually change this.
- folder.build_scripts_custom = This is the folder name where the custom build extension points are located. Only advanced users would normally change this.
- folder.code_build = This is the folder name where the build output is directed. Only advanced users would normally change this.
- folder.code_drop = This is the folder name where the build output is packaged and readied for deployment. Only advanced users would normally change this.
- folder.app.drop = This is the folder name where your application builds/packages to. Normally the same as the project.name.
- folder.environment_files = This is the folder name where the environment files (like config files for each environment) are put when they are created.
- folder.file_server = This is the folder name where you keep file server items, if you use a separate file server.
- Frameworks
- microsoft.framework = This is the version of the Microsoft Framework you are using. This is used during compile.
- language.short = What language are you building in? Valid values are vb or cs. Language is used only to determine how to output the assembly file (i.e SolutionVersion.vb or SolutionVersion.cs).
- test.framework = What test framework do you use? This is used to determine how to run your application's tests. Currently we only support MbUnit, Gallio, and NUnit. You are welcome to submit a patch.
- source_control_type = What kind of source control do you use? This is used to determine how to get revision/version information.
- Assembly Variables
- version.major = In versioning your application, this is 1.x.x.x. This is used only when building the assembly file.
- version.minor = In versioning your application, this is x.1.x.x. This is used only when building the assembly file.
- assembly.description - What you want your DLLs to say about your product when build
- allow.partially_trusted_callers - Allows your assemblies to allow partially trusted callers - NOTE: doesn't work at this point in time with the assembly generator. Patch submissions are welcome.
- sign.project_with_key - Strong name your assemblies with one setting. Creates the private key for you to check in and generates the public key in the build_output.
- sign.key.use_relative_pathing - use relative pathing when strong naming. All projects must be at the same level
- sign.key.relative_path_from_projects - the path back to the key. All projects must be at the same level.
- Compile Variables
- msbuild.configuration - A visual studio setting. Debug, Release, etc
- msbuild.platform - A visual studio setting. Any CPU, Default, etc
- Policies
- file.installation_document - The name of an install document to check for
- fail.if_no_installation_document - Should the build fail if there is no installation document?
- External Tools
- app.ncover = This is the path (from BuildScripts\analyzers) to where you keep the reference to NCover.Console.exe. The last free version of NCover we include with UppercuT. This is used during the NCover build. If the location is non-existent, UppercuT moves on to the next build step.
- app.ncover.explorer = This is the path (from BuildScripts\analyzers) to where you keep the reference to NCoverExplorer.Console.exe. The last free version of NCover we include with UppercuT. This is used during the NCover build. If the location is non-existent and the app.ncover location exists, UppercuT will throw a non-fatal error and move on.
- app.ncover.tester = This is the path (from BuildScripts\analyzers) to where you keep the reference to the testing framework's console runner. This is used during the NCover build. If the location is non-existent and the app.ncover location exists, UppercuT will throw a non-fatal error and move on.
- app.nepend = This is the path to NDepend.Console.exe. NDepend is not a free tool, but it is very valuable in determining code quality. Because it is not free, we can not include it in the framework. But we do provide the tools to leverage it if you do have a license for it. If the location is non-existent, UppercuT moves on to the next build step.
- app.moma - The path to Mono Migration Analyzer. If the location is non-existent, UppercuT moves on to the next build step.
- allow.powershell.unrestricted - If you customize the build using powershell, and you are not going to sign your scripts, you need to set this to true. This is a security risk, so understand this is a user setting with powershell 2.0 and a machine setting for 1.0. For any build that is going to run uppercut, this setting is false until manually changed.
----
Back to HowToUse?
Comments (0)
You don't have permission to comment on this page.