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
Improvement in OneDir structure #5575
Comments
I'd really like this too. It's been discussed a lot but we never did work out a works universally solution. The real problem with symlinks is Windows. It's rubbish at them. First you need to make them. Python's I'm not saying for sure that it's impossible, but I don't think Windows is capable of doing this. I tried the next closest thing I could think of: to create a shim executable written in C which just says launch the executable with the same name as this shim but inside a The best solution I can think of is to rework the bootloader so that it sets |
As an alternative while this is being addressed, I'd like to mention InnoSetup which creates installers for tidier deployment. Currently we create a --onedir package with PyInstaller, then use an InnoSetup script to compress that into a single deployable installer .exe. On the user end, this launches a typical Windows setup wizard, which can create desktop/start menu symlinks to the actual |
This isn't hard, it's just a backwards-incompatible change. But then there's a lot of backwards-incompatible changes that need doing so I don't see why it would be too hard to do this. |
@jjuod @bwoodsend |
Coming from #6075 Its good to hear that its not hard to do this :) One question - By backwards incompatible change, do you mean that a built pyinstaller can either do this way or that way - but can't do this based on a user configured flag? If so, that would be a bummer. If that is possible, this can be an additional optional flag to make the pyinstaller make the dependencies go to a sub-directory like a bin folder. If we are able to do this, it would be great - as the EXE directory will look more professional and well received by the community. |
It's very difficult to pass even the simplest of configurations to the bootloader because it's written in C but we don't want our users to need a C compiler just to use PyInstaller. Possibly, it could detect at runtime that the |
What if we implemented this as "directory sideloading"? The So bootloader could look for This, however, raises a question of where And I'm not particularly keen on having to deal with two possible |
I can't see why this would matter but I've said those words and been proven wrong enough times to know that that doesn't mean much.
The symlink approach knocks out Windows 7 and 8 (which was still some 25% of Windows users last time I checked) because only absolute link targets are allowed - i.e. the symlink would have to know the location of the bundle which would make it no longer be relocatable. I'd say my biggest concerns are the added complexity to the bootloader and the 3rd permutation to have to test on CI/CD - unless we limit which tests to run this permutation, it'll be another 40 minutes or so testing time. |
I would like to note that after I release 4.5, the plan is to work towards 5.0. Which can include as many breaking changes as we want. So we could redesign the entire bundle format/structure, without worrying about compatibility/non-breaking changes as much. |
This is great to know and if so we can add this capability in the 5.0 version which is already planned to be a breaking change :) |
Big +1 on this enhancement from me. I've come up with a workaround solution where I create a simple wrapper script on Windows, and use symlinks otherwise, see my After my post-processing, the directory structure looks like:
where CD minegauler
START minegauler.exe Possibly I'm missing some edge-case handling here, but maybe this is something that can be built-on as a workaround or even a solution in v5.x? |
I am frustrated of finding the executable in large list of bundled libraries and files. There are more than 40 files in the main directory of OneDir build. Exposing that directory to users might irritate them in finding the correct file to click, hence decreasing usability and effectiveness of software.
I also tried OneFile build, but facing ABI Incompatibility issues #5573
Solution:
A better way will be to shift
dist/<onedir>
todist/newfolder/<onedir>
and creating a symlink innewfolder
to point to the executable in jungle of files. This way user opening the directory will be happy with executables, others may choose to dive deeper. If not by default, at least an option to do so will be better.The text was updated successfully, but these errors were encountered: