Menu

#1308 Installer built on macOS Sonoma truncates license text

3.0 Series
open
nobody
None
5
2024-04-22
2024-04-12
No

Installer built on macOS Sonoma truncates license text

Installer built on macOS Sonoma truncates license text

Overview

Installer built on macOS Sonoma truncates text specified in MUI_PAGE_LICENSE to 126 characters.

Build environment

Reproduces

  • macOS Sonoma 14.4.1 (23E224)
    • Mac mini 2018 (Intel arch)
    • % brew info makensis ==> makensis: stable 3.10 (bottled)
  • Github Runner (mac-14)

NOT reproduces

  • macOS Ventura 13.6.6 (22G630)
    • Mac mini 2018 (Intel arch)
    • % brew info makensis ==> makensis: stable 3.10 (bottled)
  • GitHub Runner (mac-13)

Execution environment

OS Name Microsoft Windows 11 Home
Version 10.0.22631 Build 22631

OS Name Microsoft Windows 10 Pro
Version 10.0.19045 Build 19045

Steps to reproduce

  1. Install makensis using brew
    • brew install makensis
  2. Place la.txt longer than 126 characters
  3. Place setup.nsi like below
!include "MUI2.nsh"

OutFile "Install.exe"

!insertmacro MUI_PAGE_LICENSE "./la.txt"

Section
SectionEnd
  1. Run makensis setup.nsi
  2. Copy Install.exe and run on windows

Supplements

The PoC code is shown below.
- https://github.com/nakamura-work/nsis-mac-poc

Built on Sonoma
- https://github.com/nakamura-work/nsis-mac-poc/actions/runs/8661056537

Built on Ventura
- https://github.com/nakamura-work/nsis-mac-poc/actions/runs/8661036969

Regards.

1 Attachments

Discussion

  • Anders

    Anders - 2024-04-13

    If you add SetCompress Off to the script, is the full license visible in a hex editor?

    If not, the bug is probably somewhere inside the LoadLicenseFile function. Either how we read the file or convert it with iconv.

     
  • Valentin

    Valentin - 2024-04-19

    Confirm same behavior. For RTF file's it always empty page.
    With "SetCompress Off" also same result.

    OS - 14.4.1 (23E224) (Sonoma) aarch64

    makensis 3.10 installed via homebrew

     

    Last edit: Valentin 2024-04-19
  • NAKAMURA Tetsumasa

    It may be bug in the iconv built into macOS Sonoma.
    Using GNU libiconv, the issue did not reproduce.

    As follows.
    (Note: Because I am not expert on NSIS, UNIX, scons, et, al. so there may be errors.)

    brew install libiconv
    cd /usr/local/lib
    ln -s /usr/local/opt/libiconv/lib/libiconv.a
    ln -s /usr/local/opt/libiconv/lib/libiconv.dylib
    ln -s /usr/local/opt/libiconv/lib/libiconv.2.dylib
    
    cd nsis-3.10-src
    vi SConstruct # ref: below diff code block
    scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=/(...)/nsis-3.10-src install-compiler
    ./makensis ../nsis-mac-poc-main/alphanumeric_ascii.nsi
    
    defenv = {
        'TARGET_ARCH': ARGUMENTS.get('TARGET_ARCH', 'x86'),
    +   'LDFLAGS': '-L/usr/local/opt/libiconv/lib',
    +   'CPPFLAGS': '-I/usr/local/opt/libiconv/include',
        'ENV': {}
    }
    
     

Log in to post a comment.