|
I'm interested in playing with the Veracity source. How do I set up a development environment and get Veracity to compile on Windows? |
IntroductionAssumed - you are running Windows Vista or Windows 7, and have Visual Studio 2010 (or the equivalent SDK and NMake) installed. Get the SourceThere are two options.
or
Unpack or checkout it the directory of your choice - for brevity, we'll pretend you
put it under Install PrerequisitesInstall CMakeGrab cmake 2.8.3 or later from cmake.org. Install CMake, making sure to add cmake to the PATH variable when prompted. Install CygwinCygwin is used to run a script that builds Veracity's third-party dependencies. That is the only thing it is used for, so it is possible to build and run Veracity without installing cygwin, but you will need to build the third-party dependencies by hand instead of using the script to do it for you. It's a long process, but you can just read throught the script and and do what it would do. Visit cygwin.com, grab and run the setup utility from there. In addition to the stock Cygwin tools, you'll also need:
Add cygwin to PATHC:\cygwin\bin needs to be in your path for building the third-party libraries and for running the test suite. You can add it temporarily in a command prompt, e.g.
or add it permanently to your Windows user's path. Create a Veracity Build DirectoryYou must open a Command Prompt that has the correct Visual Studio environment variables set. Go to the the Windows Start menu and select "Microsoft Visual Studio 2010" -> "Visual Studio Tools" -> "Visual Studio Command Prompt (2010)" (Or, to build them as 64-bit, choose "Visual Studio x64 Win64 Command Prompt (2010)"). From that command prompt,
Then, to create a Visual Studio 2010 solution:
Or, to create a solution for a 64-bit build:
To use NMake instead, run:
Add vv-thirdparty bin to PATHThe first time you perform cmake -G, the script will also download and build third party libraries Veracity needs, in %USERPROFILE%\v\vv-thirdparty, which takes a few minutes. As long as you keep your build trees in this folder, such that the build script can locate vv-thirdparty, this will only happen once. Once vv-thirdparty is created, you'll need to add the binary directory to PATH:
or for 64bit builds
Build VeracityYou now have a build tree, replete with Makefiles or Project files. For Visual Studio users, simply open the solution, For NMake users,
Run the Test SuiteOnly builds that have passed the test suite on all of SourceGear's in-house build machines are ever published. To run the test suite for yourself:
All tests should pass. If there are failures, you can consult the logs. Install VeracityThe Command Line ApplicationsTo "install" veracity on your computer, update your PATH again, this time to include the Veracity command line tools, vv and vscript. For Visual Studio Project users, add these to your PATH:
For NMake users, add these:
Enable the server (and bug tracking)In order to enable Veracity's scrum bug tracking module or to run a veracity server you will also need to have a config setting called "server/files" pointed at a certain location. Run:
The Tortoise ClientImportant: For Tortoise, Debug and Release builds make a very big difference. Only Release builds will be loaded by Windows Explorer. Debug builds will only be loaded by Windows Explorer if there is a debugger attached to the explorer process. This is done to prevent a long-lived process from loading the dll, which would prevent the dll from being overwritten on a build. If you want to try the Veracity Tortoise Client, which allows you to perform Veracity operations directly from Windows Explorer, you'll need to run one of the following commands from an administrator (elevated) command prompt: If you used Visual Studio for the build, run this command:
If your build was an NMake build:
Note for 64-bit users: Windows Explorer on 64-bit systems is a 64-bit process. You must build Veracity as 64-bit in order to integrate with it.
link
This answer is marked "community wiki".
In the "Build vv-thirdparty" section you say "This will create the vv-thirdparty folder at %USERPROFILE%\v\vv-thirdparty." actually, it creates the folder at %USERPROFILE%\v\veracity\vv-thirdparty.
(Nov 26 '11 at 07:58)
Arne Mertz
1
Hi Ian, I am building Veracity again - the Problem with the thirdparty build remains, could you fix either your description or the thirdparty build-script? Regards, Arne
(Jan 07 at 08:23)
Arne Mertz
1
@Arne Sorry about that. Fixed. The other platforms' instructions should get updated later today.
(Jan 09 at 08:36)
Ian Olsen ♦♦
You need C:\cygwin\bin in your path when vv-thirdparty gets built (and when running the test suite). That's probably why you have no zlib headers. I've updated the instructions again with that change.
(Jan 09 at 09:55)
Ian Olsen ♦♦
see my last comment - even with C:\cygwin\bin in the path I get those errors.
(Jan 09 at 10:21)
Arne Mertz
Was it in the path when vv-thirdparty was created? If that's not the issue, the next thing to check would be the zlib build log: vv-thirdparty/builds-[amd64/x86]/zlib-1.2.5/build_log.txt.
(Jan 09 at 10:27)
Ian Olsen ♦♦
ok, I think I got it: when I first tried to build the solution files, cmake noticed the vv-thirdparty folder wasn't there at all, so it tried to build vv-thirdparty but because of the missing cygwin path it failed after creating the directories (vv-thirdparty/builds-x86 existed but was empty) So, setting the path and deleting the vv-thirdparty dir did the job. Thanks for the hint and for your patience :)
(Jan 09 at 12:30)
Arne Mertz
Arne - when you're compiling at the end with cygwin in your path - where in your path is
(Jan 10 at 09:53)
Paul Roub ♦♦
showing 5 of 8
show all
|
|
Small missing step: after running CMake to generate the Solution files, one has to add the thirdparty binary directory to the PATH:
or for 64bit builds
@Ian: please feel free to delete the mess I left behind with all those comments ;) /edit: is it possible to extend the path in the solution someway? Just a thought... Thanks, I've fixed that. (Also fwiw, my reply email was rejected by your mail server just now.)
(Jan 13 at 11:51)
Ian Olsen ♦♦
fixed the mail server config. Sorry for that.
(Jan 13 at 11:55)
Arne Mertz
Looked a bit into it - to avoid appending the thirdparty dir to %PATH% every time before you open the solution, you can add the directory to the executable directories in the projects that need thirdparty stuff. Currently those are sghelpsource and template_check. Take the following steps for each of the projects:
(Jan 14 at 09:10)
Arne Mertz
|