Skip to content

Commit 8abf738

Browse files
author
Koen Deforche
committed
fixing Windows build issues
1 parent a06ffd1 commit 8abf738

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+418
-163
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ IF(NOT SHARED_LIBS)
3434
SET(WT_STATIC true)
3535
SET(WTHTTP_STATIC true)
3636
SET(WT_EXT_STATIC true)
37+
SET(WTDBO_STATIC true)
38+
SET(WTDBOSQLITE3_STATIC true)
39+
SET(WTDBOPOSTGRES_STATIC true)
3740
ENDIF(NOT SHARED_LIBS)
3841

3942
IF(NOT MULTI_THREADED)
@@ -79,6 +82,7 @@ IF(WIN32)
7982
SET(BOOST_DIR "c:/Program Files/Boost" CACHE PATH "Use boost in directory")
8083
SET(GD_DIR ${USERLIB_ROOT} CACHE PATH "Search path for libgd")
8184
OPTION(BOOST_DYNAMIC "Link to boost DLLs (OFF means static link)" OFF)
85+
SET(POSTGRES_ROOT "c:/libraries" CACHE PATH "directory containing postgresql (overrides USERLIB_ROOT)")
8286
ELSE(WIN32)
8387
SET(USERLIB_ROOT /usr CACHE PATH "Other installation prefix for dependent libraries")
8488
SET(LIB_INSTALL_DIR "lib" CACHE STRING "Default path for libraries within ${CMAKE_INSTALL_PREFIX}")
@@ -89,6 +93,7 @@ ELSE(WIN32)
8993
SET(DEPLOYROOT /var/www/localhost/htdocs/wt-examples CACHE PATH "Path to deploy examples into)")
9094
SET(BOOST_DIR /usr CACHE PATH "Boost installation path prefix")
9195
SET(GD_DIR "/usr/lib" CACHE PATH "Search path for libgd2")
96+
SET(POSTGRES_ROOT "/usr" CACHE PATH "directory containing postgresql (overrides USERLIB_ROOT)")
9297
ENDIF(WIN32)
9398

9499
OPTION(DEBUG "Support for debugging, must be enabled also in wt_config.xml" OFF)

ReleaseNotes.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ <h2>Release 3.1.2 (March 26, 2010)</h2>
2626
<h3>A) New classes:</h3>
2727

2828
<dl>
29+
<dt><a href="classWt_1_1WShadow.html">WShadow</a></dt>
30+
<dd>Class representing a drop shadow effect (see below).</dd>
2931
<dt><a href="classWt_1_1Dbo_1_1backend_1_1Postgres.html">Dbo/backend/Postgres</a></dt>
3032
<dd>A Postgres backend has landed, contributed by Hilary Cheng.</dd>
3133
</dl>
@@ -46,6 +48,9 @@ <h3>B) Main new features in existing classes:</h3>
4648
<tt>boost::posix_time::ptime</tt>.</dd>
4749
<dt><a href="classWt_1_1WFormWidget.html">WFormWidget</a></dt>
4850
<dd>Added a <a href="classWt_1_1WFormWidget.html#92de7a4d9ca6796607dc9fd26f608436">setEmptyText()</a> method to implement a label inside a line edit or text area.</dd>
51+
<dt><a href="classWt_1_1WPainter.html">WPainter</a></dt>
52+
<dd>Added a <a href="classWt_1_1WPainter.html#06bb9dbe3ae195c320cfed7b062d448a">setShadow()</a> method which defines a drop shadow to be used for subsequent
53+
drawing actions.</dd>
4954
<dt><a href="classWt_1_1WResource.html">WResource</a></dt>
5055
<dd>Added a <a href="classWt_1_1WResource.html#06bb9dbe3ae195c320cfed7b062d448a">setInternalPath()</a> method which allow a resource to be deployed at a deterministic and "pretty" URL.</dd>
5156
<dt><a href="classWt_1_1WString.html">WString</a></dt>

WConfig.h.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@
1919
#define WTHTTP_CONFIGURATION "${WTHTTP_CONFIGURATION}"
2020

