Inno-Setup Installer不会动态选择Windows操作系统的语言

时间:2015-12-08 09:51:50

标签: inno-setup

我有一个在Windows上运行的应用程序。

我的要求是:当Windows上的语言配置为葡萄牙语时,安装程​​序应默认显示葡萄牙语文本,而不显示任何选择语言选项。

同样,在配置了英语的Windows上运行时,应该选择英语等等。

目前,default.isl [langOptions][Setup] AppId={{A33BA940-B460-FFFF-EFF3-1DDCE7083726} AppName=Software Updater AppVersion=2.6.3 DefaultDirName={pf}\Software Updater DefaultGroupName=Software Updater OutputDir=C:\Users\vinayb\Documents\SU_installer OutputBaseFilename=Software Updater 64bit - version 2.6.3 SetupIconFile=C:\Vinay\Installer\2.6.3\Installer files\SU_256px.ico UninstallDisplayIcon=C:\Vinay\Installer\2.6.3\Installer files\SU_256px.ico UninstallDisplayName=Software Updater Compression=lzma SolidCompression=yes ArchitecturesInstallIn64BitMode=x64 WizardSmallImageFile=C:\Program Files (x86)\Inno Setup5\WizModernSmallImage-IS.bmp WizardImageFile=C:\Program Files (x86)\Inno Setup 5\WizModernImage-IS.bmp LanguageDetectionMethod=uilanguage ShowLanguageDialog=no [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" Name: "english"; MessagesFile: "compiler:Languages\EnglishUS.isl" Name: "en_GB"; MessagesFile: "compiler:Languages\EnglishUK.isl" Name: "brazilianportuguese"; MessagesFile:"compiler:Languages\BrazilianPortuguese.isl" Name: "catalan"; MessagesFile: "compiler:Languages\Catalan.isl" Name: "corsican"; MessagesFile: "compiler:Languages\Corsican.isl" Name: "czech"; MessagesFile: "compiler:Languages\Czech.isl" Name: "danish"; MessagesFile: "compiler:Languages\Danish.isl" Name: "dutch"; MessagesFile: "compiler:Languages\Dutch.isl" Name: "finnish"; MessagesFile: "compiler:Languages\Finnish.isl" Name: "french"; MessagesFile: "compiler:Languages\French.isl" Name: "german"; MessagesFile: "compiler:Languages\German.isl" Name: "greek"; MessagesFile: "compiler:Languages\Greek.isl" Name: "hebrew"; MessagesFile: "compiler:Languages\Hebrew.isl" Name: "hungarian"; MessagesFile: "compiler:Languages\Hungarian.isl" Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl" Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl" Name: "norwegian"; MessagesFile: "compiler:Languages\Norwegian.isl" Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl" Name: "portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl" Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" Name: "scottishgaelic"; MessagesFile: "compiler:Languages\ScottishGaelic.isl" Name: "serbiancyrillic"; MessagesFile: "compiler:Languages\SerbianCyrillic.isl" Name: "serbianlatin"; MessagesFile: "compiler:Languages\SerbianLatin.isl" Name: "slovenian"; MessagesFile: "compiler:Languages\Slovenian.isl" Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl" Name: "ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl" [Registry] Root: HKLM; Subkey: "Software\Example\Software Updater\Settings"; ValueType: string; ValueName: "Language"; ValueData: "{language}" Root: HKLM; Subkey: "Software\Example\Software Updater\Settings"; ValueType: string; ValueName: "Version"; ValueData: "2.6.3" [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1 [Files] Source: "C:\Program Files\Software Updater\Software Updater.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "C:\Program Files\Software Updater\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs [Icons] Name: "{group}\Software Updater"; Filename: "{app}\Software Updater.exe" Name: "{group}\{cm:UninstallProgram,Software Updater}"; Filename: "{uninstallexe}" Name: "{commondesktop}\Software Updater"; Filename: "{app}\Software Updater.exe"; Tasks: desktopicon Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\Software Updater"; Filename: "{app}\Software Updater.exe"; Tasks: quicklaunchicon [UninstallRun] Filename: "{app}\Uninstall.bat"; StatusMsg: "Deleteing temporary files and directory..."; [UninstallDelete] Type: filesandordirs; Name: "{tmp}\global" Type: filesandordirs; Name: "{app}" 下的语言是英语,它会提升英语。即使在葡萄牙语Windows机器上,它也只显示英语。

我的脚本如下:

default.isl

C:\Program Files (x86)\Inno Setup 5下的[LangOptions] LanguageName=English LanguageID=$0409 LanguageCodePage=0 个文件包含以下条目。

*** RuntimeError: Pickling of "DataObject" instances is not enabled (http://www.boost.org/libs/python/doc/v2/pickle.html)

有什么方法吗?

0 个答案:

没有答案