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
Declutter onedir bundles #7713
Declutter onedir bundles #7713
Conversation
fc30bde
to
7b114e2
Compare
I don't understand why CI is not running on this. |
I think it's due to merge conflict. I'll rebase the symlinks branch, and then you can rebase this on top of it... |
Ahh yes, https://github.com/orgs/community/discussions/26304 says as much. |
I suppose there's no hurry for this PR given that it has to wait until after #7619 which in turn has to wait until after the next release. |
Well that's CI gummed up for the rest of the day... |
da12802
to
ec09c8e
Compare
The This means that we should probably switch from |
Reckon we need some form of new |
I think it would just make things more confusing, since it wouldn't map to onefile builds nor to onedir macOS app bundles... |
When building with BUNDLE(), all files par the executable and (for side-loaded pkgs) and the .pkg are moved into a directory with non-configurable name `_internal`. When running the application, set MEIPASS to the `_internal` directory rather than the directory containing the executable. Since, MEIPASS is used to derive library/resource search paths, those adjust automatically and in theory, only people using `dirname(sys.executable)` should have new issues finding resources at runtime after this change.
I'm really not sure about the names for the new options. |
Hmmm, yeah. It's currently called |
I suppose |
One thing I'm not particularly happy about is that |
Do you do run things with the raw bootloaders in |
Yeah, it's more of a philosophical/conceptual concern. Definitely not a blocker, though. |
Add a --contents-directory CLI option and corresponding contents_directory spec file option to change the otherwise hard-coded name of the directory in which all a onedir's non EXE contents are hidden. Note that this, whilst this spec file option would make the most sense as a parameter to BUNDLE(), it instead has to be an option to EXE() which BUNDLE() then fishes out of the EXE()'s configuration due to EXE() being the only place where OPTION TOC entries can go.
When building in onedir mode, move everything except the executable into a subdirectory so the executable is easily findable.
I'm deliberately not making this optional for now because the new if/else path arithmetic bootloader logic it would require will multiply with all the other if/else path arithmetic bootloader logic for macOS
.app
bundles and the too many variants ofMERGE()
leading to a testing/debugging hell hole which far exceeds my motivation to implement.This is all rebased on top of #7619 to avoid the merge conflicts it would otherwise lead to.