WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > HELP! Next a most complex control
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
n_baua
Member

Registered: Aug 2006
From:

HELP! Next a most complex control

Hello,

I am not sure, weather this is possible,
Please see the attached file for custom page.

I need to check the space availability on the user's PC and want to show the custom page.

Attachment: screen.gif
This has been downloaded 492 time(s).

__________________
NBaua
--------------------------------------
The Brain is wider than the sky.

Quick Link | Report this post to a moderator | IP: Logged

n_baua is offline Old Post 12-11-2006 02:38 PM
Click Here to See the Profile for n_baua Click here to Send n_baua a Private Message Click Here to Email n_baua Find more posts by n_baua Add n_baua to your buddy list Edit/Delete Message Reply w/Quote
Red Wine
Forum King

Registered: Mar 2006
From: Ath. GR

Assume that you know how to deal with InstallOptions to create custom pages, for this you'd need to implement at least E.1.4 DriveSpace and E.1.5 GetDrives.

__________________
Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS

Quick Link | Report this post to a moderator | IP: Logged

Red Wine is offline Old Post 12-11-2006 02:53 PM
Click Here to See the Profile for Red Wine Click here to Send Red Wine a Private Message Find more posts by Red Wine Add Red Wine to your buddy list Edit/Delete Message Reply w/Quote
n_baua
Member

Registered: Aug 2006
From:

Hi Red Wine,
I know how to create the custom pages but do not know which control needs to be used with InstallOptions to get the functionality.
The control you see in the attached image in first post, is just a Photoshop imagination, I am open to any other control(s) too, but need to show drive space availability to users like most of the popular installers does. (For e.g. Visual Studio 2005)

We have around 12GB of movies and illustrations to be copied to user's PC.

__________________
NBaua
--------------------------------------
The Brain is wider than the sky.

Quick Link | Report this post to a moderator | IP: Logged

n_baua is offline Old Post 12-12-2006 05:09 AM
Click Here to See the Profile for n_baua Click here to Send n_baua a Private Message Click Here to Email n_baua Find more posts by n_baua Add n_baua to your buddy list Edit/Delete Message Reply w/Quote
bholliger
Senior Member

Registered: Jul 2004
From: Switzerland

Hi NBaua!

I think you should have a look at InstallOptionsEx. This plugin offers a ListView control. It might be a solution for you.

http://nsis.sourceforge.net/InstallOption****plug-in

Have a nice day!

Cheers

Bruno

Quick Link | Report this post to a moderator | IP: Logged

bholliger is offline Old Post 12-12-2006 06:21 AM
Click Here to See the Profile for bholliger Click here to Send bholliger a Private Message Visit bholliger's homepage! Find more posts by bholliger Add bholliger to your buddy list Edit/Delete Message Reply w/Quote
n_baua
Member

Registered: Aug 2006
From:

thanks bholliger,
I will look in to it.

__________________
NBaua
--------------------------------------
The Brain is wider than the sky.

Quick Link | Report this post to a moderator | IP: Logged

n_baua is offline Old Post 12-12-2006 08:17 AM
Click Here to See the Profile for n_baua Click here to Send n_baua a Private Message Click Here to Email n_baua Find more posts by n_baua Add n_baua to your buddy list Edit/Delete Message Reply w/Quote
Red Wine
Forum King

Registered: Mar 2006
From: Ath. GR

I hope the following minimal example would help you begin.
You may use the notify flag on the custom page leave function to get the selected drive.

The script:

code:
outfile 'customtest.exe' !define REQUIRED '60000' !include 'FileFunc.nsh' !Include 'MUI.nsh' !insertmacro GetDrives !insertmacro DriveSpace !insertmacro MUI_PAGE_WELCOME page custom CustomCreate !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_LANGUAGE "English" Section - ####### SectionEnd Function CustomCreate Push $1 InstallOptions::initDialog /NOUNLOAD '$PLUGINSDIR\custom.ini' Pop $1 ReadINIStr $2 "$PLUGINSDIR\custom.ini" "Field 1" "HWND" SetCtlColors $2 0x0000FF 0xFFFFFF CreateFont $3 "Tahoma" 7 800 SendMessage $2 ${WM_SETFONT} $3 0 InstallOptions::show Pop $1 FunctionEnd Function GetDrivesCallBack ${DriveSpace} "$9" "/D=F /S=M" $R0 StrCpy $9 $9 1 IntCmp '$R0' '${REQUIRED}' +4 +4 0 StrCmp '$R2' 'state_ok' +3 WriteIniStr '$PLUGINSDIR\custom.ini' 'Field 1' 'State' 'Drive: $9 \ Required Space = ${REQUIRED} Mbytes Free Space = $R0 Mbytes' StrCpy '$R2' 'state_ok' ReadIniStr '$R1' '$PLUGINSDIR\custom.ini' 'Field 1' 'ListItems' StrCmp '$R1' '' 0 addlist WriteIniStr '$PLUGINSDIR\custom.ini' 'Field 1' 'ListItems' 'Drive: $9 \ Required Space = ${REQUIRED} Mbytes Free Space = $R0 Mbytes' goto end addlist: WriteIniStr '$PLUGINSDIR\custom.ini' 'Field 1' 'ListItems' '$R1|Drive: $9 \ Required Space = ${REQUIRED} Mbytes Free Space = $R0 Mbytes' end: Push $0 FunctionEnd Function .onInit initpluginsdir file /oname=$PLUGINSDIR\custom.ini custom.ini ${GetDrives} "HDD" GetDrivesCallBack FunctionEnd

The custom.ini
code:
[Settings] NumFields=1 [Field 1] Type=Listbox State= Left=12 Right=-11 Top=12 Bottom=36 Flags=


EDIT:
Added a defined required space and control colors.

__________________
Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS

Last edited by Red Wine on 12-12-2006 at 01:07 PM

Quick Link | Report this post to a moderator | IP: Logged

Red Wine is offline Old Post 12-12-2006 10:21 AM
Click Here to See the Profile for Red Wine Click here to Send Red Wine a Private Message Find more posts by Red Wine Add Red Wine to your buddy list Edit/Delete Message Reply w/Quote
n_baua
Member

Registered: Aug 2006
From:

Hello Red Wine,

Thanks a lot for such a gr8 HEADSTART for me.
I was looking almost this.
Thanks a milllllllllion.

__________________
NBaua
--------------------------------------
The Brain is wider than the sky.

Quick Link | Report this post to a moderator | IP: Logged

n_baua is offline Old Post 12-13-2006 03:01 AM
Click Here to See the Profile for n_baua Click here to Send n_baua a Private Message Click Here to Email n_baua Find more posts by n_baua Add n_baua to your buddy list Edit/Delete Message Reply w/Quote
Red Wine
Forum King

Registered: Mar 2006
From: Ath. GR

You welcome :-)

__________________
Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS

Quick Link | Report this post to a moderator | IP: Logged

Red Wine is offline Old Post 12-13-2006 09:51 AM
Click Here to See the Profile for Red Wine Click here to Send Red Wine a Private Message Find more posts by Red Wine Add Red Wine to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 08:38 PM. Post New Thread    Post A Reply
  Last Thread   Next Thread
WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > HELP! Next a most complex control
Show Printable Version
 | 
Email this Page
 | 
Subscribe to this Thread

Forum Jump:
 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is off
vB code is ON
Smilies are ON
[IMG] code is ON