Go to the documentation of this file.
16 inline bool is_mac_app(
const std::string& a_arg0){
17 if(a_arg0.empty())
return false;
19 if(bname==
"MacOS")
return true;
23 inline bool is_mac_app(
const std::string&){
return false;}
26 inline bool program_path(
const std::string& a_arg0,std::string& a_path) {
31 std::string path,name,
suffix;
36 std::string program = a_arg0;
38 if(program.find(
".exe")==std::string::npos) program +=
".exe";
40 std::vector<std::string> paths;
43 std::string dir = *it;
68 inline bool if_mouse_startup(
const std::string& a_arg0,
const std::string& a_env_HOME_DIR,
const std::vector<std::string>& a_home_dirs,std::ostream& a_out){
69 std::string exe_dir =
dir_name(a_arg0);
74 a_out <<
"if_mouse_startup : can't go home." << std::endl;
79 a_out <<
"if_mouse_startup :"
80 <<
" can't mkcd " <<
sout(*it)
87 std::string Contents_dir =
dir_name(exe_dir);
88 if(!
put_env(a_env_HOME_DIR,Contents_dir)) {
89 a_out <<
"if_mouse_startup :"
90 <<
" can't putenv " << a_env_HOME_DIR
91 <<
" to " <<
sout(Contents_dir)
96 {std::vector<std::string> vals;
97 vals.push_back(Contents_dir+
"/bin");
100 a_out <<
"if_mouse_startup :"
101 <<
" can't putenv DYLD_LIBRARY_PATH."
112 if(!
put_env(
"DISPLAY",
":0.0"))
return false;
115 }
else if(bname==
"bin") {
185 inline void app_res_dir(
const std::string& a_exe_path,std::string& a_res_dir) {
186 a_res_dir = a_exe_path+
sep()+
".."+
sep()+
"res";
#define tools_vforit(a__T, a__v, a__it)
#define tools_vforcit(a__T, a__v, a__it)