When building the MS Windows package, the PYTHON_VERSION variable is not used and the WinPython path is hard coded in the Makefile and NSI file. This prevent the usage of a newer version of Python. With this commit, the PYTHON_VERSION is used to compute the WinPython Python directory. That way, this directory can be derived from package.py command line argument --vm-winxp-python-version. Also the less windows binaries are not packaged anymore. closes odoo/odoo#39821 X-original-commit: ac90d8584f99e24aed931eb5186c360f9dfbf399 Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
36 lines
1.2 KiB
Makefile
36 lines
1.2 KiB
Makefile
include Makefile.version
|
|
include Makefile.python
|
|
include Makefile.servicename
|
|
|
|
SERVER_DIRECTORY=../..
|
|
FILES_DIRECTORY=release
|
|
|
|
MAKENSIS_ARGUMENTS=/DVERSION=$(VERSION) /DSERVICENAME=${SERVICENAME} /DPYTHONVERSION=${PYTHON_VERSION}
|
|
|
|
LAUNCH_MAKENSIS=/cygdrive/c/tools/cygwin/makensis $(MAKENSIS_ARGUMENTS) setup.nsi
|
|
WINPY_DIR=/cygdrive/c/odoobuild/WinPython/python-${PYTHON_VERSION}
|
|
|
|
default: allinone
|
|
|
|
clean: server_clean
|
|
rm -rf $(FILES_DIRECTORY)/*.exe
|
|
rm -rf *.exe
|
|
|
|
server_clean:
|
|
rm -rf $(SERVER_DIRECTORY)/dist
|
|
rm -rf $(SERVER_DIRECTORY)/build
|
|
rm -rf $(SERVER_DIRECTORY)/win32/dist
|
|
rm -rf $(SERVER_DIRECTORY)/win32/build
|
|
rm -rf $(SERVER_DIRECTORY)/*.exe
|
|
rm -rf $(SERVER_DIRECTORY)/.cyg*
|
|
|
|
allinone: server_clean
|
|
cp $(SERVER_DIRECTORY)/requirements.txt $(WINPY_DIR)/
|
|
-(cd $(WINPY_DIR) && ./python.exe -m pip install --upgrade pip)
|
|
-(cd $(WINPY_DIR) && cat requirements.txt | while read PAC ; do Scripts/pip3.exe install "$${PAC}" ; done)
|
|
-(cd $(WINPY_DIR) && Scripts/pip3.exe freeze)
|
|
rm $(WINPY_DIR)/requirements.txt
|
|
(cd $(SERVER_DIRECTORY)/setup/win32 && $(LAUNCH_MAKENSIS))
|
|
(cd $(SERVER_DIRECTORY)/setup/win32 && mkdir -p $(FILES_DIRECTORY))
|
|
(cd $(SERVER_DIRECTORY)/setup/win32 && cp openerp-*.exe $(FILES_DIRECTORY)/openerp-server-setup-$(VERSION).exe)
|