Fix relocated desktop tool paths and package release 0.2.2

This commit is contained in:
tongtong committed 2026-11-13 12:49:10 +08:00
1 parent efaf16de18
commit e366eb5bec
14 files changed
+250 -33

No files matched your search

+4 -2
View File
@@ -104,8 +104,10 @@ public static class DesktopPaths
public static string ResolveTool(string value, string name)
{
value = Environment.ExpandEnvironmentVariables(value.Trim().Trim('"'));
if (File.Exists(value)) return Path.GetFullPath(value);
if (value == name || value == name + ".exe")
var installed = value.Replace('\\', '/');
var managed = System.Text.RegularExpressions.Regex.IsMatch(installed, @"/Programs/(TTSTD|TongTongStudio)/ADS-(Flutter|Avalonia)/", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
if (File.Exists(value) && !managed) return Path.GetFullPath(value);
if (managed || !File.Exists(value))
{
var found = FindTool(name);
if (File.Exists(found)) return Path.GetFullPath(found);