卸载程序的自定义文本
Custom texts for uninstaller
所以我为某些游戏制作了补丁安装程序。它工作得很好,尽管 NSIS 的愚蠢设计决策。我将 NSIS 3.03 与 MUI2 一起使用。
由于补丁的性质(它不是单独的应用程序,只是应用在现有程序上的补丁)我不得不为安装程序使用几乎所有自定义文本(如 MUI_WELCOMEPAGE_TITLE、MUI_WELCOMEPAGE_TEXT 等).我的母语语法没有帮助。
但后来我愚蠢地想包括卸载程序。虽然它有效,但似乎几乎没有自定义文本。只有 MUI_UNCONFIRMPAGE_TEXT_TOP 和 MUI_UNCONFIRMPAGE_TEXT_LOCATION 有效。由于上述问题,卸载程序的其他默认文本看起来像废话(补丁而不是真正的应用程序,语法)。
例如卸载程序的欢迎页面上有类似"Before starting the uninstallation, make sure [NAME OF PATCH TO GAME] is not running."的文字。它应该类似于 "Before starting the uninstallation, make sure [NAME OF GAME, NOT NAME OF PATCH] is not running."。不,没有 MUI_UNWELCOMEPAGE_TEXT 或类似的东西。
如何更改卸载程序中的其他文本?对于 10 岁的第三个主要版本的安装程序创建者来说,这种疏忽是愚蠢的。什么鬼?
来自文档:
Page settings apply to a single page and should be set before inserting a page macro. The same settings can be used for installer and uninstaller pages. You have to repeat the setting if you want it to apply to multiple pages.
!include MUI2.nsh
!define MUI_WELCOMEPAGE_TEXT "Installer blah blah"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!define MUI_WELCOMEPAGE_TEXT "Uninstaller blah blah"
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Section
SetOutPath "$InstDir"
WriteUninstaller "$InstDir\Un.exe"
ExecShell "" "$InstDir\Un.exe"
SectionEnd
Section Uninstall
Delete "$InstDir\Un.exe"
RMDir "$InstDir"
SectionEnd
所以我为某些游戏制作了补丁安装程序。它工作得很好,尽管 NSIS 的愚蠢设计决策。我将 NSIS 3.03 与 MUI2 一起使用。
由于补丁的性质(它不是单独的应用程序,只是应用在现有程序上的补丁)我不得不为安装程序使用几乎所有自定义文本(如 MUI_WELCOMEPAGE_TITLE、MUI_WELCOMEPAGE_TEXT 等).我的母语语法没有帮助。
但后来我愚蠢地想包括卸载程序。虽然它有效,但似乎几乎没有自定义文本。只有 MUI_UNCONFIRMPAGE_TEXT_TOP 和 MUI_UNCONFIRMPAGE_TEXT_LOCATION 有效。由于上述问题,卸载程序的其他默认文本看起来像废话(补丁而不是真正的应用程序,语法)。
例如卸载程序的欢迎页面上有类似"Before starting the uninstallation, make sure [NAME OF PATCH TO GAME] is not running."的文字。它应该类似于 "Before starting the uninstallation, make sure [NAME OF GAME, NOT NAME OF PATCH] is not running."。不,没有 MUI_UNWELCOMEPAGE_TEXT 或类似的东西。
如何更改卸载程序中的其他文本?对于 10 岁的第三个主要版本的安装程序创建者来说,这种疏忽是愚蠢的。什么鬼?
来自文档:
Page settings apply to a single page and should be set before inserting a page macro. The same settings can be used for installer and uninstaller pages. You have to repeat the setting if you want it to apply to multiple pages.
!include MUI2.nsh
!define MUI_WELCOMEPAGE_TEXT "Installer blah blah"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!define MUI_WELCOMEPAGE_TEXT "Uninstaller blah blah"
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Section
SetOutPath "$InstDir"
WriteUninstaller "$InstDir\Un.exe"
ExecShell "" "$InstDir\Un.exe"
SectionEnd
Section Uninstall
Delete "$InstDir\Un.exe"
RMDir "$InstDir"
SectionEnd