Old 28th August 2014, 13:54   #1
hanen.jomaa
Junior Member
 
Join Date: Mar 2013
Posts: 23
add variable in to main section

Hi,

I have a problem in my Section main,

i want adding a $var in to the path File to copy when install,

I have File /nonfatal /r "${varDir}\${TYPE}\test\$pathspecific"

but the script can't read the value of $pathspecific, how Can I specify this value please?

please can you help me ?
hanen.jomaa is offline   Reply With Quote
Old 28th August 2014, 16:06   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,316
This has been asked a million times before.

$variables are used at run-time on the end-users machine, you can only use ${defines} with the File instruction since it needs to find the file on the machine where makensis is running.

You can use SetOutPath "$instdir\$pathspecific" etc. to control where a file is written...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 28th August 2014, 16:11   #3
hanen.jomaa
Junior Member
 
Join Date: Mar 2013
Posts: 23
when i Use SetOutPath i will create my installer diretory

but my problem is how specify the path file to copy in my installer directory
hanen.jomaa is offline   Reply With Quote
Old 28th August 2014, 16:59   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,316
SetOutPath $instdir
File "abc.ext"
SetOutPath "$instdir\foo\$bar"
File "xyz.ext"

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 29th August 2014, 19:31   #5
Collector9999
Junior Member
 
Join Date: Mar 2009
Posts: 41
Have you even populated your $pathspecific before that point?
Collector9999 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