|
|
#1 |
|
Junior Member
|
WinVer and variables troubles (+)
Good day everybody
![]() 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 PHP Code:
PHP Code:
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
|
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
You're getting confused with run-time and compile-time commands.
You need to do the checks inside your section, and jump over File calls for certain conditions. -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#3 |
|
Junior Member
|
Hmmm... Looks like I don't understand
![]() So, how to make it work globally, not only in one section... It would be excellent to get short example (or hint) of it
Last edited by Faith Healer; 25th March 2005 at 14:52. |
|
|
|
|
|
#4 |
|
Guest
Posts: n/a
|
but, Afrow UK, is it really no way to use runtime string substitution for this case?
|
|
|
|
#5 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
No, there is no way. The compiler can't guess every possible value the runtime variable might have and compress all of the matching files.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#6 |
|
Junior Member
|
kichik, but I've defined exactly:
PHP Code:
))so, $icons can have 2 values = "2k" or "xp", $unicode can have only 2 values too - "" (empty) and "_unicode". I totaly dislike old my code: 1st var: PHP Code:
PHP Code:
|
|
|
|
|
|
#7 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
No such feature will be added to NSIS. As I've said in the previous reply, the compiler can't guess which values the runtime variable will contain. For all it knows, the runtime variable can depend on the user's host name.
Best you can do is create a macro and insert it three times with different parameters. code: NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#8 |
|
Junior Member
|
sad then
![]() thank you very much for the macro, I'll try it
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|