| 731 | } |
| 732 | |
| 733 | BFP_EXPORT void BFP_CALLTYPE BfpSystem_GetExecutablePath(char* outStr, int* inOutStrSize, BfpSystemResult* outResult) |
| 734 | { |
| 735 | #ifdef BF_PLATFORM_DARWIN |
| 736 | if (gExePath.IsEmpty()) |
| 737 | { |
| 738 | char path[4096]; |
| 739 | uint32_t size = sizeof(path); |
| 740 | if (_NSGetExecutablePath(path, &size) == 0) |
| 741 | gExePath = path; |
| 742 | |
| 743 | // When when running with a './file', we end up with an annoying '/./' in our path |
| 744 | gExePath.Replace("/./", "/"); |
| 745 | } |
| 746 | #endif |
| 747 | |
| 748 | TryStringOut(gExePath, outStr, inOutStrSize, (BfpResult*)outResult); |
| 749 | } |
| 750 | |
| 751 | extern char **environ; |
| 752 |
nothing calls this directly
no test coverage detected