It doesn't look like the problem with Aspell binaries is going to be
solved before the release of LyX 1.4.0 for Windows, so here are the
installer scripts that provide all files for applications like LyX that
are statically linked to Aspell.
Note that the new aspell_dict script requires one additional parameter
(COPYRIGHTFILE) that points to the Copyright file of the dictionary.
This will allow the installer to show license information.
The aspell_data script will create an installer for the required data
files. See the script file for more information.
Please test.
Joost
/*
NSIS Script - Aspell 0.6 Dictionary Installer for Win32
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
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"
COPYRIGHTFILE - the file with the copyright information for the dictionary
OUTPUTFILE - output file (compiled installer)
Example of usage:
makensis.exe /DLANG=en /DINPUTDIR=C:\Aspell\lib\aspell-0.60
/DLISTDIR=C:\AspellDicsList
/DCOPYRIGHTFILE=C:\AspellDictSource\aspell6-en-6.0-0\Copyright
/DOUTPUTFILE=C:\AspellDics\aspell6-en.exe AspellDicts.nsi
*/
;--------------------------------
;Script macros
!macro redef name value
!ifdef "${name}"
!undef "${name}"
!endif
!define "${name}" "${value}"
!macroend
;--------------------------------
;Include Modern UI
!include "MUI.nsh"
;--------------------------------
;General
;Name and output file
Name "Aspell 0.6 Dictionary (Language: ${LANG})"
OutFile "${OUTPUTFILE}"
;Good compression
SetCompressor /SOLID lzma
;Default installation directory
InstallDir "C:\Aspell\lib\aspell-0.60"
;--------------------------------
;Pages
!insertmacro MUI_PAGE_LICENSE "${COPYRIGHTFILE}"
!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"
!insertmacro redef COMMAND "File"
!insertmacro redef 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
;--------------------------------
;Installer Functions
Function .onInit
;Try to find Aspell location
ReadRegStr $R0 HKLM "Software\Aspell" ""
StrCmp $R0 "" no_location
StrCpy $INSTDIR "$R0\lib\aspell-0.60"
no_location:
FunctionEnd
;--------------------------------
;Uninstaller Section
Section "Uninstall"
;Delete files
!insertmacro redef COMMAND "Delete"
!insertmacro redef 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
/*
NSIS Script - Aspell 0.60.4 Data Instaler for Win32
Written by Joost Verburg
Compile this script using makensis in a directory that contains an
installed version of Aspell 0.60.4
You should also copy the file COPYING to this directory
(for the license information).
Note that this script does not install Aspell binaries, it only
provides required data files for applications statically linked
to Aspell.
*/
;--------------------------------
;Files
!macro Files-Data
${COMMAND} "${DIRECTORY}ccpp.amf"
${COMMAND} "${DIRECTORY}comment.amf"
${COMMAND} "${DIRECTORY}cp1250.cmap"
${COMMAND} "${DIRECTORY}cp1250.cset"
${COMMAND} "${DIRECTORY}cp1251.cmap"
${COMMAND} "${DIRECTORY}cp1251.cset"
${COMMAND} "${DIRECTORY}cp1252.cmap"
${COMMAND} "${DIRECTORY}cp1252.cset"
${COMMAND} "${DIRECTORY}cp1253.cmap"
${COMMAND} "${DIRECTORY}cp1253.cset"
${COMMAND} "${DIRECTORY}cp1254.cmap"
${COMMAND} "${DIRECTORY}cp1254.cset"
${COMMAND} "${DIRECTORY}cp1255.cmap"
${COMMAND} "${DIRECTORY}cp1255.cset"
${COMMAND} "${DIRECTORY}cp1256.cmap"
${COMMAND} "${DIRECTORY}cp1256.cset"
${COMMAND} "${DIRECTORY}cp1257.cmap"
${COMMAND} "${DIRECTORY}cp1257.cset"
${COMMAND} "${DIRECTORY}cp1258.cmap"
${COMMAND} "${DIRECTORY}cp1258.cset"
${COMMAND} "${DIRECTORY}dvorak.kbd"
${COMMAND} "${DIRECTORY}email.amf"
${COMMAND} "${DIRECTORY}html.amf"
${COMMAND} "${DIRECTORY}iso-8859-1.cmap"
${COMMAND} "${DIRECTORY}iso-8859-1.cset"
${COMMAND} "${DIRECTORY}iso-8859-10.cmap"
${COMMAND} "${DIRECTORY}iso-8859-10.cset"
${COMMAND} "${DIRECTORY}iso-8859-11.cmap"
${COMMAND} "${DIRECTORY}iso-8859-11.cset"
${COMMAND} "${DIRECTORY}iso-8859-13.cmap"
${COMMAND} "${DIRECTORY}iso-8859-13.cset"
${COMMAND} "${DIRECTORY}iso-8859-14.cmap"
${COMMAND} "${DIRECTORY}iso-8859-14.cset"
${COMMAND} "${DIRECTORY}iso-8859-15.cmap"
${COMMAND} "${DIRECTORY}iso-8859-15.cset"
${COMMAND} "${DIRECTORY}iso-8859-16.cmap"
${COMMAND} "${DIRECTORY}iso-8859-16.cset"
${COMMAND} "${DIRECTORY}iso-8859-2.cmap"
${COMMAND} "${DIRECTORY}iso-8859-2.cset"
${COMMAND} "${DIRECTORY}iso-8859-3.cmap"
${COMMAND} "${DIRECTORY}iso-8859-3.cset"
${COMMAND} "${DIRECTORY}iso-8859-4.cmap"
${COMMAND} "${DIRECTORY}iso-8859-4.cset"
${COMMAND} "${DIRECTORY}iso-8859-5.cmap"
${COMMAND} "${DIRECTORY}iso-8859-5.cset"
${COMMAND} "${DIRECTORY}iso-8859-6.cmap"
${COMMAND} "${DIRECTORY}iso-8859-6.cset"
${COMMAND} "${DIRECTORY}iso-8859-7.cmap"
${COMMAND} "${DIRECTORY}iso-8859-7.cset"
${COMMAND} "${DIRECTORY}iso-8859-8.cmap"
${COMMAND} "${DIRECTORY}iso-8859-8.cset"
${COMMAND} "${DIRECTORY}iso-8859-9.cmap"
${COMMAND} "${DIRECTORY}iso-8859-9.cset"
${COMMAND} "${DIRECTORY}ispell"
${COMMAND} "${DIRECTORY}koi8-r.cmap"
${COMMAND} "${DIRECTORY}koi8-r.cset"
${COMMAND} "${DIRECTORY}koi8-u.cmap"
${COMMAND} "${DIRECTORY}koi8-u.cset"
${COMMAND} "${DIRECTORY}none.amf"
${COMMAND} "${DIRECTORY}nroff.amf"
${COMMAND} "${DIRECTORY}perl.amf"
${COMMAND} "${DIRECTORY}sgml.amf"
${COMMAND} "${DIRECTORY}spell"
${COMMAND} "${DIRECTORY}split.kbd"
${COMMAND} "${DIRECTORY}standard.kbd"
${COMMAND} "${DIRECTORY}tex.amf"
${COMMAND} "${DIRECTORY}texinfo.amf"
${COMMAND} "${DIRECTORY}url.amf"
!macroend
;--------------------------------
;Script macros
!macro redef name value
!ifdef "${name}"
!undef "${name}"
!endif
!define "${name}" "${value}"
!macroend
;--------------------------------
;Include Modern UI
!include "MUI.nsh"
;--------------------------------
;General
;Name and output file
Name "Aspell 0.60.4 Data"
OutFile "AspellData-0.60.4.exe"
;Good compression
SetCompressor /SOLID lzma
;Installation directory
InstallDir "C:\Aspell"
InstallDirRegKey HKLM "Software\Aspell" ""
;--------------------------------
;Pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "COPYING"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
;Installer Section
Section "Install Aspell Data"
;Install files
!insertmacro redef COMMAND "File"
SetOutPath "$INSTDIR\lib\aspell-0.60"
!insertmacro redef DIRECTORY "lib\aspell-0.60\"
!insertmacro Files-Data
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall-AspellData.exe"
;Uninstaller information
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Aspell"
"UninstallString" "$\"$INSTDIR\Uninstall-AspellData.exe$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Aspell"
"DisplayName" "Aspell 0.60.4 Data"
WriteRegDWORD HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\Aspell" "NoModify" 1
WriteRegDWORD HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\Aspell" "NoRepair" 1
;Directory information
WriteRegStr HKLM "Software\Aspell" "" "$INSTDIR"
SectionEnd
;--------------------------------
;Uninstaller Section
Section "Uninstall"
;Delete files
!insertmacro redef COMMAND "Delete"
!insertmacro redef DIRECTORY "$INSTDIR\lib\aspell-0.60\"
!insertmacro Files-Data
RMDir "$INSTDIR\lib\aspell-0.60"
RMDir "$INSTDIR\lib"
;Delete uninstaller
Delete "$INSTDIR\Uninstall-AspellData.exe"
SetOutPath $TEMP
RMDir "$INSTDIR"
;Remove uninstaller information
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Aspell"
;Remove directory information
DeleteRegKey HKLM "Software\Aspell"
SectionEnd