![]() |
#1 |
Junior Member
Join Date: May 2015
Posts: 24
|
%1 in !finalize replaced only once
As title says, it seems in a single !finalize command I can't use %1 multiple times. First one gets replaced properly, but after that it remains as plaintext.
Example !finalize 'ECHO %1 %1 > echo.txt"' Not looking for a workaround, just this seems like something that needs to be addressed in the future. |
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
The docs don't really claim you can use it multiple times.
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: May 2015
Posts: 24
|
They don't. They also don't say that it can only be used once, which is counter-intuitive.
|
![]() |
![]() |
![]() |
#4 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
You can call !finalize more than once if you need to pass it to multiple tools.
I'll add support for using %1 multiple times if you can come up with a real-world scenario where it is needed. IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#5 |
Junior Member
Join Date: May 2015
Posts: 24
|
I was using a console tool that takes file input and produces file output. I attempted to derive output filename from %1, but since I had to pass it 2nd time for that it turned out to be a no-go. Of course there are plenty of ways around that, i just thought "ugh, that really should have worked!"
|
![]() |
![]() |
![]() |
#6 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
Seems reasonable enough, fixed.
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|