我已经看到了其他一些关于此的主题,但我花了一些时间试图将其分类为无济于事。
这是我的.iss文件的通用版本:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define AppName "MyApp"
#define CompanyName "MyCompany"
#define FileName "File Name"
#define AppExeName "App Exe.exe"
#define AppIcon "..\icon.ico"
#define AppId "app.id"
#define AppURL "mywebsite"
#define AppSrcDir "path\to\app\directory"
#define AppTargetDir "{userappdata}\" + CompanyName + "\" + AppName
#define AppVersion GetFileVersion(AppSrcDir + "\" + AppExeName)
#define AppPublisher "Publisher"
#define LaunchMessage "Launch Message"
#define AppProtocol "protocol"
#define OutputDir "path\to\output"
#define SetupFilename FileName + "-setup-" + AppVersion
#define SetupImage "..\setup.bmp"
#define InstallerMessage "Some message with a German character - ö"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AllowCancelDuringInstall=no
AppId={#AppId}
AppName={#AppName}
AppVersion={#AppVersion}
AppVerName={#AppName} {#AppVersion}
AppPublisher={#AppPublisher}
AppPublisherURL={#AppURL}
AppSupportURL={#AppURL}
AppUpdatesURL={#AppURL}
DefaultDirName={#AppTargetDir}
DefaultGroupName={#CompanyName}
DisableDirPage=yes
DisableProgramGroupPage=yes
DisableReadyPage=yes
DisableReadyMemo=yes
OutputDir={#OutputDir}
OutputBaseFilename={#SetupFilename}
PrivilegesRequired=lowest
SetupIconFile={#AppIcon}
SignTool=signtool
Compression=lzma/ultra64
SolidCompression=yes
WizardSmallImageFile={#SetupImage}
UninstallDisplayIcon={app}\{#AppExeName}
[InstallDelete]
Type: filesandordirs; Name: {#AppTargetDir}
[Languages]
Name: de; MessagesFile: "compiler:Languages\German.isl"
[Files]
Source: "{#AppSrcDir}\*"; DestDir: "{app}"; Flags: recursesubdirs
Source: "path\to\other\installers\win32\*"; DestDir: "{app}\redist";
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\{#AppName}"; Filename: "{app}\{#AppExeName}"; WorkingDir: "{app}";
Name: "{commondesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; WorkingDir: "{app}";
[Run]
FileName: "{app}\redist\installer.exe"; Parameters: "/S /v/qn"; WorkingDir: "{app}"; StatusMsg: "{#InstallerMessage}";
Run Code Online (Sandbox Code Playgroud)
我的问题是它无法InstallerMessage正确显示文本。该ö字符不正确呈现。
我正在使用Unicode版本的Inno Setup(带有“(u)”)。
我已经看到过使用字节顺序标记的一些提法,但是我还没有看到任何示例。我尝试使用UTF-8编码器转换整个字符串,并在开始时添加了字节顺序标记,但是它不起作用。我完全陷入了困境!
确保.iss文件使用带有BOM的 UTF-8编码。当然,您需要Unicode版本的Inno Setup(Inno Setup 6唯一的版本)。
该字符串是否也在Pascal脚本代码中使用(不是,只是为了他人的利益而提及它,他们可能会发现此问题),您还必须使用Inno Setup 5.6.0或更高版本。早期版本在Pascal Script中不支持UTF-8。
Pascal脚本更改:
Unicode Inno设置:现在,输入源支持Unicode。例如,在必须写之前,您S := #$0100 + #$0101 + 'Aa';现在可以S := '??Aa';直接写。另请参阅新的UnicodeExample1.iss示例脚本。
| 归档时间: |
|
| 查看次数: |
846 次 |
| 最近记录: |