Skip to content

change(windows): include map2pdb generation for relevant Delphi projects#14799

Merged
mcdurdin merged 1 commit intomasterfrom
change/windows/include-map2pdb-for-relevant-projects
Nov 17, 2025
Merged

change(windows): include map2pdb generation for relevant Delphi projects#14799
mcdurdin merged 1 commit intomasterfrom
change/windows/include-map2pdb-for-relevant-projects

Conversation

@mcdurdin
Copy link
Copy Markdown
Member

@mcdurdin mcdurdin commented Sep 19, 2025

Adds a call to map2pdb for Delphi projects, if map2pdb is an executable on the path. This way, we get .pdb files we can use for debugging and for performance profiling. We may be able to use these in future also for Sentry traces and eliminate tds2dbg, but I will revisit that later.

If map2dbg is available, then the build and install actions will copy the PDB to be alongside the corresponding executable, making most debug actions relatively seamless for finding symbols.

Relates-to: #14787
Build-bot: skip release:developer,windows

User Testing

TEST_WINDOWS: Run through a set of standard Keyman for Windows tasks and verify that you do not experience any crashes.
TEST_DEVELOPER: Run through a set of standard Keyman Developer tasks and verify that you do not experience any crashes.

@keymanapp-test-bot
Copy link
Copy Markdown

keymanapp-test-bot bot commented Sep 19, 2025

@keymanapp-test-bot keymanapp-test-bot bot added this to the A19S12 milestone Sep 19, 2025
Base automatically changed from feat/windows/14787-improve-startup-time to master September 26, 2025 07:09
@darcywong00 darcywong00 modified the milestones: A19S12, A19S13 Sep 27, 2025
@darcywong00 darcywong00 modified the milestones: A19S13, A19S14 Oct 11, 2025
@darcywong00 darcywong00 modified the milestones: A19S14, A19S15 Oct 24, 2025
@keyman-server keyman-server modified the milestones: A19S15, A19S16 Nov 8, 2025
@mcdurdin mcdurdin force-pushed the change/windows/include-map2pdb-for-relevant-projects branch from 120cb60 to eee2712 Compare November 13, 2025 10:11
@mcdurdin mcdurdin force-pushed the change/windows/include-map2pdb-for-relevant-projects branch from eee2712 to a54cbf7 Compare November 13, 2025 11:08
@mcdurdin mcdurdin requested a review from rc-swag November 13, 2025 11:19
@keymanapp-test-bot keymanapp-test-bot bot added has-user-test user-test-required User tests have not been completed labels Nov 13, 2025
@mcdurdin mcdurdin marked this pull request as ready for review November 13, 2025 11:19
@mcdurdin mcdurdin marked this pull request as draft November 13, 2025 13:08
@mcdurdin
Copy link
Copy Markdown
Member Author

Both the Windows and the Developer installers are currently broken in this PR. Something has changed about how they are constructed. Investigating.

@mcdurdin mcdurdin force-pushed the change/windows/include-map2pdb-for-relevant-projects branch from a54cbf7 to 64101eb Compare November 13, 2025 13:43
Adds a call to map2pdb for Delphi projects, if map2pdb is an executable
on the path. This way, we get .pdb files we can use for debugging and
for performance profiling. This also replaces tds2dbg.

If map2dbg is available, then the build and install actions will copy
the PDB to be alongside the corresponding executable, making most debug
actions relatively seamless for finding symbols.

Also fixes up setup.exe in Windows and Developer to extend setup.exe to
a 512-byte boundary after map2pdb patches the PE.

Relates-to: #14787
Build-bot: skip release:developer,windows
Test-bot: skip
@mcdurdin mcdurdin force-pushed the change/windows/include-map2pdb-for-relevant-projects branch from 64101eb to edca16f Compare November 13, 2025 13:48
@mcdurdin mcdurdin changed the base branch from master to fix/windows/stop-outputting-debug-strings-from-dllmain November 13, 2025 13:48
@mcdurdin mcdurdin marked this pull request as ready for review November 14, 2025 04:31
@Meng-Heng Meng-Heng self-assigned this Nov 14, 2025
@Meng-Heng
Copy link
Copy Markdown
Contributor

Test Specifications

  1. Windows 10 Bootcamp
  2. Keyman for Windows 19.0.161-alpha-test-14799
  3. Keyman Developer 19.0.161-alpha-test-14799

Prerequisites

  1. Uninstall Keyman 19.0.161-alpha-test-15150, Keyman Developer 18.0.144 -> Restart the machine
  2. Install Keyman for Windows & Keyman Developer from Test Artifacts

Test Results

  • TEST_WINDOWS (PASSED):
  1. Start Keyman after installation success
  2. Verified: Keyman is located in the tray icon
  3. Launch Keyman Configuration
  4. Navigate & Interact with the five tabs (Keyboard Layouts, Options, hotkeys, Support, and Update)
  5. Verified: Work as expected
    • The diagnostic and help links
    • Check for new updates
    • Base Keyboard
    • A few features in the Options tab
    • Preset hotkeys
    • Switch language
    • Download and Install Keyboard
  • TEST_DEVELOPER (PASSED):
  1. Launch Keyman Developer
  2. Create a new Keyman keyboard project
  3. Verified: Successfully
    • Compile the keyboard & Package
    • Test on Server
    • Add a language tag
    • Debug keyboard
    • Change font
    • Install the keyboard

@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-required User tests have not been completed label Nov 14, 2025
@mcdurdin
Copy link
Copy Markdown
Member Author

@rc-swag once this merges, we will need to check the pdb upload to sentry on the next alpha build and verify that symbols are being mapped correctly.

Copy link
Copy Markdown
Contributor

@rc-swag rc-swag left a comment

Choose a reason for hiding this comment

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

lgtm

Comment on lines +33 to +36
reg add 'HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman' //v CategoryCount //t REG_DWORD //d 1 //f
reg add 'HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman' //v CategoryMessageFile //t REG_SZ //d "$INSTALLPATH_KEYMANENGINE\\keymanmc.dll" //f
reg add 'HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman' //v EventMessageFile //t REG_SZ //d "$INSTALLPATH_KEYMANENGINE\\keymanmc.dll" //f
reg add 'HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\Keyman' //v TypesSupported //t REG_DWORD //d 7 //f
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not related to map2pdb; discovered when running build.sh install, strings were incorrect.

Base automatically changed from fix/windows/stop-outputting-debug-strings-from-dllmain to master November 17, 2025 16:02
@mcdurdin mcdurdin merged commit 6e470ef into master Nov 17, 2025
12 checks passed
@mcdurdin mcdurdin deleted the change/windows/include-map2pdb-for-relevant-projects branch November 17, 2025 16:02
@github-project-automation github-project-automation bot moved this from Todo to Done in Keyman Nov 17, 2025
@keyman-server
Copy link
Copy Markdown
Collaborator

Changes in this pull request will be available for download in Keyman version 19.0.163-alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants