;NSIS Script For testsection

!define SF_SELECTED   1
!define SF_SUBSEC     2
!define SF_SUBSECEND  4
!define SF_BOLD       8
!define SF_RO         16
!define SF_EXPAND     32

!define SECTION_OFF   0xFFFFFFFE

;Title Of Your Application
Name "testsection"

;Output File Name
OutFile "section.exe"

;The Default Installation Directory
InstallDir "d:\test\testSection"

;The text to prompt the user to enter a directory
DirText "Please select the folder below"

;c ce qu'il va demander lorsqu'on choisi les composant à installer (pas de valeur on ne le propose pas)
ComponentText "This will install our software on your computer. Select which optional things you want installed."


ShowInstDetails show
Page components "" MAJSection
Page directory
Page instfiles


Function .onInit
  ;$PLUGINSDIR will automatically be removed when the installer closes
  InitPluginsDir
  File /oname=$PLUGINSDIR\vista.ini "..\ini_and_dll\vista.ini"

FunctionEnd
;*********************************************************************************************
Function MAJSection
StrCpy $1 2
push "full installation (recommended)"
Call Display_Section
push "PEAK_VIEWER_BAR"
StrCpy $1 4
Call Display_Section
push "METHOD_MANAGER_BAR"
StrCpy $1 5
Call Display_Section
push "UNIT_MANAGER_BAR"
StrCpy $1 6
Call Display_Section
push "SERVICE_GC_BAR"
StrCpy $1 7
Call Display_Section

push "Alarm Driver"
StrCpy $1 11
Call Display_Section

push "AO_DRIVER_BAR"
StrCpy $1 12
Call Display_Section

push "MJBUS_DRIVER_BAR"
StrCpy $1 13
Call Display_Section
  
push "MGS1_DRIVER_BAR"
StrCpy $1 14
Call Display_Section
SectionSetText 16 "Analyser installation"
 
FunctionEnd
;*********************************************************************************************
Function Display_Section
  pop $R5
  SectionSetText $1 "$R5"
FunctionEnd
;*********************************************************************************************
;*********************************************************************************************


section   
;Hiden section
sectionEnd
;*********************************************************************************************
subsection "My Soft"

Section ""    ;full Soft
SectionEnd   ; fin de section
;*********************************************************************************************
subsection "tools only"

section ""    ;tool 1

sectionEnd
;*********************************************************************************************
section  ""  ;tool 2

sectionEnd
;*********************************************************************************************
section ""   ; tool 3
AddSize 500
MessageBox MB_OK "j'install Unit Manager"
sectionEnd
;*********************************************************************************************
section ""   ; tool 4

sectionEnd
;*********************************************************************************************
subsectionend
subsectionend
;*********************************************************************************************
subsection "Drivers" ;on cré une arborecense

section "" ; Driver 1

sectionEnd
;*********************************************************************************************
section ""  ; Driver 2

sectionEnd
;*********************************************************************************************
section ""   ;Driver 3

sectionEnd
;*********************************************************************************************
section ""   ;Driver 4

sectionEnd
;*********************************************************************************************
SubSectionEnd  ; fin de l'arborecense
section "Config" ;Analyseur configuration

sectionEnd



