Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 5th December 2007, 16:39   #1
Socrate
Junior Member
 
Join Date: Jul 2007
Posts: 11
StrCpy & File

Hello

I'm a newbie with NSIS. I try to put in the installer a specific file "readme_fr.txt". So I tried the following code :

StrCpy $R1 "readme"
StrCpy $R1 "_fr"
StrCpy $R1 ".txt"
DetailPrint "ici $R1"
File "$R1"

In the Output window :
DetailPrint: "ici $R1"
File: "$R1" -> no files found.

How can I proceed ? Thanks for your help.
Socrate is offline   Reply With Quote
Old 5th December 2007, 17:01   #2
Rafik
Junior Member
 
Join Date: Dec 2007
Posts: 6
Howdy
I believe you can put into installer only files which names are known at compilation time. File must be available on compilation machine.

so for example using defines is allright:

!define MY_FILE "readme_fr.txt"

File "${MY_FILE}"

because define value is known during compilation, but
passing an variable which value is not known until runtime is forbidden.

Greets
Rafał
Rafik is offline   Reply With Quote
Old 6th December 2007, 07:26   #3
Socrate
Junior Member
 
Join Date: Jul 2007
Posts: 11
Thanks Rafik for your quick reply.

I have another question about my problem. Now I want to put in my file the language. So I define the language like that :

LangString langue ${LANG_ENGLISH} "En"
LangString langue ${LANG_FRENCH} "Fr"

!define MY_FILE "readme_"
StrCpy MY_FILE $(langue)
StrCpy MY_FILE ".txt"
File "${MY_FILE}"

And I have an erreor : Usage: StrCpy $(user_var: output) str [maxlen] [startoffset]

Could you help me again please ?
Socrate 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