Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Outfile and capitals (http://forums.winamp.com/showthread.php?t=247412)

shaunb 30th May 2006 11:29

Outfile and capitals
 
odd one, When I specify a variable to be used for an Outfile name, it doesnt preserve the caps.

example,

I have a var called $blech which contains BLECH

if I do

Outfile "Setup $blech.exe"

I get, as a resulting filename:

"Setup blech.exe"

and not

"Setup BLECH.exe"

of course, this works fine

Outfile "Setup BLECH.exe"

returns

"Setup BLECH.exe"

:)

am I being stupid? its just I need the company brand to be in capitals. of course hardcoding it myself works, but that negates the whole point of the variable substitution.

thanks!

Afrow UK 30th May 2006 11:42

Yes you're being stupid lol.
OutFile is a compile-time instruction - it writes the setup file onto your computer. Variables such as $blech are for run time use... i.e. when the setup is run on the users' computer.
Naturally you can't use a run time variable at compile time - this is impossible!

Why is it coming out as blech.exe? Well it's taking the $blech variable and trimming the $ from the front (invalid path character) and using that as the file name.

-Stu

shaunb 30th May 2006 11:45

ah.. : )

"Why is it coming out as blech.exe? Well it's taking the $blech variable and trimming the $ from the front (invalid path character) and using that as the file name."


I dont think so, this was merely an example and I have no $blech variable with BLECH contained, so it can't be just chopping the dollar off.

Its a define actually, and not a variable if that makes any difference.

shaunb 30th May 2006 11:52

??? I've changed nothing but now it works.

cool.

*looks around to see where the fairy went*

*puzzled look*

Afrow UK 30th May 2006 11:54

You should have said it wasn't a variable.
!defines use curly braces -> ${blech}

-Stu

shaunb 30th May 2006 11:56

yeah sorry about that, only noticed after, yeah it does use braces, definately a define.

I can't explain how it just switched from not being uppercase, to being uppercase though. I havent changed it myself.

its the same code as when I posted this thread.

world. .. ignore me

:igor:

Afrow UK 30th May 2006 11:58

Never mind then lol

$ isn't an invalid path character either :D

-Stu

shaunb 30th May 2006 12:05

true, I'm lost now, hah

anyway whats important is that it works.

you're saying its just chopping the dollar off right?

so if its a define, where do the curly braces go?

I'm pretty sure its not just dumping the define name or dropping the $ or whatever.

ah well

Afrow UK 30th May 2006 12:07

No it isn't.
I'm not sure what was wrong really with the details that you gave (mind you they were more unhelpful really!)

!define MyDefine "blah"
OutFile "${MyDefine}.exe"

-Stu

shaunb 30th May 2006 12:12

yes, my example was .. ... -=useless=-

sorry about that hah

The example you show there, thats the code I had before, when I made this thread,.. I changed it so it was hardcoded, obviously it worked then, but wasnt suitable, so I added the define again, and now its working with caps. weird.

anyway, now I've made myself appear a complete lemon to everyone I'd better continue with my project.. .. lol

:(

JasonFriday13 30th May 2006 22:02

shaunb: Since you had a dollar chopped off, here is another one.
$1.00
Go buy a chocolate blah. :D


All times are GMT. The time now is 17:51.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.