aboutsummaryrefslogtreecommitdiff
path: root/README.win32
blob: b7368e382a5f2e5aa92dd6b03092debc74c83fb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
this README describes how to set up libdui on a windows
computer.

right now we support the MinGW GCC compiler and the
Microsoft Visual Studio cl C++ compiler. this document
describes how to compile libdui for both compilers.

general prerequisites:

- install git, i installed it from http://code.google.com/p/msysgit/

- install perl, strawberry perl works for me.

- install coreutils from gnuwin32.sf.net. this is needed, because
  in the qmake build files there are some calls for the unix touch
  command. and this package installs touch for windows.

- install debugview. i got it from
  http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx
  it shows the qDebug statements that libdui will print when 
  something goes wrong.


prerequisities for visual studio:

- install visual studio, express version worked for me.

- install a qt version with dbus support. either do it
  on your own, or use the version that is distributed by
  kde. go to http://winkde.org/pub/kde/ports/win32/installer/
  and download the latest installer. then install kde.
  you can install everything, but for this purpose it is important
  to install the qt package and also the qt development package
  (the header files etc.). kde for windows comes in two "versions",
  one is compiles with visual studio express, and the other is
  compiles with mingw. make sure you select to install the 
  msvc version.


prerequisities for mingw:

- install MinGW. the version that can be installed at the
  installation routine of qt for windows is ok.

- install a qt version with dbus support. either do it
  on your own, or use the version that is distributed by
  kde. go to http://winkde.org/pub/kde/ports/win32/installer/
  and download the latest installer. then install kde.
  you can install everything, but for this purpose it is important
  to install the qt package and also the qt development package
  (the header files etc.). kde for windows comes in two "versions",
  one is compiles with visual studio express, and the other is
  compiles with mingw. make sure you select to install the 
  mingw version.


now you should have all the tools you need to build and execute libdui
and its programs.

# now you should check that youe environment is setup in a way
# that the needed tools can be found. for the following commands,
# execute them in a cmd.exe window and check if they are found.
# (when you know konsole on linux as a shell window, try out
# console2, you might like it: http://sourceforge.net/projects/console/ )
touch
perl
git
qmake

# for mingw
gcc
g++
make

# for msvc
cl
nmake

# if all the commands are found, you are fine. if not, you have to add
# the pathes to these commands to your PATH environment variable,
# like this:
# set PATH=%PATH%;c:\KDE\bin

now go to some directory, e.g. c:\dui. in the following i will
list the commands needed to get a working widgets gallery.

# go to this empty directory...
c:
cd \dui

# now do a git checkout of duitheme
git co git+ssh://git@dvcs.projects.maemo.org:af/duitheme

# now install the theme files
cd duitheme
qmake

# for msvc
nmake
nmake install

# or for mingw
make
make install

#for all
cd ..

# in this dir do a git checkout of libdui.
# right now we still need the holger-msvc branch, but it
# will be merged to master in short time.
git co git+ssh://git@dvcs.projects.maemo.org:af/libdui

# now switch to holger-msvc branch
cd libdui
git co -b holger-msvc origin/holger-msvc
cd ..

# sources are now in libdui.

# now create build directory
mkdir libduibuild

cd libduibuild

# run qmake
qmake ..\libdui\projects.pro

# for msvc:

# run nmake to build it.
nmake
# currently this will fail with an error about a missing
# duigen executable

# actually right now under windows i was not able to build
# the duigen executable in the same location no matter if
# we build a debug or release build. for that the following
# steps in between are needed. we build and "install" duigen
# before we build the rest of libdui.
cd duigen
nmake
nmake install
cd ..

# and now we continue with the normal libdui build
nmake

# now install libdui
nmake install



# for mingw
# run make to build it.
make
# currently this will fail with an error about a missing
# duigen executable

# actually right now under windows i was not able to build
# the duigen executable in the same location no matter if
# we build a debug or release build. for that the following
# steps in between are needed. we build and "install" duigen
# before we build the rest of libdui.
cd duigen
make
make install
cd ..

# and now we continue with the normal libdui build
make

# now install libdui
make install



# for all

# now we built libdui and installed it, but the theme files
# are not yet in the right places. let's see if widgetsgallery
# tries to start anyway. it is expected that when you start
# widgetsgallery, it only prints some output in the stderr channel
# and exits again. first start the debugview program to catch
# messages on stderr.
debugview

# now we set the PATH environment variable to contain the path to
# the installed qt with dbus support. in this case we use the
# KDE-on-windows version.
set PATH=c:\d\kde\bin;%PATH%

# now we add the directories which contain dui.dll and the executables.
# qmake by default installs to /usr prefix. this is c:\usr\ under windows.
set PATH=c:\usr\bin;c:\usr\lib;%PATH%

# now everything that is needed should be in place.
# start widgets gallery:
widgetsgallery

# now you should see the same widgets gallery window as you see
# on linux.
# if you do: Congratulations :-)
# if you don't: contact me and i will try to help you:
# holger.schroeder.ext@basyskom.de