1

我正在为我的应用程序使用一个非常简单的安装脚本,并在部分选择屏幕上显示一个空框。我想删除它,或者至少知道它的用途并填满它。

这是一个截图 替代文字

和我的安装脚本

; example2.nsi
;
; This script is based on example1.nsi, but it remember the directory, 
; has uninstall support and (optionally) installs start menu shortcuts.
;
; It will install ICV-MRI into a directory that the user selects,

;--------------------------------
!include "MUI.nsh"

; The name of the installer
Name "ICV-MRI"

; The file to write
OutFile "ICV-MRI_Setup.exe"

; The default installation directory
InstallDir $PROGRAMFILES\ICV-MRI

; Registry key to check for directory (so if you install again, it will 
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\ICV-MRI" "Install_Dir"

; Request application privileges for Windows Vista
RequestExecutionLevel admin

Function LaunchLink
  ExecShell "" "$INSTDIR\mri.exe"
FunctionEnd

;--------------------------------

; Pages

Page components
Page directory
Page instfiles

UninstPage uninstConfirm
UninstPage instfiles

;  !insertmacro MUI_PAGE_WELCOME
;  !insertmacro MUI_PAGE_DIRECTORY
;  !insertmacro MUI_PAGE_INSTFILES

    # These indented statements modify settings for MUI_PAGE_FINISH
    !define MUI_FINISHPAGE_NOAUTOCLOSE
    !define MUI_FINISHPAGE_RUN
    !define MUI_FINISHPAGE_RUN_NOTCHECKED
    !define MUI_FINISHPAGE_RUN_TEXT "Run MRI when the installer closes"
    !define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink"
    !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
  !insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"


;--------------------------------

; The stuff to install
Section "ICV-MRI (required)"

  SectionIn RO

  ; Set output path to the installation directory.
  SetOutPath $INSTDIR

  ; Put file there
  File "dist\bz2.pyd"
  File "dist\library.zip"
  File "dist\mri.exe"
  File "dist\PyQt4.QtCore.pyd"
  File "dist\PyQt4.QtGui.pyd"
  File "dist\python26.dll"
  File "dist\QtCore4.dll"
  File "dist\QtGui4.dll"
  File "dist\select.pyd"
  File "dist\sip.pyd"
  File "dist\unicodedata.pyd"
  File "dist\w9xpopen.exe"

  ; Write the installation path into the registry
  WriteRegStr HKLM SOFTWARE\ICV-MRI "Install_Dir" "$INSTDIR"

  ; Write the uninstall keys for Windows
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ICV-MRI" "DisplayName" "ICV-MRI"
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ICV-MRI" "UninstallString" '"$INSTDIR\uninstall.exe"'
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ICV-MRI" "NoModify" 1
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ICV-MRI" "NoRepair" 1
  WriteUninstaller "uninstall.exe"

SectionEnd

; Optional section (can be disabled by the user)
Section "Start Menu Shortcuts"

  CreateDirectory "$SMPROGRAMS\ICV-MRI"
  CreateShortCut "$SMPROGRAMS\ICV-MRI\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
  CreateShortCut "$SMPROGRAMS\ICV-MRI\ICV-MRI.lnk" "$INSTDIR\mri.exe" "" "$INSTDIR\mri.exe" 0

SectionEnd

Section "Desktop Shortcuts"

  CreateShortCut "$DESKTOP\ICV-MRI.lnk" "$INSTDIR\mri.exe" "" "$INSTDIR\mri.exe" 0

SectionEnd

;--------------------------------
4

2 回答 2

4

如果要删除它,!define MUI_COMPONENTSPAGE_NODESC请在脚本顶部

于 2009-06-03T13:57:48.440 回答
1

该框用于部分描述。

查看 Modern UI Basic.nsi 文件:


;--------------------------------
;Installer Sections

Section "Dummy Section" SecDummy

  SetOutPath "$INSTDIR"
  
  ;ADD YOUR OWN FILES HERE...
  
  ;Store installation folder
  WriteRegStr HKCU "Software\Modern UI Test" "" $INSTDIR
  
  ;Create uninstaller
  WriteUninstaller "$INSTDIR\Uninstall.exe"

SectionEnd

;--------------------------------
;Descriptions

  ;Language strings
  LangString DESC_SecDummy ${LANG_ENGLISH} "A test section."

  ;Assign language strings to sections
  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
    !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy)
  !insertmacro MUI_FUNCTION_DESCRIPTION_END

阅读更多Modern UI 自述文件,组件页面描述部分。

现代 UI 组件页面有一个文本框,当用户将鼠标悬停在组件上时,可以在其中显示描述。如果您不想使用这些描述,请插入 MUI_COMPONENTSPAGE_NODESC 接口设置。

要设置节的描述,需要在节命令中添加一个附加参数,该参数具有节的唯一标识符。此名称稍后可用于设置此部分的描述。

于 2009-06-03T13:19:32.837 回答