condition on which page to jump
Hi Guys,
I want the user to select two option on step1 page , if option1 is selected it jumps login1
and if option 2 selection it jumps to sign1 page.
I'm trying to find a good guide for a beginner, NSIS website is starting at the point that I cannot understand.
; Script generated by the HM NIS Edit Script Wizard.
BrandingText "Moontius Installer 0.91"
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Moontius"
!define PRODUCT_VERSION "0.91"
!define PRODUCT_PUBLISHER "UltraTone"
!define PRODUCT_WEB_SITE "http://www.moontius.com"
!include LogicLib.nsh
!include nsDialogs.nsh
;step1
Var Radio1_create_account
Var Radio2_existing_account
Var Dialog
Var Step1
;login1
Var label_login
Var text_login
Var label_password
Var text_password
Var label_email1
Var label_email2
Var text_email1
Var text_email2
Var label_password1
Var label_password2
Var text_password1
Var text_password2
Var hwnd
SetCompressor bzip2
; MUI 1.67 compatible ------
!include "MUI.nsh"
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
; Welcome page
;!insertmacro MUI_PAGE_WELCOME
; License page
;!define MUI_LICENSEPAGE_CHECKBOX
;!insertmacro MUI_PAGE_LICENSE "License.txt"
; Directory page
;!insertmacro MUI_PAGE_DIRECTORY
;step 1: select account / 1. create a new account / 2. already have account
Page custom step1
Page custom login1
Page custom sign1
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!define MUI_FINISHPAGE_RUN "Moontius_setup.exe"
!insertmacro MUI_PAGE_FINISH
; Language files
!insertmacro MUI_LANGUAGE "English"
; Reserve files
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
; MUI end ------
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Moontius_installer.exe"
InstallDir "$PROGRAMFILES\Moontius"
ShowInstDetails show
Function step1
        nsDialogs::Create 1018
        Pop $Dialog
        ${If} $Dialog == error
                Abort
        ${EndIf}
        ${NSD_CreateRadioButton}  50 50 150 20 "Create a new account..."
        Pop $Radio1_create_account
        ${NSD_OnClick} $Radio1_create_account Group1Radio1Click
        ${NSD_CreateRadioButton}  50 100 150 20 "Use my existing account."
        Pop $Radio2_existing_account
        nsDialogs::Show
FunctionEnd
Function Group1Radio1Click
        Push "exist"
FunctionEnd
Function login1
        ${If} Pop $0 == "exist"
        Abort
        ${EndIf}
        nsDialogs::Create 1018
        Pop $Dialog
        ${If} $Dialog == error
                Abort
        ${EndIf}
        ${NSD_CreateLabel} 3u 5u 50% 20 "Username (Global Phone Number):"
        Pop $label_login
        ${NSD_CreateText} 3u 20u 50% 20 ""
        Pop $text_login
        ${NSD_CreateLabel} 3u 35u 50% 20 "Password:"
        Pop $label_password
        ${NSD_CreatePassword} 3u 50u 50% 20 ""
        Pop $text_password
        nsDialogs::Show
FunctionEnd
Function sign1
        nsDialogs::Create 1018
        Pop $Dialog
        ${If} $Dialog == error
                Abort
        ${EndIf}
        ${NSD_CreateLabel} 3u 5u 50% 20 "Email address:"
        Pop $label_email1
        ${NSD_CreateText} 3u 20u 50% 20 ""
        Pop $text_email1
        
        ${NSD_CreateLabel} 3u 35u 50% 20 "Verify email address:"
        Pop $label_email2
        ${NSD_CreateText} 3u 50u 50% 20 ""
        Pop $text_email2
        
        ${NSD_CreateLabel} 3u 70u 100% 20 "Password: (min: 8 letter, max: 40 letter , must be mixed letter and numbers)"
        Pop $label_password1
        ${NSD_SetTextLimit} $label_password1 20
        ${NSD_CreateText} 3u 85u 50% 20 ""
        Pop $text_password1
        ${NSD_SetTextLimit} $text_password1 40
        ${NSD_CreateLabel} 3u 100u 50% 20 "Verify your password:"
        Pop $label_password2
        ${NSD_CreateText} 3u 115u 50% 20 ""
        Pop $text_password2
        nsDialogs::Show
FunctionEnd
Section
       DetailPrint "hello world"
       
SectionEnd
Section -AdditionalIcons
  SetOutPath $INSTDIR
  WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
  CreateDirectory "$SMPROGRAMS\Moontius"
  CreateShortCut "$SMPROGRAMS\Moontius\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
SectionEnd
Section -Post
SectionEnd