BarrelOfAGun
13th September 2007 22:26 UTC
Classic interface
Hi to everyone
Do you know the window where are the progress bar and where are written the extracted files?
I would want to make so that once completed the installation this window gets closed and an other appear where it asks if you want launch the application. All this happens with the modern interface, but not with that classic one.
this is my code
; Script generated by the HM NIS Edit Script Wizard.
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "MyApp"
!define PRODUCT_VERSION "2.05"
!define PRODUCT_PUBLISHER "Rand0m"
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Update.exe"
LoadLanguageFile "${NSISDIR}\Contrib\Language files\Italian.nlf"
InstallDir "$PROGRAMFILES\MyApp 2"
Icon "${NSISDIR}\Contrib\Graphics\Icons\classic-install.ico"
DirText "Il setup installerÃ_ $(^Name) nella seguente cartella.$\r$\n$\r$\nPer installare in una cartella differente, clicca Sfoglia and seleziona un'altra cartella."
ShowInstDetails show
XPStyle on
Section "SezionePrincipale" SEC01
SetOutPath "$INSTDIR"
SetOverwrite on
File "allmyfiles.png"
SectionEnd
Help me!
Anders
13th September 2007 23:16 UTC
the finish page is a custom page, use InstallOptions OR nsDialogs to create your own
BarrelOfAGun
14th September 2007 01:08 UTC
Once launch the commands !include nsDialogs.nsh which are the commands to create a custom dialog?
Sorry i'm a newbie ^^''
BarrelOfAGun
14th September 2007 17:24 UTC
Ok, is successful. Now how can I retrieve the state of the checkbox when page nsDialogsBlah gets closed?
!include nsDialogs.nsh
!include LogicLib.nsh
!define PRODUCT_NAME "MyApp"
!define PRODUCT_VERSION "2.05"
!define PRODUCT_PUBLISHER "Rand0m"
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Update.exe"
LoadLanguageFile "${NSISDIR}\Contrib\Language files\Italian.nlf"
InstallDir "$PROGRAMFILES\MyApp 2"
Icon "${NSISDIR}\Contrib\Graphics\Icons\classic-install.ico"
DirText "some text"
ShowInstDetails show
XPStyle on
Page license /ENABLECANCEL
Page directory /ENABLECANCEL
Page instfiles /ENABLECANCEL
Page custom nsDialogsBlah ValidateCustom /ENABLECANCEL
Var CHECKBOX
Var DIALOG
Function nsDialogsBlah
nsDialogs::Create /NOUNLOAD 1018
Pop $0
GetFunctionAddress $0 OnBack
nsDialogs::OnBack /NOUNLOAD $0
${NSD_CreateCheckbox} 0 -50 100% 8u 1 Test
Pop $CHECKBOX
GetFunctionAddress $0 OnClick
nsDialogs::OnClick /NOUNLOAD $0
nsDialogs::Show
FunctionEnd
Function OnBack
MessageBox MB_YESNO "are you sure?" IDYES +2
Abort
FunctionEnd
Function OnClick
MessageBox MB_OK "checkbox clicked"
FunctionEnd
Section "SezionePrincipale" SEC01
SetOutPath "$INSTDIR"
SetOverwrite on
File "allmyfiles.png"
SectionEnd
kichik
14th September 2007 18:51 UTC
Define a leave callback function for the custom page and send ${BM_GETSTATE} to the check box to get its state.
Function leave
SendMessage $CHECKBOX ${BM_GETSTATE} 0 0 $0
${If} $0 != 0
MessageBox MB_OK checked!
${EndIf}
FunctionEnd
BarrelOfAGun
15th September 2007 00:00 UTC
Thank you very much! ;)
A last thing: how I should do to mark the checkbox automatically?
kichik
15th September 2007 10:34 UTC
Send ${BM_SETSTATE}.
BarrelOfAGun
15th September 2007 13:43 UTC
SendMessage $CHECKBOX ${BM_SETSTATE} 1 1 $0
Is the right usage? The checkbox is unchecked but the application run same one!
kichik
15th September 2007 16:12 UTC
Actually, it should be BM_SETCHECK with BST_CHECKED.
SendMessage $CHECKBOX ${BM_SETCHECK} ${BST_CHECKED} 0
BarrelOfAGun
16th September 2007 02:25 UTC
Thank you very much! It's very kind from you!