删除 NSIS 安装程序底部的按钮窗格
Remove button pane at the bottom in NSIS installer
我正在使用 NSIS 创建一个只有自定义页面的安装程序。
自定义页面不应有默认按钮(后退、下一步或取消),而应在页面中央只有 1 个按钮。
有什么办法可以删除完整的底部窗格,正如我在附图中突出显示的那样?
我隐藏了按钮,但我想删除分隔线和它下面的部分。
这是我的代码:
;--------------------------------
;Include Modern UI
!include "MUI2.nsh"
;--------------------------------
;General
;Name and file
Name "Custom Test"
OutFile "custom_installer.exe"
;Default installation folder
InstallDir "$LOCALAPPDATA\Custom Test"
;Remove default branding text of Nullsoft
BrandingText " "
;--------------------------------
;Interface Settings
!define MUI_LICENSEPAGE_BGCOLOR "814EFA"
!define MUI_ABORTWARNING
!define MUI_BGCOLOR "000000"
;--------------------------------
;Functions
Function Start
nsDialogs::Create 1044
Pop [=10=]
SetCtlColors [=10=] 222425 FBFBFB
${NSD_CreateButton} 20 170 90% 15u INSTALL
GetDlgItem [=10=] $HWNDPARENT 3 ; Back Button
GetDlgItem $HWNDPARENT 1 ; Next/Close Button
GetDlgItem $HWNDPARENT 2 ; Cancel Button
ShowWindow [=10=] ${SW_HIDE}
ShowWindow ${SW_HIDE}
ShowWindow ${SW_HIDE}
nsDialogs::Show
FunctionEnd
;--------------------------------
;Pages
Page custom Start
!insertmacro MUI_PAGE_COMPONENTS
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
;Installer Sections
Section "Dummy Section" SecDummy
SetOutPath "$INSTDIR"
SectionEnd
这是安装程序页面现在的样子:
如何使用 SetBrandingText " " 隐藏水平线并使用 SetCtlColors $0 222425 FBFBFB 为底部区域着色,这样看起来喜欢对话的其余部分吗?
这对您来说是否可以接受,或者您想缩小对话框(降低其高度)?
我正在使用 NSIS 创建一个只有自定义页面的安装程序。 自定义页面不应有默认按钮(后退、下一步或取消),而应在页面中央只有 1 个按钮。 有什么办法可以删除完整的底部窗格,正如我在附图中突出显示的那样? 我隐藏了按钮,但我想删除分隔线和它下面的部分。
这是我的代码:
;--------------------------------
;Include Modern UI
!include "MUI2.nsh"
;--------------------------------
;General
;Name and file
Name "Custom Test"
OutFile "custom_installer.exe"
;Default installation folder
InstallDir "$LOCALAPPDATA\Custom Test"
;Remove default branding text of Nullsoft
BrandingText " "
;--------------------------------
;Interface Settings
!define MUI_LICENSEPAGE_BGCOLOR "814EFA"
!define MUI_ABORTWARNING
!define MUI_BGCOLOR "000000"
;--------------------------------
;Functions
Function Start
nsDialogs::Create 1044
Pop [=10=]
SetCtlColors [=10=] 222425 FBFBFB
${NSD_CreateButton} 20 170 90% 15u INSTALL
GetDlgItem [=10=] $HWNDPARENT 3 ; Back Button
GetDlgItem $HWNDPARENT 1 ; Next/Close Button
GetDlgItem $HWNDPARENT 2 ; Cancel Button
ShowWindow [=10=] ${SW_HIDE}
ShowWindow ${SW_HIDE}
ShowWindow ${SW_HIDE}
nsDialogs::Show
FunctionEnd
;--------------------------------
;Pages
Page custom Start
!insertmacro MUI_PAGE_COMPONENTS
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
;Installer Sections
Section "Dummy Section" SecDummy
SetOutPath "$INSTDIR"
SectionEnd
这是安装程序页面现在的样子:
如何使用 SetBrandingText " " 隐藏水平线并使用 SetCtlColors $0 222425 FBFBFB 为底部区域着色,这样看起来喜欢对话的其余部分吗?
这对您来说是否可以接受,或者您想缩小对话框(降低其高度)?