Old 3rd January 2012, 08:54   #1
indy31
Junior Member
 
Join Date: Jul 2011
Posts: 5
How to use calculated size from Directory Page?

The Modern Interface Directory Page (MUI_PAGE_DIRECTORY) shows the 'Space required' for the total installation. Is there an easy way to get access to this value?

I want to store this value in the Uninstaller registry key EstimatedSize.

Now I'm doing:
!include "FileFunc.nsh"

# Add package size information to Uninstaller registry.
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
IntFmt $0 "0x%08X" $0
WriteRegDWORD HKLM "${UninstallRegKey}" "EstimatedSize" "$0"


But seeing the value ready computed makes me wonder if there is an easier way to get to this info.
indy31 is offline   Reply With Quote
Old 3rd January 2012, 17:27   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
http://forums.winamp.com/showthread.php?t=320859

I think reading the values from the label might be better though but I don't think anyone has written code for that (maybe I will).

Stu
Afrow UK is offline   Reply With Quote
Old 5th January 2012, 12:42   #3
indy31
Junior Member
 
Join Date: Jul 2011
Posts: 5
Thanks.
So there is no easy way to get to the info.
indy31 is offline   Reply With Quote
Old 5th January 2012, 14:17   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
See attached. GetSpaceRequired gets the space required and space available values from either the components page (required only) or the directory page (both required and available values). It should only be used in the page leave functions. It should also work for different languages.

Stu
Attached Files
File Type: nsi SpaceRequired.nsi (1.5 KB, 145 views)
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
estimatedsize, installation size, mui_page_directory

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump