Build WeSay On Windows
The build script for WeSay does the following:
- checks out the latest version from subversion
- changes the projects so they put their output at the right spot
- adds version stamping targets to the project (so don't check them in again)
- modifies the AssemblyInfo files to have the correct version from Subversion (so don't check them in again either)
- runs all the tests
- creates the samples
- launches the app (this was to create our caches originally, it functions as a sanity check too)
- creates the installation package
- uploads the installation package to our download area
[edit]
Prerequisites
- Subversion (command line - not tortoise or another fancy gui version)
- Windows installer xml (WiX) Votive, V3. There are two installers to grab here. First, install "projectaggregator" found, then install wix.
- To Upload build, Pscp installed to "c:\program files\PuTTY\"
[edit]
Setup
- Make a directory where you want the build to take place. (a directory called WeSay will be created underneath that directory with a copy of the latest source)
- Copy CheckoutAndBuildWeSay.proj to that directory.
[edit]
Build
- Open a Visual Studio Command Prompt or call the batch file that sets up the variables. Or use the very cool gui found here.
- Run MSBuild on CheckoutAndBuildWeSay.proj. Pass in a user property and password property if you want it to upload automatically. If the build fails with unable to find the executable for the test task, you will need to provide the NUnitPath property as the path location of the nunit-console.exe. See example below.
STOP. This is going to modify many files to encode the current build number into the version info. You can't check these files back in once changed. So make sure you've checked out to a directory that you aren't working in, e.g. "WeSayForBuildingOnly".
I have a batch file that automates these steps for me. It looks like:
call "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat" x86 copy .\wesay\bld\CheckoutAndBuildWeSay.proj . msbuild CheckoutAndBuildWeSay.proj /property:password=*** /property:user=*** /property:NUnitPath="C:\Program Files\NUnit 2.4.1\bin" %1 %2 %3 %4 %5 %6 %7 pause
There are several targets you can use to narrow what gets built. See bld/WeSay.proj. E.g.
C:\WeSay\bld>msbuild WeSay.proj /t:Compile
where "Compile" could instead be "Test", "CreateSample", etc.
