mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
Fix "... is not a Multifile" error in pdeployed executables
This commit is contained in:
parent
f9f62f17f1
commit
e1d7c737cf
@ -342,7 +342,7 @@ make_parent_window() {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
P3D_instance *Panda3DBase::
|
P3D_instance *Panda3DBase::
|
||||||
create_instance(const string &p3d, bool start_instance,
|
create_instance(const string &p3d, bool start_instance,
|
||||||
char **args, int num_args, const int &p3d_offset) {
|
char **args, int num_args, int p3d_offset) {
|
||||||
// Check to see if the p3d filename we were given is a URL, or a
|
// Check to see if the p3d filename we were given is a URL, or a
|
||||||
// local file.
|
// local file.
|
||||||
Filename p3d_filename = Filename::from_os_specific(p3d);
|
Filename p3d_filename = Filename::from_os_specific(p3d);
|
||||||
@ -356,9 +356,9 @@ create_instance(const string &p3d, bool start_instance,
|
|||||||
|
|
||||||
p3d_filename.make_absolute();
|
p3d_filename.make_absolute();
|
||||||
os_p3d_filename = p3d_filename.to_os_specific();
|
os_p3d_filename = p3d_filename.to_os_specific();
|
||||||
}
|
}
|
||||||
if (is_local) {
|
if (is_local) {
|
||||||
read_p3d_info(p3d_filename);
|
read_p3d_info(p3d_filename, p3d_offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build up the token list.
|
// Build up the token list.
|
||||||
@ -454,9 +454,9 @@ delete_instance(P3D_instance *inst) {
|
|||||||
// parameters (like width and height).
|
// parameters (like width and height).
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
bool Panda3DBase::
|
bool Panda3DBase::
|
||||||
read_p3d_info(const Filename &p3d_filename) {
|
read_p3d_info(const Filename &p3d_filename, int p3d_offset) {
|
||||||
PT(Multifile) mf = new Multifile;
|
PT(Multifile) mf = new Multifile;
|
||||||
if (!mf->open_read(p3d_filename)) {
|
if (!mf->open_read(p3d_filename, p3d_offset)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
int si = mf->find_subfile("p3d_info.xml");
|
int si = mf->find_subfile("p3d_info.xml");
|
||||||
|
@ -49,10 +49,10 @@ protected:
|
|||||||
|
|
||||||
P3D_instance *
|
P3D_instance *
|
||||||
create_instance(const string &p3d, bool start_instance,
|
create_instance(const string &p3d, bool start_instance,
|
||||||
char **args, int num_args, const int &p3d_offset = 0);
|
char **args, int num_args, int p3d_offset = 0);
|
||||||
void delete_instance(P3D_instance *instance);
|
void delete_instance(P3D_instance *instance);
|
||||||
|
|
||||||
bool read_p3d_info(const Filename &p3d_filename);
|
bool read_p3d_info(const Filename &p3d_filename, int p3d_offset = 0);
|
||||||
bool parse_token(const char *arg);
|
bool parse_token(const char *arg);
|
||||||
bool parse_int_pair(const char *arg, int &x, int &y);
|
bool parse_int_pair(const char *arg, int &x, int &y);
|
||||||
string lookup_token(const string &keyword) const;
|
string lookup_token(const string &keyword) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user