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

standalone windows exe distribution script #15

Open
2 of 7 tasks
Aeva opened this issue Dec 24, 2016 · 3 comments
Open
2 of 7 tasks

standalone windows exe distribution script #15

Aeva opened this issue Dec 24, 2016 · 3 comments

Comments

@Aeva
Copy link
Owner

Aeva commented Dec 24, 2016

Create a script that generates a stand-alone windows exe file for the gui tool, using pyinstaller.

Actionable things:

  • working proof of concept build
  • create some error logging layer
  • only include necessary gir files as binaries
  • create a build batch file
  • windows icon for resulting exe
  • windowless build?
  • some kind of readme explaining the hacks needed to get the build script running >_<
Aeva added a commit that referenced this issue Jan 1, 2017
Tangentally relates to issue #15.
@Aeva
Copy link
Owner Author

Aeva commented Jan 1, 2017

With some experimentation, I was able to get the gui to run on windows. However, the "pyinstaller" build was not successful. It did complain that it could not find "C:/Python27/share/gir-1.0.", and there is indeed no "share" directory.

The steps I've taken so far were:

  1. install 32bit python 2.7
  2. install pillow
  3. install the "all in one" windows python-gobject" bundle. Make sure that "gtk" is included for install.

From there, you can run the converter_gui.py script from this project, and the basic functionality seems to work ok. I only tested the png exporter, though.

Also note, pillow must be installed from the commandline, via easy_install or pip, so it is definitely necessary to bundle an exe, as I expect most users interested in this would not know how to do this :/

Also note, with the above it takes almost a minute for the program to start O_O wtf

@Aeva
Copy link
Owner Author

Aeva commented Jan 1, 2017

Some more progress. There is a bug in pyinstaller with regards to the gobject introspection stuff. It can be worked around by copying c:/python27/lib/site-packages/gnome/share to c:/python27/.

Second problem, is that this needs to be built with freeze, so do something like pyinstaller -F converter_gui.py.

The resulting program will still crash, unfortunately. Its hard to get the command output, but I got a screenshot D: The relevant error in the traceback is: gi.RepositoryError: Typelib file for namespace 'GdkPixbuf', version '2.0' not found

Getting warmer :O

Aeva pushed a commit that referenced this issue Jan 2, 2017
This incorperates a work-around from here:
pyinstaller/pyinstaller#1966

This isn't perfect:

 - you need to modify your python directory on windows (copy
   c:/python27/lib/site-packages/gnome/shared to c:/python27/shared)

 - after generating the exe file, you also need to copy the glade file
   and the svg files into the dist dir, or the exe will crash.

This relates to issue #15.

I also updated the .gitignore file.
@Aeva
Copy link
Owner Author

Aeva commented Jan 2, 2017

Ok, got it to build after some helter skelter work-arounds:

  • you need to modify your python directory on windows (copy c:/python27/lib/site-packages/gnome/shared to c:/python27/shared)
  • after generating the exe file, you also need to copy the glade file and the svg files into the dist dir, or the exe will crash.

Aeva pushed a commit that referenced this issue Jan 4, 2017
Aeva pushed a commit that referenced this issue Jan 4, 2017
Aeva pushed a commit that referenced this issue Jan 7, 2017
Aeva added a commit that referenced this issue Jan 7, 2017
Relates to issue #13 and #15.
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

No branches or pull requests

1 participant