Fix relocated desktop tool paths and package release 0.2.2
This commit is contained in:
1 parent
efaf16de18
commit
e366eb5bec
14 files changed
+250
-33
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user