@@ -1551,8 +1551,64 @@ Unpack the source to
1551
1551
c:\Qt\4.x.x\
1552
1552
```
1553
1553
1554
+ === To include PostgreSQL support in Qt ===
1554
1555
1556
+ If you want to build Qt with PostgreSQL support you need to download
1557
+ PostgreSQL, install it and create a library you can later link with Qt.
1555
1558
1559
+ Download from .../binary/v8.2.5/win32/postgresql-8.2.5-1.zip from an
1560
+ PostgreSQL.org Mirror and install.
1561
+
1562
+ PostgreSQL is currently build with MinGW and comes with headers and libraries
1563
+ for MinGW. The headers can be used with Visual C++ out of the box, but the library
1564
+ is only shipped in DLL and archive (.a) form and therefore cannot be used with
1565
+ Visual C++ directly.
1566
+
1567
+ To create a library copy following sed script to the file mkdef.sed in
1568
+ PostgreSQL lib directory:
1569
+
1570
+ ```
1571
+ /Dump of file / {
1572
+ s/Dump of file \([^ ]*\)$/LIBRARY \1/p
1573
+ a\
1574
+ EXPORTS
1575
+ }
1576
+ /[ ]*ordinal hint/,/^[ ]*Summary/ {
1577
+ /^[ ]\+[0-9]\+/ {
1578
+ s/^[ ]\+[0-9]\+[ ]\+[0-9A-Fa-f]\+[ ]\+[0-9A-Fa-f]\+[ ]\+\([^ =]\+\).*$/ \1/p
1579
+ }
1580
+ }
1581
+ ```
1582
+
1583
+ and process execute in the Visual Studio C++ command line (from Programs menu):
1584
+
1585
+ cd c:\Program Files\PostgreSQL\8.2\bin
1586
+ dumpbin /exports ..\bin\libpq.dll | sed -nf ../lib/mkdef.sed >..\lib\libpq.def
1587
+ cd ..\lib
1588
+ lib /def:libpq.def /machine:x86
1589
+
1590
+ You'll need an sed for that to work in your path (e.g. from cygwin or msys).
1591
+
1592
+ That's almost it. You only need to the include and lib path to INCLUDE and LIB
1593
+ in vcvars.bat respectively.
1594
+
1595
+
1596
+ == Compile Qt ==
1597
+
1598
+ Open the Visual Studio C++ command line and cd to c:\Qt\4.x.x where you
1599
+ extracted the source and enter:
1600
+
1601
+ configure -platform win32-msvc2005
1602
+ nmake
1603
+ nmake install
1604
+
1605
+ Add -qt-sql-odbc -qt-sql-psql to the configure line if your want odbc and
1606
+ PostgreSQL support build into Qt.
1607
+
1608
+
1609
+ == Configure Visual C++ to use Qt ==
1610
+
1611
+ After building configure the Visual Studio Express IDE to use Qt:
1556
1612
1557
1613
1) open Visual Studio Express IDE
1558
1614
@@ -1580,7 +1636,25 @@ Source Files:
1580
1636
$(QTDIR)\src
1581
1637
```
1582
1638
1583
- == Environment Variables
1639
+ Hint: You can also add
1640
+
1641
+ ```
1642
+ QString = t=<d->data, su>, size=<d->size, i>
1643
+ ```
1644
+
1645
+ to AutoExp.DAT in C:\Program Files\Microsoft Visual Studio 8\Common7\Packages\Debugger in front of
1646
+
1647
+ ```
1648
+ [Visualizer]
1649
+ ```
1650
+
1651
+ That way the Debugger will show the contents of QString when you point at or
1652
+ watch a variable in the debugger. There are probably much more additions -
1653
+ feel free to add some - I just needed QString and took the first hit in google
1654
+ I could find.
1655
+
1656
+
1657
+ == Environment Variables ==
1584
1658
1585
1659
Right click on 'My computer' then select the 'Advanced' tab. Click environment variables and
1586
1660
create or augment the following '''System''' variables:
@@ -1606,7 +1680,31 @@ QTDIR c:\Qt\4.3.2
1606
1680
SVN_SSH "C:\\Program Files\\PuTTY\\plink.exe"
1607
1681
1608
1682
1683
+ == Install Python ==
1609
1684
1685
+ Download http://python.org/ftp/python/2.5.1/python-2.5.1.msi and install it.
1686
+
1687
+ == Install SIP ==
1688
+
1689
+ Download http://www.riverbankcomputing.com/Downloads/sip4/sip-4.7.1.zip and extract it somewhere.
1690
+ From a Visual C++ command line cd to the directory where you extract SIP and run:
1691
+
1692
+ ```
1693
+ c:\Program Files\python25\python configure.sh -p win32-msvc2005
1694
+ nmake
1695
+ nmake install
1696
+ ```
1697
+
1698
+ == Install PyQt4 ==
1699
+
1700
+ Download http://www.riverbankcomputing.com/Downloads/PyQt4/GPL/PyQt-win-gpl-4.3.1.zip and extract it somewhere.
1701
+ From a Visual C++ command line cd to the directory where you extracted PyQt4 and run:
1702
+
1703
+ ```
1704
+ c:\Program Files\python25\python configure.sh -p win32-msvc2005
1705
+ nmake
1706
+ nmake install
1707
+ ````
1610
1708
1611
1709
== Install CMake ==
1612
1710
@@ -1633,7 +1731,7 @@ http://subversion.tigris.org/downloads/1.4.5-win32/apache-2.2/svn-win32-1.4.5.zi
1633
1731
1634
1732
= Authors and Acknowledgments =
1635
1733
1636
- The follwing people have contributed to this document:
1734
+ The following people have contributed to this document:
1637
1735
1638
1736
- Windows MINGW Section
1639
1737
- Tim Sutton, Godofredo Contreras 2006
@@ -1643,6 +1741,8 @@ The follwing people have contributed to this document:
1643
1741
1644
1742
- Windows MSVC Section
1645
1743
- David Willis 2007
1744
+ - MSVC install additions Tim Sutton 2007
1745
+ - PostgreSQL, Qt compile, SIP, Python, AutoExp additions Juergen Fischer 2007
1646
1746
1647
1747
- OSX Section
1648
1748
- Tim Sutton, 2007
0 commit comments