How to view the Space available: info on the components page?
How can I display the *Space available:* window on the standard components page?
Thanks in advance
Archive: How to view the Space available: info on the components page?
How to view the Space available: info on the components page?
How can I display the *Space available:* window on the standard components page?
Thanks in advance
I think this is impossible. Space available has purposes on page Install location where it shows available space for selected path (drive) and page Components does not have this information.
Maybe you could use a little hack:
Put Install location page before Components page. Get whole texf from Space available label into $0 (in page leave event).
Then add new label (using Reshacker) to components page and set text to this label from $0.
del
tony18
you can:
!include "MUI2.nsh"
!include "Sections.nsh"
!insertmacro MUI_PAGE_DIRECTORY
!define MUI_PAGE_CUSTOMFUNCTION_SHOW components_show
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
InstallDir "$TEMP"
OutFile "FreeSpace-test.exe"
Function .onInit
System::Call 'kernel32::GetDiskFreeSpaceEx(t"$instdir",*l.r1,*l,*l)'
System::Int64Op $1 / 1024
Pop $1
FunctionEnd
Function components_show
StrCpy $4 'Space Available: $1 kb'
FindWindow $0 "#32770" "" $HWNDPARENT
System::Call 'USER32::CreateWindowEx(i0,t "STATIC",t "$4",i ${WS_CHILD}|${WS_VISIBLE},i0,i40,i300,i20,i $0,i222,i0,i0) $R2'
GetDlgItem $1 $0 1027
GetDlgItem $2 $0 222
SendMessage $1 ${WM_GETFONT} 0 0 $3
SendMessage $2 ${WM_SETFONT} $3 1
FunctionEnd
SectionGroup /e "SectionGroup " SEC0
Section "Section 1" S1
;oszone
SectionEnd
Section /o "Section 2" S2
SectionEnd
Section /o "Section 3" S3
SectionEnd
SectionGroupEnd