Building Windows Msi

In order to make the MSI you need a machine or VM running Windows. WiX must be installed and in the path. There is a Windows 7 VM available on monza.cs.wisc.edu at /scratch/condor-vm that can be used. This VM has some additional scripts to simplify the process. However, the VM does require a newer version of vmware than is installed by default on the lab computers as of 2011-02.

  1. Load the Windows VM.

  2. The password for the HTCondor user is the same password as for our web page.

  3. Open a shell using the "Condor Build" icon on the desktop. This puts WiX and 7-zip into the path, (as well as cmake and the compiler)

  4. Create a directory in C:\scratch e.g. C:\scratch\pkg760 and put the HTCondor ZIP file into it. You can do this by downloading the results.tar.gz from your build into this directory and unpacking it via 7-Zip:

   c:\> cd c:\scratch\pkg760
   c:\scratch\pkg760> 7z x results.tar.gz
   c:\scratch\pkg760> 7z x results.tar

Alternatively you can map a directory from your local machine into the VM and copy the ZIP file from there. A mapping should already exist to point to the /scratch/condor-vm directory on monza. The mapping can be seen as the Z: drive in My Computer. If the mapping is missing it can be created by going to VM -> Settings -> Options Tab -> Shared Folders -> Add

  1. Put the HTCondor zip file in this directory

   c:\scratch\pkg760> move public\condor*.zip .

  1. Unzip the HTCondor ZIP file into a temporary directory.

   c:\scratch\pkg760> 7z x -oTemp condor*.zip *

  1. Change into the bin directory and test for debug c-runtime

   c:\scratch\pkg760> cd Temp\bin
   c:\scratch\pkg760> @for %I in (*.dll *.exe) do @link -dump -imports %I | findstr /i href="/wiki-archive/pages/90D" 

There is a script called testfordebugcrt.bat in the VM that contains the for command above. If the for command produces any output, then you have debug c-runtime linkage. If this happens stop . you cannot ship these binaries!

  1. build the MSI, there is a batch file called do_wix.bat in the etc\xml directory. Run this batch file and pass it the path and filename for the MSI to make an MSI. Note that the WiX programs heat.exe, light.exe and candle.exe must be in the PATH.

   c:\scratch\pkg760> Temp\etc\WiX\do_wix.bat "%CD%\Condor-7.6.0-winnt-x86.msi"

  1. If NMI is still putting an extra directory into the ZIP file that it creates, you will have to make a new ZIP file. You can use 7-zip to unzip, but do NOT use 7-zip to build the new ZIP file - it uses the wrong compression. Use the Windows Shell to do this. (instructions at the bottom of this page)

  2. Transfer the files back out of the VM and put them in the appropriate place in NFS. Make sure the zip file and MSI are named similarly (e.g. they both start with condor-7.6.0)

Additional Notes:

The VM has a script called packageit.bat that will unzip the HTCondor ZIP file into a temporary directory and make and MSI from it, then optionally delete the temporary directory.

To make a ZIP file using the Windows Shell.

  1. start an Explorer window.

    c:\scratch\pkg760> start .

  1. right click in this window and choose New -> Compressed (zipped) folder

  2. give the folder the desired name, e.g. Condor-7.6.0-winnt-x86.zip

  3. navigate into the condor root folder - the parent folder of the bin folder. and hit ctrl+A to select all and then Ctrl+C to copy.

  4. navigate back to the folder containing the new empty ZIP file.

  5. right click on the ZIP file and choose Paste