Installing Wt on Ubuntu » History » Version 55
Zhora Melezhko, 09/27/2015 11:14 PM
1 | 1 | Pieter Libin | h1. Installing Wt on Ubuntu |
---|---|---|---|
2 | |||
3 | {{toc}} |
||
4 | |||
5 | For installation of Wt on Ubuntu, you have the choice between the official package available in Ubuntu, prebuilt packages by Pau Garcia i Quiles (always updated to the newest Wt version) or installation from source. |
||
6 | |||
7 | 24 | Charles Brockman | h2. Installing from the Official Package |
8 | 1 | Pieter Libin | |
9 | 55 | Zhora Melezhko | Since Ubuntu Intrepid (8.10), official packages for Ubuntu are available. To install Wt, run: "сайт":http://yamodna.ru/ |
10 | 1 | Pieter Libin | |
11 | <pre> |
||
12 | 51 | Zhora Melezhko | $ sudo aptitude install witty witty-dbg witty-dev witty-doc |
13 | 1 | Pieter Libin | </pre> |
14 | 50 | Koen Deforche | |
15 | 53 | Zhora Melezhko | This will automatically install all the required dependencies. If you only want the runtime library, you only need to install the witty package. The witty-dbg package contains the debug versions of the libraries. Make sure you install witty-dev (or libwtwhatever-dev) if you want to develop Wt applications. "www":http://dagway.ru/ |
16 | 51 | Zhora Melezhko | |
17 | 1 | Pieter Libin | The official package is usually a bit outdated due to the stabilization periods Debian and Ubuntu need prior to release. If you want to use the newest version of Wt and not build from source, read on. |
18 | |||
19 | 51 | Zhora Melezhko | h2. Installing from Prebuilt Packages ghdg |
20 | 1 | Pieter Libin | |
21 | 10 | Pau Garcia i Quiles | Since Wt 2.0.3, unofficial packages for Ubuntu are being built by "Pau Garcia i Quiles":http://www.elpauer.org/. To install Wt, add the "Wt PPA":http://launchpad.net/~pgquiles/+archive/wt to your repositories (check "Adding this PPA to your system" in the Wt PPA page). After adding the repository to your system, run: |
22 | 1 | Pieter Libin | |
23 | <pre> |
||
24 | $ sudo apt-get update |
||
25 | $ sudo aptitude install libwt* |
||
26 | </pre> |
||
27 | |||
28 | 21 | Jake Petroules | This will automatically install all the required dependencies. If you only want the runtime library, you only need to install the libwt24, libwthttp24, libwtext24, etc packages (no -dev, -doc or -dbg packages). The libwt-dbg package contains the debug versions of the libraries. |
29 | 1 | Pieter Libin | |
30 | These packages are built by the maintainer of the official Debian and Ubuntu packages and are always updated to the latest version of Wt. If you want to use the newest version of Wt and not build from source, this is the preferred method. |
||
31 | |||
32 | Please note in the past packages were named witty, witty-dev, witty-doc and witty-dbg. These package still exist but only as transitional packages and will be removed in the future. It is recommended that you install libwt*. |
||
33 | |||
34 | 4 | Pau Garcia i Quiles | h2. Installing from Sources |
35 | 1 | Pieter Libin | |
36 | 51 | Zhora Melezhko | |
37 | 1 | Pieter Libin | h3. Installing System Dependencies |
38 | |||
39 | 42 | Wim Dumon | Minimal dependencies: |
40 | <pre> |
||
41 | 51 | Zhora Melezhko | sudo apt-get install gcc g++ libboost-all-dev cmake |
42 | 42 | Wim Dumon | </pre> |
43 | |||
44 | 51 | Zhora Melezhko | Optional dependencies (among others): |
45 | 1 | Pieter Libin | <pre> |
46 | 51 | Zhora Melezhko | sudo apt-get install doxygen libgraphicsmagick3 libssl-dev libpq-dev libssl-dev libfcgi-dev |
47 | 1 | Pieter Libin | </pre> |
48 | |||
49 | 51 | Zhora Melezhko | Get Wt: |
50 | 45 | Wim Dumon | |
51 | 46 | Wim Dumon | Go to http://www.webtoolkit.eu/wt/download or download using wget: |
52 | 1 | Pieter Libin | |
53 | 36 | Wim Dumon | <pre> |
54 | wget -c http://kent.dl.sourceforge.net/sourceforge/witty/wt-x.y.z.tar.gz |
||
55 | 1 | Pieter Libin | tar xvxf wt-x.y.z.tar.gz |
56 | 36 | Wim Dumon | </pre> |
57 | 1 | Pieter Libin | |
58 | h3. Build Wt from sources |
||
59 | 36 | Wim Dumon | |
60 | 44 | Wim Dumon | See also http://www.webtoolkit.eu/wt/doc/reference/html/InstallationUnix.html |
61 | |||
62 | <pre> |
||
63 | cd wt-x.y.z |
||
64 | 51 | Zhora Melezhko | mkdir build; cd build |
65 | cmake .. |
||
66 | 36 | Wim Dumon | make |
67 | make -C examples |
||
68 | 1 | Pieter Libin | </pre> |
69 | 36 | Wim Dumon | To install wt in /usr/local: |
70 | 1 | Pieter Libin | <pre> |
71 | sudo make install |
||
72 | sudo ldconfig |
||
73 | </pre> |
||
74 | |||
75 | 36 | Wim Dumon | h2. Try the Examples |
76 | 1 | Pieter Libin | |
77 | 24 | Charles Brockman | h4. From the Prebuilt Packages |
78 | 1 | Pieter Libin | |
79 | 24 | Charles Brockman | * To build the examples, call CMake this way: |
80 | 1 | Pieter Libin | |
81 | <pre> |
||
82 | cmake -DWT_SOURCE_DIR=/usr/share/doc/witty-doc/ -DEXAMPLES_CONNECTOR="wt;wthttp" /usr/share/doc/witty-doc/examples |
||
83 | </pre> |
||
84 | |||
85 | * Then go to */usr/share/doc/witty-doc/examples* and enter the directory of the example you want to run. |
||
86 | |||
87 | * When running the example, set the docroot to "." |
||
88 | |||
89 | * For instance, if you compiled the examples in /home/user/dev/wtexamples, you would do: |
||
90 | |||
91 | 9 | Koen Deforche | <pre> |
92 | 47 | Wim Dumon | $ mkdir /home/user/dev/wtexamples |
93 | 1 | Pieter Libin | $ cd /home/user/dev/wtexamples |
94 | 48 | Wim Dumon | $ cmake -DWT_SOURCE_DIR=/usr/share/doc/witty-doc/ -DEXAMPLES_CONNECTOR="wt;wthttp" /usr/share/doc/witty-doc/examples |
95 | $ make |
||
96 | $ cd /usr/share/doc/witty-doc/examples/charts |
||
97 | $ /home/user/dev/wtexamples/charts/charts.wt --http-port 10000 --http-addr 0.0.0.0 --docroot . |
||
98 | </pre> |
||
99 | |||
100 | h4. From the Sources |
||
101 | |||
102 | * If you installed Wt using the source packages (http://sourceforge.net/projects/witty/files/), then you can find instructions on how to run the examples in the file *INSTALL.html* that is included in the main directory of the respective source package. |
||
103 | |||
104 | 47 | Wim Dumon | h4. Special Cases |
105 | 33 | Anonymous | |
106 | * Please note the widget gallery example will not run properly unless you download tinymce and extract it the proper place. |
||
107 | 36 | Wim Dumon | |
108 | 35 | Anonymous | * Please note the wtwithqt example needs Qt 4.x to run |
109 | |||
110 | 54 | Pau Garcia i Quiles | h2. Using 'ccmake' to Edit Build Options |
111 | 51 | Zhora Melezhko | |
112 | 33 | Anonymous | This is an easy, graphical way to edit the build options |
113 | |||
114 | <pre> |
||
115 | 24 | Charles Brockman | cd build |
116 | 18 | darren sy | ccmake . |
117 | </pre> |