From 95bd7344a6cd830137c3ddf27d7e05185983f82c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=83=E7=A8=9E=E4=B9=8B=E8=8D=89?= <1344095257@qq.com> Date: Sun, 28 Jun 2026 10:45:57 +0800 Subject: [PATCH] Add Chinese (Simplified/Traditional) language support to installer - Add ChineseSimplified and ChineseTraditional to [Languages] - Include ChineseSimplified.isl and ChineseTraditional.isl - Add Pascal script to auto-write LANGUAGE= in fontforge.bat based on installer language selection --- .../Languages/ChineseSimplified.isl | 417 +++++++++++++ .../Languages/ChineseTraditional.isl | 415 ++++++++++++ fontforge-setup/fontforgesetup.iss | 589 +++++++++--------- 3 files changed, 1143 insertions(+), 278 deletions(-) create mode 100644 fontforge-setup/Languages/ChineseSimplified.isl create mode 100644 fontforge-setup/Languages/ChineseTraditional.isl diff --git a/fontforge-setup/Languages/ChineseSimplified.isl b/fontforge-setup/Languages/ChineseSimplified.isl new file mode 100644 index 0000000..9e26f9c --- /dev/null +++ b/fontforge-setup/Languages/ChineseSimplified.isl @@ -0,0 +1,417 @@ +; *** Inno Setup version 6.5.0+ Chinese Simplified messages *** +; +; To download user-contributed translations of this file, go to: +; https://jrsoftware.org/files/istrans/ +; +; Note: When translating this text, do not add periods (.) to the end of +; messages that didn't have them already, because on those messages Inno +; Setup adds the periods automatically (appending a period would result in +; two periods being displayed). +; +; Maintainer: Zhenghan Yang (Kira) +; Email: 847320916@QQ.com +; Github: https://github.com/kira-96/Inno-Setup-Chinese-Simplified-Translation +; Encoding: UTF-8 +; Translation based on network resource +; + +[LangOptions] +; The following three entries are very important. Be sure to read and +; understand the '[LangOptions] section' topic in the help file. +LanguageName=简体中文 +; About LanguageID, to reference link: +; https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c +LanguageID=$0804 +; LanguageCodePage should always be set if possible, even if this file is Unicode +; For English it's set to zero anyway because English only uses ASCII characters +LanguageCodePage=936 +; If the language you are translating to requires special font faces or +; sizes, uncomment any of the following entries and change them accordingly. +;DialogFontName= +;DialogFontSize=9 +;DialogFontBaseScaleWidth=7 +;DialogFontBaseScaleHeight=15 +;WelcomeFontName=Segoe UI +;WelcomeFontSize=14 + +[Messages] + +; *** Application titles +SetupAppTitle=安装 +SetupWindowTitle=安装 - %1 +UninstallAppTitle=卸载 +UninstallAppFullTitle=%1 卸载 + +; *** Misc. common +InformationTitle=信息 +ConfirmTitle=确认 +ErrorTitle=错误 + +; *** SetupLdr messages +SetupLdrStartupMessage=现在将安装 %1。您想要继续吗? +LdrCannotCreateTemp=无法创建临时文件。安装程序已中止 +LdrCannotExecTemp=无法执行临时目录中的文件。安装程序已中止 +HelpTextNote= + +; *** Startup error messages +LastErrorMessage=%1。%n%n错误 %2: %3 +SetupFileMissing=安装目录中缺少文件 %1。请修正这个问题或者获取程序的新副本。 +SetupFileCorrupt=安装文件已损坏。请获取程序的新副本。 +SetupFileCorruptOrWrongVer=安装文件已损坏,或是与这个安装程序的版本不兼容。请修正这个问题或获取新的程序副本。 +InvalidParameter=无效的命令行参数:%n%n%1 +SetupAlreadyRunning=安装程序已在运行。 +WindowsVersionNotSupported=此程序不支持当前计算机运行的 Windows 版本。 +WindowsServicePackRequired=此程序需要 %1 服务包 %2 或更高版本。 +NotOnThisPlatform=此程序不能在 %1 上运行。 +OnlyOnThisPlatform=此程序只能在 %1 上运行。 +OnlyOnTheseArchitectures=此程序只能安装到为下列处理器架构设计的 Windows 版本中:%n%n%1 +WinVersionTooLowError=此程序需要 %1 版本 %2 或更高。 +WinVersionTooHighError=此程序不能安装于 %1 版本 %2 或更高。 +AdminPrivilegesRequired=在安装此程序时您必须以管理员身份登录。 +PowerUserPrivilegesRequired=在安装此程序时您必须以管理员身份或高级用户组身份登录。 +SetupAppRunningError=安装程序检测到 %1 当前正在运行。%n%n请先关闭正在运行的程序,然后点击“确定”继续,或点击“取消”退出。 +UninstallAppRunningError=卸载程序检测到 %1 当前正在运行。%n%n请先关闭正在运行的程序,然后点击“确定”继续,或点击“取消”退出。 + +; *** Startup questions +PrivilegesRequiredOverrideTitle=选择安装程序安装模式 +PrivilegesRequiredOverrideInstruction=选择安装模式 +PrivilegesRequiredOverrideText1=%1 可以为所有用户安装(需要管理员权限),或仅为您安装。 +PrivilegesRequiredOverrideText2=%1 可以仅为您安装,或为所有用户安装(需要管理员权限)。 +PrivilegesRequiredOverrideAllUsers=为所有用户安装(&A) +PrivilegesRequiredOverrideAllUsersRecommended=为所有用户安装(&A)(推荐) +PrivilegesRequiredOverrideCurrentUser=仅为我安装(&M) +PrivilegesRequiredOverrideCurrentUserRecommended=仅为我安装(&M)(推荐) + +; *** Misc. errors +ErrorCreatingDir=安装程序无法创建目录“%1” +ErrorTooManyFilesInDir=无法在目录“%1”中创建文件,因为里面包含太多文件 + +; *** Setup common messages +ExitSetupTitle=退出安装程序 +ExitSetupMessage=安装程序尚未完成。如果现在退出,将不会安装该程序。%n%n您之后可以再次运行安装程序完成安装。%n%n现在退出安装程序吗? +AboutSetupMenuItem=关于安装程序(&A)... +AboutSetupTitle=关于安装程序 +AboutSetupMessage=%1 版本 %2%n%3%n%n%1 主页:%n%4 +AboutSetupNote= +TranslatorNote=简体中文翻译由 Kira(847320916@qq.com)维护。项目地址:https://github.com/kira-96/Inno-Setup-Chinese-Simplified-Translation + +; *** Buttons +ButtonBack=< 上一步(&B) +ButtonNext=下一步(&N) > +ButtonInstall=安装(&I) +ButtonOK=确定 +ButtonCancel=取消 +ButtonYes=是(&Y) +ButtonYesToAll=全是(&A) +ButtonNo=否(&N) +ButtonNoToAll=全否(&O) +ButtonFinish=完成(&F) +ButtonBrowse=浏览(&B)... +ButtonWizardBrowse=浏览(&R)... +ButtonNewFolder=新建文件夹(&M) + +; *** "Select Language" dialog messages +SelectLanguageTitle=选择安装语言 +SelectLanguageLabel=选择安装时使用的语言。 + +; *** Common wizard text +ClickNext=点击“下一步”继续,或点击“取消”退出安装程序。 +BeveledLabel= +BrowseDialogTitle=浏览文件夹 +BrowseDialogLabel=在下面的列表中选择一个文件夹,然后点击“确定”。 +NewFolderName=新建文件夹 + +; *** "Welcome" wizard page +WelcomeLabel1=欢迎使用 [name] 安装向导 +WelcomeLabel2=即将在您的计算机上安装 [name/ver]。%n%n建议您在继续安装前关闭所有其他应用程序。 + +; *** "Password" wizard page +WizardPassword=密码 +PasswordLabel1=此安装程序需要密码验证。 +PasswordLabel3=请输入密码,然后点击“下一步”继续。密码区分大小写。 +PasswordEditLabel=密码(&P): +IncorrectPassword=您输入的密码不正确,请重新输入。 + +; *** "License Agreement" wizard page +WizardLicense=许可协议 +LicenseLabel=请在继续安装前阅读以下重要信息。 +LicenseLabel3=请阅读下列许可协议。在继续安装前您必须同意这些协议条款。 +LicenseAccepted=我同意此协议(&A) +LicenseNotAccepted=我不同意此协议(&D) + +; *** "Information" wizard pages +WizardInfoBefore=信息 +InfoBeforeLabel=请在继续安装前阅读以下重要信息。 +InfoBeforeClickLabel=准备好继续安装后,点击“下一步”。 +WizardInfoAfter=信息 +InfoAfterLabel=请在继续安装前阅读以下重要信息。 +InfoAfterClickLabel=准备好继续安装后,点击“下一步”。 + +; *** "User Information" wizard page +WizardUserInfo=用户信息 +UserInfoDesc=请输入您的信息。 +UserInfoName=用户名(&U): +UserInfoOrg=组织(&O): +UserInfoSerial=序列号(&S): +UserInfoNameRequired=请输入用户名。 + +; *** "Select Destination Location" wizard page +WizardSelectDir=选择目标位置 +SelectDirDesc=您想将 [name] 安装在哪里? +SelectDirLabel3=安装程序将安装 [name] 到下面的文件夹中。 +SelectDirBrowseLabel=点击“下一步”继续。如果您想选择其他文件夹,点击“浏览”。 +DiskSpaceGBLabel=至少需要有 [gb] GB 的可用磁盘空间。 +DiskSpaceMBLabel=至少需要有 [mb] MB 的可用磁盘空间。 +CannotInstallToNetworkDrive=安装程序无法安装到一个网络驱动器。 +CannotInstallToUNCPath=安装程序无法安装到一个 UNC 路径。 +InvalidPath=您必须输入一个带驱动器盘符的完整路径,例如:%n%nC:\App%n%n或UNC路径:%n%n\\server\share +InvalidDrive=您选定的驱动器或 UNC 共享不存在或不能访问。请选择其他位置。 +DiskSpaceWarningTitle=磁盘空间不足 +DiskSpaceWarning=安装程序至少需要 %1 KB 的可用空间才能安装,但选定驱动器只有 %2 KB 的可用空间。%n%n您确定要继续吗? +DirNameTooLong=文件夹名称或路径太长。 +InvalidDirName=文件夹名称无效。 +BadDirName32=文件夹名称不能包含下列任何字符:%n%n%1 +DirExistsTitle=文件夹已存在 +DirExists=文件夹:%n%n%1%n%n已经存在。您确定安装到这个文件夹中吗? +DirDoesntExistTitle=文件夹不存在 +DirDoesntExist=文件夹:%n%n%1%n%n不存在。您想要创建此文件夹吗? + +; *** "Select Components" wizard page +WizardSelectComponents=选择组件 +SelectComponentsDesc=您想安装哪些程序组件? +SelectComponentsLabel2=选中您想安装的组件;取消您不想安装的组件。然后点击“下一步”继续。 +FullInstallation=完全安装 +; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) +CompactInstallation=简洁安装 +CustomInstallation=自定义安装 +NoUninstallWarningTitle=组件已存在 +NoUninstallWarning=安装程序检测到下列组件已安装在您的计算机中:%n%n%1%n%n取消选中这些组件不会卸载它们。%n%n您确定要继续吗? +ComponentSize1=%1 KB +ComponentSize2=%1 MB +ComponentsDiskSpaceGBLabel=当前选择的组件需要至少 [gb] GB 的磁盘空间。 +ComponentsDiskSpaceMBLabel=当前选择的组件需要至少 [mb] MB 的磁盘空间。 + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=选择附加任务 +SelectTasksDesc=您想要安装程序执行哪些附加任务? +SelectTasksLabel2=选择您想要安装程序在安装 [name] 时执行的附加任务,然后点击“下一步”。 + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=选择开始菜单文件夹 +SelectStartMenuFolderDesc=安装程序应该在哪里放置程序的快捷方式? +SelectStartMenuFolderLabel3=安装程序将在下列“开始”菜单文件夹中创建程序的快捷方式。 +SelectStartMenuFolderBrowseLabel=点击“下一步”继续。如果您想选择其他文件夹,点击“浏览”。 +MustEnterGroupName=您必须输入一个文件夹名称。 +GroupNameTooLong=文件夹名称或路径太长。 +InvalidGroupName=文件夹名称无效。 +BadGroupName=文件夹名称不能包含下列任何字符:%n%n%1 +NoProgramGroupCheck2=不创建开始菜单文件夹(&D) + +; *** "Ready to Install" wizard page +WizardReady=准备安装 +ReadyLabel1=安装程序准备就绪,现在可以开始安装 [name] 到您的计算机。 +ReadyLabel2a=点击“安装”继续此安装程序。如果您想重新查看或修改任何设置,点击“上一步”。 +ReadyLabel2b=点击“安装”继续此安装程序。 +ReadyMemoUserInfo=用户信息: +ReadyMemoDir=目标位置: +ReadyMemoType=安装类型: +ReadyMemoComponents=已选择组件: +ReadyMemoGroup=开始菜单文件夹: +ReadyMemoTasks=附加任务: + +; *** TDownloadWizardPage wizard page and DownloadTemporaryFile +DownloadingLabel2=正在下载文件... +ButtonStopDownload=停止下载(&S) +StopDownload=您确定要停止下载吗? +ErrorDownloadAborted=下载已中止 +ErrorDownloadFailed=下载失败:%1 %2 +ErrorDownloadSizeFailed=获取大小失败:%1 %2 +ErrorProgress=无效的进度:%1 / %2 +ErrorFileSize=文件大小错误:预期 %1,实际 %2 + +; *** TExtractionWizardPage wizard page and ExtractArchive +ExtractingLabel=正在提取文件... +ButtonStopExtraction=停止提取(&S) +StopExtraction=您确定要停止提取吗? +ErrorExtractionAborted=提取已中止 +ErrorExtractionFailed=提取失败:%1 + +; *** Archive extraction failure details +ArchiveIncorrectPassword=密码不正确 +ArchiveIsCorrupted=压缩包已损坏 +ArchiveUnsupportedFormat=不支持的压缩包格式 + +; *** "Preparing to Install" wizard page +WizardPreparing=正在准备安装 +PreparingDesc=安装程序正在准备安装 [name] 到您的计算机。 +PreviousInstallNotCompleted=先前的程序安装或卸载未完成,需要您重启计算机以完成该安装。%n%n在重启计算机后,再次运行安装程序以完成 [name] 的安装。 +CannotContinue=安装程序不能继续。请点击“取消”退出。 +ApplicationsFound=以下应用程序正在使用将由安装程序更新的文件。建议您允许安装程序自动关闭这些应用程序。 +ApplicationsFound2=以下应用程序正在使用将由安装程序更新的文件。建议您允许安装程序自动关闭这些应用程序。安装完成后,安装程序将尝试重新启动这些应用程序。 +CloseApplications=自动关闭应用程序(&A) +DontCloseApplications=不要关闭应用程序(&D) +ErrorCloseApplications=安装程序无法自动关闭所有应用程序。建议您在继续之前,关闭所有在使用需要由安装程序更新的文件的应用程序。 +PrepareToInstallNeedsRestart=安装程序必须重启您的计算机。计算机重启后,请再次运行安装程序以完成 [name] 的安装。%n%n要立即重启吗? + +; *** "Installing" wizard page +WizardInstalling=正在安装 +InstallingLabel=安装程序正在安装 [name] 到您的计算机,请稍候。 + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=完成 [name] 安装向导 +FinishedLabelNoIcons=安装程序已在您的计算机中安装了 [name]。 +FinishedLabel=安装程序已在您的计算机中安装了 [name]。您可以通过已安装的快捷方式运行此应用程序。 +ClickFinish=点击“完成”退出安装程序。 +FinishedRestartLabel=为完成 [name] 的安装,安装程序必须重新启动您的计算机。要立即重启吗? +FinishedRestartMessage=为完成 [name] 的安装,安装程序必须重新启动您的计算机。%n%n要立即重启吗? +ShowReadmeCheck=是,我想查阅自述文件 +YesRadio=是,立即重启计算机(&Y) +NoRadio=否,稍后重启计算机(&N) +; used for example as 'Run MyProg.exe' +RunEntryExec=运行 %1 +; used for example as 'View Readme.txt' +RunEntryShellExec=查阅 %1 + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=安装程序需要下一张磁盘 +SelectDiskLabel2=请插入磁盘 %1 并点击“确定”。%n%n如果这个磁盘中的文件可以在下列文件夹之外的文件夹中找到,请输入正确的路径或点击“浏览”。 +PathLabel=路径(&P): +FileNotInDir2=“%2”中找不到文件“%1”。请插入正确的磁盘或选择其他文件夹。 +SelectDirectoryLabel=请指定下一张磁盘的位置。 + +; *** Installation phase messages +SetupAborted=安装程序未完成安装。%n%n请修正这个问题并重新运行安装程序。 +AbortRetryIgnoreSelectAction=选择操作 +AbortRetryIgnoreRetry=重试(&T) +AbortRetryIgnoreIgnore=忽略错误并继续(&I) +AbortRetryIgnoreCancel=取消安装 +RetryCancelSelectAction=选择操作 +RetryCancelRetry=重试(&T) +RetryCancelCancel=取消 + +; *** Installation status messages +StatusClosingApplications=正在关闭应用程序... +StatusCreateDirs=正在创建目录... +StatusExtractFiles=正在提取文件... +StatusDownloadFiles=正在下载文件... +StatusCreateIcons=正在创建快捷方式... +StatusCreateIniEntries=正在创建 INI 条目... +StatusCreateRegistryEntries=正在创建注册表条目... +StatusRegisterFiles=正在注册文件... +StatusSavingUninstall=正在保存卸载信息... +StatusRunProgram=正在完成安装... +StatusRestartingApplications=正在重启应用程序... +StatusRollback=正在撤销更改... + +; *** Misc. errors +ErrorInternal2=内部错误:%1 +ErrorFunctionFailedNoCode=%1 失败 +ErrorFunctionFailed=%1 失败;错误代码 %2 +ErrorFunctionFailedWithMessage=%1 失败;错误代码 %2.%n%3 +ErrorExecutingProgram=无法执行文件:%n%1 + +; *** Registry errors +ErrorRegOpenKey=打开注册表项时出错:%n%1\%2 +ErrorRegCreateKey=创建注册表项时出错:%n%1\%2 +ErrorRegWriteKey=写入注册表项时出错:%n%1\%2 + +; *** INI errors +ErrorIniEntry=在文件“%1”中创建 INI 条目时出错。 + +; *** File copying errors +FileAbortRetryIgnoreSkipNotRecommended=跳过此文件(&S)(不推荐) +FileAbortRetryIgnoreIgnoreNotRecommended=忽略错误并继续(&I)(不推荐) +SourceIsCorrupted=源文件已损坏 +SourceDoesntExist=源文件“%1”不存在 +SourceVerificationFailed=源文件验证失败:%1 +VerificationSignatureDoesntExist=签名文件“%1”不存在 +VerificationSignatureInvalid=签名文件“%1”无效 +VerificationKeyNotFound=签名文件“%1”使用了未知的密钥 +VerificationFileNameIncorrect=文件名不正确 +VerificationFileTagIncorrect=文件标签不正确 +VerificationFileSizeIncorrect=文件大小不正确 +VerificationFileHashIncorrect=文件哈希值不正确 +ExistingFileReadOnly2=无法替换已存在的文件,它是只读的。 +ExistingFileReadOnlyRetry=移除只读属性并重试(&R) +ExistingFileReadOnlyKeepExisting=保留已存在的文件(&K) +ErrorReadingExistingDest=尝试读取已存在的文件时出错: +FileExistsSelectAction=选择操作 +FileExists2=文件已经存在。 +FileExistsOverwriteExisting=覆盖已存在的文件(&O) +FileExistsKeepExisting=保留已存在的文件(&K) +FileExistsOverwriteOrKeepAll=为接下来的冲突文件执行此操作(&D) +ExistingFileNewerSelectAction=选择操作 +ExistingFileNewer2=已存在的文件比安装程序将要安装的文件还要新。 +ExistingFileNewerOverwriteExisting=覆盖已存在的文件(&O) +ExistingFileNewerKeepExisting=保留已存在的文件(&K)(推荐) +ExistingFileNewerOverwriteOrKeepAll=为接下来的冲突文件执行此操作(&D) +ErrorChangingAttr=尝试更改下列已存在的文件属性时出错: +ErrorCreatingTemp=尝试在目标目录创建文件时出错: +ErrorReadingSource=尝试读取下列源文件时出错: +ErrorCopying=尝试复制下列文件时出错: +ErrorDownloading=尝试下载文件时出错: +ErrorExtracting=尝试提取压缩包时出错: +ErrorReplacingExistingFile=尝试替换已存在的文件时出错: +ErrorRestartReplace=重启并替换失败: +ErrorRenamingTemp=尝试重命名下列目标目录中的一个文件时出错: +ErrorRegisterServer=无法注册 DLL/OCX:%1 +ErrorRegSvr32Failed=RegSvr32 失败;退出代码 %1 +ErrorRegisterTypeLib=无法注册类型库:%1 + +; *** Uninstall display name markings +; used for example as 'My Program (32-bit)' +UninstallDisplayNameMark=%1 (%2) +; used for example as 'My Program (32-bit, All users)' +UninstallDisplayNameMarks=%1 (%2, %3) +UninstallDisplayNameMark32Bit=32 位 +UninstallDisplayNameMark64Bit=64 位 +UninstallDisplayNameMarkAllUsers=所有用户 +UninstallDisplayNameMarkCurrentUser=当前用户 + +; *** Post-installation errors +ErrorOpeningReadme=尝试打开自述文件时出错。 +ErrorRestartingComputer=安装程序无法重启计算机,请手动重启。 + +; *** Uninstaller messages +UninstallNotFound=文件“%1”不存在。无法卸载。 +UninstallOpenError=文件“%1”不能被打开。无法卸载 +UninstallUnsupportedVer=此版本的卸载程序无法识别卸载日志文件“%1”的格式。无法卸载 +UninstallUnknownEntry=卸载日志中遇到一个未知条目(%1) +ConfirmUninstall=您确认要完全移除 %1 及其所有组件吗? +UninstallOnlyOnWin64=仅允许在 64 位 Windows 中卸载此程序。 +OnlyAdminCanUninstall=仅使用管理员权限的用户能完成此卸载。 +UninstallStatusLabel=正在从您的计算机中移除 %1,请稍候。 +UninstalledAll=已顺利从您的计算机中移除 %1。 +UninstalledMost=%1 卸载完成。%n%n有部分内容未能被删除,但您可以手动删除它们。 +UninstalledAndNeedsRestart=为完成 %1 的卸载,需要重启您的计算机。%n%n要立即重启吗? +UninstallDataCorrupted=文件“%1”已损坏。无法卸载 + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=删除共享文件? +ConfirmDeleteSharedFile2=系统表示下列共享文件已不再有任何程序使用。您希望卸载程序删除此共享文件吗?%n%n如果仍有程序正在使用此文件,删除后这些程序可能无法正常运行。如果您不能确定,请选择“否”,保留此文件在系统中不会造成任何损害。 +SharedFileNameLabel=文件名: +SharedFileLocationLabel=位置: +WizardUninstalling=卸载状态 +StatusUninstalling=正在卸载 %1... + +; *** Shutdown block reasons +ShutdownBlockReasonInstallingApp=正在安装 %1。 +ShutdownBlockReasonUninstallingApp=正在卸载 %1。 + +; The custom messages below aren't used by Setup itself, but if you make +; use of them in your scripts, you'll want to translate them. + +[CustomMessages] + +NameAndVersion=%1 版本 %2 +AdditionalIcons=附加快捷方式: +CreateDesktopIcon=创建桌面快捷方式(&D) +CreateQuickLaunchIcon=创建快速启动栏快捷方式(&Q) +ProgramOnTheWeb=%1 网站 +UninstallProgram=卸载 %1 +LaunchProgram=运行 %1 +AssocFileExtension=将 %2 文件扩展名与 %1 建立关联(&A) +AssocingFileExtension=正在将 %2 文件扩展名与 %1 建立关联... +AutoStartProgramGroupDescription=启动: +AutoStartProgram=自动启动 %1 +AddonHostProgramNotFound=您选择的文件夹中无法找到 %1。%n%n您确定要继续吗? diff --git a/fontforge-setup/Languages/ChineseTraditional.isl b/fontforge-setup/Languages/ChineseTraditional.isl new file mode 100644 index 0000000..5a817fd --- /dev/null +++ b/fontforge-setup/Languages/ChineseTraditional.isl @@ -0,0 +1,415 @@ +; *** Inno Setup version 6.5.0+ Chinese Traditional messages *** +; Name: GoneTone, gonetone@reh.tw +; +; Based on translations by: Anbang LI, anbangli@outlook.com +; Based on translations by: Enfong Tsao, nelson22768384@gmail.com +; Based on 5.5.3+ translations by Samuel Lee, Email: 751555749@qq.com +; Translation based on network resource +; +; Note: When translating this text, do not add periods (.) to the end of +; messages that didn't have them already, because on those messages Inno +; Setup adds the periods automatically (appending a period would result in +; two periods being displayed). +; +; Submit webpage: https://jrsoftware.org/files/istrans/ + +[LangOptions] +; The following three entries are very important. Be sure to read and +; understand the '[LangOptions] section' topic in the help file. +LanguageName=繁體中文 +; About LanguageID, to reference link: +; https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c +LanguageID=$0404 +; About CodePage, to reference link: +; https://docs.microsoft.com/en-us/windows/win32/intl/code-page-identifiers +LanguageCodePage=950 +; If the language you are translating to requires special font faces or +; sizes, uncomment any of the following entries and change them accordingly. +DialogFontName=Microsoft JhengHei UI +;DialogFontSize=9 +;DialogFontBaseScaleWidth=7 +;DialogFontBaseScaleHeight=15 +WelcomeFontName=Microsoft JhengHei UI +;WelcomeFontSize=14 + +[Messages] + +; *** Application titles +SetupAppTitle=安裝程式 +SetupWindowTitle=%1 安裝程式 +UninstallAppTitle=解除安裝 +UninstallAppFullTitle=解除安裝 %1 + +; *** Misc. common +InformationTitle=資訊 +ConfirmTitle=確認 +ErrorTitle=錯誤 + +; *** SetupLdr messages +SetupLdrStartupMessage=這將會安裝 %1。您想要繼續嗎? +LdrCannotCreateTemp=無法建立暫存檔案。安裝程式將會結束 +LdrCannotExecTemp=無法執行暫存檔案。安裝程式將會結束 +HelpTextNote= + +; *** Startup error messages +LastErrorMessage=%1。%n%n錯誤 %2:%3 +SetupFileMissing=安裝資料夾中遺失檔案 %1。請修正此問題或重新取得此軟體。 +SetupFileCorrupt=安裝檔案已經損毀。請重新取得此軟體。 +SetupFileCorruptOrWrongVer=安裝檔案已經損毀,或與安裝程式的版本不符。請修正此問題或重新取得此軟體。 +InvalidParameter=某個無效的參數已傳遞至命令列:%n%n%1 +SetupAlreadyRunning=安裝程式已經在執行。 +WindowsVersionNotSupported=這個程式並不支援目前在電腦所執行的 Windows 版本。 +WindowsServicePackRequired=這個程式需要 %1 Service Pack %2 或更新。 +NotOnThisPlatform=這個程式無法在 %1 執行。 +OnlyOnThisPlatform=這個程式必須在 %1 執行。 +OnlyOnTheseArchitectures=這個程式只能在專門為以下處理器架構而設計的 Windows 上安裝:%n%n%1 +WinVersionTooLowError=這個程式必須在 %1 版本 %2 或以上的系統執行。 +WinVersionTooHighError=這個程式無法安裝在 %1 版本 %2 或以上的系統。 +AdminPrivilegesRequired=您必須登入成系統管理員以安裝這個程式。 +PowerUserPrivilegesRequired=您必須登入成系統管理員或 Power Users 群組的成員以安裝這個程式。 +SetupAppRunningError=安裝程式偵測到 %1 正在執行。%n%n請立即關閉它的所有執行個體,然後按 「確定」 繼續,或按 「取消」 離開。 +UninstallAppRunningError=解除安裝程式偵測到 %1 正在執行。%n%n請立即關閉它的所有執行個體,然後按 「確定」 繼續,或按 「取消」 離開。 + +; *** Startup questions +PrivilegesRequiredOverrideTitle=選擇安裝程式安裝模式 +PrivilegesRequiredOverrideInstruction=選擇安裝模式 +PrivilegesRequiredOverrideText1=可以為所有使用者安裝 %1 (需要系統管理員權限),或是僅為您安裝。 +PrivilegesRequiredOverrideText2=可以僅為您安裝 %1,或是為所有使用者安裝 (需要系統管理員權限)。 +PrivilegesRequiredOverrideAllUsers=為所有使用者安裝 (&A) +PrivilegesRequiredOverrideAllUsersRecommended=為所有使用者安裝 (建議選項) (&A) +PrivilegesRequiredOverrideCurrentUser=僅為我安裝 (&M) +PrivilegesRequiredOverrideCurrentUserRecommended=僅為我安裝 (建議選項) (&M) + +; *** Misc. errors +ErrorCreatingDir=安裝程式無法建立資料夾「%1」 +ErrorTooManyFilesInDir=無法在資料夾「%1」內建立檔案,因為資料夾內有太多的檔案 + +; *** Setup common messages +ExitSetupTitle=結束安裝程式 +ExitSetupMessage=安裝尚未完成。如果您現在結束安裝程式,這個程式將不會被安裝。%n%n您可以稍後再執行安裝程式以完成安裝。%n%n您現在要結束安裝程式嗎? +AboutSetupMenuItem=關於安裝程式 (&A)... +AboutSetupTitle=關於安裝程式 +AboutSetupMessage=%1 版本 %2%n%3%n%n%1 網址:%n%4 +AboutSetupNote= +TranslatorNote= + +; *** Buttons +ButtonBack=< 上一步 (&B) +ButtonNext=下一步 (&N) > +ButtonInstall=安裝 (&I) +ButtonOK=確定 +ButtonCancel=取消 +ButtonYes=是 (&Y) +ButtonYesToAll=全部皆是 (&A) +ButtonNo=否 (&N) +ButtonNoToAll=全部皆否 (&O) +ButtonFinish=完成 (&F) +ButtonBrowse=瀏覽 (&B)... +ButtonWizardBrowse=瀏覽 (&R)... +ButtonNewFolder=建立新資料夾 (&M) + +; *** "Select Language" dialog messages +SelectLanguageTitle=選擇安裝語言 +SelectLanguageLabel=選擇在安裝過程中使用的語言: + +; *** Common wizard text +ClickNext=按 「下一步」 繼續,或按 「取消」 結束安裝程式。 +BeveledLabel= +BrowseDialogTitle=瀏覽資料夾 +BrowseDialogLabel=在下面的資料夾清單中選擇一個資料夾,然後按 「確定」。 +NewFolderName=新資料夾 + +; *** "Welcome" wizard page +WelcomeLabel1=歡迎使用 [name] 安裝程式 +WelcomeLabel2=這個安裝程式將會安裝 [name/ver] 到您的電腦。%n%n建議您在繼續之前關閉所有其他的應用程式。 + +; *** "Password" wizard page +WizardPassword=密碼 +PasswordLabel1=這個安裝程式具有密碼保護。 +PasswordLabel3=請輸入密碼,然後按 「下一步」 繼續。密碼是區分大小寫的。 +PasswordEditLabel=密碼 (&P): +IncorrectPassword=您輸入的密碼不正確,請重新輸入。 + +; *** "License Agreement" wizard page +WizardLicense=授權合約 +LicenseLabel=在繼續安裝之前請閱讀以下重要資訊。 +LicenseLabel3=請閱讀以下授權合約,您必須接受合約的各項條款才能繼續安裝。 +LicenseAccepted=我同意 (&A) +LicenseNotAccepted=我不同意 (&D) + +; *** "Information" wizard pages +WizardInfoBefore=資訊 +InfoBeforeLabel=在繼續安裝之前請閱讀以下重要資訊。 +InfoBeforeClickLabel=當您準備好繼續安裝,請按 「下一步」。 +WizardInfoAfter=資訊 +InfoAfterLabel=在繼續安裝之前請閱讀以下重要資訊。 +InfoAfterClickLabel=當您準備好繼續安裝,請按 「下一步」。 + +; *** "User Information" wizard page +WizardUserInfo=使用者資訊 +UserInfoDesc=請輸入您的資料。 +UserInfoName=使用者名稱 (&U): +UserInfoOrg=組織 (&O): +UserInfoSerial=序號 (&S): +UserInfoNameRequired=您必須輸入您的名稱。 + +; *** "Select Destination Location" wizard page +WizardSelectDir=選擇目的資料夾 +SelectDirDesc=選擇安裝程式安裝 [name] 的位置。 +SelectDirLabel3=安裝程式將會把 [name] 安裝到下面的資料夾。 +SelectDirBrowseLabel=按 「下一步」 繼續,如果您想選擇另一個資料夾,請按 「瀏覽」。 +DiskSpaceGBLabel=最少需要 [gb] GB 可用磁碟空間。 +DiskSpaceMBLabel=最少需要 [mb] MB 可用磁碟空間。 +CannotInstallToNetworkDrive=安裝程式無法安裝於網路磁碟機。 +CannotInstallToUNCPath=安裝程式無法安裝於 UNC 路徑。 +InvalidPath=您必須輸入完整的路徑名稱及磁碟機代碼,例如:%n%nC:\App%n%n或是 UNC 路徑格式:%n%n\\伺服器\共用資料夾 +InvalidDrive=您選取的磁碟機或 UNC 共用不存在或無法存取,請另外選擇。 +DiskSpaceWarningTitle=磁碟空間不足 +DiskSpaceWarning=安裝程式需要至少 %1 KB 的可用空間,您所選取的磁碟只有 %2 KB 可用空間。%n%n您仍要繼續安裝嗎? +DirNameTooLong=資料夾名稱或路徑太長。 +InvalidDirName=資料夾名稱不正確。 +BadDirName32=資料夾名稱不得包含以下字元:%n%n%1 +DirExistsTitle=資料夾已經存在 +DirExists=資料夾:%n%n%1%n%n已經存在。仍要安裝到該資料夾嗎? +DirDoesntExistTitle=資料夾不存在 +DirDoesntExist=資料夾:%n%n%1%n%n不存在。要建立該資料夾嗎? + +; *** "Select Components" wizard page +WizardSelectComponents=選擇元件 +SelectComponentsDesc=選擇將會被安裝的元件。 +SelectComponentsLabel2=選擇您想要安裝的元件;清除您不想安裝的元件。當您準備好繼續安裝,請按 「下一步」。 +FullInstallation=完整安裝 +; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) +CompactInstallation=精簡安裝 +CustomInstallation=自訂安裝 +NoUninstallWarningTitle=元件已存在 +NoUninstallWarning=安裝程式偵測到以下元件已經安裝在您的電腦上:%n%n%1%n%n取消選擇這些元件將不會移除它們。%n%n您仍然要繼續嗎? +ComponentSize1=%1 KB +ComponentSize2=%1 MB +ComponentsDiskSpaceGBLabel=目前的選擇需要至少 [gb] GB 磁碟空間。 +ComponentsDiskSpaceMBLabel=目前的選擇需要至少 [mb] MB 磁碟空間。 + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=選擇附加工作 +SelectTasksDesc=選擇要執行的附加工作。 +SelectTasksLabel2=選擇安裝程式在安裝 [name] 時要執行的附加工作,然後按 「下一步」。 + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=選擇「開始」功能表的資料夾 +SelectStartMenuFolderDesc=選擇安裝程式建立程式的捷徑的位置。 +SelectStartMenuFolderLabel3=安裝程式將會把程式的捷徑建立在下面的「開始」功能表資料夾。 +SelectStartMenuFolderBrowseLabel=按 「下一步」 繼續,如果您想選擇另一個資料夾,請按 「瀏覽」。 +MustEnterGroupName=您必須輸入一個資料夾的名稱。 +GroupNameTooLong=資料夾名稱或路徑太長。 +InvalidGroupName=資料夾名稱不正確。 +BadGroupName=資料夾名稱不得包含下列字元:%n%n%1 +NoProgramGroupCheck2=不要在「開始」功能表中建立資料夾 (&D) + +; *** "Ready to Install" wizard page +WizardReady=準備安裝 +ReadyLabel1=安裝程式將開始安裝 [name] 到您的電腦中。 +ReadyLabel2a=按下 「安裝」 繼續安裝,或按 「上一步」 重新檢視或設定各選項的內容。 +ReadyLabel2b=按下 「安裝」 繼續安裝。 +ReadyMemoUserInfo=使用者資訊: +ReadyMemoDir=目的資料夾: +ReadyMemoType=安裝型態: +ReadyMemoComponents=選擇的元件: +ReadyMemoGroup=「開始」功能表資料夾: +ReadyMemoTasks=附加工作: + +; *** TDownloadWizardPage wizard page and DownloadTemporaryFile +DownloadingLabel2=正在下載檔案... +ButtonStopDownload=停止下載 (&S) +StopDownload=您確定要停止下載嗎? +ErrorDownloadAborted=已停止下載 +ErrorDownloadFailed=下載失敗:%1 %2 +ErrorDownloadSizeFailed=取得檔案大小失敗:%1 %2 +ErrorProgress=進度無效:%1 / %2 +ErrorFileSize=檔案大小無效:必須為 %1,收到 %2 + +; *** TExtractionWizardPage wizard page and ExtractArchive +ExtractingLabel=正在解壓縮檔案... +ButtonStopExtraction=停止解壓縮 (&S) +StopExtraction=您確定要停止解壓縮嗎? +ErrorExtractionAborted=解壓縮已中止 +ErrorExtractionFailed=解壓縮失敗:%1 + +; *** Archive extraction failure details +ArchiveIncorrectPassword=壓縮檔密碼不正確 +ArchiveIsCorrupted=壓縮檔已損毀 +ArchiveUnsupportedFormat=不支援的壓縮檔格式 + +; *** "Preparing to Install" wizard page +WizardPreparing=準備安裝程式 +PreparingDesc=安裝程式準備將 [name] 安裝到您的電腦上。 +PreviousInstallNotCompleted=先前的安裝/解除安裝尚未完成,您必須重新啟動電腦以完成該安裝。%n%n在重新啟動電腦之後,請再次執行安裝程式以完成 [name] 的安裝。 +CannotContinue=安裝程式無法繼續。請按 「取消」 離開。 +ApplicationsFound=下面的應用程式正在使用安裝程式所需要更新的檔案。建議您允許安裝程式自動關閉這些應用程式。 +ApplicationsFound2=下面的應用程式正在使用安裝程式所需要更新的檔案。建議您允許安裝程式自動關閉這些應用程式。當安裝過程結束後,安裝程式將會嘗試重新啟動這些應用程式。 +CloseApplications=自動關閉應用程式 (&A) +DontCloseApplications=不要關閉應用程式 (&D) +ErrorCloseApplications=安裝程式無法自動關閉所有應用程式。建議您在繼續前先關閉所有正在使用安裝程式所需更新檔案的應用程式。 +PrepareToInstallNeedsRestart=安裝程式必須重新啟動您的電腦。重新啟動後,請再次執行安裝程式以完成 [name] 的安裝。%n%n您想要現在重新啟動電腦嗎? + +; *** "Installing" wizard page +WizardInstalling=正在安裝 +InstallingLabel=請稍候,安裝程式正在將 [name] 安裝到您的電腦上。 + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=正在完成 [name] 安裝程式 +FinishedLabelNoIcons=安裝程式已經將 [name] 安裝在您的電腦上。 +FinishedLabel=安裝程式已經將 [name] 安裝在您的電腦中,您可以選擇程式的捷徑來執行該應用程式。 +ClickFinish=按 「完成」 以結束安裝程式。 +FinishedRestartLabel=要完成 [name] 的安裝,安裝程式必須重新啟動您的電腦。您想要現在重新啟動電腦嗎? +FinishedRestartMessage=要完成 [name] 的安裝,安裝程式必須重新啟動您的電腦。%n%n您想要現在重新啟動電腦嗎? +ShowReadmeCheck=是,我要閱讀讀我檔案 +YesRadio=是,立即重新啟動電腦 (&Y) +NoRadio=否,我稍後重新啟動電腦 (&N) +; used for example as 'Run MyProg.exe' +RunEntryExec=執行 %1 +; used for example as 'View Readme.txt' +RunEntryShellExec=檢視 %1 + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=安裝程式需要下一張磁片 +SelectDiskLabel2=請插入磁片 %1,然後按 「確定」。%n%n如果檔案不在以下所顯示的資料夾之中,請輸入正確的路徑或按 「瀏覽」 選取。 +PathLabel=路徑 (&P): +FileNotInDir2=檔案「%1」無法在「%2」找到。請插入正確的磁片或選擇其他的資料夾。 +SelectDirectoryLabel=請指定下一張磁片的位置。 + +; *** Installation phase messages +SetupAborted=安裝沒有完成。%n%n請更正問題後再次執行安裝程式。 +AbortRetryIgnoreSelectAction=選擇操作 +AbortRetryIgnoreRetry=重試 (&T) +AbortRetryIgnoreIgnore=略過錯誤並繼續 (&I) +AbortRetryIgnoreCancel=取消安裝 +RetryCancelSelectAction=選擇操作 +RetryCancelRetry=重試 (&T) +RetryCancelCancel=取消 + +; *** Installation status messages +StatusClosingApplications=正在關閉應用程式... +StatusCreateDirs=正在建立資料夾... +StatusExtractFiles=正在解壓縮檔案... +StatusDownloadFiles=正在下載檔案... +StatusCreateIcons=正在建立捷徑... +StatusCreateIniEntries=正在建立 INI 項目... +StatusCreateRegistryEntries=正在建立登錄項目... +StatusRegisterFiles=正在註冊檔案... +StatusSavingUninstall=正在儲存解除安裝資訊... +StatusRunProgram=正在完成安裝... +StatusRestartingApplications=正在重新啟動應用程式... +StatusRollback=正在復原變更... + +; *** Misc. errors +ErrorInternal2=內部錯誤:%1 +ErrorFunctionFailedNoCode=%1 失敗 +ErrorFunctionFailed=%1 失敗;代碼 %2 +ErrorFunctionFailedWithMessage=%1 失敗;代碼 %2。%n%3 +ErrorExecutingProgram=無法執行檔案:%n%1 + +; *** Registry errors +ErrorRegOpenKey=無法開啟登錄機碼:%n%1\%2 +ErrorRegCreateKey=無法建立登錄機碼:%n%1\%2 +ErrorRegWriteKey=無法變更登錄機碼:%n%1\%2 + +; *** INI errors +ErrorIniEntry=在檔案「%1」建立 INI 項目錯誤。 + +; *** File copying errors +FileAbortRetryIgnoreSkipNotRecommended=略過這個檔案 (不建議) (&S) +FileAbortRetryIgnoreIgnoreNotRecommended=略過錯誤並繼續 (不建議) (&I) +SourceDoesntExist=來源檔案「%1」不存在 +SourceIsCorrupted=來源檔案已經損毀 +SourceVerificationFailed=來源檔案驗證失敗:%1 +VerificationSignatureDoesntExist=簽名檔「%1」不存在 +VerificationSignatureInvalid=簽名檔「%1」無效 +VerificationKeyNotFound=簽名檔「%1」使用了未知金鑰 +VerificationFileNameIncorrect=檔案名稱不正確 +VerificationFileTagIncorrect=檔案標籤不正確 +VerificationFileSizeIncorrect=檔案大小不正確 +VerificationFileHashIncorrect=檔案雜湊值不正確 +ExistingFileReadOnly2=無法取代現有檔案,因為檔案已標示為唯讀。 +ExistingFileReadOnlyRetry=移除唯讀屬性並重試 (&R) +ExistingFileReadOnlyKeepExisting=保留現有檔案 (&K) +ErrorReadingExistingDest=讀取現有檔案時發生錯誤: +FileExistsSelectAction=選擇操作 +FileExists2=檔案已存在。 +FileExistsOverwriteExisting=覆寫現有檔案 (&O) +FileExistsKeepExisting=保留現有檔案 (&K) +FileExistsOverwriteOrKeepAll=對下次衝突執行相同操作 (&D) +ExistingFileNewerSelectAction=選擇操作 +ExistingFileNewer2=現有檔案比安裝程式嘗試安裝的檔案還新。 +ExistingFileNewerOverwriteExisting=覆寫現有檔案 (&O) +ExistingFileNewerKeepExisting=保留現有檔案 (&K) (建議選項) +ExistingFileNewerOverwriteOrKeepAll=對下次衝突執行相同操作 (&D) +ErrorChangingAttr=在變更現有檔案的屬性時發生錯誤: +ErrorCreatingTemp=在目的資料夾中建立檔案時發生錯誤: +ErrorReadingSource=讀取來源檔案時發生錯誤: +ErrorCopying=複製檔案時發生錯誤: +ErrorDownloading=下載檔案時發生錯誤: +ErrorExtracting=解壓縮壓縮檔時發生錯誤: +ErrorReplacingExistingFile=取代現有檔案時發生錯誤: +ErrorRestartReplace=重新啟動電腦後取代檔案失敗: +ErrorRenamingTemp=在目的資料夾變更檔案名稱時發生錯誤: +ErrorRegisterServer=無法註冊 DLL/OCX 檔案:%1 +ErrorRegSvr32Failed=RegSvr32 失敗;結束代碼 %1 +ErrorRegisterTypeLib=無法註冊類型庫:%1 + +; *** Uninstall display name markings +; used for example as 'My Program (32-bit)' +UninstallDisplayNameMark=%1 (%2) +; used for example as 'My Program (32-bit, All users)' +UninstallDisplayNameMarks=%1 (%2, %3) +UninstallDisplayNameMark32Bit=32 位元 +UninstallDisplayNameMark64Bit=64 位元 +UninstallDisplayNameMarkAllUsers=所有使用者 +UninstallDisplayNameMarkCurrentUser=目前使用者 + +; *** Post-installation errors +ErrorOpeningReadme=開啟讀我檔案時發生錯誤。 +ErrorRestartingComputer=安裝程式無法重新啟動電腦,請自行重新啟動。 + +; *** Uninstaller messages +UninstallNotFound=檔案「%1」不存在,無法解除安裝。 +UninstallOpenError=無法開啟檔案「%1」,無法解除安裝 +UninstallUnsupportedVer=這個版本的解除安裝程式無法辨識解除安裝記錄檔「%1」之格式,無法解除安裝 +UninstallUnknownEntry=解除安裝記錄檔中發現未知的記錄 (%1) +ConfirmUninstall=您確定要完全移除 %1 及其所有元件嗎? +UninstallOnlyOnWin64=這個程式只能在 64 位元的 Windows 上解除安裝。 +OnlyAdminCanUninstall=這個程式要具備系統管理員權限的使用者方可解除安裝。 +UninstallStatusLabel=正在從您的電腦移除 %1 中,請稍候。 +UninstalledAll=%1 已經成功從您的電腦中移除。 +UninstalledMost=%1 解除安裝完成。%n%n某些項目無法移除,您可以自行移除這些項目。 +UninstalledAndNeedsRestart=要完成 %1 的解除安裝,您必須重新啟動電腦。%n%n您想要現在重新啟動電腦嗎? +UninstallDataCorrupted=檔案「%1」已經損毀,無法解除安裝 + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=移除共用檔案 +ConfirmDeleteSharedFile2=系統顯示下列共用檔案已不再被任何程式所使用,您要移除此共用檔案嗎?%n%n倘若您移除了以上檔案但仍有程式需要使用它,可能造成這些程式無法正常執行,因此您若無法確定請選擇 「否」。保留此檔案在您的系統中不會造成任何損害。 +SharedFileNameLabel=檔案名稱: +SharedFileLocationLabel=位置: +WizardUninstalling=解除安裝狀態 +StatusUninstalling=正在解除安裝 %1... + +; *** Shutdown block reasons +ShutdownBlockReasonInstallingApp=正在安裝 %1。 +ShutdownBlockReasonUninstallingApp=正在解除安裝 %1。 + +; The custom messages below aren't used by Setup itself, but if you make +; use of them in your scripts, you'll want to translate them. + +[CustomMessages] + +NameAndVersion=%1 版本 %2 +AdditionalIcons=附加捷徑: +CreateDesktopIcon=建立桌面捷徑 (&D) +CreateQuickLaunchIcon=建立快速啟動捷徑 (&Q) +ProgramOnTheWeb=%1 的網站 +UninstallProgram=解除安裝 %1 +LaunchProgram=啟動 %1 +AssocFileExtension=將 %1 與檔案副檔名 %2 產生關聯 (&A) +AssocingFileExtension=正在將 %1 與檔案副檔名 %2 產生關聯... +AutoStartProgramGroupDescription=啟動: +AutoStartProgram=自動啟動 %1 +AddonHostProgramNotFound=%1 無法在您所選的資料夾中找到。%n%n您是否還要繼續? \ No newline at end of file diff --git a/fontforge-setup/fontforgesetup.iss b/fontforge-setup/fontforgesetup.iss index 7f443ce..98f5f07 100644 --- a/fontforge-setup/fontforgesetup.iss +++ b/fontforge-setup/fontforgesetup.iss @@ -1,278 +1,311 @@ -; Script generated by the Inno Setup Script Wizard. -; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! - -#define MyAppName "FontForge" -#define MyAppFolder "FontForgeBuilds" -#define MyAppVersion GetDateTimeString('yyyymmdd', '', ''); -#define MyAppVersionDesc GetDateTimeString('yyyy-mm-dd', '', ''); -#define MyAppPublisher "FontForgeBuilds" -#define MyAppURL "http://www.fontforge.org" -#define MyAppExeName "run_fontforge.exe" -#define MyInstallEpoch "1" - -#ifdef MSYSTEM -# if MSYSTEM == "MINGW64" -# define ARCH="x64" -# define ARCHDESC="x64" -# define ARCHBITS="64" -# define OTHERBITS="32" -# endif -#endif -#ifndef ARCH -# define ARCH="" -# define ARCHDESC="x86" -# define ARCHBITS="32" -# define OTHERBITS="64" -#endif - -[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.) -AppId={{56748B9C-19AE-4689-B8C5-5A45AE0A993A} -AppName={#MyAppName} -AppVersion={#MyAppVersion} -;AppVerName={#MyAppName} {#MyAppVersion} -AppPublisher={#MyAppPublisher} -AppPublisherURL={#MyAppURL} -AppSupportURL={#MyAppURL} -AppUpdatesURL={#MyAppURL} -ArchitecturesInstallIn64BitMode={#ARCH} -DefaultDirName={commonpf}\{#MyAppFolder} -DefaultGroupName={#MyAppName} -AllowNoIcons=yes -InfoBeforeFile=..\ReleasePackage\VERSION.txt -OutputDir=. -OutputBaseFilename=FontForge-{#MyAppVersionDesc}-Windows-{#ARCHDESC} -SetupIconFile=Graphics\fontforge-installer-icon.ico -;WizardImageFile=Graphics\fontforge-wizard.bmp -WizardSmallImageFile=Graphics\fontforge-wizard.bmp -Compression=lzma2/max -SolidCompression=yes -ChangesAssociations=yes -PrivilegesRequired=poweruser - -[Languages] -Name: "english"; MessagesFile: "compiler:Default.isl" -Name: "armenian"; MessagesFile: "compiler:Languages\Armenian.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: "hebrew"; MessagesFile: "compiler:Languages\Hebrew.isl" -;Name: "icelandic"; MessagesFile: "compiler:Languages\Icelandic.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: "slovak"; MessagesFile: "compiler:Languages\Slovak.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" - -[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: "..\ReleasePackage\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Excludes: "fontforge.bat" -Source: "fontforge.bat"; DestDir: "{app}"; Flags: ignoreversion; -; NOTE: Don't use "Flags: ignoreversion" on any shared system files - -[Icons] -Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" -Name: "{group}\{#MyAppName} console"; Filename: "{app}\fontforge.bat" -Name: "{group}\{#MyAppName} interactive console"; Filename: "{app}\fontforge-console.bat" -Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" -Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon - -[Registry] -;Root: HKLM; Subkey: "Software\FontForge"; Flags: uninsdeletekey -Root: HKCR; Subkey: ".sfd"; ValueType: string; ValueName: ""; ValueData: "FontForgeProject"; Flags: uninsdeletevalue -Root: HKCR; Subkey: "FontForgeProject"; ValueType: string; ValueName: ""; ValueData: "FontForge Project"; Flags: uninsdeletekey -Root: HKCR; Subkey: "FontForgeProject\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\share\fontforge\sfd-icon.ico" -Root: HKCR; Subkey: "FontForgeProject\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1""" - -[Run] -Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent - -[Code] -procedure RecursiveDelete(Folder : String; Pattern : String; Extensions : TStringList); -var - SearchPath : String; - FilePath : String; - FindRec : TFindRec; -begin - //First search the current folder for any files matching the pattern - SearchPath := ExpandConstant(Folder + '\' + Pattern); - Log('[Recursive] searching ' + SearchPath); - if FindFirst(SearchPath, FindRec) then begin - try - repeat - if FindRec.Attributes and FILE_ATTRIBUTE_DIRECTORY = 0 then begin - if Extensions.IndexOf(ExtractFileExt(FindRec.Name)) <> -1 then begin - FilePath := ExpandConstant(Folder + '\' + FindRec.Name); - Log('[Recursive] Deleting ' + FilePath); - DeleteFile(FilePath); - end; - end; - until not FindNext(FindRec); - finally - FindClose(FindRec); - end; - end; - - //Now recursively search any subdirectories - SearchPath := ExpandConstant(Folder + '\*'); - Log('[Recursive] searching ' + SearchPath); - if FindFirst(SearchPath, FindRec) then begin - try - repeat - if ((FindRec.Attributes and FILE_ATTRIBUTE_DIRECTORY) <> 0) and - (CompareStr(FindRec.Name, '.') <> 0) and (CompareStr(FindRec.Name, '..') <> 0) then begin - FilePath := ExpandConstant(Folder + '\' + FindRec.Name); - Log('[Recursive] now searching: ' + FilePath); - RecursiveDelete(FilePath, Pattern, Extensions); - end; - until not FindNext(FindRec); - finally - FindClose(FindRec); - end; - end; -end; - - -procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); -var ExtensionsToDelete : TStringList; -begin - if CurUninstallStep = usUninstall then - begin - if MsgBox('Do you want to remove user preferences?', mbConfirmation, MB_YESNO) = IDYES then - begin - DelTree(ExpandConstant('{userappdata}\FontForge'), True, True, True); - end; - - Log('Removing Python cache files (.pyc/.pyo)...'); - ExtensionsToDelete := TStringList.Create; - ExtensionsToDelete.Add('.pyc'); - ExtensionsToDelete.Add('.pyo'); - RecursiveDelete('{app}\lib\python3.*', '*.py*', ExtensionsToDelete); - ExtensionsToDelete.Free; - end; -end; - - -///////////////////////////////////////////////////////////////////// -function GetUninstallString(): String; -var - sUnInstKey: Integer; - sUnInstPath: String; - sUnInstallString: String; - sPreviousInstallEpoch: String; - bIsOtherArch: Boolean; -begin - sUnInstKey := HKLM{#ARCHBITS}; - sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting("AppId")}_is1'); - sUnInstallString := ''; - bIsOtherArch := false; - if not RegQueryStringValue(sUnInstKey, sUnInstPath, 'UninstallString', sUnInstallString) then begin - sUnInstKey := HKCU{#ARCHBITS}; - if not RegQueryStringValue(sUnInstKey, sUnInstPath, 'UninstallString', sUnInstallString) then begin - sUnInstKey := HKLM{#OTHERBITS}; - if not RegQueryStringValue(sUnInstKey, sUnInstPath, 'UninstallString', sUnInstallString) then begin - sUnInstKey := HKCU{#OTHERBITS}; - RegQueryStringValue(sUnInstKey, sUnInstPath, 'UninstallString', sUnInstallString); - end; - if sUninstallString <> '' then begin - bIsOtherArch := true; - end; - end; - end; - if (sUninstallString <> '') and (not bIsOtherArch) then - begin - sPreviousInstallEpoch := GetPreviousData('InstallEpoch', '') - Log('Previous install epoch is: ' + sPreviousInstallEpoch + ' vs current: {#MyInstallEpoch}') - if sPreviousInstallEpoch = '{#MyInstallEpoch}' then begin - sUninstallString := ''; - end - end; - Result := sUnInstallString; -end; - - -///////////////////////////////////////////////////////////////////// -function IsUpgrade(): Boolean; -begin - Result := (GetUninstallString() <> ''); -end; - - -///////////////////////////////////////////////////////////////////// -function UnInstallOldVersion(): Integer; -var - sUnInstallString: String; - iResultCode: Integer; -begin -// Return Values: -// 1 - uninstall string is empty -// 2 - error executing the UnInstallString -// 3 - successfully executed the UnInstallString - - // default return value - Result := 0; - - // get the uninstall string of the old app - sUnInstallString := GetUninstallString(); - if sUnInstallString <> '' then begin - sUnInstallString := RemoveQuotes(sUnInstallString); - if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then - Result := 3 - else - Result := 2; - end else - Result := 1; -end; - -///////////////////////////////////////////////////////////////////// -function InitializeSetup(): Boolean; -var - iUninstallOldResult : Integer; -begin - Result := true - if (IsUpgrade()) then - begin - if MsgBox('The previous version of FontForge must be uninstalled first. Continue?', mbConfirmation, MB_YESNO) = IDYES then - begin - iUninstallOldResult := UnInstallOldVersion(); - Result := (iUninstallOldResult <> 2); - end else - Result := False; - end; -end; - -procedure RegisterPreviousData(PreviousDataKey: Integer); -begin - SetPreviousData(PreviousDataKey, 'InstallEpoch', '{#MyInstallEpoch}'); -end; - -procedure CurStepChanged(CurStep: TSetupStep); -begin - if (CurStep=ssInstall) then - begin - if (IsUpgrade()) then - begin - if MsgBox('The previous version of FontForge must be uninstalled first. Continue?', mbConfirmation, MB_YESNO) = IDYES then - UnInstallOldVersion() - else - Abort; - end; - end; -end; +; Script generated by the Inno Setup Script Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +; BUILD_DIR can be passed via command line: iscc -DBUILD_DIR="C:\path\to\build" +#ifndef BUILD_DIR +# define BUILD_DIR ".." +#endif + +#define MyAppName "FontForge" +#define MyAppFolder "FontForgeBuilds" +#define MyAppVersion GetDateTimeString('yyyymmdd', '', ''); +#define MyAppVersionDesc GetDateTimeString('yyyy-mm-dd', '', ''); +#define MyAppPublisher "FontForgeBuilds" +#define MyAppURL "http://www.fontforge.org" +#define MyAppExeName "run_fontforge.exe" +#define MyInstallEpoch "1" + +#ifdef MSYSTEM +# if MSYSTEM == "UCRT64" +# define ARCH="x64compatible" +# define ARCHDESC="x64" +# endif +# if MSYSTEM == "CLANGARM64" +# define ARCH="arm64" +# define ARCHDESC="arm64" +# endif +#endif +#ifndef ARCH +# define ARCH="x64" +# define ARCHDESC="x64_unknown" +#endif +#define ARCHBITS="64" +#define OTHERBITS="32" + +[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.) +AppId={{56748B9C-19AE-4689-B8C5-5A45AE0A993A} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +;AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +ArchitecturesInstallIn64BitMode={#ARCH} +DefaultDirName={commonpf}\{#MyAppFolder} +DefaultGroupName={#MyAppName} +AllowNoIcons=yes +InfoBeforeFile={#BUILD_DIR}\ReleasePackage\VERSION.txt +OutputDir=. +OutputBaseFilename=FontForge-{#MyAppVersionDesc}-Windows-{#ARCHDESC} +SetupIconFile=Graphics\fontforge-installer-icon.ico +UninstallDisplayIcon={app}\fontforge-installer-icon.ico +;WizardImageFile=Graphics\fontforge-wizard.bmp +WizardSmallImageFile=Graphics\fontforge-wizard.bmp +Compression=lzma2/max +SolidCompression=yes +ChangesAssociations=yes +PrivilegesRequired=poweruser + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" +Name: "armenian"; MessagesFile: "compiler:Languages\Armenian.isl" +Name: "brazilianportuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl" +Name: "catalan"; MessagesFile: "compiler:Languages\Catalan.isl" +Name: "chinesesimplified"; MessagesFile: "Languages\ChineseSimplified.isl" +Name: "chinesetraditional"; MessagesFile: "Languages\ChineseTraditional.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: "hebrew"; MessagesFile: "compiler:Languages\Hebrew.isl" +;Name: "icelandic"; MessagesFile: "compiler:Languages\Icelandic.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: "slovak"; MessagesFile: "compiler:Languages\Slovak.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" + +[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: "{#BUILD_DIR}\ReleasePackage\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Excludes: "fontforge.bat" +Source: "fontforge.bat"; DestDir: "{app}"; Flags: ignoreversion; +Source: "Graphics\fontforge-installer-icon.ico"; DestDir: "{app}"; Flags: ignoreversion; +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + +[Icons] +Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" +Name: "{group}\{#MyAppName} console"; Filename: "{app}\fontforge.bat" +Name: "{group}\{#MyAppName} interactive console"; Filename: "{app}\fontforge-console.bat" +Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" +Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon + +[Registry] +;Root: HKLM; Subkey: "Software\FontForge"; Flags: uninsdeletekey +Root: HKCR; Subkey: ".sfd"; ValueType: string; ValueName: ""; ValueData: "FontForgeProject"; Flags: uninsdeletevalue +Root: HKCR; Subkey: "FontForgeProject"; ValueType: string; ValueName: ""; ValueData: "FontForge Project"; Flags: uninsdeletekey +Root: HKCR; Subkey: "FontForgeProject\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\share\fontforge\sfd-icon.ico" +Root: HKCR; Subkey: "FontForgeProject\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1""" + +[Run] +Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent + +[Code] +procedure RecursiveDelete(Folder : String; Pattern : String; Extensions : TStringList); +var + SearchPath : String; + FilePath : String; + FindRec : TFindRec; +begin + SearchPath := ExpandConstant(Folder + '\' + Pattern); + Log('[Recursive] searching ' + SearchPath); + if FindFirst(SearchPath, FindRec) then begin + try + repeat + if FindRec.Attributes and FILE_ATTRIBUTE_DIRECTORY = 0 then begin + if Extensions.IndexOf(ExtractFileExt(FindRec.Name)) <> -1 then begin + FilePath := ExpandConstant(Folder + '\' + FindRec.Name); + Log('[Recursive] Deleting ' + FilePath); + DeleteFile(FilePath); + end; + end; + until not FindNext(FindRec); + finally + FindClose(FindRec); + end; + end; + SearchPath := ExpandConstant(Folder + '\*'); + Log('[Recursive] searching ' + SearchPath); + if FindFirst(SearchPath, FindRec) then begin + try + repeat + if ((FindRec.Attributes and FILE_ATTRIBUTE_DIRECTORY) <> 0) and + (CompareStr(FindRec.Name, '.') <> 0) and (CompareStr(FindRec.Name, '..') <> 0) then begin + FilePath := ExpandConstant(Folder + '\' + FindRec.Name); + Log('[Recursive] now searching: ' + FilePath); + RecursiveDelete(FilePath, Pattern, Extensions); + end; + until not FindNext(FindRec); + finally + FindClose(FindRec); + end; + end; +end; + +procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); +var ExtensionsToDelete : TStringList; +begin + if CurUninstallStep = usUninstall then + begin + if MsgBox('Do you want to remove user preferences?', mbConfirmation, MB_YESNO) = IDYES then + begin + DelTree(ExpandConstant('{userappdata}\FontForge'), True, True, True); + end; + Log('Removing Python cache files (.pyc/.pyo)...'); + ExtensionsToDelete := TStringList.Create; + ExtensionsToDelete.Add('.pyc'); + ExtensionsToDelete.Add('.pyo'); + RecursiveDelete('{app}\lib\python3.*', '*.py*', ExtensionsToDelete); + ExtensionsToDelete.Free; + end; +end; + +function GetUninstallString(): String; +var + sUnInstKey: Integer; + sUnInstPath: String; + sUnInstallString: String; + sPreviousInstallEpoch: String; + bIsOtherArch: Boolean; +begin + sUnInstKey := HKLM{#ARCHBITS}; + sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting("AppId")}_is1'); + sUnInstallString := ''; + bIsOtherArch := false; + if not RegQueryStringValue(sUnInstKey, sUnInstPath, 'UninstallString', sUnInstallString) then begin + sUnInstKey := HKCU{#ARCHBITS}; + if not RegQueryStringValue(sUnInstKey, sUnInstPath, 'UninstallString', sUnInstallString) then begin + sUnInstKey := HKLM{#OTHERBITS}; + if not RegQueryStringValue(sUnInstKey, sUnInstPath, 'UninstallString', sUnInstallString) then begin + sUnInstKey := HKCU{#OTHERBITS}; + RegQueryStringValue(sUnInstKey, sUnInstPath, 'UninstallString', sUnInstallString); + end; + if sUninstallString <> '' then begin + bIsOtherArch := true; + end; + end; + end; + if (sUninstallString <> '') and (not bIsOtherArch) then + begin + sPreviousInstallEpoch := GetPreviousData('InstallEpoch', '') + Log('Previous install epoch is: ' + sPreviousInstallEpoch + ' vs current: {#MyInstallEpoch}') + if sPreviousInstallEpoch = '{#MyInstallEpoch}' then begin + sUninstallString := ''; + end + end; + Result := sUnInstallString; +end; + +function IsUpgrade(): Boolean; +begin + Result := (GetUninstallString() <> ''); +end; + +function UnInstallOldVersion(): Integer; +var + sUnInstallString: String; + iResultCode: Integer; +begin + Result := 0; + sUnInstallString := GetUninstallString(); + if sUnInstallString <> '' then begin + sUnInstallString := RemoveQuotes(sUnInstallString); + if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then + Result := 3 + else + Result := 2; + end else + Result := 1; +end; + +function InitializeSetup(): Boolean; +var + iUninstallOldResult : Integer; +begin + Result := true + if (IsUpgrade()) then + begin + if MsgBox('The previous version of FontForge must be uninstalled first. Continue?', mbConfirmation, MB_YESNO) = IDYES then + begin + iUninstallOldResult := UnInstallOldVersion(); + Result := (iUninstallOldResult <> 2); + end else + Result := False; + end; +end; + +procedure RegisterPreviousData(PreviousDataKey: Integer); +begin + SetPreviousData(PreviousDataKey, 'InstallEpoch', '{#MyInstallEpoch}'); +end; + +procedure CurStepChanged(CurStep: TSetupStep); +var + BatPath: String; + Lines: TArrayOfString; + I: Integer; + LangCode: String; + LangFound: Boolean; +begin + if (CurStep = ssInstall) then + begin + if (IsUpgrade()) then + begin + if MsgBox('The previous version of FontForge must be uninstalled first. Continue?', mbConfirmation, MB_YESNO) = IDYES then + UnInstallOldVersion() + else + Abort; + end; + end; + + if CurStep = ssPostInstall then + begin + BatPath := ExpandConstant('{app}\fontforge.bat'); + if LoadStringsFromFile(BatPath, Lines) then + begin + if ActiveLanguage() = 'chinesesimplified' then + LangCode := 'zh_CN' + else if ActiveLanguage() = 'chinesetraditional' then + LangCode := 'zh_TW' + else + LangCode := ''; + + LangFound := False; + for I := 0 to GetArrayLength(Lines) - 1 do + begin + if (Pos('set LANGUAGE=', Lines[I]) = 1) or (Pos('::set LANGUAGE=', Lines[I]) = 1) then + begin + if LangCode <> '' then + Lines[I] := 'set LANGUAGE=' + LangCode + else + Lines[I] := '::set LANGUAGE=en'; + LangFound := True; + break; + end; + end; + + if not LangFound and (LangCode <> '') then + begin + SetArrayLength(Lines, GetArrayLength(Lines) + 1); + Lines[GetArrayLength(Lines) - 1] := 'set LANGUAGE=' + LangCode; + end; + + SaveStringsToFile(BatPath, Lines, False); + end; + end; +end;