Skip to content

Windows thumbnail shell extension#1569

Merged
askmeaboutlo0m merged 9 commits into
drawpile:mainfrom
cow54787:win-shell-ext
May 16, 2026
Merged

Windows thumbnail shell extension#1569
askmeaboutlo0m merged 9 commits into
drawpile:mainfrom
cow54787:win-shell-ext

Conversation

@cow54787
Copy link
Copy Markdown
Contributor

Description

Adds drawpile_shell_ext.dll on windows. This is a shell extension that provides thumbnails for .dpcs files.
The WIX installer has been updated to register the DLL as a shell extension.
The code is self contained, only relying on windows libraries (WRL for COM) and sqlite3. WIC (Windows Imaging Component) is used to parse the JPEG thumbnail inside the .dpcs file.

The PR also contains a simple test exe that loads the provider via COM and outputs a single thumbnail. I used it to test the shell extension and use a debugger, without having to rely on the file explorer.

The extension can be expanded in the future to support more file formats or other windows integration.

Formalities

  • Did you write the code yourself or was any AI-assistance or similar used? If it's the latter, describe what.

I did use LLMs to understand various windows APIs.

Copy link
Copy Markdown
Member

@askmeaboutlo0m askmeaboutlo0m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, only the ORDER BY snapshot_id DESC is functionally relevant, the rest is whatever.

SPDX-License-Identifier commands would also be nice to make it explicit. Just // SPDX-License-Identifier: GPL-3.0-or-later or // SPDX-License-Identifier: MIT or some other compatible thing at the top is fine. The Microsoft thumbnailer samples are MIT-licensed.

Comment thread cmake/DrawpileOptions.cmake Outdated
Comment thread src/win-shell-ext/dpcs.cpp
Comment thread src/win-shell-ext/dpcs.cpp Outdated
Comment thread src/win-shell-ext/dpcs.cpp Outdated
Comment thread src/win-shell-ext/dpcs.cpp Outdated
Comment thread src/win-shell-ext/main.cpp
Comment thread src/win-shell-ext/ThumbnailProvider.cpp Outdated
@askmeaboutlo0m askmeaboutlo0m merged commit 2eb9050 into drawpile:main May 16, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants