Ghini / ghini.desktop

plant collections manager (desktop version)
http://ghini.github.io/
GNU General Public License v2.0
24 stars 14 forks source link

we need a Windows installer for 3.1 #403

Open mfrasca opened 6 years ago

mfrasca commented 6 years ago

it would be nice to have it just as the one for 1.0, produced by appveyor and uploaded to github every time we do a new commit in the development line. the main difference is in the dependencies: 3.1 uses gi and introspection, so you don't install python packages, you make sure that the libraries are correctly installed on the system, and leave to python the task to link them, with from gi.repository import xxx.

RoDuth commented 6 years ago

I had a bit of a go at getting 3.1 to work on windows a few weeks ago but no luck. Tried several methods (for the gtk+ stuff) but it fell down at various points depending on the approach I took. When I next get some time I'll have another look and try to be more specific. Have you managed to get it working in windows? If so how?

As for the installer: from what I have read it seems like a similar approach is needed to the current py2exe method to pick up all the relevant components. In the long term I still think we should switch to pyinstaller.

Also, I had a go at mac osx at the same time and had no luck either. Libchamplain was the issue if I remember right. Sure it's not a big issue just no easy fix (e.g. brew install etc.) for it at this point.

I had no issues on linux.

I should add that all this was in a few hours I had spare one day, I did not put a lot of serious effort in nor record much detail. Just testing the water really, mostly in VMs again. Really should have a proper look when I next get a few hours spare...

mfrasca commented 6 years ago

I didn't yet have a look at this one. Champlain you definitely need to install and make visible, somehow.
please check the devinstall.sh script, it lists the library requirements, those that can't be solved with pip. we need to solve them on Windows, too. sed -ne 's/"//g' -e 's/PROBLEMS=.PROBLEMS//p' scripts/devinstall.sh in particular: python3-gi, gir1.2-gtkclutter, gir1.2-gtkchamplain-0.12.

RoDuth commented 6 years ago

OK, so I had another go at this, here is a little more info:

Windows: using msys2 approach as described here After running pacman -Syu then pacman -Su I used pacman to install these packages 32 bit (available packages):

base-devel
mingw-w64-i686-toolchain
mingw-w64-i686-cmake
mingw-w64-i686-python3-setuptools
mingw-w64-i686-python3-pip
mingw-w64-i686-python3-wheel
mingw-w64-i686-python3-lxml
mingw-w64-i686-python3-pillow
mingw-w64-i686-gtk3
mingw-w64-i686-python3-gobject
mingw-w64-i686-clutter
mingw-w64-i686-libchamplain

and/or their 64 bit counter parts:

base-devel
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-cmake
mingw-w64-x86_64-python3-setuptools
mingw-w64-x86_64-python3-pip
mingw-w64-x86_64-python3-wheel
mingw-w64-x86_64-python3-lxml
mingw-w64-x86_64-python3-pillow
mingw-w64-x86_64-gtk3
mingw-w64-x86_64-python3-gobject
mingw-w64-x86_64-clutter
mingw-w64-x86_64-libchamplain

I had to remove ==2.3.0 from the pillow entry in setup.py as this installs version 5.2.0, no idea if that is likely to cause issues...

I should add gdata doesn't have a python3 version on PyPI (there is this version here) but my understanding is that we no longer need it as it was only ever a part of the now removed picasa plugin (using git grep gdata show nothing in code where as git checkout b7fcf384~ - the commit before picasa was removed and running git grep gdata shows it in the picasa plugin and a comment in the docs about it being needed for picasa) so I just removed it from setup.py.

Also needed to pip install sqlalchemy==1.2.7 before python setup.py install (run in either the mingw32 or mingw64 shell dependent)

ghini brings up the connection manager > create new database, accepting defaults > "The database you have connected to is empty." > hit OK > crash with this on the command line:

2018-09-12 10:51:59,021 - bauble.connmgr - INFO - 9476 - running unreleased version
2018-09-12 10:52:00,971 - bauble - INFO - 11220 - <class 'bauble.error.EmptyDatabaseError'>(EmptyDatabaseError)
Windows fatal exception: access violation

Current thread 0x00002bd4 (most recent call first):
  File "C:/msys64/mingw64/lib/python3.7/site-packages/ghini.desktop-3.1.6-py3.7.egg\bauble\ui.py", line 251 in show
  File "C:/msys64/mingw64/lib/python3.7/site-packages/ghini.desktop-3.1.6-py3.7.egg\bauble\__init__.py", line 418 in main
  File "c:/msys64/mingw64/lib/python3.7/site-packages/ghini.desktop-3.1.6-py3.7.egg/EGG-INFO/scripts/ghini", line 26 in <module>
  File "C:/msys64/mingw64/lib/python3.7/site-packages\pkg_resources\__init__.py", line 1441 in run_script
  File "C:/msys64/mingw64/lib/python3.7/site-packages\pkg_resources\__init__.py", line 661 in run_script
  File "C:/msys64/mingw64/bin/ghini", line 4 in <module>
Segmentation fault

and this bauble.log

On a side note, for mac osx I brew install gtk+3 pygobject3 libchamplain and it crashes at the same point as above with (ghini:36653): Clutter-Gtk-ERROR **: 13:41:51.943: *** Unsupported backend.

mfrasca commented 6 years ago

for the segmentation fault, check https://stackoverflow.com/questions/16731115/how-to-debug-a-python-segmentation-fault/48303368#48303368 any time you meet things that you have to fix, please consider opening an issue. I tend to open issues even if it's going to stay open just for 10 minutes, for traceability. thank you for all this work, and please keep in mind, maybe you are already doing that, but do keep in mind this has to go in AppVeyor, so that it may produce the binaries automatically at each commit.

RoDuth commented 6 years ago

fault handler is already enabled:

https://github.com/Ghini/ghini.desktop/blob/17c6eeb048744aee97bc18fcec060278eabbda13/bauble/__init__.py#L41-L45

at some point I also got this, not sure how, why and can't seem to replicate it again but it may prove relevent:

Thread 0x00001664 (most recent call first):
  File "C:/msys64/mingw32/lib/python3.7\ssl.py", line 908 in read
  File "C:/msys64/mingw32/lib/python3.7\ssl.py", line 1049 in recv_into
  File "C:/msys64/mingw32/lib/python3.7\socket.py", line 589 in readinto
  File "C:/msys64/mingw32/lib/python3.7\http\client.py", line 610 in _safe_read
  File "C:/msys64/mingw32/lib/python3.7\http\client.py", line 460 in read
  File "C:/msys64/mingw32/lib/python3.7/site-packages/ghini.desktop-3.1.6-py3.7.egg\bauble\connmgr.py", line 142 in retrieve_latest_release_date
  File "C:/msys64/mingw32/lib/python3.7\threading.py", line 865 in run
  File "C:/msys64/mingw32/lib/python3.7\threading.py", line 917 in _bootstrap_inner
  File "C:/msys64/mingw32/lib/python3.7\threading.py", line 885 in _bootstrap

(between Windows fatal exception: access violation and Current thread 0x00002bd4 (most recent call first): as above)