Skip to content

Startup message could be improved in Pyinstaller  #55

@lbeckman314

Description

@lbeckman314

Currently the "Initializing ..." message on startup (#50) is written directly into the Pyinstaller bootloader (due to the Splash Screen feature not being currently being supported on macOS):

bootloader/src/pyi_main.c

// If only one temp dir is found then we can assume that we're in the parent 
// and should output the "Initializing ..." message
if (count == 1) {
    printf("Initializing ...\n");
}

The issue with the current logic is that if more than one DRS Downloader process is started, only the first process will output the startup message.

A more robust approach might be to update Pyinstaller to create a temporary "parent" directory for each new intitial process in which subsequent calls to the bootloader can extract files into (each multiprocessing Python process calls the same bootloader on startup).


Could leverage the runtime_tmpdir arguments in the EXE class of Pyinstaller:

PyInstaller/building/api.py

self.runtime_tmpdir = kwargs.get('runtime_tmpdir', None)

Which is then passed to the function responsible for making the temp directory to unpack the archive:

bootloader/src/pyi_archive.c

/* Check for custom run-time temporary directory options */
runtime_tmpdir = pyi_arch_get_option(status, "pyi-runtime-tmpdir");
if (runtime_tmpdir != NULL) {
    VS("LOADER: Found runtime-tmpdir %s\n", runtime_tmpdir);
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestlow priorityCan be completed in the next 1-2 months

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions