Skip to content

Commit e1df989

Browse files
authored
Haiku: getExecutablePath support
1 parent a4ffedc commit e1df989

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

libs/common/src/getExecutablePath.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,22 @@ std::string getExecutablePath()
121121
return ec ? "" : p.make_preferred().string();
122122
}
123123

124+
#elif(BOOST_OS_HAIKU)
125+
std::string getExecutablePath()
126+
{
127+
std::string ret;
128+
int32 cookie = 0;
129+
image_info info;
130+
while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK)
131+
{
132+
if (info.type == B_APP_IMAGE)
133+
{
134+
ret = info.name;
135+
}
136+
}
137+
return ret;
138+
}
139+
124140
#else
125141

126142
# error Unsupported plattform!

0 commit comments

Comments
 (0)