From ea59b3a8d2887e963b806c5f595f5d4e6460fc55 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 10 Jan 2015 02:53:31 +0000 Subject: More Mac integration work. git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@5511 a436a847-0d15-0410-975c-d299462d15a1 --- src/binary_location.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/binary_location.h') diff --git a/src/binary_location.h b/src/binary_location.h index 91e8b29..303a3bd 100644 --- a/src/binary_location.h +++ b/src/binary_location.h @@ -41,3 +41,14 @@ binary_location() } return loc; } + +/** Return the absolute path of the bundle (binary parent directory). */ +static std::string +bundle_location() +{ + const std::string binary = binary_location(); + if (binary.empty()) { + return ""; + } + return binary.substr(0, binary.find_last_of('/')); +} -- cgit v1.2.1