• Home
  • Screenshots
  • Downloads
  • FAQ
  • Help/Contact
  • Blog
  • Development
  • Build WeSay On Windows

    To get WeSay, you'll need TortoiseHG or any other Mercurial.

    hg clone http://hg.palaso.org/wesay wesay

    To develop and run WeSay, you'll need to install the following:

    • Visual Studio 2008 or later (express should be fine)

    If for some reason you need to build an installer or work on the installer source, look in WeSay/bld for various scripts. You'll need to install the following:

    • MSBuild
    • MSBuild Community Tasks
    • WIX 3
    • Nant


    This rest of this page is very out-of-date. We now use mercurial and nant.

    The build script for WeSay does the following:

    1. checks out the latest version from subversion
    2. changes the projects so they put their output at the right spot
    3. adds version stamping targets to the project (so don't check them in again)
    4. modifies the AssemblyInfo files to have the correct version from Subversion (so don't check them in again either)
    5. runs all the tests
    6. creates the samples
    7. launches the app (this was to create our caches originally, it functions as a sanity check too)
    8. creates the installation package
    9. uploads the installation package to our download area

    Prerequisites

    • Subversion (command line - not tortoise or another fancy gui version)
    • To Upload build, Pscp installed to "c:\program files\PuTTY\"

    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.

    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.

    This page was last modified 09:20, 9 May 2010. This page has been accessed 3,932 times.