Compiling TortoiseCVS with Microsoft Visual C++ 9.0 Express Edition (Visual Studio 2008)
- Checkout TortoiseCVS source tree:
CVSROOT=:pserver:anonymous@tortoisecvs.cvs.sourceforge.net:/cvsroot/tortoisecvs
In this document, I'll use [TortoiseCVS] to refer to the top directory of this sandbox - c:\prog\TortoiseCVS in my case.
- The GNU tools located at [TortoiseCVS]\tools\gnuwin32 don't work. Download the "flex++", "bison" and "m4" packages
from the GnuWin32 project and install in the default location (that is,
%PROGRAMFILES%\GnuWin32)
- Download and install CMake (latest release: 2.6.2)
- Download and install wxWidgets (current stable release: 2.8.9)
In this document, I'll use [wxWidgets] to refer to the top directory where it is installed - c:\APPS\wxWidgets-2.8.9 in my case.
- Configure wxWidgets for use with TortoiseCVS:
- Short way: Copy [TortoiseCVS]\wxw\lib\vc_lib\mswu\wx\setup.h over [wxWidgets]\include\wx\msw\setup.h
- Long way (seems safer, in case your wxWidgets version does not match exactly the one used to build TortoiseCVS previously):
- Copy [wxWidgets]\include\wx\msw\setup0.h over [wxWidgets]\include\wx\msw\setup.h
- Compare [TortoiseCVS]\wxw\lib\vc_lib\mswu\wx\setup.h against the one in wxWidgets and propagate the settings from Tortoise to wxWidgets. You will note that most flags are disabled (set to 0).
- Open Visual Studio and load the [wxWidgets]\build\msw\wx.dsw workspace.
- Build the base, core and adv projects, using the Unicode Debug|Win32 and Unicode Release|Win32 (non-DLL)
configurations. After building, you will have six libraries:
wxbase28u.lib wxbase28ud.lib wxmsw28ud_adv.lib wxmsw28ud_core.lib wxmsw28u_adv.lib wxmsw28u_core.lib
- Copy those six generated libraries from [wxWidgets]\lib\vc_lib to [TortoiseCVS]\wxw\lib\vc9 (create the latter directory if it doesn't exist).
Copy the mswu and mswud subfolders from inside [wxWidgets]\lib\vc_lib to [TortoiseCVS]\wxw\lib\vc_lib.
We are done with wxWidgets now.
- Execute runcmake-vc9.bat (preferably in a CMD console window). This should create all the required project files.
- Open [TortoiseCVS]\build\vc9win32\TortoiseCVS.sln in Visual Studio and build the solution.
- The main shell extension should build fine. I didn't bother to go beyond that (no translations, no InnoSetup installer, ...). I just copy TortoiseAct.exe and TortoiseShell.dll onto an existing TortoiseCVS installation (ok, it may be tricky sometimes) and that's all.