Initial Commit / Linux Combined Proof of Concept example
This commit is contained in:
commit
d0d2eae762
935 changed files with 155947 additions and 0 deletions
24
platform/linux/platform.h
Normal file
24
platform/linux/platform.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#ifndef __PLATFORM
|
||||
#define __PLATFORM
|
||||
#define __PLATFORM_SET_PYTHON_SEARCH_PATHS 1
|
||||
std::wstring executable_path()
|
||||
{
|
||||
/*
|
||||
wchar_t buffer[MAX_PATH];
|
||||
GetModuleFileName(NULL, buffer, MAX_PATH);
|
||||
std::wstring exec_path = buffer;
|
||||
*/
|
||||
auto exec_path = std::filesystem::canonical("/proc/self/exe").parent_path();
|
||||
return exec_path.wstring();
|
||||
//size_t path_index = exec_path.find_last_of('/');
|
||||
//return exec_path.substr(0, path_index);
|
||||
|
||||
}
|
||||
|
||||
std::wstring working_path()
|
||||
{
|
||||
auto cwd = std::filesystem::current_path();
|
||||
return cwd.wstring();
|
||||
}
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue