File: LaTeXFolder.nsh

package info (click to toggle)
lyx 2.0.3-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 96,552 kB
  • sloc: cpp: 388,556; python: 19,985; ansic: 9,725; sh: 5,696; makefile: 3,907; pascal: 1,388; objc: 985; perl: 319; yacc: 289; tcl: 163; xml: 23; sed: 16
file content (39 lines) | stat: -rw-r--r-- 1,610 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Function LatexFolder

  !insertmacro MUI_INSTALLOPTIONS_EXTRACT "io_latex.ini"
  # generate the installer page
  !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 == ""
   !insertmacro MUI_INSTALLOPTIONS_WRITE "io_latex.ini" "Field 3" "State" "C:\" # Does \" quote a "?
  ${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"
  !insertmacro MUI_INSTALLOPTIONS_READ "$State" "io_latex.ini" "Field 4" "State" # read checkbox if LaTeX should be used, "0" or not "1"
  ${if} $State == "1"
   StrCpy $LatexPath ""
   Goto ReadyFolder
  ${endif}
  !insertmacro MUI_INSTALLOPTIONS_READ "$LatexPath" "io_latex.ini" "Field 3" "State"
  # check if the latex.exe exists in the $LatexPath folder
  !insertmacro FileCheck $5 "latex.exe" "$LatexPath"
  ${if} $5 == "False"
   MessageBox MB_RETRYCANCEL "$(InvalidLaTeXFolder)" IDRETRY AgainFolder
   StrCpy $LatexPath ""
  ${endif}
  ReadyFolder:

FunctionEnd

Function LatexFolder_LeaveFunction

FunctionEnd