Skip to content

Commit

Permalink
Add msstore productId to export manifest and to wingetutil interop ma…
Browse files Browse the repository at this point in the history
…nifest object (#4934)

This change was needed as part of the effort to make exported manifest
(from winget download msstore apps) to be re-parsed and uploaded to
winget rest source.
 
Updated the some of the manifest schemas to add "required" for some
required fields previously missing.

Also, during my cross validation with the manifest schemas, I found
ExpectedReturnCode::Custom was added in manifest but not actually
updated in code. So I updated the ExpectedReturnCode map in code with
this change too.
  • Loading branch information
yao-msft authored Nov 4, 2024
1 parent 03587c2 commit 02454cc
Show file tree
Hide file tree
Showing 35 changed files with 227 additions and 141 deletions.
6 changes: 3 additions & 3 deletions doc/windows/package-manager/winget/returnCodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@ ms.localizationpriority: medium
| 0x8A150107 | -1978334969 | APPINSTALLER_CLI_ERROR_INSTALL_NO_NETWORK | This application requires internet connectivity. Connect to a network then try again. |
| 0x8A150108 | -1978334968 | APPINSTALLER_CLI_ERROR_INSTALL_CONTACT_SUPPORT | This application encountered an error during installation. Contact support. |
| 0x8A150109 | -1978334967 | APPINSTALLER_CLI_ERROR_INSTALL_REBOOT_REQUIRED_TO_FINISH | Restart your PC to finish installation. |
| 0x8A15010A | -1978334966 | APPINSTALLER_CLI_ERROR_INSTALL_REBOOT_REQUIRED_TO_INSTALL |
Installation failed. Restart your PC then try again. |
| 0x8A15010A | -1978334966 | APPINSTALLER_CLI_ERROR_INSTALL_REBOOT_REQUIRED_TO_INSTALL | Installation failed. Restart your PC then try again. |
| 0x8A15010B | -1978334965 | APPINSTALLER_CLI_ERROR_INSTALL_REBOOT_INITIATED | Your PC will restart to finish installation. |
| 0x8A15010C | -1978334964 | APPINSTALLER_CLI_ERROR_INSTALL_CANCELLED_BY_USER | You cancelled the installation. |
| 0x8A15010D | -1978334963 | APPINSTALLER_CLI_ERROR_INSTALL_ALREADY_INSTALLED | Another version of this application is already installed. |
Expand All @@ -171,7 +170,8 @@ Installation failed. Restart your PC then try again. |
| 0x8A150111 | -1978334959 | APPINSTALLER_CLI_ERROR_INSTALL_PACKAGE_IN_USE_BY_APPLICATION | Application is currently in use by another application. |
| 0x8A150112 | -1978334958 | APPINSTALLER_CLI_ERROR_INSTALL_INVALID_PARAMETER | Invalid parameter. |
| 0x8A150113 | -1978334957 | APPINSTALLER_CLI_ERROR_INSTALL_SYSTEM_NOT_SUPPORTED | Package not supported by the system. |
| 0x8A150114 | -1978334956 | APPINSTALLER_CLI_ERROR_INSTALL_UPGRADE_NOT_SUPPORTED | The installer does not support upgrading an existing package. |
| 0x8A150114 | -1978334956 | APPINSTALLER_CLI_ERROR_INSTALL_UPGRADE_NOT_SUPPORTED | The installer does not support upgrading an existing package. |
| 0x8A150115 | -1978334955 | APPINSTALLER_CLI_ERROR_INSTALL_CUSTOM_ERROR | Installation failed with installer custom error. |

## Check for package installed status

Expand Down
5 changes: 3 additions & 2 deletions schemas/JSON/manifests/v1.1.0/manifest.installer.1.1.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@
"blockedByPolicy"
]
}
}
},
"required": [ "InstallerReturnCode", "ReturnResponse" ]
},
"maxItems": 128,
"description": "Installer exit codes for common errors"
Expand Down Expand Up @@ -667,4 +668,4 @@
"ManifestType",
"ManifestVersion"
]
}
}
5 changes: 3 additions & 2 deletions schemas/JSON/manifests/v1.1.0/manifest.singleton.1.1.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@
"blockedByPolicy"
]
}
}
},
"required": [ "InstallerReturnCode", "ReturnResponse" ]
},
"maxItems": 128,
"description": "Installer exit codes for common errors"
Expand Down Expand Up @@ -803,4 +804,4 @@
"ManifestType",
"ManifestVersion"
]
}
}
7 changes: 4 additions & 3 deletions schemas/JSON/manifests/v1.2.0/manifest.installer.1.2.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,10 @@
},
"ReturnResponseUrl": {
"$ref": "#/definitions/Url",
"description": "The return response url to provide additional guidance for expected return codes"
"description": "The return response url to provide additional guidance for expected return codes"
}
}
},
"required": [ "InstallerReturnCode", "ReturnResponse" ]
},
"maxItems": 128,
"description": "Installer exit codes for common errors"
Expand Down Expand Up @@ -710,4 +711,4 @@
"ManifestType",
"ManifestVersion"
]
}
}
5 changes: 3 additions & 2 deletions schemas/JSON/manifests/v1.2.0/manifest.singleton.1.2.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@
"$ref": "#/definitions/Url",
"description": "The return response url to provide additional guidance for expected return codes"
}
}
},
"required": [ "InstallerReturnCode", "ReturnResponse" ]
},
"maxItems": 128,
"description": "Installer exit codes for common errors"
Expand Down Expand Up @@ -872,4 +873,4 @@
"ManifestType",
"ManifestVersion"
]
}
}
5 changes: 3 additions & 2 deletions schemas/JSON/manifests/v1.4.0/manifest.installer.1.4.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@
"$ref": "#/definitions/Url",
"description": "The return response url to provide additional guidance for expected return codes"
}
}
},
"required": [ "InstallerReturnCode", "ReturnResponse" ]
},
"maxItems": 128,
"description": "Installer exit codes for common errors"
Expand Down Expand Up @@ -831,4 +832,4 @@
"ManifestType",
"ManifestVersion"
]
}
}
5 changes: 3 additions & 2 deletions schemas/JSON/manifests/v1.4.0/manifest.singleton.1.4.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@
"$ref": "#/definitions/Url",
"description": "The return response url to provide additional guidance for expected return codes"
}
}
},
"required": [ "InstallerReturnCode", "ReturnResponse" ]
},
"maxItems": 128,
"description": "Installer exit codes for common errors"
Expand Down Expand Up @@ -993,4 +994,4 @@
"ManifestType",
"ManifestVersion"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
"type": "object",
"properties": {
"IconUrl": {
"$ref": "#/definitions/Url",
"type": "string",
"pattern": "^([Hh][Tt][Tt][Pp][Ss]?)://.+$",
"maxLength": 2048,
"description": "The url of the hosted icon file"
},
"IconFileType": {
Expand Down Expand Up @@ -275,4 +277,4 @@
"ManifestType",
"ManifestVersion"
]
}
}
5 changes: 3 additions & 2 deletions schemas/JSON/manifests/v1.5.0/manifest.installer.1.5.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@
"$ref": "#/definitions/Url",
"description": "The return response url to provide additional guidance for expected return codes"
}
}
},
"required": [ "InstallerReturnCode", "ReturnResponse" ]
},
"maxItems": 128,
"description": "Installer exit codes for common errors"
Expand Down Expand Up @@ -831,4 +832,4 @@
"ManifestType",
"ManifestVersion"
]
}
}
6 changes: 4 additions & 2 deletions schemas/JSON/manifests/v1.5.0/manifest.locale.1.5.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
"type": "object",
"properties": {
"IconUrl": {
"$ref": "#/definitions/Url",
"type": "string",
"pattern": "^([Hh][Tt][Tt][Pp][Ss]?)://.+$",
"maxLength": 2048,
"description": "The url of the hosted icon file"
},
"IconFileType": {
Expand Down Expand Up @@ -266,4 +268,4 @@
"ManifestType",
"ManifestVersion"
]
}
}
9 changes: 6 additions & 3 deletions schemas/JSON/manifests/v1.5.0/manifest.singleton.1.5.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@
"type": "object",
"properties": {
"IconUrl": {
"$ref": "#/definitions/Url",
"type": "string",
"pattern": "^([Hh][Tt][Tt][Pp][Ss]?)://.+$",
"maxLength": 2048,
"description": "The url of the hosted icon file"
},
"IconFileType": {
Expand Down Expand Up @@ -346,7 +348,8 @@
"$ref": "#/definitions/Url",
"description": "The return response url to provide additional guidance for expected return codes"
}
}
},
"required": [ "InstallerReturnCode", "ReturnResponse" ]
},
"maxItems": 128,
"description": "Installer exit codes for common errors"
Expand Down Expand Up @@ -1058,4 +1061,4 @@
"ManifestType",
"ManifestVersion"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
"type": "object",
"properties": {
"IconUrl": {
"$ref": "#/definitions/Url",
"type": "string",
"pattern": "^([Hh][Tt][Tt][Pp][Ss]?)://.+$",
"maxLength": 2048,
"description": "The url of the hosted icon file"
},
"IconFileType": {
Expand Down Expand Up @@ -275,4 +277,4 @@
"ManifestType",
"ManifestVersion"
]
}
}
5 changes: 3 additions & 2 deletions schemas/JSON/manifests/v1.6.0/manifest.installer.1.6.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@
"$ref": "#/definitions/Url",
"description": "The return response url to provide additional guidance for expected return codes"
}
}
},
"required": [ "InstallerReturnCode", "ReturnResponse" ]
},
"maxItems": 128,
"description": "Installer exit codes for common errors"
Expand Down Expand Up @@ -842,4 +843,4 @@
"ManifestType",
"ManifestVersion"
]
}
}
6 changes: 4 additions & 2 deletions schemas/JSON/manifests/v1.6.0/manifest.locale.1.6.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
"type": "object",
"properties": {
"IconUrl": {
"$ref": "#/definitions/Url",
"type": "string",
"pattern": "^([Hh][Tt][Tt][Pp][Ss]?)://.+$",
"maxLength": 2048,
"description": "The url of the hosted icon file"
},
"IconFileType": {
Expand Down Expand Up @@ -266,4 +268,4 @@
"ManifestType",
"ManifestVersion"
]
}
}
9 changes: 6 additions & 3 deletions schemas/JSON/manifests/v1.6.0/manifest.singleton.1.6.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@
"type": "object",
"properties": {
"IconUrl": {
"$ref": "#/definitions/Url",
"type": "string",
"pattern": "^([Hh][Tt][Tt][Pp][Ss]?)://.+$",
"maxLength": 2048,
"description": "The url of the hosted icon file"
},
"IconFileType": {
Expand Down Expand Up @@ -346,7 +348,8 @@
"$ref": "#/definitions/Url",
"description": "The return response url to provide additional guidance for expected return codes"
}
}
},
"required": [ "InstallerReturnCode", "ReturnResponse" ]
},
"maxItems": 128,
"description": "Installer exit codes for common errors"
Expand Down Expand Up @@ -1069,4 +1072,4 @@
"ManifestType",
"ManifestVersion"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
"type": "object",
"properties": {
"IconUrl": {
"$ref": "#/definitions/Url",
"type": "string",
"pattern": "^([Hh][Tt][Tt][Pp][Ss]?)://.+$",
"maxLength": 2048,
"description": "The url of the hosted icon file"
},
"IconFileType": {
Expand Down Expand Up @@ -275,4 +277,4 @@
"ManifestType",
"ManifestVersion"
]
}
}
5 changes: 3 additions & 2 deletions schemas/JSON/manifests/v1.7.0/manifest.installer.1.7.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@
"$ref": "#/definitions/Url",
"description": "The return response url to provide additional guidance for expected return codes"
}
}
},
"required": [ "InstallerReturnCode", "ReturnResponse" ]
},
"maxItems": 128,
"description": "Installer exit codes for common errors"
Expand Down Expand Up @@ -863,4 +864,4 @@
"ManifestType",
"ManifestVersion"
]
}
}
6 changes: 4 additions & 2 deletions schemas/JSON/manifests/v1.7.0/manifest.locale.1.7.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
"type": "object",
"properties": {
"IconUrl": {
"$ref": "#/definitions/Url",
"type": "string",
"pattern": "^([Hh][Tt][Tt][Pp][Ss]?)://.+$",
"maxLength": 2048,
"description": "The url of the hosted icon file"
},
"IconFileType": {
Expand Down Expand Up @@ -266,4 +268,4 @@
"ManifestType",
"ManifestVersion"
]
}
}
9 changes: 6 additions & 3 deletions schemas/JSON/manifests/v1.7.0/manifest.singleton.1.7.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@
"type": "object",
"properties": {
"IconUrl": {
"$ref": "#/definitions/Url",
"type": "string",
"pattern": "^([Hh][Tt][Tt][Pp][Ss]?)://.+$",
"maxLength": 2048,
"description": "The url of the hosted icon file"
},
"IconFileType": {
Expand Down Expand Up @@ -352,7 +354,8 @@
"$ref": "#/definitions/Url",
"description": "The return response url to provide additional guidance for expected return codes"
}
}
},
"required": [ "InstallerReturnCode", "ReturnResponse" ]
},
"maxItems": 128,
"description": "Installer exit codes for common errors"
Expand Down Expand Up @@ -1090,4 +1093,4 @@
"ManifestType",
"ManifestVersion"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
"type": "object",
"properties": {
"IconUrl": {
"$ref": "#/definitions/Url",
"type": "string",
"pattern": "^([Hh][Tt][Tt][Pp][Ss]?)://.+$",
"maxLength": 2048,
"description": "The url of the hosted icon file"
},
"IconFileType": {
Expand Down Expand Up @@ -275,4 +277,4 @@
"ManifestType",
"ManifestVersion"
]
}
}
3 changes: 2 additions & 1 deletion schemas/JSON/manifests/v1.9.0/manifest.installer.1.9.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@
"$ref": "#/definitions/Url",
"description": "The return response url to provide additional guidance for expected return codes"
}
}
},
"required": [ "InstallerReturnCode", "ReturnResponse" ]
},
"maxItems": 128,
"description": "Installer exit codes for common errors"
Expand Down
Loading

0 comments on commit 02454cc

Please sign in to comment.