Skip to content

fix(installer): preserve setup.iss in locale generator - #107

Merged
mlopezsegura merged 1 commit into
OpenstreamCo:masterfrom
Dani6ca-T:feature/i1-installer-generator-safety
Nov 30, 2026
Merged

mlopezsegura merged 1 commit into
OpenstreamCo:masterfrom
Dani6ca-T:feature/i1-installer-generator-safety

Conversation

@Dani6ca-T

Copy link
Copy Markdown
Contributor

What changed

The installer locale generator no longer rewrites Core/Installer/setup.iss. The previous broad regex replaced everything from [Languages] through the [Setup] overrides up to [Tasks], which removed the Inno Setup 6.7 theme include and setup settings.

setup.iss is now treated as the source of truth. It already includes languages.generated.iss and messages.generated.iss, so the generator only writes those generated fragments and the English region metadata.

Why

Running the generator after editing installer messages silently deleted the conditional theme block and [Setup] overrides from setup.iss. This made generated catalog updates unsafe and caused avoidable churn in a file that should be maintained deliberately.

Changes

  • tools/generate-installer-locales.py: remove the destructive setup.iss read/regex/write block; document that setup.iss is intentionally not rewritten.
  • tests/installer-generator.test.cjs: add a temporary-fixture regression suite covering byte-preservation of setup.iss, theme/[Setup] markers, generated-file identity, the 22-language/308-message catalog shape, and second-run idempotency.
  • .github/workflows/build-release.yml: install Python 3.12, run the regression test, regenerate installer catalogs, and fail if tracked generated files are stale or unexpected files appear under Core/Installer.

Testing

  • node tests/installer-generator.test.cjs: 3 tests passed, 0 failed.
  • Exact baseline generator negative control: 1 passed, 2 failed as expected; the failures detect the old setup.iss rewrite and the resulting non-idempotency.
  • Independent two-run temp-copy check: 0 of 52 installer files changed; 22 language declarations and 308 custom-message lines generated.
  • git diff --check: clean.
  • Workflow YAML parses and the new steps are ordered after checkout and before the .NET/Inno build.

Limitations

  • Inno Setup 6.7 and the .NET 10 SDK are not available in this local environment, so the installer was not compiled locally. The GitHub Actions build is the remaining compiler check.
  • The actual GitHub Actions run was not executed during preparation; the workflow was validated statically and the test was run directly.
  • The full tests/i18n.test.cjs suite could not complete under the local sandbox because spawnSync git fails with EPERM; the targeted installer-catalog test passes.

Remove the destructive setup.iss rewrite, add regression coverage for preservation and idempotency, and validate generated installer catalogs in CI.
@mlopezsegura
mlopezsegura merged commit 78bbae8 into OpenstreamCo:master Nov 30, 2026
2 checks passed
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.

2 participants