How do I create Odoo 10 for Windows as executable software?
Odoo Building Guide for Windows:
I created this guide for my own personal reference. So I try to keep it short and clear.
This will only focus on Odoo 8 in the Windows 7 environment and can be easily adapted to later versions.
OS: Windows 7, Odoo Version: 8
1) Install Python27 ( https://www.python.org/downloads/windows/ ).
2) Install PIP.
Odoo packaging files for Windows are available at https://github.com/odoo/odoo/tree/8.0/setup/win32
You must be on the Windows host to build the .exe for Odoo due to the Makefile ( https://github.com/odoo/odoo/blob/8.0/setup/win32/Makefile#L7 ) using the Cygwin emulated cygdrive path.
3) Assuming Windows is the host machine and we can proceed to install Cygwin ( https://cygwin.com/install.html )
When installing Cygwin, you will be given the option to select which packages to support. Make sure you select a category for it python
and devel
.
After the Cygwin installation is complete, open the Cygwin terminal and type " make
". If you got " make: *** No targets specified and no makefile found. Stop.
" then you will be fine.
4) Use your favorite git client (mine is http://www.mingw.org/ , or you can use Cygwin if you like) and clone the Odoo repository.
git clone https://www.github.com/odoo/odoo --depth 1 --branch 8.0 --single-branch
Since we are building for 8.0
, one branch is sufficient for this tutorial.
5) Install dependency packages from req.txt file from Odoo repo.
https://github.com/odoo/odoo/blob/8.0/requirements.txt
https://github.com/odoo/odoo/blob/8.0/doc/requirements.txt
6) A static folder for third party software like WkHtmltoPdf , PostgreSQL , etc. is placed in this static folder. https://github.com/odoo/odoo/tree/8.0/setup/win32/static
7) Download PostgreSQL from https://www.postgresql.org/download/windows/ and place it in a static folder.
8) For WkHtmltoPdf is the recommended version 0.12.1
and is available on the WkHtmltoPdf download page in the archive section.
Download from http://download.gna.org/wkhtmltopdf/0.12/0.12.1/ and put the required arch based files in a static folder.
9) Pictures for the setup file should be posted at https://github.com/odoo/odoo/tree/8.0/setup/win32/static/pixmaps
10) Edit https://github.com/odoo/odoo/blob/8.0/setup/win32/Makefile.version and enterVERSION=8.0
Files that may interest you:
Service: https://github.com/odoo/odoo/blob/8.0/setup/win32/win32_service.py
Setup: https://github.com/odoo/odoo/blob/8.0/setup/win32/win32_setup.py
Makensis: https://github.com/odoo/odoo/blob/8.0/setup/win32/setup.nsi
Package: https://github.com/odoo/odoo/blob/8.0/setup/package.py
11) Modify the NSI file based on your needs, which is available at https://github.com/odoo/odoo/blob/8.0/setup/win32/setup.nsi
If you are using NSIS from http://nsis.sourceforge.net/ and installed elsewhere by default, you may need to change the path to the makefile in the following file:
https://github.com/odoo/odoo/blob/8.0/setup/win32/Makefile#L12
12) Finally, build command Open Cygwin terminal and navigate to https://github.com/odoo/odoo/tree/8.0/setup/win32 .
Enter " make -f Makefile
"
On a successful run, the final " openerp-allinone-setup-8.0.exe
" will be available in the same folder.
source to share