-
Notifications
You must be signed in to change notification settings - Fork 15
/
DEVELOPER.TXT
191 lines (136 loc) · 7.47 KB
/
DEVELOPER.TXT
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
HydraIRC Developer Notes
========================
IMPORTANT *** Read LICENSE.TXT first! *** IMPORTANT
HydraIRC is written using Visual Studio .NET 2003.
The code has been ported to Visual Studio .NET 2005 and support for Visual Studio .NET 2003
has been dropped.
Visual Studio.NET 2005 including Service Pack 1 is REQUIRED to build HydraIRC.
(due to changes in atlrx.h, failure to compile with SP1 will result access violations
occuring in the regular expression matcher)
If you want to start helping out, check out the TODO.TXT and try and fix some bugs,
then start with some of the simpler things until you're used to the codebase.
9/23/22 - gdwnldsKSC: At this point in 2022 I am rebaselining on Visual Studio 2008 to bring the libraries up to almost within a decade in preparation to bringing to newer VS versions and runtimes. Testing is only being performed on Windows 7, 8.1 10, and 11 but will probably still work just fine on Windows XP as it is now.
Compiling
=========
Make sure you have a copy of the git repository, as well as the following files:
libxml2-master.zip
WTL 9.1 - https://sourceforge.net/projects/wtl/files/WTL%209.1/WTL%209.1.5321%20Final/
ATL Server includes/package - https://github.com/gabegundy/atlserver
HydraIRC is written and developed using Visual Studio .NET 2003 and this is the
only supported build environment. If you're using something else then you're on
your own.
-----------------------------------
VISUAL STUDIO 2008 NOTES:
The ATL Server package has become almost impossible to find as a regular download, but it can now be obtained at https://github.com/gabegundy/atlserver
You will need this in addition to the below mentioned WTL 8.0 files (Add them to your global includes for ease of use) in order to compile on VS 2008 or newer. Add the WTL 9.1 and ATL Server include directories to global include paths.
Line #532 in Plugin_WinAMP/Plugin.cpp throws a C4067 warning in VS 2008 - "unexpected tokens following preprocessor directive - expected a newline" - this is due to the '.' included in the #ifdef - #ifdef HYDRAIRC_0.3.163 throws the warning, but #ifdef HYDRAIRC_03163 does not. This code could be safely removed, as we are not targeting on building the plugin with downlevel versions anymore.
-----------------------------------
LIBXML BUILD NOTES (Version is : Current 22 Oct 2022 master): A Custom VCProj file was
included in the distro folder in the original hydraIRC bundle of libxml - the one
included now has been modified to handle the newer libXML versions.
You need to take the now included .vcproj and in the distribution folder
and place it into \HydraIRC\libs\libxml2\win32\ after extracting the contents of the
libxml2-master folder inside libxml2-master.zip to \HydraIRC\libs\libxml2\
Afterwards, we need to generate xmlversion.h for compilation to succeed and correct version
numbers to be built into the application. Open a command prompt and navigate to
\HydraIRC\libs\libxml2\win32 and execute:
cscript configure.js iconv:no xptr_locs:yes ftp:no
libXML2 will now build successfuly, and the entire HydraIRC project will now build and run.
-----------------------------------
Build Procedure:
- Unzip contents of libxml2-master inside of libxml2-master.zip to HydraIRC/libs/libxml2
- Copy Distribution\libxml2.vcproj to HydraIRC\libs\libxml2\win32
- From \HydraIRC\libs\libxml2\win32 on cmd prompt run
- cscript configure.js iconv:no xptr_locs:yes ftp:no
- Extract WTL9.1 to C:\WTL91 (path used in development, you can move and change this in
project files after setting up).
- Run cscript setup.js from inside c:\WTL91\AppWiz
- Unlike the older versions, this one automatically detects installed VC++ so no
version specific files
- Unzip ATLServer to C:\ATLServer (can be adjusted like WTL91 above)
- Select appropriate profile and platform (Release/Debug, Win32/x64) and build!
Submitting Patches
==================
Pull requests via github: https://github.com/HydraIRC/hydrairc
Development branch of gdwnldsKSC: https://github.com/gdwnldsKSC/hydrairc
Working on the source
=====================
NOTE: this section is very out of date, you're probably best just working out
of your fresh checkout and creating patches from there. Familiarise yourself
with the following SVN commands: update, status, revert and diff
TortoiseSVN is very good at letting you compare revisions of code and
creating/merging code. Look for a guide and read it!
1) check out svn tree on 1/1/2004, save entire tree in folder SVN-2004-01-01 and zip up the folder as SVN-2004-01-01.zip
2) copy that folder and save as SVN-2004-01-01-WorkingCopy
3) make yor changes to SVN-2004-01-01-WorkingCopy
4) run "diff -buarN SVN-2004-01-01 SVN-2004-01-01-WorkingCopy > patch.diff" to create a patch.
5) checkout current SVN, on 12/2/2004, save into folder SVN-2004-02-12 and zip up the folder as SVN-2004-02-12.zip
6) in SVN-2004-02-12, run the command patch -p 1 --dry-run < patch.diff
6a) if it can't find the files experiment with the the -p option,eg. patch -p 1 --dry-run < patch.diff
6b) if there are no errors, run the patch again, but without the --dry-run option.
6c) if you have sections that don't apply, try the -l option, or manually patch in the un-applied patches from the "<sourcefile>.reject" files that patch creates.
7) When all you modifications have been patched into the current source tree, make sure your changes still work and then create a NEW patch as follows.
8) rename SVN-2004-02-12 to SVN-2004-02-12-WorkingCopy
9) unzip SVN-2004-02-12.zip so you have SVN-2004-02-12 and SVN-2004-02-12-WorkingCopy
10) create a diff between SVN-2004-02-12 and SVN-2004-02-12-WorkingCopy
11) send latest patch to the mailing list with notes on what it does.
Note: it's helpful to CLEAN your working copies before making diffs, also, exclude the following files from your diff:
.svn
*.vcproj
*.sln
*.suo
BuildLog.htm
*.obj
*.pch
*.lib
*.ncb
*.map
*.pdb
*.idb
*.orig
*.rej
Debug
Release
You save that list as a text file, then use this with diff's -X option. e.g. "diff -buarN -X excludelist.txt SVN-2004-01-01 SVN-2004-01-01-WorkingCopy > patch.diff"
Coding Style
============
Follow my coding style:
variable names "AreLikeThis"
global variables "g_AreLikeThis"
member variables "m_AreLikeThis"
struct's "AreLikeThis_s"
typedef's to struct's "AreLikeThis_t"
#defines ARE_LIKE_THIS
class names sould be "CLikeThis" but not all of them are, all new classes should be C-prefixed.
I use "i" for general loops and "pass" for some loops that have nested general loops.
{'s and }'s generally go on seperate lines
if there's only one line of code after an if statement, you
can decide wether to use {}'s yourself, but the rule is:
Make It Readable.
Some things I don't do for readability's sake, e.g.
void *MyPtr;
if (MyPtr = MyFunction())
...
would be written as:
void *MyPtr;
Myptr = MyFunction();
if (MyPtr)
...
You will probably see other examples where code could be slightly
optimized (in terms of cpu instructions) but isn't, for the sake of
readability and future maintenance.
Note: some code needs to be updated to conform to my current style.
Doxygen
=======
There are doxygen docs on the website
http://hydrairc.sourceforge.net/doxygen/
In the Doxygen folder you'll find a project file which you can use to
generate your own doxygen docs on your machine, but you'll need to
install doxygen and adjust the absolute paths.
Tabs
====
Set your editor to replace tabs with spaces, set the tab-size
to 2 characters.
Other Notes
===========
More notes as and when I think of anything useful to tell you.