FileTypesIntegration
Windows keeps information about menus, file extensions, file types, and protocol handlers in the Registry, mostly under HKEY_CLASSES_ROOT. Linux mostly keeps this information in the global and per-user config files (/etc/mailcap, /etc/mime.types, etc.), and in .desktop files in several places.
Exporting Wine's associations to freedesktop.org
This already works in current git and will first appear in the 1.1.24 release.
winemenubuilder gets run with the -a option on wineboot startup and when a Windows application tells shell32 that it's changed the associations. Users could also run it on demand.
It scans HKEY_CLASSES_ROOT in the registry to find the Windows extensions, then looks up freedesktop.org MIME type for each extension, and if it can't find one it makes up a new MIME type from what the registry specifies (going as far as inventing a bogus MIME type if the registry doesn't specify any MIME type). New MIME types go into the user's MIME type list under ~/.local/share/mime/packages.
It also attempts to associate and disassociate file open handlers with MIME types. A log of what was previously done is kept in HKEY_CURRENT_USER\Software\Wine\FileOpenAssociations. Then any new file open handlers found are add to that log, and generate new freedesktop.org associations (under ~/.local/share/applications). Any from before that are now gone cause deletion of that freedesktop.org association. Associations are only (re)made when something changes, so if a user manually deletes the freedesktop.org association from ~/.local/share/applications it doesn't just come back on its own.
The implementation is quite complete, the new MIME types come with icons and even the freedesktop.org "Open With..." list is populated with the MIME handler and can be used to open new file types afterwards. Some TODOs about other association features Windows does and we don't (yet) are in the winemenubuilder source code.
Importing freedesktop.org's associations into Wine
This doesn't work yet. Proposed ways have included an alternate registry backend, the reverse of the exporting process where we fill in the registry from freedesktop.org's contents, or modifications to the parts of Wine so we launch files through freedesktop.org instead of or in addition to the registry.
Other
Windows and freedesktop.org are fundamentally different in how they handle files and MIME types, and a 100% correct and complete implementation is unlikely.
An applet to add/delete/modify filetypes might be useful, too. DavidLeeLambert might work on one.
