Inno Setup 安装中的按钮被裁剪,自定义消息显示为乱码(日语)

安德鲁·特拉克尔

在我的[run]部分,我有这个条目:

Filename: "{win}\hh.exe"; \
    Parameters: "{app}\MeetSchedAssist.chm::/msa-revision-history.htm"; \
    WorkingDir: "{app}"; \
    Flags: nowait postinstall runmaximized; \
    Description: "{cm:ViewChangeHistory}"

当我用英语运行我的安装程序时,它看起来很好:

英语成绩

一位用户刚刚录制了一段视频,将其安装在日本计算机上:

日语结果

有两个问题:

  1. GUI 的按钮都被裁剪了
  2. “查看更改历史记录”自定义字符串是乱码

英国定制的邮件文件(UTF-8编码)有:

English.ViewChangeHistory=View Change History

日本的自定义消息文件(UTF-8编码的)具有:

Japanese.ViewChangeHistory=変更履歴を表示

Why is it not displaying correctly? I am using the most recent version of Inno Setup Unicode. I do know that the user is using a Ultra HD monitor.

Also, I am rebuilding the run list like this:

type
  TRunEntry = record
    Caption: string;
    Checked: Boolean;
    Object: TObject;
  end;

procedure RebuildRunList;
var
  RunEntries: array of TRunEntry;
  I: Integer;
begin
  // Save run list ...
  SetArrayLength(RunEntries, WizardForm.RunList.Items.Count);
  for I := 0 to WizardForm.RunList.Items.Count - 1 do
  begin
    RunEntries[I].Caption := WizardForm.RunList.ItemCaption[I];
    RunEntries[I].Checked := WizardForm.RunList.Checked[I];
    RunEntries[I].Object := WizardForm.RunList.ItemObject[I];
  end;

  // ... clear it ... 
  WizardForm.RunList.Items.Clear;

  // ... and re-create 
  for I := 0 to GetArrayLength(RunEntries) - 1 do
  begin
    // the first three entries are radio buttons 
    if (I = 0) or (I = 1) or (I = 2) then
    begin
      WizardForm.RunList.AddRadioButton(
        RunEntries[I].Caption, '', 0, RunEntries[I].Checked, True, RunEntries[I].Object);
    end
      else
    begin
      WizardForm.RunList.AddCheckBox(
        RunEntries[I].Caption, '', 0, RunEntries[I].Checked, True, True, True,
        RunEntries[I].Object);
    end;
  end;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
  if CurPageID = wpFinished then
  begin
    // Only now is the RunList populated.
    // Two entries are on 64-bit systems only.
    if IsWin64 then RebuildRunList;
  end;
end;

Update

I commented out the code that rebuilds the run list and it made no difference on my PC:

结果 1

However, the skinning works correctly. So the button position matter must be related to the users using a ultra HD configuration and and/or scaled text.

Then I commentted out the skinning code and tried again on my PC. No change:

结果 2

I really don't understand why this is happening!

Update

I include the custom messages like this:

[CustomMessages]
#include AddBackslash(SourcePath) + ".\l.jpn\CustomMessagesJapanese.txt"
Miral

This depends on how you're including the text.

In an ISL file with MessagesFile

According to http://www.jrsoftware.org/ishelp/topic_unicode.htm, it is not legal to save an ISL file in UTF-8.

您必须将其保存为使用文件中指定的代码页编码的 ANSI。

直接在您的 ISS 文件中或使用 #include

或者,您可以直接在您的 iss 文件中使用 UTF-8 字符串,方法是直接在本地 [Messages] 或 [CustomMessages] 部分中使用 Language.Key 值,如下所示:

[CustomMessages]
English.ViewChangeHistory=View Change History
Japanese.ViewChangeHistory=変更履歴を表示

您还可以#include 使用相同格式的外部文件。

在这两种情况下(无论是直接在 iss 文件中还是在 #included 文件中),您都需要确保将文件保存为带有 BOM 的 UTF-8。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Inno Setup中的TTreeView

来自分类Dev

在Inno Setup中取消安装

来自分类Dev

Inno Setup:自定义类

来自分类Dev

Inno Setup:创建自定义表单

来自分类Dev

Inno Setup:自定义类

来自分类Dev

Inno Setup - 创建自定义消息框(是/否)

来自分类Dev

如何从Inno Setup安装JRE?

来自分类Dev

inno setup中的“ Not in a loop”错误

来自分类Dev

Inno Setup中的条件DisableProgramGroupPage

来自分类Dev

在Inno Setup中记录TWindowsVersion

来自分类Dev

Inno Setup 中的动态密码

来自分类Dev

阻止按钮在Inno Setup中获得焦点

来自分类Dev

Inno Setup如何在自定义消息中添加CRLF /换行符

来自分类Dev

Inno Setup中的自定义消息和占位符文本

来自分类Dev

在Inno Setup中处理和自定义错误和消息

来自分类Dev

Inno Setup如何在自定义消息中添加CRLF /换行符

来自分类Dev

为什么在Inno Setup中未选中自定义页面上的单选按钮?

来自分类Dev

当窗口调整为最小尺寸时(在Inno Setup上),TLabel控件会在自定义页面上裁剪

来自分类Dev

在Inno Setup中,FinishedPage上未显示自定义TLabel

来自分类Dev

Inno Setup的自定义页面向导

来自分类Dev

在Inno-Setup中使用自定义DLL

来自分类Dev

Inno Setup语言对话框自定义

来自分类Dev

Inno Setup:“就绪页面”自定义布局

来自分类Dev

Inno Setup使用Pascal脚本自定义FinishedLabel

来自分类Dev

Inno Setup的自定义页面向导

来自分类Dev

使用Google Map的Inno Setup自定义页面

来自分类Dev

Inno Setup:自定义页面选择更新或删除/卸载

来自分类Dev

获取单选按钮值[INNO SETUP]

来自分类Dev

wpFinished页面上的Inno Setup替换按钮