Commit 329b197
Font Install, Uninstall, additional Font List (microsoft#5566)
Implements a good chunk of microsoft#166 Key features and changes:
All of the below are experimental behind the fonts experimental feature.
Font install is implemented as a winget-common installer that models
most of the font install behavior of the operating system in its key
components. It deviates from a normal font install in that the install
locations and registry key paths are a little different in order to map
fonts to an identifiable version-specific deterministic location. This
is so we may more easily identify font packages and remove them and
avoid font collisions, torn state, or removing fonts from other
packages.
**Font List update**
- Added new font list "--files" option that lists fonts by installed
files and their known validity state
- Fonts are listed by file where they are located and have an assigned
identifier for later use in removal.
- The Font Status reflects whether the registry matches an actual font
file on disk (fonts without a file are labeled "Corrupt").
- The intent here is to add filters later to get a better idea of what
fonts are on the system, where they came from, and which might need
repair or removal. At present my system had over 300 font files
installed so the list is quite large.
**Font Install**
- Add font support for install. This is the base WinGet install command,
not the 'font' sub-command.
- Requires font experimental feature to be enabled.
- Added the core Font evaluation code to AppInstallerCommonCore so it is
not strictly bound to the CLI.
- The font install scheme puts WinGet installed font packages in sub
folders and subkeys where they can exist side-by-side with other font
packages without worry of file collision and easier high-confidence
removal/upgrade and rollback.
- Registers the font with the current session and notifies other apps of
the new font availability.
- Configures the font to be loaded on subsequent sessions.
- Install works for machine and user fonts.
**Font Uninstall*
- Added font support for uninstall. This is the base WinGet uninstall
command, not the 'font' sub-command.
- Requires font Experimental feature to be enabled.
- Uninstall works for WinGet-installed fonts only at this time.
** Font List*
- Added font package detection to the PredefinedInstalledSource.
- This allows font packages to be detected for uninstall.
**Workflows**
- Support for Font Install and Uninstall
**Tested**
- Added many unit tests which exercise the the Font install, uninstall,
information gathering, listing, for machine and user scopes. All of the
new core code added is exercised in unit tests.
- All scopes for install using unit tests and local web server.
- Install and uninstall with manifest an local server.
- Install and uninstall and list with package from a private package
source.
- Verified ACLs on the folders match expected permissions for
visibility.
- Verified per-user and per-machine fonts are installed correctly and
show up in Font Settings immediately.
**NOT part of this PR and is likely a future PR**
- Font upgrade (a new version will be installed side-by-side)
- Uninstall of non-packaged fonts. This is in plan, just not in the
scope of this PR.
- [x] I have signed the [Contributor License
Agreement](https://cla.opensource.microsoft.com/microsoft/winget-pkgs).
- [x] I have updated the [Release Notes](../doc/ReleaseNotes.md).
- [x] This pull request is related to an issue.
-----
###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/5566)
---------
Co-authored-by: Muhammad Danish <[email protected]>
Co-authored-by: Kaleb Luedtke <[email protected]>1 parent 4d740f6 commit 329b197
File tree
53 files changed
+2286
-56
lines changed- .github/actions/spelling
- doc
- windows/package-manager/winget
- src
- AppInstallerCLICore
- Commands
- Workflows
- AppInstallerCLIE2ETests
- Helpers
- TestData
- Manifests
- AppInstallerCLITests
- TestData
- AppInstallerCommonCore
- Manifest
- Public/winget
- AppInstallerRepositoryCore
- Microsoft
- LocalhostWebServer
- Microsoft.Management.Deployment
- WinGetSourceCreator/Model
- WinGetUtil
- WindowsPackageManager
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
53 files changed
+2286
-56
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
180 | 182 | | |
181 | 183 | | |
182 | 184 | | |
| |||
417 | 419 | | |
418 | 420 | | |
419 | 421 | | |
| 422 | + | |
420 | 423 | | |
421 | 424 | | |
422 | 425 | | |
423 | 426 | | |
424 | 427 | | |
425 | 428 | | |
| 429 | + | |
| 430 | + | |
426 | 431 | | |
427 | 432 | | |
428 | 433 | | |
| |||
437 | 442 | | |
438 | 443 | | |
439 | 444 | | |
| 445 | + | |
440 | 446 | | |
441 | 447 | | |
442 | 448 | | |
| |||
604 | 610 | | |
605 | 611 | | |
606 | 612 | | |
| 613 | + | |
607 | 614 | | |
608 | 615 | | |
609 | 616 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
149 | 156 | | |
150 | 157 | | |
151 | 158 | | |
| |||
170 | 177 | | |
171 | 178 | | |
172 | 179 | | |
173 | | - | |
| 180 | + | |
174 | 181 | | |
175 | 182 | | |
176 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
206 | 208 | | |
207 | 209 | | |
208 | 210 | | |
| |||
472 | 474 | | |
473 | 475 | | |
474 | 476 | | |
| 477 | + | |
| 478 | + | |
475 | 479 | | |
476 | 480 | | |
477 | 481 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| 48 | + | |
| 49 | + | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 54 | + | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| 306 | + | |
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
311 | 312 | | |
| 313 | + | |
| 314 | + | |
312 | 315 | | |
| 316 | + | |
313 | 317 | | |
314 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
315 | 328 | | |
| 329 | + | |
316 | 330 | | |
317 | 331 | | |
318 | 332 | | |
| |||
461 | 475 | | |
462 | 476 | | |
463 | 477 | | |
464 | | - | |
465 | 478 | | |
| 479 | + | |
466 | 480 | | |
467 | 481 | | |
468 | 482 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | | - | |
144 | | - | |
| 143 | + | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
66 | 78 | | |
67 | 79 | | |
68 | 80 | | |
| |||
288 | 300 | | |
289 | 301 | | |
290 | 302 | | |
| 303 | + | |
291 | 304 | | |
292 | 305 | | |
293 | 306 | | |
| |||
0 commit comments