Имя пользователя:
Пароль:
 

Показать сообщение отдельно

Новый участник


Сообщения: 21
Благодарности: 0

Профиль | Отправить PM | Цитировать


K.A.V, нужно чтобы для каждого выбранного компонента пользователь мог сам выбрать путь, просто записать его в скрипте нельзя.
MKN, я так понял это примерно то что нужно, только код приведенный там не компилируется.
PHP код: Выделить весь код

# variables to hold the installation directories 
var Component1Dir 
var Component2Dir 
var Component3Dir 

# components page 
!insertmacro MUI_PAGE_COMPONENTS 

# multiple directory pages 
!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 

# The file installation 'page' 
!insertmacro MUI_PAGE_INSTFILES 

# The components (sections) 
Section Component1 
  
# stuff here. Be sure to use the directory variable corresponding 
  # to the directory page used. In this case, for example: 
  
SetOutPath "$Component1Dir" 
    
File "somefile" 
    
File "someotherfile" 
SectionEnd 

Section Component2 
  
# stuff here 
  
SetOutPath "$Component2Dir" 
    
File "somefile" 
    
File "someotherfile" 
SectionEnd 

Section Component3 
  
# stuff here 
  
SetOutPath "$Component3Dir" 
    
File "somefile" 
    
File "someotherfile" 
SectionEnd 

# Functions run before showing each directory page. 
# Here we'll call Abort to stop the page from showing up 
#  if the user didn't select the component 
Function Component1DirPre 
  
# Get the flags for the section 
  
SectionGetFlags ${Component1$R0 
  
# Binary 'and' with value '1' (selected or not) 
  
IntOp $R0 $R0 
  
# If it is not selected 
  
IntCmp $R0 0 0 +
    
# Then Abort. This will prevent the page from showing up 
    
Abort 
  
# Otherwise, continue 
FunctionEnd 

Function Component2DirPre 
  SectionGetFlags 
${Component2$R0 
  IntOp $R0 $R0 

  IntCmp $R0 0 0 
+
    Abort 
FunctionEnd 

Function Component3DirPre 
  SectionGetFlags 
${Component3$R0 
  IntOp $R0 $R0 

  IntCmp $R0 0 0 
+
    Abort 
FunctionEnd 

Error in macro MUI_PAGE_DIRECTORY on line 21

Отправлено: 12:45, 05-02-2014 | #1002