This page covers topics related to the MS Windows port of the KDE PIM suite.
Contents |
Build base KDE libraries for Windows with required dependencies, preferable using emerge tool (because it tracks dependencies for you):
emerge kdepimlibs- that will also build qt, kdesupport (part of it), soprano, strigi, kdelibs, kdebase
emerge libassuan- this is an optional dependency of kdepim
emerge kdepim
Notes:
| Status | Feature | Description | Contact |
|---|---|---|---|
| DONE | Maildir implementation | make maildir standard work with Windows filesystems | <jstaniek> |
| DONE | Folder Indices | so called "mmap mode" | <jstaniek> |
| DONE | SASL support | security | PIM Team <KDE PIM Team> |
| IN PROGRESS | Registry settings for default apps and services | Integration: Setting KMail as default e-mail client, KOrganizer as defaule windows calendaring app, etc. See the notes. | <jstaniek> |
| DONE | Drag&Drop support | Integration: D&D files onto the message composer | <jstaniek> |
| IN PROGRESS | Copy&Paste support | Integration | <jstaniek> |
| DONE | Use the standard Windows filedialogs | Integration | <jstaniek> |
| DONE | Fixes for Start Menu entries | Integration: avoid crashes and conflicts of kwinstartmenu KDED plugin with Start Menu entries added by hand in 3rd-party installers | <jstaniek> |
| IN PROGRESS | "Locked" dbus-daemon; see also Alternative solution | Unique KDE applications lock DBUS daemon on crash | PIM Team <KDE PIM Team> |
| DONE | Usability: activate previous instances of unique apps | When another instance of unique appliaction is started, activate previous instance. This is what users expect. Moreover, if standalone application is running, e.g. KMail, and user clicked on "e-mail" component of Kontact, window of the standalone application is activated.(827268) |
<jstaniek> |
The implementation based strictly on the original maildir specification in kmail does not work on Windows' file system, since it uses the ":" (forbidden on windows) character in file names. It also relies (as does maildir in general) on the atomicity of making a hardlink and then unlinking the original, to implement an atomic move. The implementation used by akonadi (kdepim/maildir) relies on QFile in that regard, but it's unclear if rename is atomic on all platforms.
There are issues with locking index files for KMail folders and mmap()/munmap() operations on Windows. Therefore, SQLite-based indices are in development. More info...
| Note |
|---|
| jstaniek 22:01, 14 January 2008 (CET): TortoiseSVN is GPLed SVN client which is nicely integrated with Windows Explorer. Perhaps we can use its source code as a reference... |
Introduction: We can detect whether KMail is the default e-mail client. If set as default, KMail should act as a default mailer, and thus be invoked automatically for actions like RMB "Send To -> E-mail Recipient". This shall be also reused by others for KOrganizer and Konqueror. The solution is relatively simple modifications to the Windows Registry. See Mozilla's solution.
First, we can use HKLM node for system-global settings or HKCU node for current-user-only settings. If the attempt to set the value in HKLM fails, usually because of unsufficient permissions, HKCU should be used. As expected, HKCU overrides HKLM settings. See KB297878. Below we'll use HKCU.
From the KB: After updating the registry keys, the application broadcasts the WM_SETTINGCHANGE message with wParam = 0 and lParam pointing to the null-terminated string "Software\Clients\StartMenuInternet" to notify the operating system that the default client has changed.
HKLM\Software\Clients\AppName\DllPath points to a dll implementing MAPI interface. Internet Explorer uses Windows Messaging by default to invoke a mailer on a mailto: link. Only if the MAPI install is misconfigured will it resort to directly accessing the mailto association key.[1] Example implementation of MAPI services is Thundebird's mozMapi32.dll (the key is usualle equal to C:\Program Files\Mozilla Thunderbird\mozMapi32.dll).
Support drag&drop from/to composer and from received mails into the file system (Windows Explorer and the Desktop)
Support pasting files copied (in Windows Explorer or the Desktop) as attachments.
| Note |
|---|
| SASL should be available before building kdepimlibs. When you build kdepimlibs, it should display message like "SASL Found" during configure stage. |
Cyrus SASL is used on Windows for SSL/TLS, so we use the same source code plus wrapper functions that are a part of the Cyrus distribution (the result is a native Windows library, do not confuse with Cygwin!).
Two Mozilla's patches have to be applied for msvc.
Cyrus SASL functionality is based on plugins. For KDEpimlibs we have set the paths for plugins and configuration to KDEROOT/lib/sasl2/ and KDEROOT/share/config/sasl2/, respectively. The configuration capatibilities are apparently not used for now. (jstaniek February 3 2008)
The following parts of KDEpimlibs depend on sasl2: kldap, kioslave/{sieve|imap4|smtp|pop3}.
Limitations: Currently all plugins but KerberosV4 (kerberos4.c) and PASSDSS (passdss.c) can be built on Windows. (more info)
See also:
Insert non-formatted text here
Download SASL library and plugins for mingw and msvc. Here's link, this time uploaded to the wiki (TODO move it to the kde windows server): http://kexi-project.org/download/cyrus-sasl2-2008-04.zip. The archive provides directory structure, so you'll know where to unpack these files.
Please apply these fixes in order to avoid crashes in related KDE componenets.
Update: this step is not needed since r806657.
KOrganizer's reminder daemon (korgac) crashes on Windows because of recent commit. A quick fix is to go to kdelibs/ source directory and type:
svn up -r 795533 kdeui/util/ksystemtrayicon.cpp
Then compile and install the kdelibs.
We sometimes need to disable creation and automatic maintenance of the KDE menu entry in the Start Menu. To do this, we can add these lines to the $KDEROOT/share/config/kwinstartmenurc file on deployment:
[General]
Enabled=false
Tip: just download the file: kwinstartmenurc and save it to the $KDEROOT/share/config/ directory.
History:
Introduction: upon application crash (for whatever reason), dbus-daemon (happens on Windows only) does not unregister unused service(s). Subsequent execution of the same application causes KUniqueApplication: Can't setup D-Bus service. Probably already running error and immediate exit with no visible feedback.
Reported as http://intevation.de/roundup/kolab/issue2639
Past workaround: manual killing dbus-daemon.
Rationale for the new workaround: make KDEPIM more suitable for demonstrating, without executing cryptic commands.
Workaround: If registering dbus service for KUniqueApplication (e.g. "org.kde.kmail") failed, do not exit immediately but instead:
Recipe: apply kuniqueapplication.patch in kdelibs and rebuild and install kdeui; this will make KUniqueApplication::start() return with false value instead of exiting().