diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /setup/win32/Makefile | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'setup/win32/Makefile')
| -rw-r--r-- | setup/win32/Makefile | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/setup/win32/Makefile b/setup/win32/Makefile new file mode 100644 index 00000000..cf2d0c42 --- /dev/null +++ b/setup/win32/Makefile @@ -0,0 +1,42 @@ +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 +WINPY32_DIR=/cygdrive/c/odoobuild/WinPy32/python-${PYTHON_VERSION} +WINPY64_DIR=/cygdrive/c/odoobuild/WinPy64/python-${PYTHON_VERSION}.amd64 + +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 $(WINPY32_DIR)/ + -(cd $(WINPY32_DIR) && ./python.exe -m pip install --upgrade pip) + -(cd $(WINPY32_DIR) && cat requirements.txt | while read PAC ; do Scripts/pip3.exe install "$${PAC}" ; done) + -(cd $(WINPY32_DIR) && Scripts/pip3.exe freeze) + rm $(WINPY32_DIR)/requirements.txt + cp $(SERVER_DIRECTORY)/requirements.txt $(WINPY64_DIR)/ + -(cd $(WINPY64_DIR) && ./python.exe -m pip install --upgrade pip) + -(cd $(WINPY64_DIR) && cat requirements.txt | while read PAC ; do Scripts/pip3.exe install "$${PAC}" ; done) + -(cd $(WINPY64_DIR) && Scripts/pip3.exe freeze) + rm $(WINPY64_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 odoo_setup_*.exe $(FILES_DIRECTORY)/) + (cd $(SERVER_DIRECTORY)/setup/win32/$(FILES_DIRECTORY) && chmod 0766 odoo_setup_*.exe) |
