Freedon Nadd
8th January 2011 18:27 UTC
Multiple Language And InstallDir
Hi all,
I`m trying to create a setup with multiple languages and I it was pretty easy.
Now I`m trying to set the InstallDir or $INSTDIR depending on the selected language.
in the Function .onInit
I force the user to choose the install language but doing a
StrCpy $INSTDIR "$PROGRAMFILES\${PRODUCT_PROGRAMFILES_PATH}\${RESOURCES_PRODUCT_NAME}"
doesn't seem to work.
What should I do?
Thanks for your help.
Freedon Nadd
9th January 2011 01:22 UTC
Forgot to mention
I forgot to mention that the ${RESOURCES_PRODUCT_NAME} is a LangString in a .nsh File.
Afrow UK
9th January 2011 11:15 UTC
No it's not. $(RESOURCES_PRODUCT_NAME) might be though.
Stu
Freedon Nadd
9th January 2011 16:25 UTC
Do you have a sample of multiple language and installDir, maybe it`s something else I`m doing wrong?
Thanks for your help.
LoRd_MuldeR
9th January 2011 19:34 UTC
Like this?
LangString RESOURCES_PRODUCT_NAME ${LANG_ENGLISH} "Fish and Chips"
LangString RESOURCES_PRODUCT_NAME ${LANG_GERMAN} "Wurst und Sauerkraut"
[...]
InstallDir "$PROGRAMFILES\$(RESOURCES_PRODUCT_NAME)"
But be sure you don't load (overwrite) the InstallDir from a previous install via InstallDirRegKey...
[EDIT]
Hmm, try adding this to the above:
Function .onGuiInit
StrCpy $INSTDIR "$PROGRAMFILES\$(RESOURCES_PRODUCT_NAME)"
FunctionEnd