[bt-devel] Updated Windows Build Procedure

Gary Holmlund gary.holmlund at gmail.com
Tue Oct 13 20:09:17 MST 2009


Greg,

There is an issue where the Visual Studio 2008 SP1 compiler compiles 
libraries and exes and embeds a version number requiring the VS 2008 
(not VS2008 SP1) run time libraries. Our cmake/NSIS installer was 
copying the VS2008SP1 libraries into the BibleTime\bin directory. This 
version number difference was causing crashes when we try to run on a 
non-development computer. There are more details about this issue at 
this link.
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=361682

After looking at the workarounds in the above link, I was manually 
editing the version number in BT to the VS2008SP1 value. This also had 
to be done the Qt dlls. This manual procedure was rather ugly.

On further study I found that Microsoft recommends a different procedure 
that is much cleaner. Instead of installing the VS run time libraries in 
BibleTime\bin, we install a program from Microsoft called 
vcredist_x86.exe. This installs the VS run time libraries in 
c:\Windows\WinSiS\...  These are then in a central location and shared 
among all programs requiring them. To do this I put steps into the BT 
installer to install the vcredist_x86.exe and then delete the exe as it 
is no longer needed. There are several versions of programs by this 
name, but we need the VS2008 version because that is what the VS2008 or 
VS2008SP1 compiler embeds into libs and exes.

I have updated the cmake/BTCpack.cmake to do this and I have updated the 
building on windows wiki instructions. Please note that I added two 
cmake variables to the procedure.

CMAKE_BUILD_TYPE       Release
MSVC_REDIST                   c:/Bt/msvcrt/vcredist_x86.exe

http://devel.bibletime.info/wiki/Building_on_Windows

Gary Holmlund



More information about the bt-devel mailing list