Since I started this blog, which was kind of supposed to be the KoroIRC developer blog, I went on many ramblings about random stuff, but never actually took the time to talk about the main subject. This is what I do today.
Changes in this version
Here I will talk a little about what will change and what will not.
Modularity
In version 0.3, the source code of the main executable contained about three big categories of code:
- User interface code: This is the code that manages the windows, switchbar, pane, all the settings dialogs, etc. Everything you can see or interact with is here.
- IRC code: This is what manages the actual connections, parses the protocol and notifies the user interface. Also, all CTCP, DCC and Identity management is here.
- Helper and “glue” code:This is all the code that does common tasks. Initialization, custom memory management, string parsing, threads, etc. This part was very big.
Of course, all of it was compiled into a giant monolithic executable that has everything embedded in it. Therefore, the goal for this version is to try and make KoroIRC 0.4 more modular.
In order to achieve this goal, the main executable code has been split into many parts. First, all the common code has been made into a new library, kirccore.dll. This also allows the other executables and DLLs to reuse that code too, reducing them in code size. Most of the extraneous functions of KoroIRC are in the process of being moved to plugins (.kpl files), with kircapi.dll as their “call gate” into the main executable code. As such, it is possible to have a super minimalist, no-frills KoroIRC installation in only three files:
KoroIRC.exekirccore.dllTDEmu.dll
I shall also take the occasion to mention that KoroIRC can be used as a portable application since its very birth. The installer is provided merely as a convenience. If KoroIRC finds an INI file in the same folder as itself, it will use it for loading/saving settings.
Operating system requirements
In version 0.3, I had three separate builds to maintain: an Unicode build, an ANSI build and an x64 build. This was all magically hidden to the user by the installer, which automatically installed the right one.
Back in 2005, when I started version 0.3, I still knew a bunch of people stuck with old computers, still on Windows 98. So it was only natural to support these old operating systems, since they were still used. However, having to support them often meant a lot of glue code, such as loading stuff with LoadLibrary / GetProcAddress and having an “alternate code path” if the functionality was not present. This increased code size and complexity a lot, and limited my choice of APIs to use.
Thankfully, these days everybody uses Windows XP or Windows Vista now, so I think it is safe to remove support for the old operating systems. So version 0.4 will only support Windows 2000 and higher, and the code is being cleaned of old code paths. A good example of this is in the updater code, where I could just stick a call to CheckTokenMembership — which is only available starting with Windows 2000 — instead of having to manually loop through the groups in the token.
User interface changes
There won’t be much major user interface changes for this version. But there is one thing worthy of noting. I’m currently in the process of replacing all message boxes with much more user-friendlier task dialogs instead. The very cool thing is that it works in Windows 2000 and Windows XP too! And, since I’m doing that, I’ve also started using string table resources.
Also, I’m working hard in order to have High-DPI support. KoroIRC 0.3 only had that partially, which is why the executable wasn’t marked as “DPI-aware” under Windows Vista. I’m working hard to remove all remaining hardcoded sizes (which are often for bitmaps or icons) and making sure everything scales well no matter the size. Also, this is an area I’m dogfooding much, as I myself run at 120DPI on my new LCD monitor.
Also, for all those who complained that it was imposible to hide the lower pane, this version won’t have the possibility to hide it either, sorry. However, know that I heard you and that it is definitely planned for the following version, along with a slew of other user interface changes.
Tools
I have also added my own crash reporter. Yeah, I know this reeks of NIH, especially when Microsoft has Windows Error Reporting, but there are hard entry conditions on WER, and also my own crash reporting tool allows to collect additional information from the user before sending the dump file.
I have also added a “Files” pane as an optional plugin, which is merely an embedding of a shell folder right into the lower pane. It is very useful to be able to drag and drop files to send them to somebody real fast, without having to switch windows.
I plan to redo the user interface of the DCC Information Tool. For those who didn’t know, every time you receive a file by DCC, KoroIRC stores additional information from the DCC into an alternate data stream of the file. This tool allows you to see that stored information.
Status
I have much done, enough to say that KoroIRC 0.4 is already significantly different from version 0.3. However, there is still much work to be done in all areas, so I’d say it’s at about 50% done.
Why is development so slow?
The short answer is: because I’m not paid to do it. The long answer is that coding is an activity best done at night, and also needs long times of having nothing to do in order to be properly set in motion.
Thing is, with school and work being much more demanding than before, I simply do not have as much free time as I’d like to, and when I get some, I don’t necessarily feel like coding much. Back in 2004, I had whole months free, with nothing better to do than sleeping in the day and coding in the night, and thus KoroIRC 0.2 was born in about four months of concentrated efforts.
Sadly, this is not the case anymore, and sometimes months can pass without me writing a single line of code on KoroIRC. This is why it takes so much time to release new versions now.
