# This script contains the following functions:
#
-# - LaTeXCheck (check installed LaTeX-system), uses:
+# - LaTeXCheck (check installed LaTeX-system),
+# (only used by Small and Complete installer), uses:
# StrPointer
# StrPoint
# RevStrPointer
# RevStrPoint
#
-# - un.DelAppPathSub and UnAppPreSuff, (delete the folder ~\Documents and Settings\username\Application Data\LyX for all users), uses:
+# - un.DelAppPathSub and UnAppPreSuff,
+# (delete the folder ~\Documents and Settings\username\Application Data\LyX for all users), uses:
# un.GetParentA
# un.GetUsers
# un.StrPoint
# StrPoint
# UnAppPreSuff
#
-# - CreateAppPathSub and AppPreSuff, (creates the folder ~\Documents and Settings\username\Application Data\LyX for all users), uses:
+# - CreateAppPathSub and AppPreSuff,
+# (creates the folder ~\Documents and Settings\username\Application Data\LyX for all users),
+# (only used by Small and Complete installer), uses:
# GetParentA
# GetUsers
# StrPointer
#--------------------------------
-Function RevStrPoint
- !insertmacro RevStrPointer $String $Search $Pointer
-FunctionEnd
+!if ${INSTALLER_TYPE} == "NotUpdate" # only for Small and Complete installer
+
+ Function RevStrPoint
+ !insertmacro RevStrPointer $String $Search $Pointer
+ FunctionEnd
+
+!endif # endif ${INSTALLER_TYPE} == "NotUpdate"
#--------------------------------
#--------------------------------
-Function CreateAppPathSub
+!if ${INSTALLER_TYPE} == "NotUpdate" # only for Small and Complete installer
+
+ Function CreateAppPathSub
# creates a subfolder of the APPDATA path for all users
# get folder names
CopyFiles "$INSTDIR\Resources\session" "$AppPath"
Delete "$INSTDIR\Resources\session" # delete the session file in the INSTDIR because it is unneeded there
-FunctionEnd
+ FunctionEnd
+
+!endif # endif ${INSTALLER_TYPE} == "NotUpdate"
#--------------------------------
-Function ReplaceLineContent
+!if ${INSTALLER_TYPE} == "Update" # only for Update installer
+
+ Function ReplaceLineContent
# replaces "$OldString" with "LyX $NewString"
- ${WordReplace} '$R9' "$OldString" "$NewString" "+" '$R9' # macro from WordFunc.nsh
- Push $0
+ ${WordReplace} '$R9' "$OldString" "$NewString" "+" '$R9' # macro from WordFunc.nsh
+ Push $0
-FunctionEnd
+ FunctionEnd
+
+!endif # endif ${INSTALLER_TYPE} == "Update"
#--------------------------------
-Function CheckAppPathPreferences
+!if ${INSTALLER_TYPE} == "Update" # only for Update installer
+
+ Function CheckAppPathPreferences
# replaces a string "$OldString" with "$NewString" in a file "$FileName"
# get folder names
${LineFind} "$AppPath\$FileName" "" "1:-1" "ReplaceLineContent"
doneB:
-FunctionEnd
+ FunctionEnd
+
+!endif # endif ${INSTALLER_TYPE} == "Update"
#--------------------------------
#------------------------------------------
-Function LaTeXCheck
+!if ${INSTALLER_TYPE} == "NotUpdate" # only for Small and Complete installer
+
+ Function LaTeXCheck
# searches the string "$Search" in the string "$String" and extracts the path around it
# the extracted path is checked if the file "latex.exe" is in it
Goto StartCheck
${endif}
-FunctionEnd
+ FunctionEnd
+
+!endif # endif ${INSTALLER_TYPE} == "NotUpdate"