Old 2nd October 2019, 08:42   #1
bovirus
Junior Member
 
Join Date: Jul 2019
Posts: 8
Add variable (ex. program version) to use in all language

@Anders

Hello.

I'm an installer script for a program
I want toa dd a variable that I change every time I will release a new program version to change the relative strings in the installer (ex Window caption), etc

Langstring examples are

LangString LSTR_0 1033 " "
LangString LSTR_1 1033 "$(LSTR_2) Setup"
LangString LSTR_2 1033 "Test application (x64) Professional"

Of course I can create a string with version for each language like

LangString LSTR_0 1033 " "
LangString LSTR_1 1033 "$(LSTR_2) Setup"
LangString LSTR_2 1033 "Test application (x64) Professional v. $(LSTR_3)"
LangString LSTR_3 1033 "2.06"

but I would do one times and sue it for all languages instead one line for each language,

How can do that?
For the same reason I think to create also variables for

"x64" (or "x86")
"Professional" (or "Free")

that are ripetitive things.

Thanks.
bovirus is offline   Reply With Quote
Old 2nd October 2019, 09:31   #2
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 882
For strings that remain the same across languages, you can use a define instead.

Oh, and this won't work because it's out of order (LSTR_2 is used before it's initialized):

LangString LSTR_1 1033 "$(LSTR_2) Setup"
LangString LSTR_2 1033 "Test application (x64) Professional"

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 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