When building the Windows installer, a virtual machine is used with prepackaged python modules. With this commit, the packaging script will try to install on the virtual machine the python packages specified in requirements.txt. Each package is installed individually, that way, if an install fails, the install of the other packages continues. At the end of the process, successfully packages are listed so that they will appear in the build log files. Also, the Makefile was cleaned in this commit (removal of py2exe stuffs).
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}
|
|
|
|
LAUNCH_MAKENSIS=/cygdrive/c/tools/cygwin/makensis $(MAKENSIS_ARGUMENTS) setup.nsi
|
|
WINPY_DIR=/cygdrive/c/odoobuild/WinPython/python-3.6.2
|
|
|
|
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)
|