]> git.lyx.org Git - lyx.git/blob - development/Win32/packaging/installer/components/reinstall.nsh
69ffbe4401960c26cbd4801739f5a698873199c2
[lyx.git] / development / Win32 / packaging / installer / components / reinstall.nsh
1 /*
2
3 Reinstall options
4
5 */
6
7 ;--------------------------------
8 ;Page functions
9
10 Function PageReinstall
11
12   ;Check whether this version is already installed
13
14   ReadRegStr $R0 SHELL_CONTEXT ${APP_REGKEY} "Version"
15
16   ${if} $R0 != "${APP_VERSION}"
17     Abort
18   ${endif}
19
20   !insertmacro MUI_HEADER_TEXT $(TEXT_REINSTALL_TITLE) $(TEXT_REINSTALL_SUBTITLE)
21   !insertmacro MUI_INSTALLOPTIONS_DISPLAY "reinstall.ini"
22
23 FunctionEnd
24
25 Function PageReinstallValidate
26
27   !insertmacro MUI_INSTALLOPTIONS_READ $R0 "reinstall.ini" "Field 2" "State"
28
29   ${if} $R0 == "1"
30     !insertmacro SelectSection ${SecCore}
31   ${else}
32     !insertmacro UnselectSection ${SecCore}
33   ${endif}
34
35 FunctionEnd