Archive: StrRep outside of sections


StrRep outside of sections
I'm having trouble of using StrRep from StrFunc.nsh. What I wanted to do is converting a Version string from 1.2.3 to 1_2_3 to use in the OutFile Attribute, but it just won't work. Is there a way to use StrRep outside a section?
My code looks like this:


!define PRODUCT_VERSION "1.2.3"
!include "StrFunc.nsh"
${StrRep}

${StrRep} $0 "${PRODUCT_VERSION}" "." "_"
OutFile "${InstallerPath}\Setup\Application_$0_setup.exe"



TiA

Hi Veit,

Check this article http://nsis.sourceforge.net/Invoking_NSIS_run-time_commands_on_compile-time.
You should be able to perform what you desire.

Isawen


isawen:
Thanks for the reply. I was hoping for an easier solution.
I think I will the just define two Product Versions, one with dots and one with underscores.

Veit


You cannot use StrRep outside sections.
The easly way it will be for you to have two declarations of the version.