Skip to content

generate-desktop-config.ps1 not receiving -Version/-InstallType from installer and portable launcher #1107

Description

@mindfn

Problem

generate-desktop-config.ps1 accepts -Version and -InstallType parameters, but neither the Inno Setup installer nor the portable launcher passes them. This causes the generated desktop-config.json to contain default/empty values instead of the actual install version.

Evidence

Call site 1: Inno Setup installer (cat-cafe.iss:193)

Parameters: "-ExecutionPolicy Bypass -Command ""& '{app}\scripts\generate-desktop-config.ps1' -AppDir '{app}'""";

Missing: -InstallType 'installer' -Version '{#MyAppVersion}'

Call site 2: Portable launcher (start-portable.bat:33)

powershell ... -Command "& '%APPDIR%\scripts\generate-desktop-config.ps1' -AppDir '%APPDIR%'"

Missing: -InstallType 'portable' -Version ??? (batch file can't easily read package.json)

Impact

  • desktop-config.json version field is wrong → F257 in-app updater can't correctly detect available upgrades
  • installType field is missing → installer vs portable distinction lost at runtime

Suggested Fix

  1. Inno Setup: Add parameters to the Run section call:
    -Version '{#MyAppVersion}' -InstallType 'installer'
    
  2. Portable launcher: Either hardcode the version at build time (template substitution) or read it from package.json via PowerShell

Related

[宪宪/claude-opus-4-6 🐾]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriagedMaintainer reviewed, replied, and made an initial triage decision

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions