Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Startup message could be improved in Pyinstaller #55

Open
lbeckman314 opened this issue Nov 15, 2023 · 0 comments
Open

Startup message could be improved in Pyinstaller #55

lbeckman314 opened this issue Nov 15, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request low priority Can be completed in the next 1-2 months

Comments

@lbeckman314
Copy link
Collaborator

lbeckman314 commented Nov 15, 2023

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);
}
@lbeckman314 lbeckman314 added the enhancement New feature or request label Nov 15, 2023
@lbeckman314 lbeckman314 self-assigned this Nov 15, 2023
@lbeckman314 lbeckman314 added the low priority Can be completed in the next 1-2 months label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority Can be completed in the next 1-2 months
Projects
None yet
Development

No branches or pull requests

1 participant