Create a build that can install 2 different packages by user wish
I need suggestion about my technical problem:
I want to create a build that let to user to choose 1 of 2 options (packages) for installation, but
1. How can I add window with radio choice?
2. After user has chosen a package, how can I pass him to right installation path?
Now I have this version:
***********************************************************

!define TAKING "files_to_take"
!addincludedir "${TAKING}\inc"
!addincludedir "..\common_lib"

#Things you can change are here
!define VERSION "1.0"
!define PROD_VERSION "1.0"
!define MUTEX "NewSetup"
!define BRAND "Copyright Home Ltd."
!define COMPLETED "Setup has finished successfully."

!define RELEASEDIR "releases\"
!define IMAGES "${TAKING}\img"
!define FILEBASE "game"
!define TEMPFILES "${TAKING}\temp"
!define DISTRO1 "${TAKING}\folder1"
!define DISTRO2 "${TAKING}\folder2"
!define DEST "C:\game"
!define TESTFILE "game.exe"

#additional file version information here
!define Product_Name "Game"
!define Company_Name "Home"
!define File_Description "Setup Package v.${VERSION}"
SetCompressor /FINAL lzma # Set the compression type
#-------------Pre-Execution Includes------
# Support for "IF" "FOR" and other logic constructs
#-------------Imports from common functions
!define fnCheckForMutex
!define fnDumpLog
#!define fnGetFilePath
!include "LogicLib.nsh"
!include "common.nsh"
!include "Sections.nsh"
!include "WinMessages.nsh"
!include "UMUI.nsh"

#-------------Modern Interfce Settings-------------------
!define MUI_ABORTWARNING
!define MUI_CUSTOMFUNCTION_GUIINIT myGUIInit
#------Page Macros-----------------------------
!insertmacro MUI_PAGE_WELCOME
!define MUI_PAGE_CUSTOMFUNCTION_PRE prelic
!insertmacro MUI_PAGE_LICENSE "${TAKING}\inc\lic.txt"
!insertmacro MUI_PAGE_INSTFILES

!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French"

#---------------Global things---------------------
Name "${Product_Name} v.${PROD_VERSION}"
ShowInstDetails show
CompletedText "${COMPLETED}"
InstallDir "${DEST}"
BrandingText "${BRAND}"
OutFile ${RELEASEDIR}\${FILEBASE}_v${PROD_VERSION}_${VERSION}.exe

#----------------Version Information ------------------
VIAddVersionKey "ProductName" "${Product_Name} v.${PROD_VERSION}"
VIAddVersionKey "Comments" "${Comments}"
VIAddVersionKey "CompanyName" "${Company_Name}"
VIAddVersionKey "FileDescription" "${File_Description}"
VIAddVersionKey "FileVersion" "${VERSION}"
VIProductVersion "${PROD_VERSION}"
VIAddVersionKey "LegalCopyright" "Home"

#-----Global Variables----------------------
var setup_type
var instal_type
#----------Sections-------------------------

# The Main Section is here - this one is the 2nd executed
Section -First
DetailPrint "The setup type is $setup_type."
SetOutPath "${DEST}"
#${If} $setup_type == "fresh"
# DetailPrint "Executing fresh installation."
#SetOutPath "${DEST}"
# SetOverwrite on
# File /r ${DISTRO}\*.*
#${ElseIf} $setup_type == "upgrade"
#------- UPGRADE to a newer version of MATIC
# DetailPrint "Upgrading current version ..."
# SetOutPath ${DEST}
# SetOverwrite on
#File /r "${DISTRO}\*.exe"
# SetOverwrite off
# File /r "${DISTRO}\*.*"
# ClearErrors
#${EndIf}
WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd

#-----------FunishUp---------------
Section -Finishup

DetailPrint "**********Finishup section.***************"
DetailPrint "Create All those nice icons and shortcuts."

SetShellVarContext all
SetOutPath $INSTDIR

CreateDirectory "$SMPROGRAMS\game"
CreateShortCut "$SMPROGRAMS\game\game.lnk" "$INSTDIR\game.exe"
CreateShortCut "$SMPROGRAMS\game\UninstallerGame.lnk" "$INSTDIR\Uninstall.exe"
CreateShortCut "$DESKTOP\game.lnk" "$INSTDIR\game.exe"
DetailPrint "Dumping the log to file."
Push "$TEMP\${Product_Name}_Setup_v_${VERSION}_install.log"

Call DumpLog
SectionEnd
#---------Functions ---------------------

Section "Uninstall"
Delete $INSTDIR\Uninstall.exe ; delete self
Delete $INSTDIR\*.*
Delete $INSTDIR\folder1\*.*
Delete $INSTDIR\folder2\*.*
RMDir $INSTDIR\folder1
RMDir $INSTDIR\folder2
RMDir $INSTDIR
SectionEnd

#--------------------On Init------------------------------
Function .onInit
#Check for Multiple instances
#Put any other mutex checks or "... is running" tests
${MutexErr} "${MUTEX}" "This installation is already running." ""
${MutexErr} "MATIC.EXE" "Matic is running. Close it and run this setup again." ""
${If} ${FileExists} "${DEST}\${TESTFILE}"
StrCpy $setup_type "upgrade"
${Else}
StrCpy $setup_type "fresh"
${EndIf}

MessageBox MB_OK "Now choose one of 2 kinds of installation modes: YES=new1 or NO=new2"

MessageBox MB_YESNO "Again, YES=new1 or NO=new2. Choose right version!" IDYES new1
Exec :new2
new1:

InitPluginsDir
File "/oname=$PLUGINSDIR\button.bmp" \
"${NSISDIR}\Contrib\skinnedbutton\skins\ishield.bmp"
FunctionEnd

Function new1
${If} $setup_type == "fresh"
DetailPrint "Executing fresh installation."
SetOutPath "${DEST}"
SetOverwrite on
File /r ${DISTRO1}\*.*
${ElseIf} $setup_type == "upgrade"
DetailPrint "Upgrading current version ..."
SetOutPath ${DEST}
SetOverwrite on
File /r "${DISTRO1}\*.exe"
SetOverwrite off
File /r "${DISTRO1}\*.ini"
File /r "${DISTRO1}\*.udl"
ClearErrors
${EndIf}
FunctionEnd

Function new2
${If} $setup_type == "fresh"
DetailPrint "Executing fresh installation."
SetOutPath "${DEST}"
SetOverwrite on
File /r ${DISTRO2}\*.*
${ElseIf} $setup_type == "upgrade"
DetailPrint "Upgrading current version ..."
SetOutPath ${DEST}
SetOverwrite on
File /r "${DISTRO2}\*.exe"
SetOverwrite off
File /r "${DISTRO2}\*.ini"
File /r "${DISTRO2}\*.udl"
ClearErrors
${EndIf}
FunctionEnd

Function SaveLog
Push "$TEMP\${Product_Name}_Setup_v_${VERSION}_install.log"
Call DumpLog
FunctionEnd

Function .onInstFailed
MessageBox MB_OK "Try your installation again in next time."
Call SaveLog
FunctionEnd

Function myGUIInit
skinnedbutton::skinit /NOUNLOAD "$PLUGINSDIR\button.bmp"
Pop $0
StrCmp $0 "success" noerror
MessageBox MB_ICONEXCLAMATION|MB_OK "skinned button error: $0"
noerror:
FunctionEnd

Function prelic
${If} $setup_type != "fresh"
Abort
${Endif}
FunctionEnd

Function .onInstSuccess
MessageBox MB_YESNO "Congratulation, installation completed sucessfully. Do you want view readme?" IDNO NoReadme
Exec notepad.exe ; view readme or whatever, if you want.
NoReadme:
FunctionEnd
***********************************************************

Again, this version didn't work properly because it can't reference to nwe1 or new2 functions. Hope to your help!
PS: I just started to work with NSIS scripts