Angus Leeming wrote:
So you're not interested in fixing things? I guess I misunderstood you.
I mean that there is no point in a workaround (putting dictionaries in
the LyX directory) if it's not easier than a good solution (making it a
configuration option).
> http://wiki.lyx.org/Windows/Aspell6
Thanks for building all 80 Aspell dictionary installers, but it was
maybe a better idea to test one first (as I said in my previous post the
installer script was untested).
When testing your installers I noticed that the uninstaller user
interface is broken, this should be fixed in the attached script.
Hopefully uploading did not take you too much time.
Joost
/*
NSIS script for Aspell dictionaries
Written by Joost Verburg
To be used with the shell script of Angus Leeming
Required defines:
LANG - language code
INPUTDIR - directory with compiled dictionary files for the language
OUTPUTDIR - directory to write the compiled installer
LISTDIR - directory that contains the file ls_langcode (for example, ls_en)
with the dictionary files to be installed. The format should be:
${COMMAND} "${DIRECTORY}filename"
Example of usage:
makensis.exe /DLANG=en /DINPUTDIR=C:\Aspell\lib\aspell-0.60
/DOUTPUTDIR=C:\AspellDics /DLISTDIR=C:\AspellDicsList AspellDicts.nsi
*/
;--------------------------------
;Include Modern UI
!include "MUI.nsh"
;--------------------------------
;General
;Name and output file
Name "Aspell 0.6 Dictionary (Language: ${LANG})"
OutFile "${OUTPUTDIR}\aspell6-${LANG}.exe"
;Good compression
SetCompressor /SOLID lzma
;Default installation directory (the location where LyX expects Aspell)
InstallDir "C:\Aspell\lib\aspell-0.60"
;--------------------------------
;Pages
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
;--------------------------------
;Languages
;Probably no need to add multiple languages for such a simple thing
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
;Installer Section
Section "Install Dictionary"
;Install files
SetOutPath "$INSTDIR"
!define COMMAND "File"
!define DIRECTORY "${INPUTDIR}\"
!include "${LISTDIR}\ls_${LANG}"
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall-${LANG}.exe"
;Uninstaller information
WriteRegStr HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\Aspell6-Dictionary-${LANG}"
"UninstallString" "$\"$INSTDIR\Uninstall-${LANG}.exe$\""
WriteRegStr HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\Aspell6-Dictionary-${LANG}"
"DisplayName" "Aspell 0.6 Dictionary (Language: ${LANG})"
WriteRegDWORD HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\Aspell6-Dictionary-${LANG}"
"NoModify" 1
WriteRegDWORD HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\Aspell6-Dictionary-${LANG}"
"NoRepair" 1
SectionEnd
;--------------------------------
;Uninstaller Section
Section "Uninstall"
;Delete files
!undef COMMAND
!undef DIRECTORY
!define COMMAND "Delete"
!define DIRECTORY "$INSTDIR\"
!include "${LISTDIR}\ls_${LANG}"
;Delete uninstaller
Delete "$INSTDIR\Uninstall-${LANG}.exe"
;Remove uninstaller information
DeleteRegKey HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\Aspell6-Dictionary-${LANG}"
SectionEnd