summaryrefslogtreecommitdiffstats
path: root/doc/win32.compiling.1.2.txt
blob: bb396a338323c9b0591ba7c29de9183914ff81d4 (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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
Win32 KVIrc compiling 1.2 
a tutorial by <Grifisx>
updated by <LoSko> on 2007/01/18

english translation by <etherea`> 

Index 

@ Prologue
@ Ingredients
@ Providing ingredients
@ Setting up the ambiency
@ Setting ambiency variables
@ Compiling
@ Creating ambiency for setup
@ Creating setup

@ Prologue 

This is meant to be a simple guide to KVIrc compiling under Windows ambiency, so 
that everyone who's willing to try to compile the latest version of this cross platform 
client can easily do without the need for the latest snapshot/development to be 
released. 

@ Ingredients 

1) CVS version of KVIrc
2) Visual C++ 2005 Express
3) SDK package from Microsoft
4) Perl.
5) gettext for Windows
6) Innosetup or NSIS
7) Non Commercial QT 3.2.1
8) OpenSSL
9) zlib for Win32

@ Providing ingredients 

So, let's see where to find the necessary ingredients to bake up our freshy KVIrc. 

-1) CVS version of KVIrc 

To get this out you will need a CVS client for Windows, then type the following 
command: 

cvs -z3 -d:pserver:[email protected]:/cvs co kvirccvs 


And just in case you can find instructions here:
Link: http://www.kvirc.net/?id=cvs
A suggestion for a tiny and free CVS is Tortoise CVS.
Link: http://www.tortoisecvs.org/

-2) Visual C++ 2005 Express 

This compiler is free (at least for the moment), you will only need to register in order to
get it and use it for free, use it!
Link: http://msdn.microsoft.com/vstudio/express/visualc/

-3) SDK package from Microsoft 

This one too is for free, then download and install it! 
Link: http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3A93E-40C0EC4F68E5&displaylang=en 

-4) Perl
Perl is needed to create documentation and make perl module works, you can
download it from here:
Link: http://www.activestate.com/Products/ActivePerl/?

-5) gettext for Windows 
Download and install it, it's needed to create languages localization files: 
Link: http://sourceforge.net/projects/gettext 
Note: be sure to install gettext in this directory C:\Program Files\GnuWin32 so that all the 
executables are located in C:\Program Files\GnuWin32\bin otherwise you'll be forced to 
change something in the file needed to create the setup ambiency. 

-6) Innosetup 

Another free program, required to create the final setup.
Link: http://www.jrsoftware.org/isinfo.php
If you are using NSIS you can have your copy here:
Link: http://nsis.sourceforge.net/Download

-7) Non Commercial QT 3.2.1 

That's probably the most difficult thing to acquire; you can try find a book on QT that 
has it enclosed (the non commercial one) or you'll have to figure out how to find it out. 
You can buy a commercial version too, 3.x.x higher than 3.2.1. 

Book: C++ GUI Programming with QT 3
Link: http://www.amazon.com/gp/product/0131240722/102-11831924381702?v=glance&n=283155
If you are pretty acknowledged with compiling you can try these instructions:
Link: http://qtwin.sourceforge.net/qt3-win32/compile-msvc-2005.php
Even if this last choice's a bit nasty to make out working =)
You still can find some precompiled version of this free stand (found on the same site of 
qtwin even if a bit older) but beware: choosing this last chance will make KVIrc XP
themes not supported.
By using a different version of QT you'll need to modify every KVIrc project adapting
the qt.xxxx.dll and headers and libraries paths.
For example, assuming you have installed commercial QT 3.3.4 you'll have to modify
the projects this way:
a) selecting Properties of each project then ->Linker and ->Input
b) store the right library in the qt-mtnc321.lib matching the installed version
requirements, ie qt-3.3.4.lib. To know the exact name of your .lib file to be linked just go
to the directory where you did installed QT, in the subfolder /lib (like C:\Qt\3.3.4\lib)

-8) OpenSSL 
That is needed in order to compile SSL support for KVIrc, you can have libraries and 
everything else from here: 
Link: http://www.slproweb.com/products/Win32OpenSSL.html 

-9) zlib for win32 

To give KVIrc the ability to save log files in compressed format that's what you need. 
Link: http://gnuwin32.sourceforge.net/packages/zlib.htm 

That's the main page, but you will need the developers files:
Link: http://gnuwin32.sourceforge.net/downloadlinks/zlib-lib-zip.php
Extract them in any folder you may like, my own suggestion is folder C:\lib for your 
convenience; directory tree will be as follows: 

C:(dir) 
|__zlib(dir)
|__include(dir)
| |__zconf.h
| |__zlib.h
|__lib(dir)
|__zlib.lib
|__zlib.exp

Remember where did you have this folder extract because you will have to setup paths 
of the include files (the .h files) and of the libraries (the .lib files) in ambiency variables 
of your operating system. 

@ Setting up the ambiency 

Install in the following order (theoretically it is not necessary a given order but this 
�recipe� is fully oriented to non expert users): 
1-Visual C++ 2005 Express 
2-SDK ; once you have installed it take the folders Lib, Include and Bin (you will find
them all in the SDK given path � generally in folder C:\Program Files\Microsoft Platform
SDK) and copy them in the folder \SDK\v2.0 that is under the installation path of Visual
C++ (generally in C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0).
Attention: when copying these files you'll be prompted to overwrite one or more files;
just answer NO.
3-QT 3.x.x ; during the installation you'll be prompted to record ambiency variables: 
answer YES. 
4-OpenSSL ; during the installation you'll be prompted to record ambiency variables: 
answer YES. 
5-Perl ; during the installation you'll be prompted to record ambiency variables: 
answer YES. 
6-gettext 
7-Innosetup or NSIS or both =) (Freedom is the power to choose ;)) 
8-zlib ; if you did download the install&compile package; otherwise just unpack 
and/or extract the ready-to-use pakage wherever you may like (generally in folder C:\). 

@ Setting ambiency variables 

Now we need to set up every variable of this ambiency, needed in order the compiler 
will be able to find every library from which KVIrc depends. 
Right-button on Resources then Properties -> Advanced -> Ambient Variables and this will 
engage all QT system variables (QTDIR) set; if that doesn't match you will need to 
reinstall QT and remember to answer YES once you're prompted for setting all ambiency 
variables, otherwise you will need to set them manually � that parts from this tutorial. 

In the section dedicated to variables of the actual user add (if you don't have it yet) the 
following and then give the right paths that are on your own machine (hereby are my 
own paths): 

Variable: 

PERLDIR 
Value: 
C:\perl 
Meaning: 
Directory that stores Perl 

Variable: 
ZLIBLIBDIR 
Value: 
C:\zlib\lib 
Meaning: 
Directory that stores file .lib of zlib installed library, the file name must be zlib.lib 

Variable: 
OPENSSL 
Value: 
C:\OpenSLL 
Meaning: 
Installation folder of OpenSSL 

Variable: 
SSLINCDIR 
Value: 
C:\OpenSSL\include 
Meaning: 
Directory that stores OpenSSL .h files 

Variable: 
SSLLIBDIR 
Value: 
C:\OpenSSL\lib\VC 
Meaning: 
OpenSSL .lib files storage

Variable: 
MSGFMT 
Value: 
C:\Program Files\GnuWin32\bin\msgfmt.exe
Meaning: 
msgfmt executable path

After you've added all the variables with their own values you need to reboot. 

@ Compiling 

Go to folder kvirccvs\kvirc and open the file kvirc_vc05.sln then -for the less 
experienced-select Build -> Configure Manager -> Release and run the compiling with 
Build ->Build Solution. 
You'll need to wait a little before the building ends, mostly that's up to your processor 
(on a P3 800MHz it takes about 40/45 minutes, on a P4 3000 just 10/15 minutes). 
Now.. pray everything is going to get the right place and no unexpected to happen; but 
in case you do have troubles here are 3 different solutions: 

a) read this tutorial once more, hoping you missed some points;
b) try to find out where the problem is;
c) step to Azzurranet on channel #kvirc.net and ask for Grifisx or Noldor or Pragma.

@ Creating ambiency for setup 

If you're reading this, thank God, your patience and your mother (yes, yet she didn't 
managed to kill you death nevertheless you spent 28 hours a day reading lines on a 
monitor) you're almost done! 
The latest 2 steps are quite easy. 
Go to folder kvirccvs\kvirc\win32build and run makedist.vbs file. 
Then run the process, on which end you'll get a folder named pakage; be sure inside 
there are kvirc.exe, kvilib.dll, the folder with every KVIrc module and the following dlls: 

ssleay32.dll
libeay32.dll
qt-mtnc3321.dll
perl58.dll
zlib1.dll
idleui.dll
msvcr80.dll


If you see something missing just run up a search onto your system and copy them into 
the pakage directory. 
Check even the file Microsoft.VC80.CRT.manifest is placed both in root folder and sub folder 
modules, otherwise copy it into them (files are stored into kvirccvs\kvirc\data\manifests ; 
in this last case you will only need to rename the given file 
Microsoft.VC80.CRT.modules.manifest into Microsoft.VC80.CRT.manifest before you put it in 
the modules folder). 

@ Creating setup 

Easypeasy!
After installation of Innosetup launch file KVIrc.iss that houses in folder
kvirccvs\kvirc\win32build and run the script so that at the end of the process you'll find
a freshy hot setup.exe in folder kvirccvs\kvirc\win32build\package\setup.
If you did chose NSIS: right click on the KVIrc.nsi installation script that is found in
folder kvirccvs\kvirc\win32build and run Compile NSIS Script.
This way you'll have a KVIrc.VERSION-dev-DATE.exe in your actual directory!
Run.
If everything went ok then.. EnjoY! =D

Tonino Imbesi 
<Grifisx>