p3dembed --prep

This commit is contained in:
rdb 2010-01-06 09:36:52 +00:00
parent 516352a4e0
commit 55ba9a1b3d
2 changed files with 15 additions and 8 deletions

View File

@ -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('/', '\\')

View File

@ -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,