12. Januar 2012

just more incredible - the incredible Blog

Die Unglaublichkeit scheint kein Ende zu nehmen xD

Nach the incredible Machine und the incredible Staggers, (zuvor kurz The Staggers) bin ich nun auf einen weiteren incredible Blog gestoßen :-o

www.incredibleblog.co.za aber nicht von dem incredible Leitman :-/

Wie es aussieht ein Blog über aktuelle Technologien,
Apple, Gaming, Tablets, Laptops, Cameras, Cellulas und "Specials" kann man den Topics entnehmen.

Gehostet wird dieser incredibleBlog scheinbar von Whitespace, die vermarktende Firma nennt sich Incredible Connection.


Tja, was es so alles gibt :)
- der RICHTIGE incredible Leitman xD

NACHTRAG zu wt - Installation on windows

Eigentlich wollte ich den ursprünglichen Beitrag "wt - Installation on windows" editieren und erweitern, bzw. mit Kommentaren weitere Informationen ergänzen...
aber dann hatte ich ein schlechtes Gefühl, wenn ich auf einen eigenen Beitrag selber kommentiere :-/
(Das ist ungefähr so, wie auf Facebook seinen eigenen Status zu liken xD)

Darum hier, ein eigener Beitrag mit einigen zusätzlichen Informationen:


Starten von wt Beispielen

Wie bereits in der Dokumentation beschrieben
[copy - paste]
In the MSVC IDE Right-click on the example project you want to run, and select 'Properties'. In Configuration Properties->Debugging, set the Command Arguments to

--http-address=0.0.0.0 --http-port=8080 --deploy-path=/hello --docroot=.

Wt builds static versions of all libraries by default and links against static boost libraries by default. If you would choose to build dynamic libraries in the future (see remarks at the bottom of this page), the easiest way to locate the dependency dlls, is to append their location to the PATH variable. In order to do so, change the Environment field to contain a PATH directive:
PATH=c:/libraries/lib;c:/Boost/lib;;

Right-click on the example project you want to run and select 'Set as Startup Project'. Press F5 (Run). This will start a httpd server listening on all local interfaces, on port 8080, and you may browse the example at http://127.0.0.1:8080/hello

Examples that need extra files to run, should be executed from their source directory in order to find their dependency files (icons, css files, etc. Watch for 404 errors in Wt's output). To do so, set the 'Working directory' for the example to wt-2.x.x/examples/ExampleName. Some examples (e.g. the wt home page) need the 'resources' directory to work correctly. Copy the wt-2.x.x/resources to the example's source directory to solve this problem. Other examples (such as the Charts example) may require the installation of ExtJs. See the Wt reference manual for more information on how to obtain and install ExtJs.

These are all the command-line options that are available (run the wt application with --help to see the newer options available in your version):
General options:
  -h [ --help ]              produce help message
  -t [ --threads ] arg (=10) number of threads
  --docroot arg              document root for static files
  --no-compression           do not compress dynamic text/html and text/plain 
                             responses
  --deploy-path arg (=/)     location for deployment


HTTP server options:
  --http-address arg    IPv4 (e.g. 0.0.0.0) or IPv6 Address (e.g. 0::0)
  --http-port arg (=80) HTTP port (e.g. 80)


HTTPS server options:
  --https-address arg     IPv4 (e.g. 0.0.0.0) or IPv6 Address (e.g. 0::0)
  --https-port arg (=443) HTTPS port (e.g. 443)
  --ssl-certificate arg   SSL server certificate chain file
                          e.g. "/etc/ssl/certs/vsign1.pem" 
  --ssl-private-key arg   SSL server private key file
                          e.g. "/etc/ssl/private/company.pem" 
  --ssl-tmp-dh arg        File for temporary Diffie-Hellman parameters
                          e.g. "/etc/ssl/dh512.pem" 
[/copy - paste]



Möglicherweise auftretende Probleme


  • CMake Error: file cannot create directory

Ich erhielt seltsamerweise die folgende Fehlermeldung von cmake, als ich, wie in der Installationsanleitung beschrieben, versucht habe, das "INSTALL" Projekt zu bauen:
"Install the project... -- Install configuration: "Debug" CMake Error at cmake_install.cmake:33 (FILE): file cannot create directory: C:\WT C:\Programme\cmake. Maybe need administrative privileges."

Was auch verständlich ist, denn wieso sollte ein directory aus zwei Pfadangaben bestehen? o.O
Jedenfalls, wirklich in meinem cmake file (cmake_install.cmake, befindet sich im build Verzeichnis von wt, welches lt. Installationsanleitung mit cmake erstellt wurde) steht in Zeile 33
"FILE(INSTALL DESTINATION "C:/Programme/WT/C:/Programme/cmake/share/cmake-version/Modules" TYPE FILE FILES "WT_ROOT/cmake/FindWt.cmake")"

Keine Ahnung, woher das gekommen ist,
aber selbstverständlich funktioniert das Ganze, wenn lediglich EIN Zielverzeichnis angegeben wird
"FILE(INSTALL DESTINATION "C:/Programme/WT" TYPE FILE FILES "WT_ROOT/cmake/FindWt.cmake")"



  • default_token is not a static member of class boost::random::random_device

Beim kompilieren erhielt ich einige Fehlermeldungen im Stil von:
" t-3.1.11\src\web\random_device.cpp:125: error: 'const char* const boost::random::random_device::default_token' is not a static member of 'class boost::random::random_device'
wt-3.1.11\src\web\random_device.cpp: In constructor 'boost::random::random_device::random_device(const std::string&)':wt-3.1.11\src\web\random_device.cpp:165: error: 'max_value' was not declared in this scope "

Nach einigem Suchen, bin ich auf ein Ticket in der boost library gestoßen das besagt, das dies passiert wenn das flag WT_NO_BOOST_RANDOM nicht korrekt gesetzt ist.
Die Lösung war, mittels cmake die Konfiguration nochmals zu laden, das flag auf FALSE zu stellen und nochmals zu generieren :)



  • _SCL_SECURE_NO_WARNINGS macro redefinition in Boost.Move

Zu guter Letzt erhielt ich noch ungefähr 1900 Warnungen dass ein Macro erneut definiert wurde xD
Dies scheint jedoch auch ein bug in der boost library version 1.48 zu sein (Ticket) und ist über ein wenig Patcharbeit schnell ausgebügelt:
[copy - paste]
In the "boost/move/move.hpp" (line 28) header file _SCL_SECURE_NO_WARNINGmacro is defined without checking whether previous definition exists:
#ifdef BOOST_MSVC
   #ifndef _CRT_SECURE_NO_DEPRECATE
   #define  BOOST_INTERPROCESS_CRT_SECURE_NO_DEPRECATE
   #define _CRT_SECURE_NO_DEPRECATE
   #define _SCL_SECURE_NO_WARNINGS
   #endif
   #pragma warning (push)
   #pragma warning(disable:4996)
#endif
Correct code:
#ifdef BOOST_MSVC
   #ifndef _CRT_SECURE_NO_DEPRECATE
   #define  BOOST_INTERPROCESS_CRT_SECURE_NO_DEPRECATE
   #define _CRT_SECURE_NO_DEPRECATE
   #endif
   #ifndef _SCL_SECURE_NO_WARNINGS
   #define _SCL_SECURE_NO_WARNINGS
   #endif
   #pragma warning (push)
   #pragma warning(disable:4996)
#endif
[/copy - paste]


Sooooo.... puh,  ist doch ein wenig mehr als gedacht :-o
War also doch die richtige Entscheidung, das in einen extra Post zu verfrachten ;)


Ich hoffe, hiermit jemandem mit einem eventuell auftretendem selben Problem vielleicht geholfen zu haben,
doch wenn nicht habe ich immer noch die Genugtuung, das alles zusammengeschrieben zu haben falls ich wieder mal in die Versuchung komme diesen ganzen Framework-aufsetzen-Durchgang zu wiederholen ^^

mit freundlichen Grüßen,
happy coding :)
- the incredible Leitman 

11. Januar 2012

wt - Installation on windows

Endlich ist es so weit :))))
Neues Projekt, neue Technologie, neues Framework ^.^

Für unser neues Projekt werden wir in Zukunft auf wt von emweb setzen.

Ich bin eigentlich, rein vom anschauen und anfänglichen einlesen bereits ziemlich begeistert von diesem Framework,
es ist schnell, wirkt robust und weist weiter eine rasche Updatepolitik auf.


Doch, wie das so ist, am Anfang eines jeden Projektes steht der erste Schritt:
Die Installation und Konfiguration der neuen Technologie


Hierbei sei zu sagen, dass wt auf die boost C++ libaries setzt, welche ebenfalls heruntergeladen und installiert werden müssen,
des Weiteren benötigt man cmake.

Hier eine einfache Installationsanleitung unter windows (wer sich ein wenig umsieht, findet auf der Seite natürlich für alle anderen OS ebenfalls Informationen, sogar für Android :-o! )




Anhand dieser gut ausgeführten Installationszusammenfassung kann ich demnächst loslegen und bereits anfangen ein wenig damit zu spielen ;)

happy coding
- the incredible Leitman


UPDATE: 
Ich bin bei der Installation und kompilierung (OBWOHL ich mich strikt an die Anleitung gehalten habe :p) auf ein paar Probleme gestoßen, welche ich in folgendem Beitrag erörtert habe.