Support $MAIN_DIR for the poor C++ users

This commit is contained in:
rdb 2009-07-01 13:34:29 +00:00
parent 26bc853d92
commit ace7910a44
1 changed files with 6 additions and 1 deletions

View File

@ -537,6 +537,11 @@ read_args() {
}
#endif
if (_dtool_name.empty())
if (!_binary_name.empty()) {
set_environment_variable("MAIN_DIR", Filename(_binary_name).get_dirname());
}
if (_dtool_name.empty()) {
_dtool_name = _binary_name;
}
}