Skip to content

emrg: fix .iss LoadStringFromFile 2-param signature (v0.2.30 Build Release windows gate) - #732

Closed
argszero wants to merge 1 commit into
masterfrom
feature/iss-loadstring-fix
Closed

emrg: fix .iss LoadStringFromFile 2-param signature (v0.2.30 Build Release windows gate)#732
argszero wants to merge 1 commit into
masterfrom
feature/iss-loadstring-fix

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

Fixes the v0.2.30 Build Release failure 31661378619 (windows-2025 'Make installer' step): iscc rejected the generated emrg.iss with Error on line 183 ... Invalid number of parameters.

Root cause

Inno Setup's Pascal Script API declares

function LoadStringFromFile(const FileName: String; var S: AnsiString): Boolean;

— a 2-parameter out-argument form, identical in iscc 6.7.1 through 7.x (verified against issrc Shared.ScriptFunc.pas at tags is-6_7_1 / is-6_7_3 / is-7_1_0 / main). #727's R125 log-surfacing code (merged in eb38234) called the non-existent 1-parameter string-returning form LogText := LoadStringFromFile(LogFile). The Test workflow never compiles the .iss, so the error only surfaced at tag-push Build Release — the v0.2.7 lesson recurring.

Changes

  1. packaging/make-installer.sh — call LoadStringFromFile(LogFile, LogText) (out-param), keep the FileExists guard and 2000-char truncation; comment documents the real signature
  2. tests/test_installer_stop.py — positive assert for the 2-param form + negative assert forbidding the 1-param form
  3. .github/workflows/test.yml — new Inno Setup script compile smoke test step in the windows-2025 job: renders the emrg.iss heredoc (stub payload) and runs the runner's preinstalled iscc, so .iss syntax/signature errors fail PR CI instead of at release time

Verification

  • Local pytest: 761 passed (incl. installer-stop suite 8/8)
  • Rendered .iss compiles region verified; heredoc has no other unset $var expansions
  • import run_client + emrg --help green

…lease windows gate)

v0.2.30 Build Release 31661378619 failed at the windows 'Make installer'
step: iscc rejected the emrg.iss [Code] section with
'Invalid number of parameters' on LoadStringFromFile(LogFile).

Root cause: Inno Setup's Pascal Script API declares
  function LoadStringFromFile(const FileName: String; var S: AnsiString): Boolean;
(2-param out-argument form, identical in 6.7.1 through 7.x — verified
against issrc Shared.ScriptFunc.pas). #727's R125 log-surfacing code
called the non-existent 1-param string-returning form; the Test workflow
never compiles the .iss, so the error only surfaced at tag-push Build
Release (v0.2.7 lesson recurring).

Fix:
- make-installer.sh: call LoadStringFromFile(LogFile, LogText) (out-param),
  keep FileExists guard + 2000-char truncation
- tests/test_installer_stop.py: assert the 2-param form (positive) and
  forbid the 1-param form (negative)
- test.yml test-windows: new 'Inno Setup script compile smoke test' step —
  renders the emrg.iss heredoc (stub payload) and runs the runner's
  preinstalled iscc, so .iss syntax/signature errors fail PR CI instead
  of at release time
@argszero

Copy link
Copy Markdown
Owner Author

Closing as duplicate — consolidating into #731 (same iscc gate intent). Pushing the LoadStringFromFile 2-param signature fix (make-installer.sh) + regression test (test_installer_stop.py) onto #731's branch so the gate goes green and the v0.2.30 Build Release failure is actually fixed.

@argszero argszero closed this Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant