Skip to content

wingetcreate looks for installer architecture instead of application architecture #198

@ldennington

Description

@ldennington

Brief description of your issue

To replace my team's current custom tooling for deploying to winget, I am trying to adopt wingetcreate for automatic updates of the Microsoft.Git manifest each time we release. The manifest currently has one installer and specifies an x64 architecture. Note that this refers to the application to be installed not the installer itself (which is x86).

When we attempt to publish a new manifest, wingetcreate downloads the installer and detects that the installer is x86. It then compares it to the x64 specified in the manifest and fails. I've included more details below, but in short I think wingetcreate is matching on installer architecture when it should be matching on application architecture.

Steps to reproduce

Pre-Requisites

  1. Use a Windows 10 machine
  2. Ensure winget and wingetcreate are installed and on the path
  3. Generate a PAT that has repo:public_repo scope

Steps to Reproduce

Run the following command (replacing *** with the token you generated above):

wingetcreate update Microsoft.Git -u https://github.com/ldennington/git/releases/download/v2.33.0.vfs.0.7/Git-2.33.0.vfs.0.7-64-bit.exe -v 2.33.0.0.7 -o manifests -t ***

Expected behavior

I expected the Microsoft.Git manifest to be updated successfully and saved to the manifests directory.

Actual behavior

The following error is thrown:

Each new installer URL must have a single match to an existing installer based on installer type and architecture. The following installers failed to match an existing installer:
Multiple matches found for X86 Inno installer detected from the url: https://github.com/ldennington/git/releases/download/v2.33.0.vfs.0.7/Git-2.33.0.vfs.0.7-64-bit.exe

I tried to update the architecture to x86 in the manifest, but that broke winget validation (which makes sense since x64 applications can't run on x86 machines). So I don't actually think this was the right fix. My understanding is that Inno Setup only ships an x86 version, and it's only possible to create x86 Inno installers using this tech, so I would expect this issue to impact a lot of products beyond just Microsoft.Git.

In light of this, I believe that wingetcreate should be looking at the application architecture instead of the installer architecture when attempting to find an installer match.

Environment

Windows Package Manager Version: v1.1.12701
Windows OS Build: 19043.1288
wingetcreate Version: 0.4.2.1
Package: Microsoft.Git

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.Resolution-Fix-Committed

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions