How to build Windows Tryton Client?


(Maxime Richez) #1

Here’s a procedure to build Windows Tryton Client:

First you need a Windows 32 bits (i’m using a Windows 7):

In msys interface:

  • Update database packages and system packages:
    pacman -Syu
  • Close msys window and relaunch msys32 to update packages:
    pacman -Su
  • Check installed packages:
    pacman -Qqe
  • Install some needed packages:
    pacman -S mercurial tar mingw-w64-i686-atk mingw-w64-i686-gcc mingw-w64-i686-gdk-pixbuf2 mingw-w64-i686-python2-gobject mingw-w64-i686-gobject-introspection mingw-w64-i686-goocanvas mingw-w64-i686-gtk3 mingw-w64-i686-nsis mingw-w64-i686-python2-babel mingw-w64-i686-python2-setuptools mingw-w64-i686-python2-pygtk
  • Download and install cx_Freeze 5.0.2 (there’s a bug with latest available cx_Freeze 5.1.1):
    wget http://repo.msys2.org/mingw/i686/mingw-w64-i686-python2-cx_Freeze-5.0.2-1-any.pkg.tar.xz
    pacman -U mingw-w64-i686-python2-cx_Freeze-5.0.2-1-any.pkg.tar.xz
  • Install pip:
    curl https://bootstrap.pypa.io/get-pip.py | python
    pip install python-dateutil
  • Clone Tryton and go to latest stable branch:
    hg clone http://hg.tryton.org/tryton
    cd tryton
    hg up 4.8
  • Execute client compilation script:
    sh make-win32-installer.sh

Now, you should get tryton-setup-4.8.2.exe
Hope this help ! Remarks and comments are welcome.


(Cédric Krier) #2

It is probably better to redirect to the homepage of MSYS2 and request to download the executable as the link may change in the future.

It will be good to have a link to the bug report so reader can see if it still apply on future versions.

I think it is not needed to point to the last stable. Reader will update the source to its target.

There is no need for the ./ so I think it will be clearer to remove it.


(Maxime Richez) #3

I updated guidelines following your suggestions…
About the bug, this is very strange… after building Tryton with cx_Freeze 5.0.2, i updated cx_Freeze to 5.1.1 and building Tryton was still working without any error! I made some tests, error is happening when building directly with cx_Freeze 5.1.1, if you build with previous version 5.0.2 and then update to 5.1.1 building the same Tryton folder is ok.
I made a comparison between Tryton folder build with 5.02 and Tryton folder build with 5.1.1 but can’t find which file is causing the error ( https://snag.gy/pl3G7P.jpg )


(Cédric Krier) #4

For me, it just mean that the dist folder kept the _gi dll. I guess you will be able to reproduce it if you clear dist folder before building.


(Maxime Richez) #5

I made a comparison between dist folder (with tryton.exe working) and another one recreated with cx_freeze 5.1.1 (tryton.exe not working): there’s no difference ! There’s no _gi.dll file in the both dist directory. So for me the only difference is in the generated tryton.exe file.


(Cédric Krier) #6

There is lib/gi/_gi.dll.a which is probably the dll that it tries to import.


(Maxime Richez) #7

I forget to add dll comparison in Meld :slight_smile:
Missing dll’s are : LIBEAY32.dll, SSLEAY32.dll, libgdk-win32-2.0-0.dll, libgirepository-1.0-1.dll, libgthread-2.0-0.dll, libgtk-win32-2.0-0.dll, libjasper-4.dll, libjpeg-8.dll, libpyglib-2.0-python2-0.dll, libtiff-5.dll

If i copy LIBEAY32.dll, SSLEAY32.dll, libgirepository-1.0-1.dll, into dist (5.1.1), tryton.exe is now working!

All thoses files are in /dist/lib directory and should be in /dist directory. Don’t know if problem is from generated setup-freeze.py or from cx_Freeze ?