# How to build Windows Tryton Client?

**URL:** https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563
**Category:** Developer
**Created:** [May 28, 2018, 7:50am UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563 "2018-05-28T07:50:01Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![maxx](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/maxx/32/2320_2.png) [@maxx](https://discuss.tryton.org/u/maxx)
#### Post date: [May 28, 2018, 7:50am UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/1 "2018-05-28T07:50:01Z")

</div>

**Here’s a procedure to build Windows Tryton Client:**

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

- install msys32 ([https://www.msys2.org/](https://www.msys2.org/) - Choose i686 executable)
- after installation, launch mingw32.exe

In msys interface:

- Update database packages and system packages:

```auto
pacman -Syu

```

- Close msys window and relaunch msys32 to update packages:

```auto
pacman -Su

```

- Check installed packages:

```auto
pacman -Qqe

```

- Install some needed packages:

```auto
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 mingw-w64-i686-librsvg

```

- Download and install cx\_Freeze 5.0.2 (there’s a bug with latest available cx\_Freeze 5.1.1):

```auto
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:

```auto
pacman -S python-pip
pip install python-dateutil

```

- Clone Tryton and go to latest stable branch:

```auto
hg clone http://hg.tryton.org/tryton
cd tryton
hg up 4.8

```

- Execute client compilation script:

```auto
sh make-win32-installer.sh

```

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

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [May 28, 2018, 3:16pm UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/2 "2018-05-28T15:16:57Z")

</div>

> [@maxx](#):
>
> install msys32 ([http://repo.msys2.org/distrib/i686/msys2-i686-20161025.exe](http://repo.msys2.org/distrib/i686/msys2-i686-20161025.exe))

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.

> [@maxx](#):
>
> there’s a bug with latest available cx\_Freeze 5.1.1

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

> [@maxx](#):
>
> Clone Tryton and go to latest stable branch (4.8):

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

> [@maxx](#):
>
> sh ./make-win32-installer.sh

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

---

<div class="post-metadata">

### Author: ![maxx](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/maxx/32/2320_2.png) [@maxx](https://discuss.tryton.org/u/maxx)
#### Post date: [May 29, 2018, 2:41pm UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/3 "2018-05-29T14:41:11Z")

</div>

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](https://snag.gy/pl3G7P.jpg) )

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [May 29, 2018, 9:10pm UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/4 "2018-05-29T21:10:28Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![maxx](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/maxx/32/2320_2.png) [@maxx](https://discuss.tryton.org/u/maxx)
#### Post date: [May 30, 2018, 7:46am UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/5 "2018-05-30T07:46:33Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [May 30, 2018, 7:49am UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/6 "2018-05-30T07:49:54Z")

</div>

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

---

<div class="post-metadata">

### Author: ![maxx](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/maxx/32/2320_2.png) [@maxx](https://discuss.tryton.org/u/maxx)
#### Post date: [May 30, 2018, 8:06am UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/7 "2018-05-30T08:06:37Z")

</div>

I forget to add dll comparison in Meld 🙂  
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 ?

---

<div class="post-metadata">

### Author: ![wuf31](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/wuf31/32/161_2.png) [@wuf31](https://discuss.tryton.org/u/wuf31)
#### Post date: [July 10, 2018, 4:29am UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/8 "2018-07-10T04:29:12Z")

</div>

Latest tryton client is using _python3_ as a requirement.  
Can this be updated to _python3_ ?  
Otherwise, how can one build latest tryton client on windows ?

Thank You for this guide

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [July 12, 2018, 8:31am UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/9 "2018-07-12T08:31:50Z")

</div>

For me, it is just a matter of changing python2 by python3 and we can use last version of cx\_Freeze from pacman.

---

<div class="post-metadata">

### Author: ![wuf31](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/wuf31/32/161_2.png) [@wuf31](https://discuss.tryton.org/u/wuf31)
#### Post date: [July 13, 2018, 10:54am UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/10 "2018-07-13T10:54:58Z")

</div>

Thanks ced,

I’m able to build the new windows client.  
Apparently, pygtk2 is not needed anymore.

---

<div class="post-metadata">

### Author: ![adeseg99](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/a/977dab/32.png) [@adeseg99](https://discuss.tryton.org/u/adeseg99)
#### Post date: [January 2, 2019, 12:30pm UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/11 "2019-01-02T12:30:31Z")

</div>

once i run

````auto
sh make-win32-installer.sh
``` on my msys2 i get this error
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'compile_catalog'
````

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [January 2, 2019, 12:36pm UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/12 "2019-01-02T12:36:44Z")

</div>

You are missing [Babel](https://pypi.org/project/Babel/).

---

<div class="post-metadata">

### Author: ![adeseg99](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/a/977dab/32.png) [@adeseg99](https://discuss.tryton.org/u/adeseg99)
#### Post date: [January 2, 2019, 2:53pm UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/13 "2019-01-02T14:53:43Z")

</div>

new error  
running compile\_catalog  
compiling catalog tryton/data/locale/bg/LC\_MESSAGES/tryton.po to tryton/data/locale/bg/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/ca/LC\_MESSAGES/tryton.po to tryton/data/locale/ca/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/cs/LC\_MESSAGES/tryton.po to tryton/data/locale/cs/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/de/LC\_MESSAGES/tryton.po to tryton/data/locale/de/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/es/LC\_MESSAGES/tryton.po to tryton/data/locale/es/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/es\_419/LC\_MESSAGES/tryton.po to tryton/data/locale/es\_419/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/fa/LC\_MESSAGES/tryton.po to tryton/data/locale/fa/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/fr/LC\_MESSAGES/tryton.po to tryton/data/locale/fr/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/hu\_HU/LC\_MESSAGES/tryton.po to tryton/data/locale/hu\_HU/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/it\_IT/LC\_MESSAGES/tryton.po to tryton/data/locale/it\_IT/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/ja\_JP/LC\_MESSAGES/tryton.po to tryton/data/locale/ja\_JP/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/lo/LC\_MESSAGES/tryton.po to tryton/data/locale/lo/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/lt/LC\_MESSAGES/tryton.po to tryton/data/locale/lt/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/nl/LC\_MESSAGES/tryton.po to tryton/data/locale/nl/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/pl/LC\_MESSAGES/tryton.po to tryton/data/locale/pl/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/pt\_BR/LC\_MESSAGES/tryton.po to tryton/data/locale/pt\_BR/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/ru/LC\_MESSAGES/tryton.po to tryton/data/locale/ru/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/sl/LC\_MESSAGES/tryton.po to tryton/data/locale/sl/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/zh\_CN/LC\_MESSAGES/tryton.po to tryton/data/locale/zh\_CN/LC\_MESSAGES/tryton.mo  
Traceback (most recent call last):  
File “setup-freeze.py”, line 5, in   
import user  
ModuleNotFoundError: No module named ‘user’

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [January 2, 2019, 3:14pm UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/14 "2019-01-02T15:14:59Z")

</div>

It looks like you are building with Python3 a version prior to 5.0 which does not support without [http://hg.tryton.org/tryton/rev/ab5658e40e22/](http://hg.tryton.org/tryton/rev/ab5658e40e22/)  
The [user module](https://docs.python.org/2/library/user.html) was used to load `~/.pythonrc.py` to setup custom environment variables.

---

<div class="post-metadata">

### Author: ![adeseg99](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/a/977dab/32.png) [@adeseg99](https://discuss.tryton.org/u/adeseg99)
#### Post date: [January 2, 2019, 4:20pm UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/15 "2019-01-02T16:20:34Z")

</div>

now this  
running compile\_catalog  
compiling catalog tryton/data/locale/bg/LC\_MESSAGES/tryton.po to tryton/data/locale/bg/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/ca/LC\_MESSAGES/tryton.po to tryton/data/locale/ca/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/cs/LC\_MESSAGES/tryton.po to tryton/data/locale/cs/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/de/LC\_MESSAGES/tryton.po to tryton/data/locale/de/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/es/LC\_MESSAGES/tryton.po to tryton/data/locale/es/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/es\_419/LC\_MESSAGES/tryton.po to tryton/data/locale/es\_419/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/fa/LC\_MESSAGES/tryton.po to tryton/data/locale/fa/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/fr/LC\_MESSAGES/tryton.po to tryton/data/locale/fr/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/hu\_HU/LC\_MESSAGES/tryton.po to tryton/data/locale/hu\_HU/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/it\_IT/LC\_MESSAGES/tryton.po to tryton/data/locale/it\_IT/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/ja\_JP/LC\_MESSAGES/tryton.po to tryton/data/locale/ja\_JP/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/lo/LC\_MESSAGES/tryton.po to tryton/data/locale/lo/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/lt/LC\_MESSAGES/tryton.po to tryton/data/locale/lt/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/nl/LC\_MESSAGES/tryton.po to tryton/data/locale/nl/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/pl/LC\_MESSAGES/tryton.po to tryton/data/locale/pl/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/pt\_BR/LC\_MESSAGES/tryton.po to tryton/data/locale/pt\_BR/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/ru/LC\_MESSAGES/tryton.po to tryton/data/locale/ru/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/sl/LC\_MESSAGES/tryton.po to tryton/data/locale/sl/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/zh\_CN/LC\_MESSAGES/tryton.po to tryton/data/locale/zh\_CN/LC\_MESSAGES/tryton.mo  
Traceback (most recent call last):  
File “setup-freeze.py”, line 8, in   
from cx\_Freeze import setup, Executable  
ModuleNotFoundError: No module named ‘cx\_Freeze’

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [January 2, 2019, 4:36pm UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/16 "2019-01-02T16:36:07Z")

</div>

Well the error message is pretty obvious, isn’t it?

---

<div class="post-metadata">

### Author: ![adeseg99](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/a/977dab/32.png) [@adeseg99](https://discuss.tryton.org/u/adeseg99)
#### Post date: [January 2, 2019, 11:05pm UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/17 "2019-01-02T23:05:51Z")

</div>

no cx\_freeze i think

---

<div class="post-metadata">

### Author: ![adeseg99](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/a/977dab/32.png) [@adeseg99](https://discuss.tryton.org/u/adeseg99)
#### Post date: [January 4, 2019, 1:35am UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/18 "2019-01-04T01:35:17Z")

</div>

Traceback (most recent call last):  
File “setup-freeze.py”, line 37, in   
raise Exception(‘%s not found’ % dll)  
Exception: librsvg-2-2.dll not found

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [January 4, 2019, 8:48am UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/19 "2019-01-04T08:48:57Z")

</div>

Added to [How to build Windows Tryton Client?](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563) librsvg.

---

<div class="post-metadata">

### Author: ![adeseg99](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/a/977dab/32.png) [@adeseg99](https://discuss.tryton.org/u/adeseg99)
#### Post date: [January 10, 2019, 12:59am UTC](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563/20 "2019-01-10T00:59:29Z")

</div>

after building i tried to build with 5.0.4  
i got this  
$ sh make-win32-installer.sh  
running compile\_catalog  
compiling catalog tryton/data/locale/bg/LC\_MESSAGES/tryton.po to tryton/data/locale/bg/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/ca/LC\_MESSAGES/tryton.po to tryton/data/locale/ca/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/cs/LC\_MESSAGES/tryton.po to tryton/data/locale/cs/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/de/LC\_MESSAGES/tryton.po to tryton/data/locale/de/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/es/LC\_MESSAGES/tryton.po to tryton/data/locale/es/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/es\_419/LC\_MESSAGES/tryton.po to tryton/data/locale/es\_419/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/fa/LC\_MESSAGES/tryton.po to tryton/data/locale/fa/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/fr/LC\_MESSAGES/tryton.po to tryton/data/locale/fr/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/hu\_HU/LC\_MESSAGES/tryton.po to tryton/data/locale/hu\_HU/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/it\_IT/LC\_MESSAGES/tryton.po to tryton/data/locale/it\_IT/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/ja\_JP/LC\_MESSAGES/tryton.po to tryton/data/locale/ja\_JP/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/lo/LC\_MESSAGES/tryton.po to tryton/data/locale/lo/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/lt/LC\_MESSAGES/tryton.po to tryton/data/locale/lt/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/nl/LC\_MESSAGES/tryton.po to tryton/data/locale/nl/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/pl/LC\_MESSAGES/tryton.po to tryton/data/locale/pl/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/pt\_BR/LC\_MESSAGES/tryton.po to tryton/data/locale/pt\_BR/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/ru/LC\_MESSAGES/tryton.po to tryton/data/locale/ru/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/sl/LC\_MESSAGES/tryton.po to tryton/data/locale/sl/LC\_MESSAGES/tryton.mo  
compiling catalog tryton/data/locale/zh\_CN/LC\_MESSAGES/tryton.po to tryton/data/locale/zh\_CN/LC\_MESSAGES/tryton.mo  
Traceback (most recent call last):  
File “./setup-freeze.py”, line 75, in   
with open(gir\_file, ‘r’, encoding=‘utf-8’) as src:  
FileNotFoundError: [Errno 2] No such file or directory: ‘/usr/share/gir-1.0/Atk-1.0.gir’

[Next page](https://discuss.tryton.org/t/how-to-build-windows-tryton-client/563.md?page=2)
