Difference between revisions of "Projects/PIM/MS Windows"

< Projects‎ | PIM
Jump to: navigation, search
("Locked" dbus-daemon)
(Add Minimum System Requirements)
 
(62 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This page covers topics related to the MS Windows port of the KDE PIM suite.
+
This page covers topics related to the KDE PIM Suite on MS Windows NT kernel (which means running on Windows Desktop versions NT or newer like XP, Vista or 7).
 
+
{{Note|This page is work in progress started by [[User:Jstaniek|jstaniek]].}}
+
  
 
==Building==
 
==Building==
Build base KDE libraries for Windows with required dependencies, preferable using ''emerge'' tool (because it tracks dependencies for you):
 
#install ''emerge'' and its dependencies as described [[Getting_Started/Build/KDE4/Windows/emerge|here]]
 
#either [[#Build_SASL_by_hand|build SASL by hand]] or [[#Download_SASL_for_mingw_and_msvc|download precompiled version for mingw and msvc]], and install it (if you skip this step you will not have SSL/TLS support in your apps)
 
#unpack gpgme-1.1.4-3-lib.zip and gpgme-1.1.4-3-bin.zip from http://www.winkde.org/pub/kde/ports/win32/repository/win32libs/ to your KDEDIR
 
#from the cmd.exe command line, enter <pre>emerge kdepimlibs</pre> - that will  also build ''qt'', ''kdesupport'' (part of it), ''soprano'', ''strigi'', ''kdelibs'', ''kdebase''
 
#enter <pre>emerge libassuan</pre> - this is an optional dependency of ''kdepim''
 
#finally, enter <pre>emerge kdepim</pre>
 
  
Notes:
+
To build KDE PIM for Windows use emerge.
*Temporary fix for [http://bugs.kde.org/show_bug.cgi?id=160881 Bug 160881: PGP encryption of mails results in empty MIME-part] in kdepim can be enabled if you add -DKLEO_SYNCHRONOUS_API_HOTFIX:BOOL=ON to your cmake call.
+
For documentation about emerge please see [http://techbase.kde.org/Getting_Started/Build/KDE4/Windows]
 +
 
 +
You should be able to get executables just by calling emerge kdepim.
 +
 
 +
 
 +
== Bugs ==
 +
For a list of open, Windows specific, bugs please see: [http://bugs.kde.org/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=akregator&product=kaddressbook&product=kdepim&product=kdepimlibs&product=kmail2&product=kontact&product=korganizer&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&keywords_type=allwords&keywords=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=NEEDSINFO&op_sys=MS+Windows&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0= bugs.kde.org]
  
 
== Problem points ==
 
== Problem points ==
=== Maildir implementation in KMail ===
+
{| class="sortable" border="1" cellpadding="5" cellspacing="0" style="border: gray solid 1px; border-collapse: collapse; text-align: left; width: 100%;"
It is to be expected, that the maildir implementation 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.
+
|- style="background: #ececec; white-space:nowrap;"
*[[User:Jstaniek|jstaniek]] 12:50, 7 January 2008 (CET): Hard/soft links could be handled on Windows by altering the source code so that the "link" file is a text file itself and contains the target path. If we need atomic renames, '''Windows apparently lacks them''', I have found a pre-Vista [http://blogs.msdn.com/adioltean/archive/2005/12/28/507866.aspx blog] which contains description on how to perform them in a messy but honest way (look at the very last "Write process (on Foo.txt)" version). There's also a way to recover from application/system crash during the pseudo-atomic operations (see the very last "Recovery from a crash during write" checklist).
+
! Status !! Feature !! Description !! Contact
*[[User:Jstaniek|jstaniek]] 12:42, 24 January 2008 (CET): We will most probably benefit from ''maildir'' suport on Windows as Thunderbird (ver. <3) apparently lacks support for this storage, despite [https://bugzilla.mozilla.org/show_bug.cgi?id=58308 many wishes] and [http://wiki.mozilla.org/Thunderbird/Feature_Brainstorming#Storage_folder plans].
+
*[[User:Jstaniek|jstaniek]] 12:42, 24 January 2008 (CET): regarding replacing ":" character on windows:
+
** We cannot use ":" in any way ([http://en.wikipedia.org/wiki/Maildir#Windows_software Wikipedia note]), so we have to rename it to something other:
+
*** The proposed replace character is "!". Not "-" (see [https://bugzilla.mozilla.org/show_bug.cgi?id=58308#c77 this] for explanation).
+
*** We may want to add support for user-defined character, to allow reuse maildirs of apps like mutt (which uses "-"), but it should be clearly noted in the handbook that the setting is only for integration with existing maildirs.
+
*** '''The rename makes the implementation incompatible''' with the [http://cr.yp.to/proto/maildir.html specification] (which is informal anyway and says nothing about the replacement character).
+
** '''The ability of sharing a single maildir''' structure on dual boot machines (e.g., using the [http://www.fs-driver.org/ IFS Ext2 driver] or [http://ext2fsd.sourceforge.net/projects/projects.htm#ext2fsd Ext2fsd: way less crashy than IFS Ext2 (no blue screen of the death) and actively maintained]) is affected by the problem with ":" character.
+
*** '''Windows FS layer''' apparently returns "file not found" error for files having the ":"  character on a linux filesystem. So if there is a need for storing the maildir at linux side, ":" should be renamed even if Linux itself does work with ":".
+
*** Conversely, '''if the maildir has to be stored at windows side''', ":" characters have to be renamed, do Linux build of KMail (and KDE-PIM in general) should support this rename too in order to access the storage.
+
  
===Folder Indices===
+
{{FeatureTodo | [[#Documentation_of_KDE|Documentation of KDE]] |Somehow the documentation is not loaded correctly in khelpcenter without visible errors in the debug output| }}
There are issues with locking index files for KMail folders and mmap()/munmap() operations on Windows. Therefore, SQLite-based indices are in development. [[Projects/PIM/MS Windows/SQLite Folder Indices|More info...]]
+
  
===Integration into the Windows Explorer & Desktop===
+
{{FeatureTodo|[[#Search|Search]]|Provide a search backend|aheinecke@intevation.de| Andre Heinecke }}
{{Note|[[User:Jstaniek|jstaniek]] 22:01, 14 January 2008 (CET): [http://tortoisesvn.tigris.org/ TortoiseSVN] is GPLed SVN client which is nicely integrated with Windows Explorer. Perhaps we can use its source code as a reference...}}
+
  
====Registry settings for default apps and services====
+
{{FeatureTodo|[[#Default_Folders|Default Folders]]|
'''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 [http://members.toast.net/4pf/Protocol.html Mozilla's solution].
+
Some default folders in the wrong place (not in AppData) |aheinecke@intevation.de| Andre Heinecke }}
  
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 [http://support.microsoft.com/kb/297878 KB297878]. Below we'll use HKCU.
+
{{FeatureTodo|[[#Nepomuk|Nepomuk]]|Provide a working Nepomuk|aheinecke@intevation.de| Andre Heinecke }}
  
*HKCU\Software\Clients\StartMenuInternet key is used to specify default web browser; could be set to Konqueror
+
{{FeatureInProgress|[[#Multiuser_Support|Multiuser Support]]|Make it possible
*HKCU\Software\Clients\StartMenuInternet\app.exe\shell\open\command key is used for "Internet" start menu shortcut, can be set to Konqueror. Note from the KB - <tt>"The command might open the browser on the users home page, for example. However, it might launch some other introductory user interface that the ISV feels is appropriate."</tt> So this is not the same as 'default browser' setting.
+
to deploy KDEPIM in multiuser environments||}}
  
*HKCU\Software\Clients\Mail\Appname - registered email client, there can be more entries within the 'Mail' node. Adding KMail here makes it available for users to select as a default browser using 'Set Default Programs' system window.
+
{{FeatureTodo|[[#Dialogs_in_background| Dialogs opening in background]]| Dialogs are way to often opened in
*HKCU\Software\Clients\Mail - default email client,  'Windows Mail' by default; could be set to KMail.
+
the background and thus missed by the user |aheinecke@intevation.de| Andre Heinecke}}
  
*HKCU\Software\Clients\Calendar\Appname - registered calendar application, there can be more entries within the 'Calendar' node. See the note for HKCU\Software\Clients\Mail\Appname.
+
{{FeatureTodo|[[#Kwallet_and_accountwizard|KWallet in background of accountwizard warnings]]| Do not open the initial KWallet dialog behind the accountwizard |aheinecke@intevation.de| Andre Heinecke}}
*HKCU\Software\Clients\Calendar - default calendar application, 'Windows Calendar' on Vista; could be set to KOrganizer.
+
  
*HKCU\Software\Clients\Contacts\Appname - registered contacts client, there can be more entries within the 'Contacts' node. See the note for HKCU\Software\Clients\Mail\Appname.
+
{{FeatureTodo|[[#Seamless_Crypto| Seamless integration with Gpg4Win 2.1]]| Crypto does not integrate as good and easy as it should|aheinecke@intevation.de| Andre Heinecke}}
*HKCU\Software\Clients\Contacts - default contacts application, 'Address Book' by default; could be set to KAddressBook.
+
  
*HKCU\Software\Clients\News\Appname - registered newsgroup client, there can be more entries within the 'News' node. See the note for HKCU\Software\Clients\Mail\Appname.
+
{{FeatureTodo|[[#Summary_Screen| Summary Screen without Nepomuk]]| The summary screen has problems without nepomuk avialability|aheinecke@intevation.de| Andre Heinecke}}
*HKCU\Software\Clients\News - default newsgroup application, 'Windows Mail' by default; could be set to KNode.
+
  
From the KB: <tt>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.</tt>
+
{{FeatureInProgress|[[#Mailto_Protocol| Make mailto work]]| There are probably some wrong parameters set in the registry. KSendemail has already been fixed so that i can take the parameters correctly. |aheinecke@intevation.de| Andre Heinecke}}
  
=====Using MAPI=====
+
{{FeatureTodo|[[#Plugin_Performance| Performance of Plugin loading]]|Loading plugins like the configuration plugins takes unnaturally
HKLM\Software\Clients\AppName\DllPath points to a dll implementing [http://en.wikipedia.org/wiki/MAPI 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.[http://members.toast.net/4pf/Protocol.html]
+
long|aheinecke@intevation.de| Andre Heinecke}}
Example implementation of MAPI services is Thundebird's mozMapi32.dll (the key is usualle equal to C:\Program Files\Mozilla Thunderbird\mozMapi32.dll).
+
  
=====KDE-related notes=====
+
{{FeatureTodo|[[#SSL_Certificates| SSL Certificate checks]]|All SSL Certificate checks fail|aheinecke@intevation.de| Andre Heinecke}}
*KDElibs execute default web browser or email client for protocols like http(s): and <nowiki>mailto:</nowiki> via {{Qt|QDesktopServices}}::openUrl(), which in turn uses ShellExecute(). openUrl() is widely used in Qt e.g. for hyperlinks in text boxes and label widgets.
+
*A general rule of KDE/win: not to duplicate registry settings in any rc file and use default applications if possible, to avoid changing behaviour expected by users.
+
  
====Drag&drop support====
+
{{FeatureTodo|[[#Minimum_System_Requirements| System Requirements]]|Minimum System requirements|aheinecke@intevation.de| Andre Heinecke}}
Support drag&drop from/to composer and from received mails into the file system (Windows Explorer and the Desktop)
+
====Copy&paste support====
+
Support pasting files copied (in Windows Explorer or the Desktop) as attachments.
+
===Profile migration===
+
*[http://kb.mozillazine.org/Profile_folder Mozilla profile directories]
+
===SASL support===
+
{{Note|SASL should be available '''before''' building kdepimlibs. When you build kdepimlibs, it should display message like "SASL Found" during configure stage.}}
+
====Build SASL by hand====
+
[http://asg.web.cmu.edu/sasl/ 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 [http://wiki.mozilla.org/LDAP_C_SDK_SASL_Windows patches] have to be applied for msvc.
+
{{FeatureDone|[[#LDAP_Support|LDAP Support]]| Enabling KLdap |aheinecke@intevation.de| Andre Heinecke }}
  
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. ([[User:Jstaniek|jstaniek]] February 3 2008)
+
{{FeatureDone|[[#Akonadi_Notifications|Akonadi Notifications]]| Akonadi Notifications are not communicated correctly to the GUI |}}
  
The following parts of KDEpimlibs depend on sasl2: kldap, kioslave/{sieve|imap4|smtp|pop3}.
+
{{FeatureDone|[[#Kwallet_warnings|Kwallet warnings]]| Remove the Kwallet "do you want to grant xy access |aheinecke@intevation.de| Andre Heinecke}}
  
'''Limitations:''' Currently all plugins but KerberosV4 (kerberos4.c) and PASSDSS (passdss.c) can be built on Windows. ([http://www.sendmail.org/~ca/email/cyrus2/windows.html more info])
+
{{FeatureDone|Image view in Mailviewer|Images in the Mailviewer are not shown correctly||}}
  
'''See also:'''
+
{{FeatureDone|[[#Design|Design]]|Make KDEPIM feel native on Windows||}}
*[http://negotiateauth.mozdev.org/ Negotiateauth] Mozilla plugin and [http://sourceforge.net/projects/modauthkerb/ Mod_auth_kerb] Apache module for Kerberos support.
+
*[http://mailman.mit.edu/pipermail/kerberos/2004-April/005152.html this] [http://mailman.mit.edu/pipermail/kerberos/2004-April/005155.html thread]
+
<nowiki>Insert non-formatted text here</nowiki>
+
  
====Download SASL for mingw and msvc====
+
{{FeatureDone|[[#GPG4Win_Integration|Integrate with GPG4Win]]| GnuPG is
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.
+
currently supported |aheinecke@intevation.de| Andre Heinecke}}
  
 +
{{FeatureDone|[[#Akonadi_Start_Stop|Akonadi startup/shutdown]]|Decide how akonadi should be started/stopped on Windows (There is now a
 +
Full Shudown button in Kontact that also kills akonadi||}}
 +
|}
  
===Hot fixes to apply===
+
===SSL Certificates===
Please apply these fixes in order to avoid crashes in related KDE componenets.
+
All SSL certificate checks currently fail a correct solution would be to take the Installed Windows certificates additionally to the kdelibs default certificates.
====Crashes in korgac====
+
Update: this step is not needed since r806657.
+
+
<strike>KOrganizer's reminder daemon (korgac) crashes on Windows because of recent commit. A quick fix is to go to kdelibs/ source directory and type:
+
  
<tt>svn up -r 795533 kdeui/util/ksystemtrayicon.cpp</tt>
+
===Plugin Performance===
 +
The loading of plugins, especially the kcm modules for the configuration
 +
Dialog take unnaturally long to load for the first time. Depending
 +
on your Machine this can be 10-40 seconds.
  
Then compile and install the kdelibs.</strike>
+
===Sumarry Screen===
 +
Clicking on the Summary Screen in Kontact seems to trigger a very large query. Used with multiple large accounts Kontact started to loose stability and ultimately began to freeze um with some Akonadi ressources crashing.
  
====Crashes in KDED====
+
===Seamless Crypto===
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:
+
There needs to be a build of the gnupg development libaries that better integrates with gpg4win. The selfbuilt camakeified Versions do not have any upstream support and are built without smime support. The upstream gpg4win-dev package was built against gpg 1 and does only work after some tricks.
 +
Kleopatra master on Windows also seems a bit buggy (refreshing way too often) but this might be a side effect of the libraries.
  
<code>
+
===Dialogs in background===
[General]
+
Many Dialogs (for example the "ignore ssl errors" dialog can open in the background) and be missed by the user that then is confused by the behavior of
Enabled=false
+
kontact.
</code>
+
  
Tip: just download the file: [https://www.intevation.de/roundup/kolab/file799/kwinstartmenurc kwinstartmenurc] and save it to the $KDEROOT/share/config/ directory.
+
===Kwallet warnings===
 +
The Kwallet warnings don't make sense as they do not add any kind of security. The processname can easily be faked and they are just written in a plain text file. They often open in the background and are confusing.
  
===="Locked" dbus-daemon====
+
===Minimum System Requirements===
([[User:Jstaniek|jstaniek]] 18:12, 27 May 2008 (CEST) for enterprise4 branch; emerge package: kdepim-branch)
+
The minimal system requirements (CPU/RAM/Disk Space) for Kontact on Windows are currently unkonwn since it is much more standalone then on a GNU/Linux System those need to be measured and communicated. Windows apperantly expect something like that.
  
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.
+
===Multiuser Support===
 +
Kontact on Windows currently can be run on the same machine twice with different users but there are appearantly some problems on Windows Server installations.
  
Reported as http://intevation.de/roundup/kolab/issue2639
+
===LDAP Support===
 +
Done by integrating a binary package of openldap into the build.
  
Past workaround: manual killing dbus-daemon.
+
There are two options to get LDAP support for PIM on Windows:
  
Rationale for the new workaround: make KDEPIM more suitable for demonstrating, without executing cryptic commands.
+
====OpenLDAP====
 +
* Pro:  
 +
** Would offer the same API as on GNU/Linux
 +
** Is proven to work on Windows with KDEPIM
 +
** If just a binary package is used, the effort is small.
  
Workaround: If registering dbus service for KUniqueApplication (e.g. "org.kde.kmail") failed, do not exit immediately but instead:
+
* Contra:
# look if there's a process with the same name (.e.g kmail) running, if so exit with no action
+
** Current Openldap is not ported to be buildable natively on Windows. So far it would need to be cross compiled, or cygwin compiled or the binaries taken.  
# if there's no process with the same name, kill dbus-daemon (first, using SIGTERM, then SIGKILL), then restart the application with exactly the same arguments and the same current working directory.
+
** More effort to do a good port to a decent buildsystem which fits the toolchain like cmake/emerge to be build with msvc or mingw-w64 on Windows.  
 +
** Can not be debugged with msvc for above reasons
 +
** Is another dependency we have to take care of, which increasing code and complexety, more chance for security issues and the port needs to be maintained.
  
Recipe:
+
====WinLDAP====
# apply [http://www.intevation.de/roundup/kolab/file806/kuniqueapplication.patch kuniqueapplication.patch] in kdelibs and rebuild and install kdeui; this will make KUniqueApplication::start() return with false value instead of exiting().
+
Windows has native LDAP support with winldap:  
# apply [http://intevation.de/roundup/kolab/file807/workaround_for_locked_dbus.patch workaround_for_locked_dbus.patch] in kdepim; build and install kdepim; this adds KPIM::Application class to libkdepim, and KMail, KOrganizer and Kontact uses it.
+
  
===Other TODOs===
+
* Pro:
*KMFolderTree::cleanupConfigFile() removes kmailrc sections for nonexisting folders but the changes are not writen back ([[User:Jstaniek|jstaniek]] 11:07, 14 May 2008 (CEST))
+
** Integrated into the platform, maintained by Microsoft
 +
** API differences should be Minimal so kldap calls could stay the same
 +
** Behaviour consistent with other LDAP client behaviour on Windows.
  
== Notes ==
+
* Contra:
* '''The branches/work/kdab-post-4.0 branch''' ([http://websvn.kde.org/branches/work/kdab-post-4.0/kdepim/ kdepimlibs], [http://websvn.kde.org/branches/work/kdab-post-4.0/kdepim/ kdepim] modules) '''have been closed and merged into [http://websvn.kde.org/trunk/KDE/ trunk]'''. KDE PIM for Windows development happens in trunk again now.
+
** Efforts comparable to OpenLDAP with initally ported build system. In particular higher than the simple "take binary" approach.
 +
** kdepimlibs is build with -DUNICODE, but expects LDAP system calls o return ascii, so this needs conversion. There is a bit code in kdepimlibs/kldap/w32ldaphelp.h which works fo WindowsCE, but now Windows>=NT.
 +
** Is propietary we do not know the implementation details and cannot debug it.
 +
** Might show slightly different behavior than OpenLDAP, which raises potential testing and support costs when Kontact behaves differently here.
 +
** Might not implement all functions used by kldap so working around it in kldap would be necessary.
 +
 
 +
===Search===
 +
There are several issues with Nepomuk / Soprano and the redland rdf libraries on Windows,
 +
they are currently disabled because there is no stable build for Windows.
 +
 
 +
===Nepomuk===
 +
For a virtuoso installation to work regsvr32 has to be called on the virtuoso odbc driver at the moment. Soprano has to be fixed so that it checks if that driver is availble and if not registers it. The NSIS installer does this currently
 +
 
 +
===Akonadi Notifications===
 +
DBus problem that has been fixed in newer versions of DBus > 1.4.1
 +
 
 +
===Design===
 +
Oxygen Theme looks strange and alien on Windows 7 default style but ok on Windows XP style
 +
Currently the Packaged Style in the Enterprise 5 package is optimzed for
 +
XP and Vista/7 looks.
 +
 
 +
Best solution would be to check what the System Style is or package the KDE-Systemsettings to customize that style.
 +
 
 +
===Akonadi Start Stop===
 +
Akonadi startup can take a while on slow systems which delays the first Kontact
 +
startup.
 +
 
 +
Once akonadi is running it can not be stopped from the UI
 +
 
 +
===GPG4Win Integration===
 +
Crypto is now working again the reason was an error in libstdc++ on windows that caused std::strings to corrupt the heap.
 +
 
 +
== General Hints ==
 +
 
 +
=== Shutdown everything from KDE ===
 +
Either run killkde.bat in your installation\bin directory or run
 +
kdeinit4 --terminate to shut down everything.
 +
 
 +
==== Delete all configuration ====
 +
 
 +
To delete all configuration files remove the folders .local .config .kde in
 +
your userdata directory.
 +
(e.g. c:\documents and settings\testuser\ on xp c:\users\testuser on win7)
 +
Also delete .kde in your application data directory
 +
(e.g. c:\documents and settings\testuser\Applicationdata on xp c:\users\testuser\Applicationdata\roaming on win7)
 +
 
 +
==== Switch to English ====
 +
 
 +
To change the application '''language''' of Kontact from German '''to English''' please
 +
use a text editor and change the locale settings in the file 'kdeglobals' to:
 +
  Country=en
 +
  Language=en_US
 +
and restart all KDE processes (esp. logout, login).
 +
You'll find this file usually under the installed directory
 +
in 'Kontact\share\config' (e.g. c:\Program Files\Kontact\share\config\kdeglobals).
 +
 
 +
Or goto: help -> change application language
 +
 
 +
==== Backtrace for Crash reporting ====
 +
 
 +
If you encounter crashes, a backtrace might help the developers to find
 +
the defect faster. There are some hints doing a backtrace with gdb on windows
 +
in  http://techbase.kde.org/Development/Tutorials/Debugging/Debugging_on_MS_Windows#MinGW_debugging_hints
 +
 
 +
==== Diagnostics ====
 +
General debugging techniques of KDEPIM Software are also available on Windows.
 +
There is akonadiconsole installed as a tool to debug akonadi, as well as qdbusviewer.
 +
 
 +
DebugView and some other tools from the following URL can be useful to diagnose problems:
 +
http://techbase.kde.org/Projects/KDE_on_Windows/Tools
 +
 
 +
DebugView will let you see the message of the KDE runtime system, which on GNU/Linux you can see on stdout or stderr.
 +
 
 +
----
 +
 
 +
 
 +
==Some notes from the original porting project==
 +
 
 +
===Integration into the Windows Explorer & Desktop===
 +
{{Note|[[User:Jstaniek|jstaniek]] 22:01, 14 January 2008 (CET): [http://tortoisesvn.tigris.org/ TortoiseSVN] is GPLed SVN client which is nicely integrated with Windows Explorer. Perhaps we can use its source code as a reference...}}
 +
 
 +
====Registry settings for default apps and services====
 +
'''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 [http://members.toast.net/4pf/Protocol.html 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 [http://support.microsoft.com/kb/297878 KB297878]. Below we'll use HKCU.
 +
 
 +
*HKCU\Software\Clients\StartMenuInternet key is used to specify default web browser; could be set to Konqueror
 +
*HKCU\Software\Clients\StartMenuInternet\app.exe\shell\open\command key is used for "Internet" start menu shortcut, can be set to Konqueror. Note from the KB - <tt>"The command might open the browser on the users home page, for example. However, it might launch some other introductory user interface that the ISV feels is appropriate."</tt> So this is not the same as 'default browser' setting.
 +
 
 +
*HKCU\Software\Clients\Mail\Appname - registered email client, there can be more entries within the 'Mail' node. Adding KMail here makes it available for users to select as a default browser using 'Set Default Programs' system window.
 +
*HKCU\Software\Clients\Mail - default email client,  'Windows Mail' by default; could be set to KMail.
 +
 
 +
*HKCU\Software\Clients\Calendar\Appname - registered calendar application, there can be more entries within the 'Calendar' node. See the note for HKCU\Software\Clients\Mail\Appname.
 +
*HKCU\Software\Clients\Calendar - default calendar application, 'Windows Calendar' on Vista; could be set to KOrganizer.
 +
 
 +
*HKCU\Software\Clients\Contacts\Appname - registered contacts client, there can be more entries within the 'Contacts' node. See the note for HKCU\Software\Clients\Mail\Appname.
 +
*HKCU\Software\Clients\Contacts - default contacts application, 'Address Book' by default; could be set to KAddressBook.
 +
 
 +
*HKCU\Software\Clients\News\Appname - registered newsgroup client, there can be more entries within the 'News' node. See the note for HKCU\Software\Clients\Mail\Appname.
 +
*HKCU\Software\Clients\News - default newsgroup application, 'Windows Mail' by default; could be set to KNode.
 +
 
 +
From the KB: <tt>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.</tt>
 +
 
 +
=====Using MAPI=====
 +
HKLM\Software\Clients\AppName\DllPath points to a dll implementing [http://en.wikipedia.org/wiki/MAPI 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.[http://members.toast.net/4pf/Protocol.html]  
 +
Example implementation of MAPI services is Thundebird's mozMapi32.dll (the key is usualle equal to C:\Program Files\Mozilla Thunderbird\mozMapi32.dll).
 +
 
 +
=====KDE-related notes=====
 +
*KDElibs execute default web browser or email client for protocols like http(s): and <nowiki>mailto:</nowiki> via {{Qt|QDesktopServices}}::openUrl(), which in turn uses ShellExecute(). openUrl() is widely used in Qt e.g. for hyperlinks in text boxes and label widgets.
 +
*A general rule of KDE/win: not to duplicate registry settings in any rc file and use default applications if possible, to avoid changing behaviour expected by users.
 +
*[[User:Jstaniek|jstaniek]] 12:06, 18 June 2008 (CEST): Before LinuxTag I've performed some tests of setting default clients, and looks like it's is not possible to set onlt writing registry entries. Some API calls may be needed, especially because locked at least one registry key is locked for writing during the session.
  
 
== Links ==
 
== Links ==
 
* [[Projects/KDE_on_Windows|The KDE on Windows]] Project
 
* [[Projects/KDE_on_Windows|The KDE on Windows]] Project
 
* [[Projects/KDE on Windows/Missing features of kdelibs|Missing features of kdelibs on Windows]] - KDE PIM may depend on them
 
* [[Projects/KDE on Windows/Missing features of kdelibs|Missing features of kdelibs on Windows]] - KDE PIM may depend on them
 
== External Links ==
 
*Find out how others have managed to port their software to Windows:
 
**[http://cs.senecac.on.ca/~david.humphrey/writing/firefox-win32-build.html Building Firefox on Windows using msvc]
 
**[http://wiki.mozilla.org/LDAP_C_SDK_SASL_Windows Building Cyrus SASL on Windows]
 
  
 
[[Category:PIM]]
 
[[Category:PIM]]
 
[[Category:MS Windows]]
 
[[Category:MS Windows]]

Latest revision as of 09:41, 21 February 2012

This page covers topics related to the KDE PIM Suite on MS Windows NT kernel (which means running on Windows Desktop versions NT or newer like XP, Vista or 7).

Contents

[edit] Building

To build KDE PIM for Windows use emerge. For documentation about emerge please see [1]

You should be able to get executables just by calling emerge kdepim.


[edit] Bugs

For a list of open, Windows specific, bugs please see: bugs.kde.org

[edit] Problem points

Status Feature Description Contact
TO DO Documentation of KDE Somehow the documentation is not loaded correctly in khelpcenter without visible errors in the debug output [mailto: < >]


TO DO Search Provide a search backend Andre Heinecke <aheinecke@intevation.de>


TO DO Default Folders

Some default folders in the wrong place (not in AppData)

Andre Heinecke <aheinecke@intevation.de>


TO DO Nepomuk Provide a working Nepomuk Andre Heinecke <aheinecke@intevation.de>


IN PROGRESS Multiuser Support Make it possible

to deploy KDEPIM in multiuser environments

[mailto: <>]


TO DO Dialogs opening in background Dialogs are way to often opened in

the background and thus missed by the user

Andre Heinecke <aheinecke@intevation.de>


TO DO KWallet in background of accountwizard warnings Do not open the initial KWallet dialog behind the accountwizard Andre Heinecke <aheinecke@intevation.de>


TO DO Seamless integration with Gpg4Win 2.1 Crypto does not integrate as good and easy as it should Andre Heinecke <aheinecke@intevation.de>


TO DO Summary Screen without Nepomuk The summary screen has problems without nepomuk avialability Andre Heinecke <aheinecke@intevation.de>


IN PROGRESS Make mailto work There are probably some wrong parameters set in the registry. KSendemail has already been fixed so that i can take the parameters correctly. Andre Heinecke <aheinecke@intevation.de>


TO DO Performance of Plugin loading Loading plugins like the configuration plugins takes unnaturally

long

Andre Heinecke <aheinecke@intevation.de>


TO DO SSL Certificate checks All SSL Certificate checks fail Andre Heinecke <aheinecke@intevation.de>


TO DO System Requirements Minimum System requirements Andre Heinecke <aheinecke@intevation.de>


DONE LDAP Support Enabling KLdap Andre Heinecke <aheinecke@intevation.de>


DONE Akonadi Notifications Akonadi Notifications are not communicated correctly to the GUI [mailto: <>]


DONE Kwallet warnings Remove the Kwallet "do you want to grant xy access Andre Heinecke <aheinecke@intevation.de>


DONE Image view in Mailviewer Images in the Mailviewer are not shown correctly [mailto: <>]


DONE Design Make KDEPIM feel native on Windows [mailto: <>]


DONE Integrate with GPG4Win GnuPG is

currently supported

Andre Heinecke <aheinecke@intevation.de>


DONE Akonadi startup/shutdown Decide how akonadi should be started/stopped on Windows (There is now a

Full Shudown button in Kontact that also kills akonadi

[mailto: <>]

[edit] SSL Certificates

All SSL certificate checks currently fail a correct solution would be to take the Installed Windows certificates additionally to the kdelibs default certificates.

[edit] Plugin Performance

The loading of plugins, especially the kcm modules for the configuration Dialog take unnaturally long to load for the first time. Depending on your Machine this can be 10-40 seconds.

[edit] Sumarry Screen

Clicking on the Summary Screen in Kontact seems to trigger a very large query. Used with multiple large accounts Kontact started to loose stability and ultimately began to freeze um with some Akonadi ressources crashing.

[edit] Seamless Crypto

There needs to be a build of the gnupg development libaries that better integrates with gpg4win. The selfbuilt camakeified Versions do not have any upstream support and are built without smime support. The upstream gpg4win-dev package was built against gpg 1 and does only work after some tricks. Kleopatra master on Windows also seems a bit buggy (refreshing way too often) but this might be a side effect of the libraries.

[edit] Dialogs in background

Many Dialogs (for example the "ignore ssl errors" dialog can open in the background) and be missed by the user that then is confused by the behavior of kontact.

[edit] Kwallet warnings

The Kwallet warnings don't make sense as they do not add any kind of security. The processname can easily be faked and they are just written in a plain text file. They often open in the background and are confusing.

[edit] Minimum System Requirements

The minimal system requirements (CPU/RAM/Disk Space) for Kontact on Windows are currently unkonwn since it is much more standalone then on a GNU/Linux System those need to be measured and communicated. Windows apperantly expect something like that.

[edit] Multiuser Support

Kontact on Windows currently can be run on the same machine twice with different users but there are appearantly some problems on Windows Server installations.

[edit] LDAP Support

Done by integrating a binary package of openldap into the build.

There are two options to get LDAP support for PIM on Windows:

[edit] OpenLDAP

  • Pro:
    • Would offer the same API as on GNU/Linux
    • Is proven to work on Windows with KDEPIM
    • If just a binary package is used, the effort is small.
  • Contra:
    • Current Openldap is not ported to be buildable natively on Windows. So far it would need to be cross compiled, or cygwin compiled or the binaries taken.
    • More effort to do a good port to a decent buildsystem which fits the toolchain like cmake/emerge to be build with msvc or mingw-w64 on Windows.
    • Can not be debugged with msvc for above reasons
    • Is another dependency we have to take care of, which increasing code and complexety, more chance for security issues and the port needs to be maintained.

[edit] WinLDAP

Windows has native LDAP support with winldap:

  • Pro:
    • Integrated into the platform, maintained by Microsoft
    • API differences should be Minimal so kldap calls could stay the same
    • Behaviour consistent with other LDAP client behaviour on Windows.
  • Contra:
    • Efforts comparable to OpenLDAP with initally ported build system. In particular higher than the simple "take binary" approach.
    • kdepimlibs is build with -DUNICODE, but expects LDAP system calls o return ascii, so this needs conversion. There is a bit code in kdepimlibs/kldap/w32ldaphelp.h which works fo WindowsCE, but now Windows>=NT.
    • Is propietary we do not know the implementation details and cannot debug it.
    • Might show slightly different behavior than OpenLDAP, which raises potential testing and support costs when Kontact behaves differently here.
    • Might not implement all functions used by kldap so working around it in kldap would be necessary.

[edit] Search

There are several issues with Nepomuk / Soprano and the redland rdf libraries on Windows, they are currently disabled because there is no stable build for Windows.

[edit] Nepomuk

For a virtuoso installation to work regsvr32 has to be called on the virtuoso odbc driver at the moment. Soprano has to be fixed so that it checks if that driver is availble and if not registers it. The NSIS installer does this currently

[edit] Akonadi Notifications

DBus problem that has been fixed in newer versions of DBus > 1.4.1

[edit] Design

Oxygen Theme looks strange and alien on Windows 7 default style but ok on Windows XP style Currently the Packaged Style in the Enterprise 5 package is optimzed for XP and Vista/7 looks.

Best solution would be to check what the System Style is or package the KDE-Systemsettings to customize that style.

[edit] Akonadi Start Stop

Akonadi startup can take a while on slow systems which delays the first Kontact startup.

Once akonadi is running it can not be stopped from the UI

[edit] GPG4Win Integration

Crypto is now working again the reason was an error in libstdc++ on windows that caused std::strings to corrupt the heap.

[edit] General Hints

[edit] Shutdown everything from KDE

Either run killkde.bat in your installation\bin directory or run kdeinit4 --terminate to shut down everything.

[edit] Delete all configuration

To delete all configuration files remove the folders .local .config .kde in your userdata directory. (e.g. c:\documents and settings\testuser\ on xp c:\users\testuser on win7) Also delete .kde in your application data directory (e.g. c:\documents and settings\testuser\Applicationdata on xp c:\users\testuser\Applicationdata\roaming on win7)

[edit] Switch to English

To change the application language of Kontact from German to English please use a text editor and change the locale settings in the file 'kdeglobals' to:

 Country=en
 Language=en_US

and restart all KDE processes (esp. logout, login). You'll find this file usually under the installed directory in 'Kontact\share\config' (e.g. c:\Program Files\Kontact\share\config\kdeglobals).

Or goto: help -> change application language

[edit] Backtrace for Crash reporting

If you encounter crashes, a backtrace might help the developers to find the defect faster. There are some hints doing a backtrace with gdb on windows in http://techbase.kde.org/Development/Tutorials/Debugging/Debugging_on_MS_Windows#MinGW_debugging_hints

[edit] Diagnostics

General debugging techniques of KDEPIM Software are also available on Windows. There is akonadiconsole installed as a tool to debug akonadi, as well as qdbusviewer.

DebugView and some other tools from the following URL can be useful to diagnose problems: http://techbase.kde.org/Projects/KDE_on_Windows/Tools

DebugView will let you see the message of the KDE runtime system, which on GNU/Linux you can see on stdout or stderr.



[edit] Some notes from the original porting project

[edit] Integration into the Windows Explorer & Desktop

noframe
 
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...

[edit] Registry settings for default apps and services

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.

  • HKCU\Software\Clients\StartMenuInternet key is used to specify default web browser; could be set to Konqueror
  • HKCU\Software\Clients\StartMenuInternet\app.exe\shell\open\command key is used for "Internet" start menu shortcut, can be set to Konqueror. Note from the KB - "The command might open the browser on the users home page, for example. However, it might launch some other introductory user interface that the ISV feels is appropriate." So this is not the same as 'default browser' setting.
  • HKCU\Software\Clients\Mail\Appname - registered email client, there can be more entries within the 'Mail' node. Adding KMail here makes it available for users to select as a default browser using 'Set Default Programs' system window.
  • HKCU\Software\Clients\Mail - default email client, 'Windows Mail' by default; could be set to KMail.
  • HKCU\Software\Clients\Calendar\Appname - registered calendar application, there can be more entries within the 'Calendar' node. See the note for HKCU\Software\Clients\Mail\Appname.
  • HKCU\Software\Clients\Calendar - default calendar application, 'Windows Calendar' on Vista; could be set to KOrganizer.
  • HKCU\Software\Clients\Contacts\Appname - registered contacts client, there can be more entries within the 'Contacts' node. See the note for HKCU\Software\Clients\Mail\Appname.
  • HKCU\Software\Clients\Contacts - default contacts application, 'Address Book' by default; could be set to KAddressBook.
  • HKCU\Software\Clients\News\Appname - registered newsgroup client, there can be more entries within the 'News' node. See the note for HKCU\Software\Clients\Mail\Appname.
  • HKCU\Software\Clients\News - default newsgroup application, 'Windows Mail' by default; could be set to KNode.

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.

[edit] Using MAPI

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.[2] Example implementation of MAPI services is Thundebird's mozMapi32.dll (the key is usualle equal to C:\Program Files\Mozilla Thunderbird\mozMapi32.dll).

[edit] KDE-related notes
  • KDElibs execute default web browser or email client for protocols like http(s): and mailto: via QDesktopServices::openUrl(), which in turn uses ShellExecute(). openUrl() is widely used in Qt e.g. for hyperlinks in text boxes and label widgets.
  • A general rule of KDE/win: not to duplicate registry settings in any rc file and use default applications if possible, to avoid changing behaviour expected by users.
  • jstaniek 12:06, 18 June 2008 (CEST): Before LinuxTag I've performed some tests of setting default clients, and looks like it's is not possible to set onlt writing registry entries. Some API calls may be needed, especially because locked at least one registry key is locked for writing during the session.

[edit] Links


This page was last modified on 21 February 2012, at 09:41. This page has been accessed 40,032 times. Content is available under Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal