NSIS在欢迎页面和完成页面添加文字、超链接
侧边栏壁纸
  • 累计撰写 29 篇文章
  • 累计收到 137 条评论

NSIS在欢迎页面和完成页面添加文字、超链接

nsisfans
2022-01-21 / 0 评论 / 90 阅读 / 正在检测是否收录...

在欢迎页面和完成页面添加文字、超链接。

代码来自:贾可

!include MUI2.nsh

Name "Example"

InstallDir $TEMP
OutFile Example.exe

!define MUI_LANGDLL_ALWAYSSHOW # 始终显示语言选择对话框
!define MUI_LANGDLL_ALLLANGUAGES # 始终显示所有可用语言

# 如果是单语言,也可以将 $(Welcome.Page.Extra) 和 $(Finish.Page.Link) 直接替换成你需要的文字。

!define MUI_WELCOMEPAGE_TEXT "$(MUI_TEXT_WELCOME_INFO_TEXT)$\r$\n$\r$\n$\r$\n$\r$\n$\r$\n$\r$\n$\r$\n$\r$\n$(Welcome.Page.Extra)"

!define MUI_FINISHPAGE_LINK "$(Finish.Page.Link)"
!define MUI_FINISHPAGE_LINK_LOCATION "https://jq.qq.com/?_wv=1027&k=QFymvYMY"

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_LANGUAGE SimpChinese
!insertmacro MUI_LANGUAGE English

LangString Welcome.Page.Extra ${LANG_SimpChinese} "本程序由 NSIS 技术交流群出品"
LangString Welcome.Page.Extra ${LANG_English} "Produced by Tech-Exchange of NSIS"

LangString Finish.Page.Link ${LANG_SimpChinese} "加入 NSIS 技术交流群"
LangString Finish.Page.Link ${LANG_English} "Join Tech-Exchange of NSIS"

ShowInstDetails show

Section -
    SetDetailsPrint textonly
    DetailPrint "Please wait while installing..."
    SetDetailsPrint listonly
    Sleep 200
    Sleep 200
    Sleep 200
    Sleep 200
    Sleep 200
    Sleep 200
    Sleep 200
    Sleep 200
    Sleep 200
    Sleep 200
SectionEnd

Function .onInit
    # 显示语言选择对话框
    !insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd
0

评论 (0)

取消