View Single Post
Old 26th June 2011, 12:33   #3
Panarchy
Member
 
Join Date: Nov 2008
Posts: 72
Exclamation

Thanks, that method worked for the non-MUI interface, but I can't seem to get it working in MUI...

Can someone take a look?

Thanks,

Chip D. Panarchy




code:
!include nsDialogs.nsh
!include LogicLib.nsh

!include "MUI2.nsh"

Name "BOOST Library Installer"
OutFile "Boost installer.exe"

InstallDir "$INSTDIR"
InstallDirRegKey HKCU "Software\Boost" ""

RequestExecutionLevel user
XPStyle on

!define MUI_ABORTWARNING

!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\GPL.txt"
!define MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE "Please enter boost download URL (zip)"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES

!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

#LangString PAGE_TITLE ${LANG_ENGLISH} "Title"
#LangString PAGE_SUBTITLE ${LANG_ENGLISH} "Subtitle"

#Function CustomPageFunction
#!insertmacro MUI_HEADER_TEXT $(PAGE_TITLE) $(PAGE_SUBTITLE)
#FunctionEnd

!insertmacro MUI_LANGUAGE "English"

Var Text
Var Text_State

Section "Dummy Section" SecDummy
SetOutPath "$INSTDIR"
#download $Text $TEMP
#unzip $TEMP\boost_1_46_1.zip
#run bjam.exe, set prefix to $INSTDIR

WriteRegStr HKCU "Software\Modern UI Test" "" $INSTDIR
WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd

Page custom nsDialogsPage nsDialogsPageLeave

Section "Uninstall"
Delete "$INSTDIR\Uninstall.exe"
RMDir "$INSTDIR"
DeleteRegKey /ifempty HKCU "Software\Modern UI Test"
SectionEnd

Function nsDialogsPage
StrCpy $Text_State "http://sourceforge.net/projects/boost/files/boost/1.46.1/boost_1_46_1.zip/download"

${NSD_CreateText} 0 13u 100% 12u $Text_State
Pop $Text

nsDialogs::Show
FunctionEnd

Function nsDialogsPageLeave
${NSD_GetText} $Text $Text_State
FunctionEnd

Panarchy is offline   Reply With Quote