Skip to content

Retrieve Mozc's installation directory from registry - #1087

Merged
hiroyuki-komatsu merged 1 commit into
google:masterfrom
yukawa:issue_1086
Oct 21, 2024
Merged

hiroyuki-komatsu merged 1 commit into
google:masterfrom
yukawa:issue_1086

Conversation

@yukawa

@yukawa yukawa commented Oct 17, 2024

Copy link
Copy Markdown
Collaborator

Description

Currently the directory %ProgramFiles(x86)%\Mozc is effectively hard coded in mozc_tip{32,64}.dll. This is a big challenge when we want to switch Mozc's installation directory from %ProgramFiles(x86)%\Mozc to %ProgramFiles%\Mozc.

So as not to bother users during the migration, with this commit SystemUtil::GetServerDirectory() first attempts to retrieve Mozc's installation directory from registry by checking the COM entry for mozc_tip64.dll.

The next step is to deploy mozc_tip{32,64}.dll users with this commit.

Issue IDs

This is a preparation to switch Mozc's installation directory from

  %ProgramFiles(x86)%\Mozc

into

  %ProgramFiles%\Mozc

without user observable downtime (google#1086).

Currently the directory

  %ProgramFiles(x86)%\Mozc

is effectively hard coded in 'mozc_tip{32,64}.dll'. This means if older
versions of 'mozc_tip{32,64}.dll' continue assuming the previous
installation directory until it is unloaded or the process is restarted.

To avoid such mismatch, with this commit

  SystemUtil::GetServerDirectory()

starts dynamically retrieving Mozc's installation directory from
registry by checking COM entries of 'mozc_tip64.dll'. If it fails, we
fall back to the previous behavior.

Note that this is the first step of the migration and we cannot go to
the next step until 'mozc_tip{32,64}.dll' with this commit is deployed
to users.
@hiroyuki-komatsu
hiroyuki-komatsu merged commit 774b558 into google:master Oct 21, 2024
@hiroyuki-komatsu

Copy link
Copy Markdown
Collaborator

We have merged your PR.
Thank you for the contribution!

@yukawa
yukawa deleted the issue_1086 branch October 31, 2024 22:18
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