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

Current state of show-available-fonts branch doesn't run on Windows #1108

Closed
aujo opened this issue Sep 23, 2018 · 9 comments
Closed

Current state of show-available-fonts branch doesn't run on Windows #1108

aujo opened this issue Sep 23, 2018 · 9 comments

Comments

@aujo
Copy link

aujo commented Sep 23, 2018

Frescobaldi crashes during start up. Running on WIndows 10. I attached a screenimage of the error message

afbeelding

@uliska
Copy link
Collaborator

uliska commented Sep 24, 2018

This is the first report that shows the limitation mentioned in the second paragraph of the installation instruction is actually accurate:

... which should work as long as the custom version doesn't rely on any Python modules that are not included in the binary release.

The background for this is that a Frescobaldi "installation" on Windows consists of two parts:

  1. The actual Python files in <install-dir>\frescobaldi_app
  2. Python itself, which is packaged in the various .exe files and DLLs

The Python files (1.) are those that can be replaced with the Git repository and that will be updated through the Git commands.

The Python distribution is bundled during the process of building a binary Windows release. This bundling pulls and bundles all Python modules that are used by the application. As a consequence the Windows version will fail with exactly the reported error as soon as the code in the Git repository tries to import a Python module that had not been required at the moment when the Windows binary was compiled.

This means the only useful solution is to rebuild the Windows binary release. Unfortunately I don't know how this is actually done and if it can reasonably be done on the user's computer. AFAICS it is done by running the script windows/freeze.py in the Frescobaldi repository, but I'm not sure about any dependencies. Besides the script mentions C:\Python27\Python and PyQt4 instead of Python 3 and PyQt5, so I'm not sure if/how it currently works (it has to work in principle since we do have a binary release of Frescobaldi 3).

I will update the installation instructions and try to get the necessary information.

@uliska
Copy link
Collaborator

uliska commented Sep 24, 2018

Ah, that's why it felt so familiar: #1093

@uliska
Copy link
Collaborator

uliska commented Sep 26, 2018

I just realized the issue at hand is probably something different. I see that you are using Python 3.5, and the auto element that is failed to be loaded has been added to Python in version 3.6.

Since the use of this feature is completely unimportant and doesn't warrant requiring a higher Python version (that wouldn't be available in many reasonably current Linux distros either) I can easily change the code to avoid using it. When I have the chance to do so later today I'll post an update and would ask you to test again. Note that this should also affect the master branch by now.

NOTE: This doesn't make the need for a way to build Windows installations obsolete.

uliska added a commit that referenced this issue Sep 26, 2018
This has been added in Python 3.6, so a reasonable number of users
might get problems.
auto() is really not needed, so it can be removed.

closes #1108
@uliska
Copy link
Collaborator

uliska commented Sep 26, 2018

Should be fixed by 1a05883.
@aujo could you please test?

@aujo
Copy link
Author

aujo commented Sep 27, 2018

Frescobaldi still freezes. This time pathlib is the culprit:

afbeelding

@uliska
Copy link
Collaborator

uliska commented Sep 27, 2018

OK. pathlib is an addition to Python 3.4, so this is not the issue here. But since it seems I introduced a module that had so far not been used by Frescobaldi I assume this is an instance of the issue I described in my first comment above.

So presumably the only way around this is to somehow obtain a new "binary release" of a newer state of the repository. Thoughts on this have already started but I can't tell you when there will be a step-by-step guide to "build" Frescobaldi on Windows, sorry.

@aujo
Copy link
Author

aujo commented Sep 28, 2018

Too bad. Well, I guess I'll have to try and build a Frescobaldi binary for Windows. Could be a nice challenge for the weekend

@uliska
Copy link
Collaborator

uliska commented Sep 12, 2019

I'm pretty sure this one is obsolete by now. If Windows problems pop up during preparation of the next release they'll probably be different anyway.

@uliska uliska closed this as completed Sep 12, 2019
@wbsoft
Copy link
Collaborator

wbsoft commented Sep 25, 2019

Maybe the issue is also that the freeze script only bakes python modules in the installer that are actually used. See windows/freeze.py. So updating the source files is not enough, freeze should be run as well to create a new self-contained installer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants