client: urho3d_path
This commit is contained in:
parent
a3e4705452
commit
c242626edf
@ -47,12 +47,13 @@ struct CApp: public App, public u3d::Application
|
||||
engineParameters_["FullScreen"] = false;
|
||||
engineParameters_["Headless"] = false;
|
||||
|
||||
// TODO: Proper paths
|
||||
ss_ urho3d_path = interface::getGlobalFilesystem()->get_absolute_path(
|
||||
g_client_config.urho3d_path);
|
||||
ss_ tmp_path = interface::getGlobalFilesystem()->get_absolute_path(
|
||||
g_client_config.cache_path+"/tmp");
|
||||
engineParameters_["ResourcePaths"] = u3d::String()+
|
||||
"/home/celeron55/softat/Urho3D/Bin/CoreData;"+
|
||||
"/home/celeron55/softat/Urho3D/Bin/Data;"+
|
||||
urho3d_path.c_str()+"/Bin/CoreData;"+
|
||||
urho3d_path.c_str()+"/Bin/Data;"+
|
||||
tmp_path.c_str();
|
||||
engineParameters_["AutoloadPaths"] = "";
|
||||
|
||||
|
@ -41,6 +41,12 @@ bool Config::check_paths()
|
||||
fail = true;
|
||||
}
|
||||
|
||||
if(!check_file_readable(urho3d_path+"/Bin/CoreData/Shaders/GLSL/Basic.glsl")){
|
||||
log_e(MODULE, "Urho3D doesn't seem to exist in urho3d_path=\"%s\"",
|
||||
cs(urho3d_path));
|
||||
fail = true;
|
||||
}
|
||||
|
||||
auto *fs = interface::getGlobalFilesystem();
|
||||
fs->create_directories(cache_path);
|
||||
if(!check_file_writable(cache_path+"/write.test")){
|
||||
|
@ -10,6 +10,7 @@ namespace client
|
||||
ss_ server_address;
|
||||
ss_ share_path = "..";
|
||||
ss_ cache_path = "../cache";
|
||||
ss_ urho3d_path = "../../Urho3D";
|
||||
|
||||
bool check_paths();
|
||||
};
|
||||
|
@ -50,13 +50,14 @@ int main(int argc, char *argv[])
|
||||
|
||||
client::Config &config = g_client_config;
|
||||
|
||||
const char opts[100] = "hs:P:C:l:";
|
||||
const char opts[100] = "hs:P:C:U:l:";
|
||||
const char usagefmt[1000] =
|
||||
"Usage: %s [OPTION]...\n"
|
||||
" -h Show this help\n"
|
||||
" -s [address] Specify server address\n"
|
||||
" -P [share_path] Specify share/ path\n"
|
||||
" -C [cache_path] Specify cache/ path\n"
|
||||
" -U [urho3d_path] Specify Urho3D path\n"
|
||||
" -l [integer] Set maximum log level (0...5)\n"
|
||||
;
|
||||
|
||||
@ -80,6 +81,10 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, "INFO: config.cache_path: %s\n", c55_optarg);
|
||||
config.cache_path = c55_optarg;
|
||||
break;
|
||||
case 'U':
|
||||
fprintf(stderr, "INFO: config.urho3d_path: %s\n", c55_optarg);
|
||||
config.urho3d_path = c55_optarg;
|
||||
break;
|
||||
case 'l':
|
||||
log_set_max_level(atoi(c55_optarg));
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user