mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
onpluginfail in more cases
This commit is contained in:
parent
97f711de8c
commit
086e53a453
@ -418,6 +418,9 @@ int PPInstance::DownloadP3DComponents( std::string& p3dDllFilename )
|
||||
}
|
||||
}
|
||||
|
||||
if (error) {
|
||||
set_failed();
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
@ -448,7 +451,6 @@ int PPInstance::LoadPlugin( const std::string& dllFilename )
|
||||
nout << "Attempting to load core API from " << pathname << "\n";
|
||||
if (!load_plugin(pathname, "", "", true, "", "", "", false, false, nout)) {
|
||||
nout << "Unable to launch core API in " << pathname << "\n";
|
||||
set_failed();
|
||||
error = 1;
|
||||
} else {
|
||||
#ifdef PANDA_OFFICIAL_VERSION
|
||||
@ -464,6 +466,9 @@ int PPInstance::LoadPlugin( const std::string& dllFilename )
|
||||
}
|
||||
}
|
||||
|
||||
if (error) {
|
||||
set_failed();
|
||||
}
|
||||
return error ;
|
||||
}
|
||||
|
||||
|
@ -480,7 +480,7 @@ url_notify(const char *url, NPReason reason, void *notifyData) {
|
||||
string contents_filename = _root_dir + "/contents.xml";
|
||||
if (!read_contents_file(contents_filename)) {
|
||||
nout << "Unable to read contents file " << contents_filename << "\n";
|
||||
// TODO: fail
|
||||
set_failed();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1107,7 +1107,7 @@ downloaded_file(PPDownloadRequest *req, const string &filename) {
|
||||
string contents_filename = _root_dir + "/contents.xml";
|
||||
if (!read_contents_file(contents_filename)) {
|
||||
nout << "Unable to read contents file " << contents_filename << "\n";
|
||||
// TODO: fail
|
||||
set_failed();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1231,7 +1231,7 @@ downloaded_plugin(const string &filename) {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: fail
|
||||
set_failed();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1239,12 +1239,13 @@ downloaded_plugin(const string &filename) {
|
||||
string pathname = _core_api_dll.get_pathname(_root_dir);
|
||||
if (!copy_file(filename, pathname)) {
|
||||
nout << "Couldn't copy " << pathname << "\n";
|
||||
set_failed();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_core_api_dll.quick_verify(_root_dir)) {
|
||||
nout << "After copying, " << pathname << " is no good.\n";
|
||||
// TODO: fail
|
||||
set_failed();
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user