diff --git a/direct/src/p3d/DeploymentTools.py b/direct/src/p3d/DeploymentTools.py index 86bfdf6d51..672c4267c2 100644 --- a/direct/src/p3d/DeploymentTools.py +++ b/direct/src/p3d/DeploymentTools.py @@ -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") @@ -223,12 +223,6 @@ class Installer: Standalone.notify.warning(" -> %s failed for platform %s" % (package.packageName, package.platform)) 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. @@ -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('/', '\\') diff --git a/direct/src/plugin_standalone/p3dEmbed.cxx b/direct/src/plugin_standalone/p3dEmbed.cxx index f29d29b4e5..2df8ad86d6 100644 --- a/direct/src/plugin_standalone/p3dEmbed.cxx +++ b/direct/src/plugin_standalone/p3dEmbed.cxx @@ -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,