mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-28 23:15:19 +00:00
b505d06116
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39495 a592a061-630c-0410-9148-cb99ea01b6c8
40 lines
1.6 KiB
Plaintext
40 lines
1.6 KiB
Plaintext
Function LatexFolder
|
|
|
|
!insertmacro INSTALLOPTIONS_EXTRACT "gui\io_latex.ini"
|
|
# generate the installer page
|
|
!insertmacro MUI_HEADER_TEXT "$(EnterLaTeXHeader1)" "$(EnterLaTeXHeader2)"
|
|
${if} $LatexName != ""
|
|
!insertmacro INSTALLOPTIONS_WRITE "gui\io_latex.ini" "Field 1" "Text" "$(EnterLaTeXFolder)"
|
|
${else}
|
|
!insertmacro INSTALLOPTIONS_WRITE "gui\io_latex.ini" "Field 1" "Text" "$(EnterLaTeXFolderNone)"
|
|
${endif}
|
|
!insertmacro INSTALLOPTIONS_WRITE "gui\io_latex.ini" "Field 2" "Text" "$(PathName)"
|
|
${if} $PathLaTeX == ""
|
|
!insertmacro INSTALLOPTIONS_WRITE "gui\io_latex.ini" "Field 3" "State" "C:\" # Does \" quote a "?
|
|
${else}
|
|
!insertmacro INSTALLOPTIONS_WRITE "gui\io_latex.ini" "Field 3" "State" "$PathLaTeX"
|
|
${endif}
|
|
!insertmacro INSTALLOPTIONS_WRITE "gui\io_latex.ini" "Field 4" "Text" "$(DontUseLaTeX)"
|
|
!insertmacro INSTALLOPTIONS_WRITE "gui\io_latex.ini" "Field 4" "State" "$State"
|
|
AgainFolder:
|
|
!insertmacro INSTALLOPTIONS_DISPLAY "gui\io_latex.ini"
|
|
!insertmacro INSTALLOPTIONS_READ "$State" "gui\io_latex.ini" "Field 4" "State" # read checkbox if LaTeX should be used, "0" or not "1"
|
|
${if} $State == "1"
|
|
StrCpy $PathLaTeX ""
|
|
Goto ReadyFolder
|
|
${endif}
|
|
!insertmacro INSTALLOPTIONS_READ "$PathLaTeX" "gui\io_latex.ini" "Field 3" "State"
|
|
# check if the latex.exe exists in the $PathLaTeX folder
|
|
!insertmacro FileCheck $5 "latex.exe" "$PathLaTeX"
|
|
${if} $5 == "False"
|
|
MessageBox MB_RETRYCANCEL "$(InvalidLaTeXFolder)" IDRETRY AgainFolder
|
|
StrCpy $PathLaTeX ""
|
|
${endif}
|
|
ReadyFolder:
|
|
|
|
FunctionEnd
|
|
|
|
Function LatexFolder_LeaveFunction
|
|
|
|
FunctionEnd
|