Menu

#1147 !makensis outputs wrong charset (gibberish) only through makensisw.exe

3.0 Alpha Series
closed-fixed
nobody
None
5
2016-07-04
2016-07-01
Robmaister
No

Version: v3.0rc1
OS: Windows 10 Enterprise x64

I just moved from 2.4 to 3.0rc1 for the !finalize command, as I'm automating authenticode signing of the installer and uninstaller. I also started using the new !makensis command over the old !system call I was doing to generate the uninstaller before signing it, and that's when I noticed that the output during the uninstall script was outputting gibberish. An example here:

SetCompressor: /FINAL LZMA
!makensis: ""C:\Program Files (x86)\NSIS\Bin\makensis.exe" /v4 /OCS UTF16LE -DGENERATE_UNINSTALLER "install.nsi""
M s ss:2 uCIM_nc1s9rs :\t5s":se1:WeOsoicll1 
!system: returned 2

The actual call I'm making is:

!makensis '-DGENERATE_UNINSTALLER "${__FILE__}"' = 0

When running through makensis.exe instead of makensisw.exe, the !makensis call sets /OCS to ACP instead of UTF16LE and the output is fine. I am not specifying anything character set-related in install.nsi, both of these character sets are the defaults of makensis and makensisw.

Very occasionally this bug ate error messages during uninstaller generation. My workaround was to just !define GENERATE_UINSTALLER at the top of the script and run it to see the error message. I eventually just moved to running makensis.exe on the command line.

I can provide extra information/full logs and nsi script via email if necessary. Reproduction should be as simple as throwing in a !makensis call in the middle of any example script guarded by a !ifdef.

Discussion

  • Anders

    Anders - 2016-07-01

    MakensisW asks for UTF16-LE output and the compiler is foolish enough to pass this hint along to the child process even though it is unable to handle that output format when parsing the pipe output. It should be easy enough to fix.

     
  • Anders

    Anders - 2016-07-04
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB