Angus Leeming wrote:
Just to be certain I understand, given a directory, so: (..)
Right? If that's the case then the command below would look in directory 'de'
and output a file 'ls_de' containing all the files in 'de':
ls de | sed 's/^/${COMMAND} "${DIRECTORY}/;s/$/"/' > ls_de
Exactly what I mean. Attached is a new script (untested) that takes an
extra define LISTDIR with the directory that contains the file
ls_langcode (for example, ls_de) in this format (see the top of the
script for more info).
If you update your shell script to generate the list files and call
makensis this should all work. (Maybe there is still a little typo in my
script but I need your shell script to test.)
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
;--------------------------------
;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})"
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