Hi,
I think I found a bug in the PA Launcher V2.0.
Description:
When you try to generate a portable app launcher you get the notification that the launcher was not generated. In the launcher generator's log file you get the following text in the last line:
Error in script "G:\WinBox\PortableApps.com\PortableApps.comLauncher\Other\Source\PortableApps.comLauncher.nsi" on line 54 -- aborting creation process
This happens when you choose a too long term with too much blanks in the term for the variable 'name' under section [Details] in App\AppInfo\appinfo.ini
An example:
While you get this error with
[Details]
Name=Application - My Own Application Portable
you do not get it with
[Details]
Name=Application - MyOwnApplication Portable
but it comes up again with
[Details]
Name=Application - My OwnApplicationA AA Portable
There was a discussion about it in this thread at that time referring to line 51 in the script.
Hope this helps.
Cheers
Gremlin
As mentioned in the old thread, that's a very confusing error message which doesn't really mean anything at all. Right through I have been entirely unable to come up with a logical explanation to the issue. First of all, are you using NSIS Portable (Unicode) 2.46?
A complete NSIS log would also be a lot more useful than just the single line as if there's any more helpful information it'll be earlier. To get it all you should also comment out line 23 of PortableApps.comLauncher.nsi - change
!verbose 3
to;!verbose 3
- so that you get all of what's happening.I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
I am using NSIS Portable (Unicode) 2.46 Rv2. A complete NSIS log can be found at PasteBin.
The weird thing is I tried it on 2 laptops and on one it would fail and on the other it would work. I have the PAL Launcher Generator and the NSIS Portable on an USB stick working from there. But it is not always the same laptop where it is working or not. It could be vice versa.
I've diagnosed what it is due to that, and it's definitely a bug (or quirk if you prefer) in NSIS. Here's my train of thought tracing it; I may be wrong in one or two points but I believe that I'm right in the essence of it:
Name=Application - My Own Application Portable
Application - My Own Application Portable
.__UTIL__NSH__ is defined. So the parser wanders forwards until it gets to an !else or an !endif. It finds the !else (wrong one) and goes on, parsing as it goes. It's missed the !macro, so at this point it doesn't realise it's inside a macro. Thus, instead of realising ${NAME} is a macro-scope definition... it looks for a global one. Which we have (otherwise it would just become a literal "${NAME}" and a warning would be showed at the end that it was not recognised and ignored). Uh oh...
!ifdef THIS & THAT & THEOTHER & ...
. When it gets to actually parsing it, then it would complain about a syntax error if this code path really happened.!define Application - My Own Application Portable${CallArtificialFunction_TYPE}_DEFINED
In the Inkscape installer I had a bit of trouble when the Windows build provider tried to generate the installer for 0.48pre1 (I think it was that release), where a certain code path ended up with !if..!endif muddling, because it missed ones in the middle. So I had to change the nesting of a couple of !if, !ifdef things to the other way round so that when the BZR_REVISION wasn't set it wouldn't get messed up. It took me quite a while to work that one out but I got it in the end.
As you can hopefully see, it's not my fault, except in that I didn't take care to avoid the glitch in the NSIS compiler by using a unique !define name.
One solution is to use a different variable - if I used PortableAppName instead of Name the problem would go away entirely. But it's still a bug in NSIS which I should report to them.
I've already had to deal with a vaguely similar issue in PAL to do with the way the parsing works; in the segments, I can use ${SegmentInit}, which has been defined in ${SegmentFile} to
!macro FileName.nsh_Init
, but when it gets to the end of the macro, I originally tried using a !define for ${SegmentEnd} to provide the !macroend, but that was no good because as far as the parser was concerned the ${SegmentEnd} is part of the macro, with definitions not to be parsed until the macro is included... That's why PAL has the vaguely not-neat${SegmentInit}
..!macroend
.I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1