I'm using NSIS not for long time (less than 4 months), often read this NSIS-related forum, read docs + using search (maybe miss something), etc.
I use NSIS for my MirandaIM pack installer, which globaly (for full installation) detects Windows version and depending on it installs needed/proper files.
I decided to advance/modify/optimize code, but got some troubles which I can't resolve, feeling dumb 🙁
So, I have files:
tabsrmm.dll
tabsrmm_unicode.dll
tabsrmm_icons_faith_brq_2k.dll
tabsrmm_icons_faith_brq_xp.dll
so, I need to copy files:
* if WinVer is unknown then copy
tabsrmm.dll + tabsrmm_icons_faith_brq_2k.dll (but without "_2k" in the name)
* if WinVer is Win2k then copy
tabsrmm_unicode.dll + tabsrmm_icons_faith_brq_2k.dll (without "_2k" in the name)
if WinVer is WinXP/2k3 then copy
tabsrmm_unicode.dll + tabsrmm_icons_faith_brq_xp.dll (without "_xp" in the name)
my code is
Function .onInit
ReadRegStr $WinVer HKLM "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion" CurrentVersion
StrCmp $WinVer "5.0" win2k
StrCmp $WinVer "5.1" winxp
StrCmp $WinVer "5.2" winxp
StrCpy $icons "2k"
StrCpy $unicode ""
Goto endwinver
win2k:
StrCpy $icons "2k"
StrCpy $unicode "_unicode"
Goto endwinver
winxp:
StrCpy $icons "xp"
StrCpy $unicode "_unicode"
endwinver:
FunctionEnd Section "tabSRMM v0.9.9.9" SecTabSRMM
SectionIn 1 2 3
SetOverwrite on
SetOutPath "$INSTDIR\\Plugins"
File "..\\Plugins\\tabsrmm${unicode}.dll"
File /oname=tabsrmm_icons.dll "..\\Icons\\tabsrmm_icons\\tabsrmm_icons_faith_brq_${icons}.dll"
SectionEnd And it doesn't works - when I'm compilate this it complains:File: "..\Icons\tabsrmm_icons\tabsrmm_icons_faith_brq_${icons}.dll" -> no files found.
in fact that files
tabsrmm_icons_faith_brq_2k.dll
tabsrmm_icons_faith_brq_xp.dll
exist
Thank you for any help 🙂