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

Convert Windows Install to PyInstaller #199

Merged
merged 29 commits into from Oct 22, 2019
Merged

Convert Windows Install to PyInstaller #199

merged 29 commits into from Oct 22, 2019

Conversation

danyeaw
Copy link
Member

@danyeaw danyeaw commented Aug 30, 2019

The current method of building Windows packages takes about 1 hour. It requires redownloading and installing all of the needed packages to a build root, compiling everything, removing unnecessary files, creating an exe, and then packaging it into an installer. It is prone to many issues, and troubleshooting it takes a very long time because the iterations are so long.

This PR attempts to fix this by using PyInstaller instead. It takes a different approach to analyze the code and look for dependencies. This is very fast, and I can package the app in to an installer in 6 minutes - with most of the time spent building the installer and portable installer files themselves.

There are issues with PyInstaller and GTK/msys2. I have been working through these, but this is the current status:

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Documentation content changes

What is the current behavior?

Very slow windows build times.

Issue Number: N/A

What is the new behavior?

Build times are a couple of orders of magnitude faster.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@amolenaar
Copy link
Member

The code looks good. It's far less code, which is always good. Is there an installer .exe file I can try on my vanilla windows machine?

@danyeaw
Copy link
Member Author

danyeaw commented Sep 10, 2019

@amolenaar I have uploaded an installer for testing to a draft Release.

@amolenaar
Copy link
Member

I finally ran the installer on my (vanilla) Windows machine.

It works :)

Screenshot (1)

@danyeaw
Copy link
Member Author

danyeaw commented Sep 28, 2019

@amolenaar Ya, now if we can only get rid of that pesky command prompt that pops up!

@amolenaar
Copy link
Member

Isn’t the ‘pythonw’ executable supposed to take care of that?

@danyeaw
Copy link
Member Author

danyeaw commented Sep 28, 2019

We need to build the app using the windowed option, which only fails when debug mode is disabled 😵

Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
Signed-off-by: Dan Yeaw <dan@yeaw.me>
@danyeaw danyeaw marked this pull request as ready for review October 22, 2019 01:15
Signed-off-by: Dan Yeaw <dan@yeaw.me>
@danyeaw danyeaw merged commit ef1ef87 into master Oct 22, 2019
@danyeaw danyeaw deleted the pyinstaller branch October 22, 2019 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants