Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve Mozc's installation directory from registry #1087

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

yukawa
Copy link
Collaborator

@yukawa yukawa commented Oct 17, 2024

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
1 check passed
@hiroyuki-komatsu
Copy link
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