Спасибо, все работает. Если можно еще пару вопросов, просто хотел бы разобраться:
1.
PHP код:
что тут происходит?
2. Попробовал переделать функции таким образом:
PHP код:
var Component1Dir
var Component2Dir
var Component3Dir
var chek1
var chek2
var chek3
!insertmacro MUI_PAGE_COMPONENTS
!define MUI_PAGE_CUSTOMFUNCTION_PRE Component1DirPre
!define MUI_DIRECTORYPAGE_VARIABLE $Component1Dir
!insertmacro MUI_PAGE_DIRECTORY
!define MUI_PAGE_CUSTOMFUNCTION_PRE Component2DirPre
!define MUI_DIRECTORYPAGE_VARIABLE $Component2Dir
!insertmacro MUI_PAGE_DIRECTORY
!define MUI_PAGE_CUSTOMFUNCTION_PRE Component3DirPre
!define MUI_DIRECTORYPAGE_VARIABLE $Component3Dir
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
# The components (sections)
Section Component1
StrLen $0 "$MUI_PAGE_CUSTOMFUNCTION_PRE"
SetOutPath "$Component1Dir"
SectionEnd
Section Component2
# stuff here
SetOutPath "$Component2Dir"
SectionEnd
Section Component3
# stuff here
SetOutPath "$Component3Dir"
SectionEnd
Function Component1DirPre
SectionGetFlags ${Component1} $chek3
MessageBox MB_OK "$chek3"
${If} $chek3 == 0
Abort
${EndIf}
FunctionEnd
Function Component2DirPre
SectionGetFlags ${Component2} $chek1
MessageBox MB_OK "$chek1"
${If} $chek1 == 0
Abort
${EndIf}
FunctionEnd
Function Component3DirPre
SectionGetFlags ${Component3} $chek2
MessageBox MB_OK "$chek2"
${If} $chek2 == 0
Abort
${EndIf}
FunctionEnd
Значения chek1-chek3 получаю все время одинаковые, либо все 0, либо все 1, соответственно вывод страниц работает не правильно. Что не так?