Winamp & Shoutcast Forums

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

oborstad 1st February 2006 00:03

ifdef and langstrings
 
Hi All,

Is there a way to tell if a string has been defined for a language? I'm trying to to something like:


test.nsh:
code:
!ifndef $(error_message)
LangString error_message ${LANG_ENGLISH} "My generic error message"
!endif

function test
MessageBox MB_OK ${error_message
functionend


main.nsi
code:
!include test.nsh
LangString error_message ${LANG_ENGLISH} "Override message"
...
call test


but anything I've come up with so far only results in either a warning message in the compiler of:
LangString "..." set multiple times for 1033, wasting space (...)

when I test it out, it seems to work as long as I put the message I want before the include (since it ignores the second one)... but I would rather not see the warning. I've looked through the source for NSIS and through the examples, and plugins, etc... but haven't really found anything like this...

Thanks!

Owen Borstad

(long time lurker and quite adept, but currently stumped on this)

Afrow UK 1st February 2006 09:16

I'm pretty sure that isn't possible. You just need to !define a constant of the same name when using LangString.

-Stu


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

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.