;NSIS Modern User Interface version 1.70 ;Basic Example Script ;Written by Joost Verburg SetCompress force SetCompressor /FINAL LZMA ShowInstDetails show ShowUnInstDetails show SetOverwrite on SetDatablockOptimize on SetDateSave on XPStyle on CRCCheck on ;-------------------------------- ;Include Modern UI !include "MUI.nsh" ;-------------------------------- ;General ;Name and file Name "Progress text, not refreshing?" OutFile "Basic_Mofdified.exe" ;Default installation folder InstallDir "$PROGRAMFILES\Modern UI Test" ;Get installation folder from registry if available InstallDirRegKey HKCU "Software\Modern UI Test" "" ;-------------------------------- ;Interface Settings !define MUI_ABORTWARNING ;-------------------------------- ;Pages !define MUI_FINISHPAGE_NOAUTOCLOSE !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Contrib\Modern UI\License.txt" !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES ;-------------------------------- ;Languages !insertmacro MUI_LANGUAGE "English" ;-------------------------------- ;Macros !macro PRINT TEXT SetDetailsPrint listonly DetailPrint "${TEXT}" SetDetailsPrint none !macroend ;-------------------------------- ;Installer Sections Section "Dummy Section" SecDummy !insertmacro PRINT "Entering:Section Dummy" SetOutPath "$INSTDIR" nsisdl::download /TRANSLATE "Downloading %s" "Connecting..." \ "second" "minute" "hour" "s" "%d.%01dkB/s" " (%d %s%s remaining)" \ /TIMEOUT=30000 "http://www.winamp.com/images/header/logo.gif" "$INSTDIR\logo.gif" ;Create uninstaller WriteUninstaller "$INSTDIR\Uninstall.exe" !insertmacro PRINT "Leaving:Section Dummy" SectionEnd Section "Dummy Section 2" SecDummy2 !insertmacro PRINT "Entering:Section Dummy 2" CopyFiles /FILESONLY "$INSTDIR\logo.gif" "$INSTDIR\logo2.gif" MessageBox mb_ok "Shouldn't the text above the progress bar now read, copying x to y? Or be NULL?" !insertmacro PRINT "Leaving:Section Dummy 2" SectionEnd ;-------------------------------- ;Descriptions ;Language strings LangString DESC_SecDummy ${LANG_ENGLISH} "A test section." LangString DESC_SecDummy2 ${LANG_ENGLISH} "A second test section." ;Assign language strings to sections !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy) !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy2} $(DESC_SecDummy2) !insertmacro MUI_FUNCTION_DESCRIPTION_END ;-------------------------------- ;Uninstaller Section Section "Uninstall" Delete "$INSTDIR\Uninstall.exe" RMDir "$INSTDIR" DeleteRegKey /ifempty HKCU "Software\Modern UI Test" SectionEnd ;-------------------------------- ; Functions Function .onInit InitPluginsDir SetOutPath "$PLUGINSDIR" File /r "${NSISDIR}\Plugins\*.*" ; nsisdl.dll FunctionEnd