From 63cdebba8830921daf14101e02c2d9590a0343a4 Mon Sep 17 00:00:00 2001 From: spycrab Date: Sun, 20 Jan 2019 02:24:26 +0100 Subject: UICommon/AutoUpdate: Add macOS support --- Source/Core/Common/FileUtil.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Source/Core/Common/FileUtil.cpp') diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index fe622ac21a..a631aa3edc 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #endif @@ -683,6 +684,9 @@ std::string GetExePath() dolphin_path = TStrToUTF8(dolphin_exe_expanded_path); else dolphin_path = TStrToUTF8(dolphin_exe_path); +#elif defined(__APPLE__) + dolphin_path = GetBundleDirectory(); + dolphin_path = dolphin_path.substr(0, dolphin_path.find_last_of("Dolphin.app/Contents/MacOS")); #else char dolphin_exe_path[PATH_MAX]; ssize_t len = ::readlink("/proc/self/exe", dolphin_exe_path, sizeof(dolphin_exe_path)); -- cgit v1.2.3