File /r "${PRODUCT_SOURCEDIR}\${AspellInstall}"
# copy the files and register Aspell
CopyFiles "$INSTDIR\${AspellInstall}" "$APPDATA"
+ # finally copy the Aspell personal files to the Application folder of all users
+ # this assures that every user can have its own word list
+ StrCpy $AppSubfolder "Aspell"
+ StrCpy $AppFiles "$APPDATA\Aspell\Personal"
+ ${if} $ProductRootKey == "HKLM" # if install for all users
+ Call CreateAppPathSub # function from LyXUtils.nsh
+ ${else}
+ CreateDirectory "$APPDATA\$AppSubfolder"
+ CopyFiles "$AppFiles" "$APPDATA\$AppSubfolder"
+ ${endif}
WriteRegStr HKLM "SOFTWARE\Aspell" "Base Path" "${AspellDir}"
WriteRegStr HKLM "SOFTWARE\Aspell" "Dictionary Path" "${AspellDictPath}"
# show message about Aspell dictionaries
# the code rule to display the correct message:
- # - when the englisch dictionary is already installed or couldn't be installed -> set a "1"
+ # - when the English dictionary is already installed or couldn't be installed -> set a "1"
# - when the dictionary of the chosen LyX menu language is already installed or couldn't be installed -> set a "2"
# - when the dictionary of the Windows system language is already installed or couldn't be installed -> set a "3"
# - when the dictionary of the chosen LyX menu language is equal to the dictionary of the Windows system language -> set a "4"
DownloadNow:
ExecShell "open" "${AspellLocationExact}"
DownloadLater:
-
+
+ # when something was installed, copy the Aspell dictionary files to the Application
+ # folder of all users this assures that every user can have its own word list
+ ${if} $AspellInstallYes != "321"
+ ${andif} $AspellInstallYes != "421"
+ StrCpy $AppSubfolder "Aspell"
+ StrCpy $AppFiles "$APPDATA\Aspell\Dictionaries"
+ Call CreateAppPathSub # function from LyXUtils.nsh
+ ${endif}
+
FunctionEnd
!endif # endif ${INSTALLER_TYPE} == "NotUpdate"
ReadRegStr $1 SHCTX "Software\Aspell" "Base Path"
# delete Aspells' install folder
RMDir /r $1
+ # remove LyX's config files
+ StrCpy $AppSubfolder "Aspell"
+ Call un.DelAppPathSub # function from LyXUtils.nsh
# unregister Aspell and its dictionaries
DeleteRegKey SHCTX "Software\Aspell"
DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\Aspell"