Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 27th September 2002, 17:57   #1
jangogo
Junior Member
 
Join Date: Sep 2002
Posts: 15
Unhappy Why? a bug?

I use a micro like this:
!insertmacro UpgradeDLL "dao360.dll" "$PROGRAMFILES\Common Files\Microsoft Shared\DAO\dao360.dll"

the micro like this:
!macro UpgradeDLL DLL_NAME DLL_LOCATION
...
GetDLLVersion ${DLL_LOCATION} $3 $4
.......
!endmacro

when I compile,error comes:
GetDLLVersion expects 3 parameters, got 5.
Usage: GetDLLVersion filename $(user_var: high output) $(user_var: low output)
Error in macro UpgradeDLL on macroline 8

error cause because the filepath string "...dao360.dll" has two space.
but if I don't call GetDLLVersion in micro, everything is OK!
or if I remove the two space in DLL_LOCATION , everything is OK,too!

how I can run:
!insertmacro UpgradeDLL "dao360.dll" "$PROGRAMFILES\Common Files\Microsoft Shared\DAO\dao360.dll"
with no error?
pls! I need your help!
Attached Files
File Type: txt upgradedll.nsh.txt (1,023 Bytes, 81 views)
jangogo is offline   Reply With Quote
Old 27th September 2002, 18:32   #2
dselkirk
Senior Member
 
Join Date: Aug 2002
Posts: 118
try this

GetDLLVersion "${DLL_LOCATION}" $3 $4
dselkirk is offline   Reply With Quote
Old 28th September 2002, 03:09   #3
jangogo
Junior Member
 
Join Date: Sep 2002
Posts: 15
yes,It works but....

I try and it works.
but the Script Cause compile error in :
File /oname=${DLL_LOCATION} ${DLL_NAME}
Usage: File ([/a] [/r] filespec [...]|/oname=outfile one_file_only)
Error in macro UpgradeDLL on macroline 16

So I change it to:
File /oname="${DLL_LOCATION}" ${DLL_NAME}
it still the same error.

So why this comes?and How I can do? those error always in micro.
help me,pls!
jangogo is offline   Reply With Quote
Old 28th September 2002, 09:03   #4
eccles
NSIS Dev
 
eccles's Avatar
 
Join Date: Sep 2001
Location: Leicester, UK
Posts: 193
This should do it:

File "/oname=${DLL_LOCATION}" ${DLL_NAME}

When a parameter may contain spaces, the quotes have to be placed around the whole parameter, not just the filename.
eccles is offline   Reply With Quote
Old 28th September 2002, 14:20   #5
jangogo
Junior Member
 
Join Date: Sep 2002
Posts: 15
thx all!

I'm using it to handle my VB app installation. I works well except the .tlb file register. if this problem is OK, this setup tool will be perfect!
jangogo is offline   Reply With Quote
Old 28th September 2002, 20:09   #6
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
That's normal, you don't have to register type libraries.
Joost Verburg is offline   Reply With Quote
Old 29th September 2002, 14:56   #7
Koen van de Sande
Senior Member
 
Join Date: Mar 2001
Location: Holland
Posts: 269
This is my personal version of the UpgradeDLL macro... I made it at the same time as Kypec. However, it does not need any additional plugins like his version.
Hope you like it.
Attached Files
File Type: txt properupgrade.nsh.txt (2.7 KB, 87 views)

Koen van de Sande
Van de Sande Productions
TibEd.net | VPatch
Koen van de Sande is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump