2007-02-08 21:09:30 +00:00
|
|
|
Function LatexFolder
|
|
|
|
|
|
|
|
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "io_latex.ini"
|
2007-05-01 17:55:54 +00:00
|
|
|
# generate the installer page
|
2007-02-08 21:09:30 +00:00
|
|
|
!insertmacro MUI_HEADER_TEXT "$(EnterLaTeXHeader1)" "$(EnterLaTeXHeader2)"
|
|
|
|
${if} $LatexName != ""
|
|
|
|
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_latex.ini" "Field 1" "Text" "$(EnterLaTeXFolder)"
|
|
|
|
${else}
|
|
|
|
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_latex.ini" "Field 1" "Text" "$(EnterLaTeXFolderNone)"
|
|
|
|
${endif}
|
|
|
|
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_latex.ini" "Field 2" "Text" "$(PathName)"
|
|
|
|
${if} $LatexPath == ""
|
2007-05-01 17:55:54 +00:00
|
|
|
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_latex.ini" "Field 3" "State" "C:\" # Does \" quote a "?
|
2007-02-08 21:09:30 +00:00
|
|
|
${else}
|
|
|
|
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_latex.ini" "Field 3" "State" "$LatexPath"
|
|
|
|
${endif}
|
|
|
|
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_latex.ini" "Field 4" "Text" "$(DontUseLaTeX)"
|
|
|
|
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_latex.ini" "Field 4" "State" "$State"
|
|
|
|
AgainFolder:
|
|
|
|
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "io_latex.ini"
|
2007-05-01 17:55:54 +00:00
|
|
|
!insertmacro MUI_INSTALLOPTIONS_READ "$State" "io_latex.ini" "Field 4" "State" # read checkbox if LaTeX should be used, "0" or not "1"
|
2007-02-08 21:09:30 +00:00
|
|
|
${if} $State == "1"
|
|
|
|
StrCpy $LatexPath ""
|
|
|
|
Goto ReadyFolder
|
|
|
|
${endif}
|
|
|
|
!insertmacro MUI_INSTALLOPTIONS_READ "$LatexPath" "io_latex.ini" "Field 3" "State"
|
2007-05-01 17:55:54 +00:00
|
|
|
# check if the latex.exe exists in the $LatexPath folder
|
2007-02-08 21:09:30 +00:00
|
|
|
!insertmacro FileCheck $5 "latex.exe" "$LatexPath"
|
|
|
|
${if} $5 == "False"
|
|
|
|
MessageBox MB_RETRYCANCEL "$(InvalidLaTeXFolder)" IDRETRY AgainFolder
|
|
|
|
StrCpy $LatexPath ""
|
|
|
|
${endif}
|
|
|
|
ReadyFolder:
|
|
|
|
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
Function LatexFolder_LeaveFunction
|
|
|
|
|
|
|
|
FunctionEnd
|