Skip to content

Commit 55b1249

Browse files
committed
Fix searching for predefined OSX app
1 parent 173728c commit 55b1249

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Assets/PatchKit Patcher/Scripts/AppStarter.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,17 @@ public AppStarter(App app)
2929

3030
private string ResolveExecutablePath(AppVersion appVersion)
3131
{
32+
PlatformType platformType = Platform.GetPlatformType();
33+
3234
if (!string.IsNullOrEmpty(appVersion.MainExecutable))
3335
{
3436
string executablePath = Path.Combine(_app.LocalDirectory.Path, appVersion.MainExecutable);
3537

36-
if (File.Exists(executablePath))
38+
bool isOSXApp = platformType == PlatformType.OSX &&
39+
executablePath.EndsWith(".app") &&
40+
Directory.Exists(executablePath);
41+
42+
if (File.Exists(executablePath) || isOSXApp)
3743
{
3844
return executablePath;
3945
}
@@ -50,7 +56,6 @@ private string ResolveExecutablePath(AppVersion appVersion)
5056

5157
}
5258

53-
PlatformType platformType = Platform.GetPlatformType();
5459
return AppFinder.FindExecutable(_app.LocalDirectory.Path, platformType);
5560
}
5661

0 commit comments

Comments
 (0)