1
this README describes how to set up libdui on a windows
2
computer.
3
4
right now we support the MinGW GCC compiler and the
5
Microsoft Visual Studio cl C++ compiler. this document
6
describes how to compile libdui for both compilers.
7
8
general prerequisites:
9
10
- install git, i installed it from http://code.google.com/p/msysgit/
11
12
- install perl, strawberry perl works for me.
13
14
- install coreutils from gnuwin32.sf.net. this is needed, because
15
  in the qmake build files there are some calls for the unix touch
16
  command. and this package installs touch for windows.
17
18
- install debugview. i got it from
19
  http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx
20
  it shows the qDebug statements that libdui will print when 
21
  something goes wrong.
22
23
24
prerequisities for visual studio:
25
26
- install visual studio, express version worked for me.
27
28
- install a qt version with dbus support. either do it
29
  on your own, or use the version that is distributed by
30
  kde. go to http://winkde.org/pub/kde/ports/win32/installer/
31
  and download the latest installer. then install kde.
32
  you can install everything, but for this purpose it is important
33
  to install the qt package and also the qt development package
34
  (the header files etc.). kde for windows comes in two "versions",
35
  one is compiles with visual studio express, and the other is
36
  compiles with mingw. make sure you select to install the 
37
  msvc version.
38
39
40
prerequisities for mingw:
41
42
- install MinGW. the version that can be installed at the
43
  installation routine of qt for windows is ok.
44
45
- install a qt version with dbus support. either do it
46
  on your own, or use the version that is distributed by
47
  kde. go to http://winkde.org/pub/kde/ports/win32/installer/
48
  and download the latest installer. then install kde.
49
  you can install everything, but for this purpose it is important
50
  to install the qt package and also the qt development package
51
  (the header files etc.). kde for windows comes in two "versions",
52
  one is compiles with visual studio express, and the other is
53
  compiles with mingw. make sure you select to install the 
54
  mingw version.
55
56
57
now you should have all the tools you need to build and execute libdui
58
and its programs.
59
60
# now you should check that youe environment is setup in a way
61
# that the needed tools can be found. for the following commands,
62
# execute them in a cmd.exe window and check if they are found.
63
# (when you know konsole on linux as a shell window, try out
64
# console2, you might like it: http://sourceforge.net/projects/console/ )
65
touch
66
perl
67
git
68
qmake
69
70
# for mingw
71
gcc
72
g++
73
make
74
75
# for msvc
76
cl
77
nmake
78
79
# if all the commands are found, you are fine. if not, you have to add
80
# the pathes to these commands to your PATH environment variable,
81
# like this:
82
# set PATH=%PATH%;c:\KDE\bin
83
84
now go to some directory, e.g. c:\dui. in the following i will
85
list the commands needed to get a working widgets gallery.
86
87
# go to this empty directory...
88
c:
89
cd \dui
90
91
# now do a git checkout of duitheme
92
git co git+ssh://git@dvcs.projects.maemo.org:af/duitheme
93
94
# now install the theme files
95
cd duitheme
96
qmake
97
98
# for msvc
99
nmake
100
nmake install
101
102
# or for mingw
103
make
104
make install
105
106
#for all
107
cd ..
108
109
# in this dir do a git checkout of libdui.
110
# right now we still need the holger-msvc branch, but it
111
# will be merged to master in short time.
112
git co git+ssh://git@dvcs.projects.maemo.org:af/libdui
113
114
# now switch to holger-msvc branch
115
cd libdui
116
git co -b holger-msvc origin/holger-msvc
117
cd ..
118
119
# sources are now in libdui.
120
121
# now create build directory
122
mkdir libduibuild
123
124
cd libduibuild
125
126
# run qmake
127
qmake ..\libdui\projects.pro
128
129
# for msvc:
130
131
# run nmake to build it.
132
nmake
133
# currently this will fail with an error about a missing
134
# duigen executable
135
136
# actually right now under windows i was not able to build
137
# the duigen executable in the same location no matter if
138
# we build a debug or release build. for that the following
139
# steps in between are needed. we build and "install" duigen
140
# before we build the rest of libdui.
141
cd duigen
142
nmake
143
nmake install
144
cd ..
145
146
# and now we continue with the normal libdui build
147
nmake
148
149
# now install libdui
150
nmake install
151
152
153
154
# for mingw
155
# run make to build it.
156
make
157
# currently this will fail with an error about a missing
158
# duigen executable
159
160
# actually right now under windows i was not able to build
161
# the duigen executable in the same location no matter if
162
# we build a debug or release build. for that the following
163
# steps in between are needed. we build and "install" duigen
164
# before we build the rest of libdui.
165
cd duigen
166
make
167
make install
168
cd ..
169
170
# and now we continue with the normal libdui build
171
make
172
173
# now install libdui
174
make install
175
176
177
178
# for all
179
180
# now we built libdui and installed it, but the theme files
181
# are not yet in the right places. let's see if widgetsgallery
182
# tries to start anyway. it is expected that when you start
183
# widgetsgallery, it only prints some output in the stderr channel
184
# and exits again. first start the debugview program to catch
185
# messages on stderr.
186
debugview
187
188
# now we set the PATH environment variable to contain the path to
189
# the installed qt with dbus support. in this case we use the
190
# KDE-on-windows version.
191
set PATH=c:\d\kde\bin;%PATH%
192
193
# now we add the directories which contain dui.dll and the executables.
194
# qmake by default installs to /usr prefix. this is c:\usr\ under windows.
195
set PATH=c:\usr\bin;c:\usr\lib;%PATH%
196
197
# now everything that is needed should be in place.
198
# start widgets gallery:
199
widgetsgallery
200
201
# now you should see the same widgets gallery window as you see
202
# on linux.
203
# if you do: Congratulations :-)
204
# if you don't: contact me and i will try to help you:
205
# holger.schroeder.ext@basyskom.de