Old 10th May 2002, 12:50   #1
oojah
Junior Member
 
Join Date: May 2002
Posts: 2
$Variables in File instruction?

Hi,

I am one of the developers of the windows port of an open source gaming zone (see http://ggz.sf.net ). We have been using nsis to distribute our paltry attempts at coding and are for the most part amazingly pleased with it.

We have a number of system files to be distributed and at the moment these are added with the instructions

SetOutputPath $SYSDIR
File "C:\windows\system\dllname.dll"
RegDLL $SYSDIR\dllname.dll

for example. This works without a problem for me when using Win98, but one of the other developers uses Win2k exclusively. For him to be able to compile the nsis file he must replace C:\windows\system with c:\winnt\system32. This is, I must admit, not the greatest of hardships but I imagine that it would be simple enough to add support for at least $SYSDIR to the File instruction so that we could then use

File "$SYSDIR\dllname.dll"

and it would compile on all versions of windows.

It occurs to me now that makensis may search for the file in all of %PATH% so

File "dllname.dll"

would be all that is needed. I don't have internet access until I'm back at work on monday so I'll leave this post and test it over the weekend ;)

I'm sure that I'm not the only one in this situation.

Regards,

Roger
oojah is offline   Reply With Quote
Old 10th May 2002, 14:27   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Hi Roger,

You can build an installer that will make the installer.
Its script should be:
PHP Code:
SilentInstall silent

Section 
"asd"
  
ReadRegStr $1 HKLM "Software\\NSIS" ""
  
Exec '"$1\\makensisw.exe" "$1\\makensis.exe" /CD "yourscript.nsi" /DLOCALSYSDIR=$SYSDIR'
SectionEnd 
In your installer you should use ${LOCALSYSDIR} to find your dll.

KiCHiK

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 10th May 2002, 15:32   #3
oojah
Junior Member
 
Join Date: May 2002
Posts: 2
Ah, very cunning.

Thanks,

Roger
oojah is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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