Joel
14th February 2003 22:57 UTC
!Macros hate labels?
trying this:
!macro BuscarArch MiArch Seccion FlagNoArch FlagSiArch
ifFileExists $SYSDIR\${MiArch} yay
MessageBox MB_OK|MB_ICONEXCLAMATION "No se encontrĂ³ el archivo..."
SectionSetFlags ${Seccion} ${FlagNoArch}
yay:
SectionSetFlags ${Seccion} ${FlagSiArch}
!macroend
The macro doesn't read the part of yay: .....
Is this normal?
:blah:
kichik
14th February 2003 23:15 UTC
What do you mean by doesn't read? Does it not execute it?
I'll assume that si is yes and no is, well, no. According to this code and my poor knowldge of Spanish, ${Seccion} will always be selected because you don't skip the last line if the one before was executed. Is this the problem? Or does it completely ignore what comes after the label? If the second case is what happens to you then try to replace the last line with !error "skip me?" and see if you get the error.
Joel
14th February 2003 23:28 UTC
mmm.... the problem is the macro execute first:
SectionSetFlags ${Seccion} ${FlagNoArch}
and then execute:
SectionSetFlags ${Seccion} ${FlagSiArch}
It's suppose to be, if the file doesn't exists, do:
SectionSetFlags ${Seccion} ${FlagNoArch}
else:
SectionSetFlags ${Seccion} ${FlagSiArch}
The macro is this, firs detect the file if is not there then
turn the section with flag 25.
If does then turn section 16
And yes... Si = Yes No = No :p and Seccion = Section...
I think you already know that :D
kichik
14th February 2003 23:34 UTC
OK, so like I have said you need to jump over the enabling of the section. It won't jump for you... :)
Add Goto +2 just before yay: and all should work well.
Joel
14th February 2003 23:48 UTC
smokin'....
thanks KichiK !!!
Works great...I most build the coolest Installer ;)
PS: I wonder if "LicenseData" will accept html files...
kichik
15th February 2003 00:05 UTC
LicesneData doesn't know what HTML files are. It will treat it as a text file. You can open the HTML file in Word and save it as RTF.