mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
p3dembed --prep
This commit is contained in:
parent
516352a4e0
commit
55ba9a1b3d
@ -193,7 +193,7 @@ class Installer:
|
||||
if not self.includeRequires:
|
||||
return
|
||||
|
||||
host = HostInfo(self.hostUrl, rootDir = rootDir, asMirror = False)
|
||||
host = HostInfo(self.hostUrl, rootDir = rootDir, asMirror = True)
|
||||
if not host.readContentsFile():
|
||||
if not host.downloadContentsFile(self.http):
|
||||
Installer.notify.error("couldn't read host")
|
||||
@ -224,12 +224,6 @@ class Installer:
|
||||
continue
|
||||
break
|
||||
|
||||
# Remove the original multifiles. We don't need them and they take up space.
|
||||
for mf in glob.glob(Filename(rootDir, "hosts/*/*/*.mf").toOsSpecific()):
|
||||
os.remove(mf)
|
||||
for mf in glob.glob(Filename(rootDir, "hosts/*/*/*/*.mf").toOsSpecific()):
|
||||
os.remove(mf)
|
||||
|
||||
def buildAll(self, outputDir = "."):
|
||||
""" Creates a (graphical) installer for every known platform.
|
||||
Call this after you have set the desired parameters. """
|
||||
@ -624,7 +618,6 @@ class Installer:
|
||||
for root, dirs, files in os.walk(rootDir.toOsSpecific()):
|
||||
for name in files:
|
||||
file = Filename.fromOsSpecific(os.path.join(root, name))
|
||||
if file.getExtension().lower() == "mf": continue
|
||||
file.makeAbsolute()
|
||||
file.makeRelativeTo(rootDir)
|
||||
outdir = file.getDirname().replace('/', '\\')
|
||||
|
@ -173,6 +173,20 @@ run_embedded(streampos read_offset, int argc, char *argv[]) {
|
||||
P3D_instance_feed_url_stream_ptr = &P3D_instance_feed_url_stream;
|
||||
P3D_instance_handle_event_ptr = &P3D_instance_handle_event;
|
||||
|
||||
// Calling the executable with --prep just prepares the directory
|
||||
// structure, this is usually invoked in the installer.
|
||||
if (argc == 2 && strcmp(argv[1], "--prep") == 0) {
|
||||
_window_type = P3D_WT_hidden;
|
||||
_log_basename = "prep";
|
||||
P3D_token token;
|
||||
token._keyword = "stop_on_ready";
|
||||
token._value = "1";
|
||||
_tokens.push_back(token);
|
||||
token._keyword = "hidden";
|
||||
token._value = "1";
|
||||
_tokens.push_back(token);
|
||||
}
|
||||
|
||||
// Now call init_plugin() to verify that we got all of the required
|
||||
// function pointers. This will also call P3D_initialize().
|
||||
if (!init_plugin("", _host_url, _verify_contents, _this_platform,
|
||||
|
Loading…
x
Reference in New Issue
Block a user