Page History
- 2021-Jun-30 16:33 coatsworth
- 2021-Jun-30 16:24 coatsworth
- 2020-Jan-30 17:20 coatsworth
- 2020-Jan-23 10:13 coatsworth
- 2019-Oct-17 16:37 coatsworth
- 2019-Oct-16 16:07 coatsworth
- 2019-Mar-11 11:22 coatsworth
- 2019-Mar-11 11:16 coatsworth
- 2018-Dec-19 13:41 johnkn
- 2016-May-26 10:08 johnkn
- 2016-Mar-14 16:35 zmiller
- 2016-Mar-14 16:02 zmiller
- 2015-Oct-06 13:20 johnkn
- 2015-Oct-06 13:18 johnkn
- 2015-Oct-06 13:12 johnkn
- 2015-Sep-22 14:43 johnkn
- 2015-Sep-22 14:41 johnkn
- 2015-Sep-22 14:25 johnkn
- 2015-Jan-15 15:03 bt
- 2015-Jan-15 14:59 bt
- 2015-Jan-15 14:54 bt
- 2014-Dec-19 10:38 bt
- 2014-Nov-04 12:57 calderon
- 2014-Nov-04 11:52 calderon
- 2014-Oct-24 12:29 calderon
- 2014-Oct-24 12:10 johnkn
- 2014-Oct-24 12:03 calderon
- 2014-Oct-24 11:43 calderon
- 2013-Oct-15 16:31 johnkn
- 2012-Nov-15 11:36 adesmet
- 2012-Nov-15 11:33 adesmet
Overview
For instructions on building HTCondor with vs2008, see Building HTCondor with vs2008 on Windows.
For instructions on building HTCondor in releases prior to 7.5.5, see Building HTCondor prior to 7.5.5 on Windows.
For information about the conversion of the build process from project files to cmake see BuildModernization
Building HTCondor with cmake on Windows
Prerequisites
In order to build HTCondor on Windows, the following prerequisites are required. They need to be in the PATH before you can build. There is a batch file msconfig\set_build_env.bat
in the HTCondor sources that will locate the installed prerequisites and set the PATH for you if you don't wish to add them to your global PATH.
- Install 7-zip. Add it to your PATH. 7-zip is not needed to build, but it is needed to make the HTCondor .ZIP file. You will not be able to build the PACKAGE target witout 7-zip.
- [Optional] install git and add it to your PATH, git is one way to get the HTCondor sources. It is not needed if you already have the sources.
- Cmake 2.8.3 or later, the
Cmake\bin
directory should be added your PATH. For now, be sure to use CMake 2.8 and not CMake 3. - Install Active Perl. Add it to your PATH.
- Install Visual Studio. Add it to your PATH.
- Visual Studio Express (Free to anyone) https://www.microsoft.com/express/Downloads/
- Visual Studio 2012. Paid.
- UW Madison staff can get it here: https://idp.cs.wisc.edu/idp/Authn/UserPassword.
- [Optional] Start Visual Studio and Open Tools->Options under "Projects and Solutions" click on VC++ Directories and add the following to the Executable directories. This is not needed if you use
msconfig\set_build_env.bat
to set the PATH before you build.- $(SolutionDir)\msconfig
- Move $(PATH) to the bottom as sometimes C:\cygwin\bin is in the $(PATH) which can cause issues with HTCondor's bundled binaries.
- [Optional] Install 32-bit Python 2.8. This is needed to build and/or use the python bindings. It must be the same bitness as the HTCondor binaries, which means 32-bit for now.
- [Optional] Install WiX 3.0 on your windows machine (Depends on Visual Studio). WiX is not needed to build, but it is needed to create the MSI installer.
**IMPORTANT GIT CONFIG for windows** you most set a global git config value or patch files will fail because the sources will be modified during cloning of the repository. From command line enter: |
git config --global core.autocrlf false
Building
1.) Open a windows commmand prompt (you can use the command prompt provided by the Visual Studio installation "%appdata%\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2012\Visual Studio Tools\Developer Command Prompt for VS2012")
2.) Checkout origin/master from the git repository, or download the HTCondor Sources http://www.cs.wisc.edu/condor/downloads-v2/download.pl
3.) navigate to the root directory of the sources, it is called CONDOR_SRC if you are a using a git clone. (The root directory has a file called configure_uw in it.)
4.) add cmake\bin to your PATH if it is not already. One way to do this is to execute msconfig\set_build_env.bat
. This will setup PATH, LIB, and INCLUDE environment variables to build HTCondor. If this batch file cannot find cmake.exe It will report an error.
5.) [Optional] If you want to use cached externals set the environment variable CONDOR_BLD_EXTERNAL_STAGE
to the path of the externals cache. Using cached externals can save a lot of time if you plan to build HTCondor more than once. For example
set CONDOR_BLD_EXTERNAL_STAGE=c:\scratch\condor_externals
6.) The the cmake build supports both in-source and out-of-source builds. Out- of-source is better if you are building from git. If you are building from a the source tarball, then in-source is simpler.
for out-of-source builds, navigate to the build destination folder and execute cmake; passing it the path to the HTCondor sources. For example
REM assuming that the current directory is CONDOR_SRC set condorsources=%CD% mkdir c:\scratch\condor\build cd /d c:\scratch\condor\build cmake CMakeLists.txt -G "Visual Studio 11" %condorsources%
cmake -G "Visual Studio 11" .
6.) Once you have used cmake to build Condor.sln, you can build on the command line or interactively. The options are
devenv condor.sln /Rebuild RelWithDebInfo /project ALL_BUILD
Note - If the build fails remove external and local build folders
Then start over. We don't recover well after a failed build.
Building Tests
Build the tests target in the Condor.sln Solution File. Once built you can run all the batch tests as before.
Copying Build results to the release Directory
There is a cmake file that will copy the build products to the correct subdirectories of a HTCondor installation. This can be used to overwrite an existing HTCondor install, or to layout the HTCondor files in preparation for making the installer.
cmake -DBUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX:PATH=c:\scratch\condor\release_dir -P cmake_install.cmake
Note: Building the INSTALL target in the Condor.sln solution file invokes this cmake file. It will copy build results to $(SolutionDir)\release_dir
Making the MSI installer
The WiX programs are used to create the MSI installer. Before you can create the MSI, you must copy build results to a release directory. See above.
To build the MSI, make sure that WiX is in your PATH, then navigate to the release dir and run etc\WiX\do_wix.bat
passing the path to the release dir and the name of the output MSI file as arguments. For example, if your release dir is c:\scratch\condor\release_dir
you would execute
cd c:\scratch\condor\release_dir etc\WiX\do_wix.bat %CD% c:\scratch\condor\Condor-X.Y.Z-winnt-x86.msi