Archive: File command with variables?


File command with variables?
  What is the easiest way to copy different files (with different names) depending on the installer language, e.g. copy readme files (in specific language) to installation folder depending on the installer language.

I could do it with a strcmp like:

StrCmp $LANGUAGE${LANG_ENGLISH} 0 +2

File "readme-en.rtf"
StrCmp $LANGUAGE ${LANG_GERMAN} 0 +2
File"readme-de.rtf" ...
But that's very complicated for many languages.

Why can't I just use LangStrings? Is there any other method doing it.

Thanks in advance
Konrad

Because LangStrings are runtime. Just wrap a nice macro around it, that should make it a line a file.


How should the makro look. Please give a hint!
Thanks
Konrad


hmm i have another not so nice solution:
copy all language-specific files to a new directory (before compiling):
.\langfiles\${LANGUAGE}\
e.g. the german files to: .\langfiles\1031\readme.rtf
the english: .\langfiles\1033\readme.rtf

then install at runtime the whole tree by
File /r /NONFATAL ".\langfiles\*.*"

then, also at runtime, copy only the right files to the right directory:
CopyFiles "$OUTDIR\langfiles\$LANGUAGE\*.*" "$OUTDIR\*.*"

at last, delete the other files:
RMDir /r "$OUTDIR\langfiles"

done.


You can copy MUI_DESCRIPTION_BEGIN, MUI_DESCRIPTION_TEXT and MUI_DESCRIPTION_END from the MUI and base it on them.


I thought that the MUI_DESCRIPTION makros are only for the descriptions in the component page. How can I use them for a readme file, which I want to copy to installation folder?


Every insertion of the MUI_DESCRIPTION_TEXT macro sets a description text for a specific component, just like you need a macro which will extract a file for a specific language.