Mention the requirement for the MFC feature pack.
// To build this file, execute "nant APIDocs" // After that, you can read the compiled version at TortoiseSVN\doc\output\TortoiseSVNAPI.chm /** \page build Build instructions \section Introduction Introduction Compiling TortoiseSVN is not very difficult, but it requires several steps to finish, at least the first time. Unlike other big open source projects, once you have built all the libraries TortoiseSVN depends on, you can use the familiar VisualStudio IDE to build and debug the binaries. No need to run the build script for every little change. So don't give up if you read through the next section and all the requirements. You only have to do this once. \section Requirements Requirements \subsection Requirements1 First, you need to install the compiler package. -# You need VS2008 (or at least Visual C++ 2008) to allow building of the full TortoiseSVN package. You will also need the MFC feature pack for VS2008 which is available from here: http://www.microsoft.com/downloads/details.aspx?FamilyId=D466226B-8DAB-445F-A7B4-448B326C48E7&displaylang=en This is the recommended option, but it is not free :-( If you want to build the msi make sure the "Tools for Redistributing Applications" are installed. -# If you do not have access to VS.NET you can download the free Visual C++ 2008 Express Edition. This will allow you to build the subversion libraries and the SubWCRev, TortoiseBlame, TortoiseUDiff, TortoiseIDiff, CrashRpt and ResText projects only. You can not build the main parts of TortoiseSVN (shell extension, TortoiseProc, TSVNCache, TortoiseMerge) with the Express Edition! - Install Visual C++ 2008 Express Edition. Download it from http://msdn.microsoft.com/vstudio/express/visualc/ - Install MASM 6.15 from: http://win32assembly.online.fr/files/masm615.zip and add it to the PATH environment variable \note Do not bother to install WiX and Votive as you cannot build very much. -# If you plan to build 64 bit packages, install the package - "Language Tools" -> "Visual C++" -> "X64 Compilers and Tools" available in the VS.NET2008 Professional and higher. This will provide you with a cross-compiler and a suitable command shell. On XP64, there will also be a native compiler. -# \b Optional but recommended: Install Microsoft SDK for Windows Vista (February 2007 Update) - http://www.microsoft.com/downloads/details.aspx?FamilyID=FF6467E6-5BBA-4BF5-B562-9199BE864D29 . Make sure you install the x64 compiler, header and libraries if you want to build in x64. - Open "Microsoft Windows SDK", "Visual Studio Registration", "Integrate Windows SDK with Visual Studio 2008" to make sure Visual Studio uses the latest SDK headers and libraries. -# \b Optional: Install the MSDN Library (documentation) from http://www.microsoft.com/downloads/details.aspx?familyid=B8704100-0127-4D88-9B5D-896B9B388313 You can always access it online at http://msdn2.microsoft.com/en-us/Library \subsection Requirements2 Next you need to install some utilities/programs. - Java runtime http://java.sun.com http://java.sun.com/webapps/getjava/BrowserRedirect - Python 2.4(\b 1) http://www.python.org/windows/ - libxml2 python bindings http://users.skynet.be/sbi/libxml-python/ - Perl http://www.activestate.com/Products/ActivePerl/ - WiX(\b 1) http://wix.sourceforge.net - Votive(\b 2) http://wix.sourceforge.net - NAnt(\b 1) http://nant.sourceforge.net . (\b 1) Add the paths of the binaries to the PATH environment variable. You may have to logoff/logon to make the new environment variables take effect! (\b 2) Install Votive to be able to load .wixproj project files. \subsection Requirements3 Next you need to download some more. - OpenSSL source http://www.openssl.org/source/ You will need at least version 0.9.7m or 0.9.8g, respectively. - ZLib source http://www.gzip.org/zlib/ - tools collection http://tortoisesvn.tigris.org/files/documents/406/42347/Tools-1.5.zip - dictionaries/thesauri(\b Optional) http://lingucomponent.openoffice.org/ \section Preparations Preparations Now you're almost ready. Only a few more steps to do: - create a new folder on your harddisk, e.g. SVN. Make sure you have at least 1.5 GB of free space left!!! - create a new folder in SVN called 'common' - unzip the openssl sourcecode into 'common', and rename the folder to 'openssl' - unzip the zlib sourcecode into 'common' and rename the folder to 'zlib' - copy the dictionaries/thesauri to 'common\spell'. note that the names of the files are important! They have to be en_US.aff, en_US.dic, en_GB.aff and en_GB.dic (or whatever language you use). Warning: only the thesaurus in the format for OO2 will work. Earlier versions will crash TortoiseSVN! - Checkout the TortoiseSVN sources from the Subversion repository into SVN\TortoiseSVN - unzip the file 'Tools.zip' into a folder, we suggest SVN\TortoiseSVN\Tools. Note: the path to the tools folder must not have special chars in it or spaces. If you checked out the TortoiseSVN source to such a location, you can store the tools folder somewhere else. - Make a copy of the file default.build.user.tmpl in the TortoiseSVN root folder and rename that copy to default.build.user. Then adjust the paths as mentioned in that file. - Make a copy of the file doc\doc.build.user.tmpl and rename that copy to doc\doc.build.user. Then adjust the paths in that file according to your setup. \section build32 Building 32 bit packages Hint: before you can start building TortoiseSVN, you need to call the vsvars32.bat file which is located in \%VS90COMNTOOLS%. Note that for the Express edition you need to sort out the vars for the platform SDK as well. The easiest way I found was to edit the supplied VC++ file C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat Look for the :x86 label and add an extra call to setenv.cmd as shown below: \code :x86 if not exist "%~dp0bin\vcvars32.bat" goto missing call "%~dp0bin\vcvars32.bat" if exist "%ProgramFiles%\Microsoft SDKs\Windows\v6.0\bin\setenv.cmd" call "%ProgramFiles%\Microsoft SDKs\Windows\v6.0\bin\setenv.cmd" /Release /x86 /vista if exist "%ProgramFiles%\Microsoft SDKs\Windows\v6.0\bin\setenv.cmd" goto :eof if exist "%ProgramFiles%\Microsoft Platform SDK\setenv.cmd" call "%ProgramFiles%\Microsoft Platform SDK\setenv.cmd" if exist "%ProgramFiles%\Microsoft Platform SDK\setenv.cmd" goto :eof goto :eof \endcode Then call vsvarsall.bat when you start your command processor instead of vsvars32 as described above. Now, if you got some time left you can run the build script to compile TortoiseSVN. Grab a cup of coffee - it can take up to two hours, depending on how fast your computer is (on mine, it takes 1 hour and 50 minutes)! \verbatim > nant \endverbatim will show you some help about the targets you can use \verbatim > nant setup \endverbatim will compile everything, including docs and languagepacks and create the msi installer If you encounter any build errors, you can run nant again like this: \verbatim > nant setup -l:buildlog.txt \endverbatim which will create a build log file which you can use to analyse where exactly the build failed. If you are building using VC++ Express, your options are somewhat limited. Firstly you need to change the build tool in default.build.user. There is already a line to set this up which you need to un-comment: \verbatim <property name="buildtool" value="vcexpress.exe" /> \endverbatim Now you need to build the Subversion libraries: \verbatim > nant Subversion \endverbatim Note that the VC Express compiler works in the background without a console window. There is a lot of disk activity with no apparent result showing in the Nant console window. Be patient! Before building the applications, update the version info: > nant VersionInfo Now you can open the SubWCRev.vcproj file to start the IDE. Some error dialogs will come up, which you can ignore. Right click on SubWCRev and 'Build'. You can also right click on TortoiseBlame and TortoiseIDiff and build those. \section build64cross Building 64 bit packages on win32 (cross-compile) First, we build some 32-bit SVN utilities you will need later during the build process. Follow the instruction above or just open "Microsoft Visual Studio 2008" -> "Visual Studio Tools" -> "Visual Studio 2008 Command Prompt", change to the TortoiseSVN source directory and run \verbatim > nant release binaries \endverbatim Now, build the x64 packages: Open "Microsoft Visual Studio 2008" -> "Visual Studio Tools" -> "Visual Studio 2008 x64 Cross Tools Command Prompt", change to the TortoiseSVN source directory and run \verbatim > nant x64 cross release setup \endverbatim After the script finished, the packages can be found in bin. \section build64 Building 64 bit packages on x64 To build native packages on your 64 bit Windows, just open "Microsoft Visual Studio 2008" -> "Visual Studio Tools" -> "Visual Studio 2008 Win64 Command Prompt", change to the TortoiseSVN source directory and run \verbatim > nant x64 release setup \endverbatim After the script finished, the packages can be found in bin. \section clean Cleaning the build directories To clean the files you just built, open a command prompt as explained above, change to the TortoiseSVN source directory and run \verbatim > nant release clean \endverbatim You have to clean when alterning between x86 and x64 builds. You will find that Language\Tortoise.pot gets deleted. This is normal. This is a generated file that is in the repository so the translators don't need to build the whole thing to update documentation. \section buildhelp Learning the current build options Many other settings can be used. You can have a description of the possible targets by running \verbatim > nant help \endverbatim */