Building Qt 4.8.3 and Qwt 5.2.2 on Windows 7 (64-bit) and Windows XP (32-bit) for RiverWare 6.3
Phil Weinstein, CADSWES, 9-20-2012 -- IN PROGRESS.
NOTE: This is a preliminary version of this document being included in some of the gzipped tar files described in section 4. Many of the links are to local files put aside in a subdirectory accompanying this file. A very-slightly more complete version of this document (e.g. citing the sizes of the ultimately generated gzipped tar files) will be available elsewhere. |
RiverWare dynamically links Qt (i.e. DLLs).
There is virtually no difference in the process of building Qt on these two Windows platforms -- i.e. other, for example, the way in which the system "path" is edited (which isn't actually that different anyway).
I referred to the following two webpages in devising the steps below:
(1) Download file qt-everywhere-commercial-src-4.8.3.zip from the Qt4 commercial customer portal (http://qt.digia.com/Log-in-Customer-Portal/).
(2) Extract and move the top-level directory to C:\Riverware\tools\Qt-483\
Note that the following two steps (3 and 4) -- modifying qt_functions.prf before configuring the Qt build -- is required only for the correct processing of the half-dozen Qt3 UI files in our DbDmi directory. It is actually a simple matter to port these to Qt4 UI files (even without porting the Qt3 widgets in those files to Qt4), i.e. by running the Qt "uic3" program to do this conversion. We just haven't done this yet.
(3) Make a backup copy of qt_functions.prf: -- (btw, see the preceeding note).
(4) Edit the "NEW" file. (See the "CADWSES" comments in this posted copy) and copy to (replace) qt_functions.prf
http://cadswes2.colorado.edu/~philw/2012/Qt483/qt_functions_prf_NEW.txt
(5a) Put C:\Riverware\tools\Qt-483\bin on the path. (This should be removed before building RiverWare).
(5b) Remove C:\RiverWare\tools\UnxUtils from the path. (This must be restored before building RiverWare).
(6) Open one of the two Visual Studio 2008 command prompts, depending on whether a 32-bit or 64-bit build of Qt is desired. From the Windows Start Menu: All Programs >> Microsoft Visual Studio 2008 >> Visual Studio Tools >> ...
... confirm that the path changes worked. (type: path). Note that the path will start with a whole bunch of Visual Studio paths. The configured paths follow those.
(7) Change to the C:\Riverware\tools\Qt-483\ directory, and type (or paste) the following 'configure' command (all on one line).
... the first part of this (the Qt config process) takes about 10 or 15 minutes to run on our 64-bit, Windows 7 windows machines and 2 or 3 times that on my 32-bit Windows XP machine. It is then necessary to respond to the following prompt which starts the build of the Qt libraries, tools and examples. This takes about four to five hours on 64-bit, and maybe 12 hours on 32-bit. (Just type "nmake") ...
Qt is now configured for building. Just run nmake.
To reconfigure, run nmake confclean and configure.
The following links are excerpts of the console output on the two Windows platforms, in two parts:
PROBLEM on Phil's 64-bit Windows 7 machine (Mohawk). The Qt 4.8.3 build was tried twice, and crashed in different places. This problem did not occur on "Wesel" (a 32-bit XP machine) or on "Spurwink" (a different 64-bit Windows 7 machine). Also, on Mohawk, RiverWare does sometimes crash when run in Visual Studio, I believe this may be due to a the same instability issue. It turns out that this is a known problem. See the response fro Digia Commercial Qt Support, below. CRASH ON WINDOWS 7 Qt 4.6.3 BUILD [9-17-2012]: Windows mt.exe failure:
CRASH ON WINDOWS 7 Qt 4.6.3 BUILD [9-18-2012]: Windows mt.exe failure:
RESPONSE FROM DIGIA COMMERCIAL SUPPORT: [To the mt.exe problem] you can try following: CONFIG -= embed_manifest_exe CONFIG -= embed_manifest_dll This error you get when using mt.exe sometimes occurs and usually rebuilding helps. It is speculated it might be due to a virus scanner. You should also check that the SDK in that machine is up to date, old SDK also can cause errors in mt.exe. |
Qt 4.8.3 DLLs are generated in this directory: C:\Riverware\tools\Qt-483\lib\. The 64-bit DLLs are enumerated below in a couple orders, shown here with their size (byte count). There are 19 DLLs in both debug and non-debug (release) versions (38 in all):
64-bit DLLs sorted by file name:2976256 Qt3Support4.dll 5024768 Qt3Supportd4.dll 1295360 QtCLucene4.dll 3316736 QtCLucened4.dll 3184640 QtCore4.dll 5778944 QtCored4.dll 3267584 QtDeclarative4.dll 6316544 QtDeclaratived4.dll 5478912 QtDesigner4.dll 2424320 QtDesignerComponents4.dll 4958208 QtDesignerComponentsd4.dll 8747008 QtDesignerd4.dll 10841088 QtGui4.dll 19514368 QtGuid4.dll 561664 QtHelp4.dll 1084416 QtHelpd4.dll 133632 QtMultimedia4.dll 283648 QtMultimediad4.dll 1168896 QtNetwork4.dll 2011136 QtNetworkd4.dll 910848 QtOpenGL4.dll 1756672 QtOpenGLd4.dll 1520640 QtScript4.dll 717824 QtScriptTools4.dll 1347072 QtScriptToolsd4.dll 6526976 QtScriptd4.dll 252928 QtSql4.dll 449024 QtSqld4.dll 343040 QtSvg4.dll 689664 QtSvgd4.dll 129536 QtTest4.dll 238592 QtTestd4.dll 17465856 QtWebKit4.dll 39426048 QtWebKitd4.dll 449024 QtXml4.dll 779776 QtXmld4.dll 329728 phonon4.dll 635392 phonond4.dll |
64-bit Non-Debug (Release) sorted by Size:129536 QtTest4.dll 133632 QtMultimedia4.dll 252928 QtSql4.dll 329728 phonon4.dll 343040 QtSvg4.dll 449024 QtXml4.dll 561664 QtHelp4.dll 717824 QtScriptTools4.dll 910848 QtOpenGL4.dll 1168896 QtNetwork4.dll 1295360 QtCLucene4.dll 1520640 QtScript4.dll 2424320 QtDesignerComponents4.dll 2976256 Qt3Support4.dll 3184640 QtCore4.dll 3267584 QtDeclarative4.dll 5478912 QtDesigner4.dll 10841088 QtGui4.dll 17465856 QtWebKit4.dll |
Debug Sorted by Size:238592 QtTestd4.dll 283648 QtMultimediad4.dll 449024 QtSqld4.dll 635392 phonond4.dll 689664 QtSvgd4.dll 779776 QtXmld4.dll 1084416 QtHelpd4.dll 1347072 QtScriptToolsd4.dll 1756672 QtOpenGLd4.dll 2011136 QtNetworkd4.dll 3316736 QtCLucened4.dll 4958208 QtDesignerComponentsd4.dll 5024768 Qt3Supportd4.dll 5778944 QtCored4.dll 6316544 QtDeclaratived4.dll 6526976 QtScriptd4.dll 8747008 QtDesignerd4.dll 19514368 QtGuid4.dll 39426048 QtWebKitd4.dll |
(8) Copy the 38 generated DLLs:
... there are ten other DLLs in the target directory required by RiverWare. This copy operation may overwrite prior DLLs (i.e. our previous Qt 4.6.3 DLLs). Some of the generated Qt 4.8.3 DLLs are "new" (not represented in Qt 4.6.3).
Note that versions of RiverWare built with Qt 4.6.3 (not 4.8.3) seem to run fine with the newer Qt 4.8.3 DLLs (in C:\Riverware\tools\bin\) -- though this hasn't been significantly tested, so is not a recommended "production" configuration.
RiverWare statically links Qwt (i.e. a .lib file -- either a debug or release library).
Rather than using 'nmake', I'm generating Visual Studio .vcproj files from .pro files, and building the libraries in Visual Studio 2008. I'm not taking time to actually build the examples. I'm building only the static libraries:
PROCESS:
(1) Download the Qwt 5.2.2 zip file from http://sourceforge.net/projects/qwt/files/qwt/5.2.2/
(2) Unpack and move the top level directory to:
(3) Look over the INSTALL file instructions, in particular, Section (B) Win32/MSVC Qt3/Qt4
(2) Edited qwtconfig.pri (a 'pro' include file) -- significant values:
INSTALLBASE = C:/RiverWare/tools/Qwt-522_Qt-483
CONFIG += debug_and_release
CONFIG += build_all
# CONFIG += QwtDll
CONFIG += QwtPlot
CONFIG += QwtWidgets
# CONFIG += QwtSVGItem
# CONFIG += QwtMathML
(4) Make a backup copy of qwt_plot_curve.cpp:
(5) Apply SOURCE CODE FIX to qwt_plot_curve-NEW.cpp and copy over qwt_plot_curve.cpp.
See the edited copy posted here:
http://cadswes2.colorado.edu/~philw/2012/Qt483/Qwt522-Changes/qwt_plot_curve-NEW_cpp.txt
Method: void QwtPlotCurve::drawLines (QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const ... around line 740
for (int i = from; i <= to; i++) { // CADSWES FIX -- originally developed with Qwt 5.0.2: // Change [i] to [i - from]. Without this, our solution to // drawing disjoint curves (having internal NaNs) crashes. // //-- WRONG: QwtDoublePoint &p = points[i]; QwtDoublePoint &p = points[i - from]; p.setX( xMap.xTransform(x(i)) ); p.setY( yMap.xTransform(y(i)) ); } |
(5) Optional: Confirm that the qmake.exe is the new one from Qt 4.8.3
(6) Generate the Visual Studio ".vcproj" files (from Qwt's ".pro" files):
Among other things, this results in the creation of file: src\qwtd.vcproj. Note: the 'd' signifies 'debug' (rather than 'release'). But we really don't need a separate vcproj file for 'release'. That can just be toggled within Visual Studio.
(7) In Visual Studio 2008, open the project file:
(7a) In Visual Studion2008, Build the Release (non-debug) and Debug Libraries:
(8) For the 64-bit build, insure that the two generated libraries are in, or moved to C:\RiverWare\tools\Qwt-522_Qt-482\lib\. This is the normal destination for the 32-bit build, and I have also seen the 64-bit build put them there too -- but not always. That is, the 64-bit libraries may be created here:
If so, copy them here:
After building Qt 4.8.3 and Qwt 5.2.2, restore the system path. (See Qt 4.8.3 step 5 above). This must be done before building RiverWare. In particular, the Unix Utilities are needed for the RiverWare build.
(1) The original Qt 4.8.3 and Qwt 5.2.2 zipped source downloads were placed in our development tools deployment download area: R:\windows\config\downloads\
(2) The generated Qt 4.8.3 DLLs in the C:\RiverWare\tools\bin\ directories on the "staging" machines were tar-gzipped and placed in our development tools deployment area in R:\windows\config\
These gzipped tar files contain a form of the following notes (with a different "Note" file name):
These include the following information (common to both 64-bit and 32-bit):
C:\Riverware\tools\bin\ changes for upgrade from Qt 4.6.3 to Qt 4.8.3. September 2012 for RiverWare 6.3 ( 1) cplex122.dll -- no change ( 2) gdal19.dll -- no change ( 3) lti_dsdk.dll -- no change ( 4) oci.dll -- no change ( 5) oraocci11d.dll -- no change ( 6) oraocci11.dll -- no change ( 7) proj.dll -- no change ( 8) rlm902.dll -- no change ( 9) rlm.dll -- no change (10) tcl85.dll -- no change ( 1) Qt3Support4.dll -- Qt 4.8.3 -- REPLACED ( 2) Qt3Supportd4.dll -- Qt 4.8.3 -- REPLACED ( 3) QtCore4.dll -- Qt 4.8.3 -- REPLACED ( 4) QtCored4.dll -- Qt 4.8.3 -- REPLACED ( 5) QtGui4.dll -- Qt 4.8.3 -- REPLACED ( 6) QtGuid4.dll -- Qt 4.8.3 -- REPLACED ( 7) QtNetwork4.dll -- Qt 4.8.3 -- REPLACED ( 8) QtNetworkd4.dll -- Qt 4.8.3 -- REPLACED ( 9) QtSql4.dll -- Qt 4.8.3 -- REPLACED (10) QtSqld4.dll -- Qt 4.8.3 -- REPLACED (11) QtXml4.dll -- Qt 4.8.3 -- REPLACED (12) QtXmld4.dll -- Qt 4.8.3 -- REPLACED ( 1) phonon4.dll -- Qt 4.8.3 -- NEW ( 2) phonond4.dll -- Qt 4.8.3 -- NEW ( 3) QtCLucene4.dll -- Qt 4.8.3 -- NEW ( 4) QtCLucened4.dll -- Qt 4.8.3 -- NEW ( 5) QtDeclarative4.dll -- Qt 4.8.3 -- NEW ( 6) QtDeclaratived4.dll -- Qt 4.8.3 -- NEW ( 7) QtDesigner4.dll -- Qt 4.8.3 -- NEW ( 8) QtDesignerd4.dll -- Qt 4.8.3 -- NEW ( 9) QtDesignerComponents4.dll -- Qt 4.8.3 -- NEW (10) QtDesignerComponentsd4.dll -- Qt 4.8.3 -- NEW (11) QtHelp4.dll -- Qt 4.8.3 -- NEW (12) QtHelpd4.dll -- Qt 4.8.3 -- NEW (13) QtMultimedia4.dll -- Qt 4.8.3 -- NEW (14) QtMultimediad4.dll -- Qt 4.8.3 -- NEW (15) QtOpenGL4.dll -- Qt 4.8.3 -- NEW (16) QtOpenGLd4.dll -- Qt 4.8.3 -- NEW (17) QtScript4.dll -- Qt 4.8.3 -- NEW (18) QtScriptd4.dll -- Qt 4.8.3 -- NEW (19) QtScriptTools4.dll -- Qt 4.8.3 -- NEW (20) QtScriptToolsd4.dll -- Qt 4.8.3 -- NEW (21) QtSvg4.dll -- Qt 4.8.3 -- NEW (22) QtSvgd4.dll -- Qt 4.8.3 -- NEW (23) QtTest4.dll -- Qt 4.8.3 -- NEW (24) QtTestd4.dll -- Qt 4.8.3 -- NEW (25) QtWebKit4.dll -- Qt 4.8.3 -- NEW (26) QtWebKitd4.dll -- Qt 4.8.3 -- NEW |
NOTE: The following description is preliminary, for the inclusion of THIS document in the indicated gzipped tar files.
(3) The built Qt 4.8.3 source trees are being tar-gzipped and placed in our development tools deployment area in R:\windows\config\ ...
(4) The build Qwt 5.2.2 source trees are being tar-gzipped and placed in our development tools deployment area in R:\windows\config\ ...
(5) The win-config.pl perl script in R:\windows\config\boot\ will be updated to support the deployment the contents of the following gzipped tar files. Note that the naming convention is important -- the difference between the 32-bit and 64-bit file names must be that the latter includes "-x64" (as demonstrated with these filenames), and the 32-bit filenames are the same, except for omitting "-x64". In particular, they cannot include "-x32" (i.e. given the current implementation of the win-config.pl script).
To 32-bit machines:
- R:\windows\config\tools_bin.tar.gz
- R:\windows\config\Qt-483.tar.gz
- R:\windows\config\Qwt-522_Qt-483.tar.gz
To 64-bit machines:
- R:\windows\config\tools_bin-x64.tar.gz
- R:\windows\config\Qt-483-x64.tar.gz
- R:\windows\config\Qwt-522_Qt-483-x64.tar.gz
IN PROGRESS -- See the note at the top of this document.
--- (end) ---