File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33//
44
55#include < cstdio>
6+ #include < cstdlib>
67#include < filesystem>
78#include < fstream>
89#include < iostream>
910#include < share/def.hpp>
11+ #include < stdlib.h>
1012
1113namespace yoi {
1214 thread_local yoi::wstr __current_file_path = L" " ;
@@ -170,11 +172,15 @@ namespace yoi {
170172 std::string path;
171173 int length, dirnameLength;
172174
173- length = wai_getExecutablePath (nullptr , 0 , &dirnameLength);
174- path.resize (length + 1 );
175- wai_getExecutablePath (path.data (), length, &dirnameLength);
176- path[length] = ' \0 ' ;
177- return yoi::string2wstring (
178- path.substr (0 , path.rfind (std::filesystem::path::preferred_separator)));
175+ if (auto e = getenv (" HOSHI_HOME" ); e != nullptr ) {
176+ return string2wstring (e) + L" /bin" ;
177+ } else {
178+ length = wai_getExecutablePath (nullptr , 0 , &dirnameLength);
179+ path.resize (length + 1 );
180+ wai_getExecutablePath (path.data (), length, &dirnameLength);
181+ path[length] = ' \0 ' ;
182+ return yoi::string2wstring (
183+ path.substr (0 , path.rfind (std::filesystem::path::preferred_separator)));
184+ }
179185 }
180186} // namespace yoi
Original file line number Diff line number Diff line change 11#ifndef HOSHI_LANG_DEFINES_H
22#define HOSHI_LANG_DEFINES_H
33
4- #define HOSHI_LANG_VERSION "86 "
5- #define HOSHI_LANG_GIT_COMMIT_HASH "c382a2 "
4+ #define HOSHI_LANG_VERSION "87 "
5+ #define HOSHI_LANG_GIT_COMMIT_HASH "dd4110 "
66
77#endif
Original file line number Diff line number Diff line change 1- 86
1+ 87
You can’t perform that action at this time.
0 commit comments