Skip to content

Commit 518584f

Browse files
author
Koen Deforche
committed
see Changelog
1 parent 992c6f5 commit 518584f

25 files changed

+145
-155
lines changed

Changelog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
29-06-2009:
2+
* JSlot: fix exec() call as suggested by Adrian Sutherland
3+
14
25-06-2009:
25
* WCanvasPaintDevice, WSvgImage, WVmlImage: string -> stringstream
36
optimizations

INSTALL.win32.html

Lines changed: 22 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -24,53 +24,26 @@ <h2>Requirements</h2>
2424

2525
<p>Requirements:
2626
<ul>
27-
<li>Microsoft Visual Studio C++ 2005. Wt and all its dependencies also
28-
build on the Express Edition, which is free (as in beer) to use. If you
29-
use the Express Edition, you will also need to install the Platform
30-
SDK, which can be downloaded from Microsoft. It is recommended to
31-
upgrade your MSVC 2005 with Service Pack 1 as it contains important
32-
bugfixes. We have not tested Wt on older versions of MSVC.</li>
33-
<li>CMake cross-platform build system (www.cmake.org): cmake-2.4.x,
27+
<li>Microsoft Visual Studio C++ 2008. Wt and its dependencies also
28+
build on the Express Edition, which is free (as in beer) to use.
29+
<li>CMake cross-platform build system (www.cmake.org): cmake-2.6.x,
3430
Windows version.</li>
3531
<li>Boost 1.35 (or later).</li>
36-
<li>Xerces-C++ XML parser, version 2.7.0 or newer.</li>
37-
<li>OpenSSL, version 0.9.8d or newer.</li>
38-
<li>zlib 1.2.3</li>
3932
</ul>
4033
</p>
4134

4235
<p>Additional and optional requirements for some of the examples
4336
<ul>
37+
<li>For https support: OpenSSL, version 0.9.8d or newer.</li>
38+
<li>To compress traffic: zlib 1.2.3</li>
4439
<li>libgd (style, wt-homepage, mandelbrot)</li>
4540
<li>libmysql and libmysql++-2.x (hangman)</li>
4641
</ul>
4742
</p>
4843

49-
<p>On unix systems, libraries are usually installed in standard locations,
50-
with their header files in /usr/include (or variants) and the libraries in
51-
/usr/lib (or variants). Windows does not have such standard locations for
52-
storing header files and libraries. Therefore, you will have to point out
53-
where the libraries can be found. If you follow the recommendations below,
54-
the task of specifying these paths will be require minimal effort (but
55-
you'll still have to ensure that the executable will be able to locate the
56-
DLLs at runtime, e.g. by adding the directories to PATH).
57-
</p>
58-
59-
<p>CMake will automatically locate your libraries in subdirectories of
60-
USERLIB_ROOT (defaults to c:/libraries). Use the following directories:
61-
<ul>
62-
<li>Boost: During configuration of Boost, set the prefix to $USERLIB_ROOT/Boost</li>
63-
<li>Xerces-C++: TBD</li>
64-
<li>OpenSSL: TBD</li>
65-
<li>zlib: TBD</li>
66-
<li>libgd: TBD</li>
67-
<li>libmysql: TBD</li>
68-
<li>libmysql++: TBD</li>
69-
</ul>
70-
7144
<p>
7245
We stronly recommend to use libraries which are all built using the same
73-
compiler (MSVC 2005 SP1) and the same runtime configuration (/MT, /MD, /MTd
46+
compiler and the same runtime configuration (/MT, /MD, /MTd
7447
or /MDd) to avoid incompatibilities with the C runtime libraries. Mixing
7548
CRTs is NOT recommended, the <a href="http://www.zlib.net/DLL_FAQ.txt">zlib
7649
DLL FAQ</a> clearly explains why and what you should do about it (in
@@ -80,69 +53,37 @@ <h2>Requirements</h2>
8053

8154
<hr />
8255

83-
<h2>Building and installing the Wt library</h2>
84-
85-
<h4>1. Run CMake</h4>
86-
87-
<p>In the CMake GUI, set the 'Where is your source code' to the location where
88-
you unpacked the source code. Set 'Where to build the binaries' to a build
89-
directory (can be the same as the location of the source code). Press
90-
'Configure' and choose 'Build For Visual Studio 8 2005'.</p>
91-
92-
<p>During configuration, you will see messages that confirm that fastcgi is
93-
disabled, and that wthttp is enabled. You will probably also receive
94-
notifications of dependencies that were not found. You can now manually
95-
adjust the paths to the dependencies and other configuration parameters,
96-
and press the 'Configure' button again. When your configuration is complete,
97-
press 'Ok' and a solution file will be generated.</p>
98-
99-
100-
<p>Some variables you may want to change are:</p>
101-
102-
<dl>
103-
<dt><strong>CMAKE_INSTALL_PREFIX</strong></dt>
104-
<dd>Installation prefix for the library and include files)</dd>
105-
<dt><strong>CONFIGURATION</strong></dt>
106-
<dd>Location of the configuration file</dd>
107-
</dl>
56+
<h2>Step by step instructions to build and install the Wt library</h2>
10857

109-
<h4>2. Build the library and the examples</h4>
58+
Up to date instructions are located on the Wt wiki page:
59+
<a href="http://www.webtoolkit.eu/wt/wiki/index.php/Installing_Wt_2.1_on_MS_Windows">Installing Wt on MS Windows</a>
11060

111-
Start Microsoft Visual Studio, open the generated solution file, and
112-
select Build->Build Solution (or hit F7).
61+
<h2>Trying the examples (or your own Wt application) using wthttpd</h3>
11362

114-
<h4>3. Install the library:</h4>
115-
116-
No installation is required for wt applications, as long as the application
117-
is able to locate its dependencies (.dll files). Add the directories to the
118-
dependencies to the PATH, copy them to the current directory, or to any other
119-
location where Windows looks for dll files.
120-
121-
<hr />
122-
123-
<h2>Trying the examples (or your own Wt application)</h2>
124-
125-
<h3>Using wthttpd</h3>
126-
127-
<h4>1. Run the example <i>X</i></h4> in the MSVC IDE
63+
<h4>1. Run the example in the MSVC IDE </h4>
12864

12965
Right-click on the example project you want to run, and select 'Properties'.
13066
In Configuration Properties->Debugging, set the Command Arguments to
13167
<pre>
13268
--http-address=0.0.0.0 --http-port=8080 --deploy-path=/hello --docroot=.
13369
</pre>
134-
The easiest way to locate the dependency dlls, is to append their location
135-
to the PATH variable. In order to do so, change the Environment field to
136-
contain a PATH directive:
137-
<pre>
138-
PATH=c:/libraries/lib;c:/Boost/lib;&lt;path to wt.dll&gt;;&lt;path to wthttp.dll&gt;
139-
</pre>
14070

14171
<p>
14272
This will start a httpd server listening on all local interfaces, on
14373
port 8080, and you may browse the example at <a
14474
href="http://127.0.0.1:8080/hello">http://127.0.0.1:8080/hello</a></p>
14575

76+
<p>
77+
Examples that need extra files to run, should be executed from their source
78+
directory in order to find their dependency files (icons, css files, etc.
79+
Watch for 404 errors in Wt's output). To do so, set the 'Working directory'
80+
for the example to wt-2.x.x/examples/ExampleName. Some examples (e.g. the
81+
wt home page) need the 'resources' directory to work correctly. Copy
82+
the wt-2.x.x/resources to the example's source directory to solve this
83+
problem. Other examples (such as the Charts example) may require the
84+
installation of ExtJs. See the Wt reference manual for more information
85+
on how to obtain and install ExtJs.
86+
14687
<p>
14788
These are all the command-line options that are available:
14889
<pre>

examples/treeview-dragdrop/TreeViewDragDrop.C

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -388,14 +388,10 @@ private:
388388
treeView->setColumnWidth(4, 100);
389389
treeView->setColumnWidth(5, 100);
390390

391-
WItemDelegate *delegate;
392-
delegate = dynamic_cast<WItemDelegate *>
393-
(treeView->itemDelegateForColumn(4));
394-
delegate->setTextFormat(FileModel::dateDisplayFormat);
395-
396-
delegate = dynamic_cast<WItemDelegate *>
397-
(treeView->itemDelegateForColumn(5));
391+
WItemDelegate *delegate = new WItemDelegate(this);
398392
delegate->setTextFormat(FileModel::dateDisplayFormat);
393+
treeView->setItemDelegateForColumn(4, delegate);
394+
treeView->setItemDelegateForColumn(5, delegate);
399395

400396
treeView->setColumnAlignment(3, AlignRight);
401397
treeView->setColumnAlignment(4, AlignRight);

src/Wt/WAbstractItemModel.C

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@ bool matchValue(const boost::any& value,
4949

5050
switch (f) {
5151
case MatchStringExactly:
52-
return boost::algorithm::iequals(value_str, query_str);
52+
return boost::iequals(value_str, query_str);
5353
case MatchStringExactly | (int)MatchCaseSensitive:
54-
return boost::algorithm::equals(value_str, query_str);
54+
return boost::equals(value_str, query_str);
5555

5656
case MatchStartsWith:
57-
return boost::algorithm::istarts_with(value_str, query_str);
57+
return boost::istarts_with(value_str, query_str);
5858
case MatchStartsWith | (int)MatchCaseSensitive:
59-
return boost::algorithm::starts_with(value_str, query_str);
59+
return boost::starts_with(value_str, query_str);
6060

6161
case MatchEndsWith:
62-
return boost::algorithm::iends_with(value_str, query_str);
62+
return boost::iends_with(value_str, query_str);
6363
case MatchEndsWith | (int)MatchCaseSensitive:
64-
return boost::algorithm::ends_with(value_str, query_str);
64+
return boost::ends_with(value_str, query_str);
6565

6666
default:
6767
throw WtException("Not yet implemented: WAbstractItemModel::match with "

src/Wt/WAbstractProxyModel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ public:
105105
using WAbstractItemModel::setData;
106106
using WAbstractItemModel::data;
107107

108-
#ifndef WT_TARGET_JAVA
108+
#ifndef WT_CNOR
109109
using WAbstractItemModel::setHeaderData;
110-
#endif // WT_TARGET_JAVA
110+
#endif // WT_CNOR
111111

112112
private:
113113
WAbstractItemModel *sourceModel_;

src/Wt/WApplication.C

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ WApplication::WApplication(const WEnvironment& env)
6161
internalPathChanged_(this),
6262
#ifndef WT_TARGET_JAVA
6363
serverPush_(false),
64+
#ifndef WT_CNOR
6465
eventSignalPool_(new boost::pool<>(sizeof(EventSignal<>))),
66+
#endif
6567
shouldTriggerUpdate_(false),
6668
#endif // WT_TARGET_JAVA
6769
javaScriptClass_("Wt"),

src/Wt/WContainerWidget

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ private:
402402
void propagateLayoutItemsOk(WLayoutItem *item);
403403

404404
friend class WImage;
405+
friend class WTableCell;
405406
};
406407

407408
}

src/Wt/WContainerWidget.C

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,11 @@ void WContainerWidget::setContentAlignment(WFlags<AlignmentFlag> alignment)
267267
{
268268
contentAlignment_ = alignment;
269269

270+
/* Make sure vertical alignment is always specified */
271+
AlignmentFlag vAlign = contentAlignment_ & AlignVerticalMask;
272+
if (vAlign == 0)
273+
contentAlignment_ |= AlignTop;
274+
270275
flags_.set(BIT_CONTENT_ALIGNMENT_CHANGED);
271276

272277
repaint(RepaintPropertyAttribute);
@@ -361,7 +366,8 @@ void WContainerWidget::updateDom(DomElement& element, bool all)
361366
element.setProperty(PropertyStyleDisplay, "inline");
362367

363368
if (flags_.test(BIT_CONTENT_ALIGNMENT_CHANGED) || all) {
364-
switch (contentAlignment_ & AlignHorizontalMask) {
369+
AlignmentFlag hAlign = contentAlignment_ & AlignHorizontalMask;
370+
switch (hAlign) {
365371
case AlignLeft:
366372
if (flags_.test(BIT_CONTENT_ALIGNMENT_CHANGED))
367373
element.setProperty(PropertyStyleTextAlign, "left");
@@ -380,8 +386,9 @@ void WContainerWidget::updateDom(DomElement& element, bool all)
380386
break;
381387
}
382388

383-
if (domElementType() == DomElement_TD)
384-
switch (contentAlignment_ & AlignVerticalMask) {
389+
if (domElementType() == DomElement_TD) {
390+
AlignmentFlag vAlign = contentAlignment_ & AlignVerticalMask;
391+
switch (vAlign) {
385392
case AlignTop:
386393
if (flags_.test(BIT_CONTENT_ALIGNMENT_CHANGED))
387394
element.setProperty(PropertyStyleVerticalAlign, "top");
@@ -394,6 +401,7 @@ void WContainerWidget::updateDom(DomElement& element, bool all)
394401
default:
395402
break;
396403
}
404+
}
397405
}
398406

399407
if (flags_.test(BIT_ADJUST_CHILDREN_ALIGN)

src/Wt/WJavaScript

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ private:
302302
boost::signal6<void, A1, A2, A3, A4, A5, A6> *impl_;
303303
};
304304

305-
#ifndef WT_TARGET_JAVA
305+
#ifndef WT_CNOR
306306

307307
/*
308308
* JSignal -- specialization for void
@@ -315,7 +315,7 @@ public:
315315
bool collectSlotJavaScript = false);
316316
};
317317

318-
#else // WT_TARGET_JAVA
318+
#else // WT_CNOR
319319

320320
class WT_API JSignal0 : public JSignal<NoClass>
321321
{
@@ -329,9 +329,9 @@ public:
329329
void emit();
330330
};
331331

332-
#endif // WT_TARGET_JAVA
332+
#endif // WT_CNOR
333333

334-
#ifndef WT_TARGET_JAVA
334+
#ifndef WT_CNOR
335335

336336
template <typename A1, typename A2, typename A3,
337337
typename A4, typename A5, typename A6>
@@ -591,7 +591,7 @@ void JSignal<A1, A2, A3, A4, A5, A6>::processDynamic(const JavaScriptEvent& jse)
591591
SignalArgTraits<A6>::unMarshal(jse, 5));
592592
}
593593

594-
#endif // WT_TARGET_JAVA
594+
#endif // WT_CNOR
595595

596596
}
597597

src/Wt/WJavaScript.C

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
#include "WtException.h"
1010

1111
namespace Wt {
12-
12+
#ifndef WT_CNOR
1313
JSignal<void>::JSignal(WObject *object, const std::string& name,
1414
bool collectSlotJavaScript)
1515
: JSignal<>(object, name, collectSlotJavaScript)
1616
{ }
17+
#endif
1718

1819
void throwWtException(const std::string& msg)
1920
{

0 commit comments

Comments
 (0)