Old 26th February 2019, 04:37   #1
jkeller@opentext
Junior Member
 
Join Date: Feb 2019
Posts: 2
Using & in !define

I have a define that creates a string with an '&' in it....

!define IHUB_PRODUCT_NAME "OpenText Magellan BI & Reporting System Console 16.6"

but when I use this define it removes the '&' (see attachments).

OpenText Magellan BI Reporting System Console 16.6"

Why is this? and how can I get this to work?
Attached Thumbnails
Click image for larger version

Name:	err.gif
Views:	48
Size:	60.7 KB
ID:	54404   Click image for larger version

Name:	err.png
Views:	47
Size:	75.1 KB
ID:	54405  
jkeller@opentext is offline   Reply With Quote
Old 26th February 2019, 06:43   #2
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 881
If you have nsis 3, try this:

!define IHUB_PRODUCT_NAME "OpenText Magellan BI & Reporting System Console 16.6"
!define IHUB_PRODUCT_NAME_DA "OpenText Magellan BI && Reporting System Console 16.6"

Name "${IHUB_PRODUCT_NAME}" "${IHUB_PRODUCT_NAME_DA}"

Name has an optional parameter for using doubled ampersands.

Also, you can use defines within defines:

!define IHUB_PRODUCT_VERSION "16.6"
!define IHUB_PRODUCT_NAME "OpenText Magellan BI & Reporting System Console ${IHUB_PRODUCT_VERSION}"
!define IHUB_PRODUCT_NAME_DA "OpenText Magellan BI && Reporting System Console ${IHUB_PRODUCT_VERSION}"

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 26th February 2019, 13:33   #3
jkeller@opentext
Junior Member
 
Join Date: Feb 2019
Posts: 2
Unfortunatly we are using MakeNSIS v2.46.5-Unicode
jkeller@opentext is offline   Reply With Quote
Old 26th February 2019, 19:07   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,163
Quote:
Originally Posted by jkeller@opentext View Post
Unfortunatly we are using MakeNSIS v2.46.5-Unicode
Why?


Anyway, the 2 parameter version of Name exists in NSIS 2.4x as well IIRC.

IntOp $PostCount $PostCount + 1
Anders 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