2121
#cmakedefine WT_STATIC
22+
#cmakedefine WTDBO_STATIC
23+
#cmakedefine WTDBOPOSTGRES_STATIC
24+
#cmakedefine WTDBOSQLITE3_STATIC
2225
#cmakedefine WTHTTP_STATIC
2326
#cmakedefine WT_EXT_STATIC
27+
#cmakedefine WT_EXT_STATIC
2428

2529
#if ${WT_DEBUG_ENABLED}
2630
#ifndef WT_TARGET_JAVA

cmake/WtFindPostgresql.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44
# - POSTGRES_FOUND
55
#
66

7-
FIND_LIBRARY(POSTGRES_LIBRARIES pq
7+
FIND_LIBRARY(POSTGRES_LIBRARIES
8+
NAMES
9+
pq libpq
10+
PATHS
811
/usr/lib
912
/usr/local/lib
1013
/opt/local/lib
14+
${POSTGRES_ROOT}/lib
1115
${USERLIB_ROOT}/lib
1216
)
1317

@@ -18,6 +22,8 @@ FIND_PATH(POSTGRES_INCLUDE libpq-fe.h
1822
/usr/local/include/postgresql
1923
/opt/local/include
2024
/opt/local/include/postgresql
25+
${POSTGRES_ROOT}/include
26+
${POSTGRES_ROOT}/postgresql/include
2127
${USERLIB_ROOT}/include
2228
${USERLIB_ROOT}/postgresql/include
2329
)

examples/filetreetable/FileTreeTableNode.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ FileTreeTableNode::FileTreeTableNode(const boost::filesystem::path& path)
2727

2828
if (boost::filesystem::exists(path)) {
2929
if (!boost::filesystem::is_directory(path)) {
30-
int fsize = boost::filesystem::file_size(path);
30+
int fsize = (int)boost::filesystem::file_size(path);
3131
setColumnWidget(1, new WText(boost::lexical_cast<std::wstring>(fsize)));
3232
columnWidget(1)->setStyleClass("fsize");
3333
} else

examples/painting/PaintExample.C

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,24 @@ PaintExample::PaintExample(WContainerWidget *root, bool showTitle)
2020
std::string text;
2121
if (showTitle)
2222
text += "<h2>Paint example</h2>";
23+
2324
text +=
2425
"<p>A simple example demonstrating cross-browser vector graphics."
2526
"</p>"
26-
"<p>The emweb logo below is painted using the Wt WPainter API from bezier paths, and "
27-
"rendered to the browser using inline SVG, inline VML or the "
28-
"HTML 5 &lt;canvas&gt; element."
27+
"<p>The emweb logo below is painted using the Wt WPainter API from "
28+
"bezier paths, and rendered to the browser using inline SVG, inline VML "
29+
"or the HTML 5 &lt;canvas&gt; element."
2930
"</p>"
3031
"<p>"
3132
"The example also demonstrates the horizontal and vertical "
3233
"<a href=\"http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WSlider.html\" target=\"_blank\">"
33-
"WSlider</a> widgets. Here, the events of the WSlider"
34-
"widgets are used to scale and rotate the emweb logo."
34+
"WSlider</a> widgets (which are rendered using vector graphics). Here, "
35+
"the events of the WSlider widgets are used to scale and rotate the "
36+
"emweb logo."
37+
"</p>"
38+
"<p>"
39+
"In non-IE browsers, a different backend is used for positive or negative "
40+
"angles (SVG or HTML canvas)."
3541
"</p>";
3642

3743
new WText(text, this);

examples/painting/ShapesWidget.C

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ void ShapesWidget::paintEvent(WPaintDevice *paintDevice)
5353
{
5454
WPainter painter(paintDevice);
5555

56+
painter.setShadow(WShadow(10, 10, WColor(0, 0, 0, 50), 10));
5657
painter.setRenderHint(WPainter::Antialiasing);
5758

5859
painter.translate(width().value()/2, height().value()/2);
@@ -108,8 +109,8 @@ void ShapesWidget::drawEmwebMW(WPainter& painter)
108109
p.cubicTo(144.14176,24.512492,149.113,21.235634,156.98545,21.235634);
109110
p.cubicTo(164.8499,21.235634,169.81314,24.512492,173.10599,31.841463);
110111
p.cubicTo(176.10311,38.53904,176.215,45.708164,176.215,45.780095);
111-
p.lineTo(176.215,80.41343);
112-
p.lineTo(197.97014,80.41343);
112+
p.lineTo(176.215,70.41343);
113+
p.lineTo(197.97014,70.41343);
113114
p.lineTo(197.97014,45.732141);
114115
p.cubicTo(197.97014,44.605222,197.83427,34.518895,193.35057,24.072913);
115116
p.cubicTo(186.70894,8.5517985,173.77734,0,156.99344,0);

examples/wt-homepage/ExampleSourceViewer.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void ExampleSourceViewer::setExample(const std::string& exampleDir,
101101
bool exists = false;
102102
try {
103103
exists = fs::exists(exampleDir);
104-
} catch (std::exception& e) {
104+
} catch (std::exception&) {
105105
}
106106

107107
if (!exists) {

examples/wt-homepage/SourceView.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ std::string getLanguageFromFileExtension(const std::string &fileName)
7878

7979
std::string readFileToString(const std::string& fileName)
8080
{
81-
std::size_t outputFileSize = fs::file_size(fileName);
81+
std::size_t outputFileSize = (std::size_t)fs::file_size(fileName);
8282
std::fstream file (fileName.c_str(), std::ios::in | std::ios::binary);
8383
char* memblock = new char [outputFileSize];
8484
file.read(memblock, outputFileSize);

examples/wt-homepage/jwt-home.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ you may share tips, notes and experiences using JWt.
635635

636636
<p>
637637
Browse below the source code for all examples included in
638-
<a href="http://webtoolkit.eu/jwt">JWt</a>.
638+
<a href="http://www.webtoolkit.eu/jwt">JWt</a>.
639639
</p>
640640
</div>
641641
</message>
@@ -648,7 +648,7 @@ you may share tips, notes and experiences using JWt.
648648

649649
<p>
650650
Browse below the source code for JWt's
651-
<a href="http://webtoolkit.eu/jwt/examples/hello_world">
651+
<a href="http://www.webtoolkit.eu/jwt/examples/hello_world">
652652
Hello world</a> example.
653653
</p>
654654
</div>
@@ -662,7 +662,7 @@ you may share tips, notes and experiences using JWt.
662662

663663
<p>
664664
Browse below the source code for JWt's
665-
<a href="http://webtoolkit.eu/jwt/examples/hello_world">
665+
<a href="http://www.webtoolkit.eu/jwt/examples/hello_world">
666666
Hello world</a> example.
667667
</p>
668668
</div>
@@ -676,7 +676,7 @@ you may share tips, notes and experiences using JWt.
676676

677677
<p>
678678
Browse below the source code for JWt's
679-
<a href="http://webtoolkit.eu/jwt/examples/charts">
679+
<a href="http://www.webtoolkit.eu/jwt/examples/charts">
680680
Charts</a> example.
681681
</p>
682682
</div>
@@ -690,7 +690,7 @@ you may share tips, notes and experiences using JWt.
690690

691691
<p>
692692
Browse below the source code for JWt's
693-
<a href="http://webtoolkit.eu/jwt/examples/treeview">
693+
<a href="http://www.webtoolkit.eu/jwt/examples/treeview">
694694
Treeview</a> example.
695695
</p>
696696
</div>
@@ -704,7 +704,7 @@ you may share tips, notes and experiences using JWt.
704704

705705
<p>
706706
Browse below the source code for JWt's
707-
<a href="http://webtoolkit.eu/jwt/examples/composer">
707+
<a href="http://www.webtoolkit.eu/jwt/examples/composer">
708708
Mail composer</a> example.
709709
</p>
710710
</div>

0 commit comments

Comments
 (0)