chore(windows): WinGet Links resolution uses ProgramFiles (machine-wide) after LOCALAPPDATA; drop ProgramData; update comment
parent
fae347b03a
commit
80d311ec13
|
|
@ -278,7 +278,6 @@ namespace UnityMcpBridge.Editor.Helpers
|
||||||
string localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) ?? string.Empty;
|
string localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) ?? string.Empty;
|
||||||
string programFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) ?? string.Empty;
|
string programFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) ?? string.Empty;
|
||||||
string appData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) ?? string.Empty;
|
string appData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) ?? string.Empty;
|
||||||
string programData = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) ?? string.Empty; // optional fallback
|
|
||||||
|
|
||||||
// Fast path: resolve from PATH first
|
// Fast path: resolve from PATH first
|
||||||
try
|
try
|
||||||
|
|
@ -309,10 +308,8 @@ namespace UnityMcpBridge.Editor.Helpers
|
||||||
candidates = new[]
|
candidates = new[]
|
||||||
{
|
{
|
||||||
// Preferred: WinGet Links shims (stable entrypoints)
|
// Preferred: WinGet Links shims (stable entrypoints)
|
||||||
// Per-user shim, then machine-wide shim
|
// Per-user shim (LOCALAPPDATA) → machine-wide shim (Program Files\WinGet\Links)
|
||||||
Path.Combine(localAppData, "Microsoft", "WinGet", "Links", "uv.exe"),
|
Path.Combine(localAppData, "Microsoft", "WinGet", "Links", "uv.exe"),
|
||||||
Path.Combine(programData, "Microsoft", "WinGet", "Links", "uv.exe"),
|
|
||||||
// ProgramFiles Links is uncommon; keep as low-priority fallback
|
|
||||||
Path.Combine(programFiles, "WinGet", "Links", "uv.exe"),
|
Path.Combine(programFiles, "WinGet", "Links", "uv.exe"),
|
||||||
|
|
||||||
// Common per-user installs
|
// Common per-user installs
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue