Skip to content
Snippets Groups Projects
Commit 47046e9d authored by Christophe Monniez's avatar Christophe Monniez
Browse files

[REM] packaging: remove windows 32 bit support


Since may 2020, M$ stopped to ship their 32 bits OS.
So, there is no need to distribute a 32 bit version anymore.

This will reduce the package size by 2.

The new package will use Python 3.10 by default, that's why the
local requirements were changed (a wheel package was missing for windows
in the previous version of PyKCS11).

closes odoo/odoo#125361

Signed-off-by: default avatarChristophe Monniez (moc) <moc@odoo.com>
parent 89749f07
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,6 @@ FILES_DIRECTORY=release
MAKENSIS_ARGUMENTS=/DVERSION=$(VERSION) /DMAJOR_VERSION=$(MAJORVERSION) /DMINOR_VERSION=$(MINORVERSION) /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
......@@ -27,12 +26,6 @@ server_clean:
allinone: server_clean
# need to install requirements-local-proxy.txt for local proxy install
cp $(SERVER_DIRECTORY)/requirements.txt $(WINPY32_DIR)/
cp requirements-local-proxy.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 list)
rm $(WINPY32_DIR)/requirements.txt
cp $(SERVER_DIRECTORY)/requirements.txt $(WINPY64_DIR)/
cp requirements-local-proxy.txt $(WINPY64_DIR)/
-(cd $(WINPY64_DIR) && ./python.exe -m pip install --upgrade pip)
......
netifaces==0.11.0
PyKCS11==1.5.10
PyKCS11==1.5.12
ghostscript==0.7
cryptocode==0.1
pysmb==1.2.9.1
......@@ -59,7 +59,7 @@ Unicode True
!endif
!ifndef PYTHONVERSION
!define PYTHONVERSION '3.7.4'
!define PYTHONVERSION '3.10.11'
!endif
!ifndef SERVICENAME
......@@ -217,11 +217,7 @@ Section $(TITLE_Odoo_Server) SectionOdoo_Server
# Installing winpython
SetOutPath "$INSTDIR\python"
${If} ${RunningX64}
File /r /x "__pycache__" "${TOOLSDIR}\WinPy64\python-${PYTHONVERSION}.amd64\*"
${Else}
File /r /x "__pycache__" "${TOOLSDIR}\WinPy32\python-${PYTHONVERSION}\*"
${EndIf}
File /r /x "__pycache__" "${TOOLSDIR}\WinPy64\python-${PYTHONVERSION}.amd64\*"
SetOutPath "$INSTDIR\nssm"
File /r /x "src" "${TOOLSDIR}\nssm-2.24\*"
......@@ -234,11 +230,7 @@ Section $(TITLE_Odoo_Server) SectionOdoo_Server
# Install Visual C redistribuable files
DetailPrint "Installing Visual C++ redistributable files"
${If} ${RunningX64}
nsExec::Exec '"$INSTDIR\vcredist\vc_redist.x64.exe" /q'
${Else}
nsExec::Exec '"$INSTDIR\vcredist\vc_redist.x86.exe" /q'
${EndIf}
nsExec::Exec '"$INSTDIR\vcredist\vc_redist.x64.exe" /q'
SetOutPath "$INSTDIR\thirdparty"
File /r "${STATIC_PATH}\wkhtmltopdf\*"
......@@ -264,17 +256,10 @@ Section $(TITLE_Odoo_Server) SectionOdoo_Server
WriteIniStr "$INSTDIR\server\odoo.conf" "options" "default_productivity_apps" "True"
DetailPrint "Installing Windows service"
nsExec::ExecTOLog '"$INSTDIR\python\python.exe" "$INSTDIR\server\odoo-bin" --stop-after-init --logfile "$INSTDIR\server\odoo.log" -s'
${If} ${RunningX64}
nsExec::ExecToLog '"$INSTDIR\nssm\win64\nssm.exe" install ${SERVICENAME} "$INSTDIR\python\python.exe"'
nsExec::ExecToLog '"$INSTDIR\nssm\win64\nssm.exe" set ${SERVICENAME} AppDirectory "$\"$INSTDIR\python$\""'
nsExec::ExecToLog '"$INSTDIR\nssm\win64\nssm.exe" set ${SERVICENAME} AppParameters "\"$INSTDIR\server\odoo-bin\" -c "\"$INSTDIR\server\odoo.conf\"'
nsExec::ExecToLog '"$INSTDIR\nssm\win64\nssm.exe" set ${SERVICENAME} ObjectName "LOCALSERVICE"'
${Else}
nsExec::ExecToLog '"$INSTDIR\nssm\win32\nssm.exe" install ${SERVICENAME} "$INSTDIR\python\python.exe" '
nsExec::ExecToLog '"$INSTDIR\nssm\win32\nssm.exe" set ${SERVICENAME} AppDirectory "$\"$INSTDIR\python$\""'
nsExec::ExecToLog '"$INSTDIR\nssm\win32\nssm.exe" set ${SERVICENAME} AppParameters "\"$INSTDIR\server\odoo-bin\" -c "\"$INSTDIR\server\odoo.conf\"'
nsExec::ExecToLog '"$INSTDIR\nssm\win32\nssm.exe" set ${SERVICENAME} ObjectName "LOCALSERVICE"'
${EndIf}
nsExec::ExecToLog '"$INSTDIR\nssm\win64\nssm.exe" install ${SERVICENAME} "$INSTDIR\python\python.exe"'
nsExec::ExecToLog '"$INSTDIR\nssm\win64\nssm.exe" set ${SERVICENAME} AppDirectory "$\"$INSTDIR\python$\""'
nsExec::ExecToLog '"$INSTDIR\nssm\win64\nssm.exe" set ${SERVICENAME} AppParameters "\"$INSTDIR\server\odoo-bin\" -c "\"$INSTDIR\server\odoo.conf\"'
nsExec::ExecToLog '"$INSTDIR\nssm\win64\nssm.exe" set ${SERVICENAME} ObjectName "LOCALSERVICE"'
AccessControl::GrantOnFile "$INSTDIR" "LOCALSERVICE" "FullAccess"
Call RestartOdooService
......@@ -286,11 +271,7 @@ Section $(TITLE_PostgreSQL) SectionPostgreSQL
VAR /GLOBAL postgresql_exe_filename
VAR /GLOBAL postgresql_url
${If} ${RunningX64}
StrCpy $postgresql_exe_filename "postgresql-12.4-1-windows-x64.exe"
${Else}
StrCpy $postgresql_exe_filename "postgresql-10.14-1-windows.exe"
${EndIf}
StrCpy $postgresql_exe_filename "postgresql-12.4-1-windows-x64.exe"
StrCpy $postgresql_url "https://get.enterprisedb.com/postgresql/$postgresql_exe_filename"
nsExec::Exec 'net user openpgsvc /delete'
......@@ -429,16 +410,10 @@ SectionEnd
Function .onInit
VAR /GLOBAL previous_install_dir
${If} ${RunningX64}
SetRegView 64
${EndIf}
SetRegView 64
ReadRegStr $previous_install_dir HKLM "${REGISTRY_KEY}" "Install_Dir"
${If} $previous_install_dir == ""
${If} ${RunningX64}
StrCpy $INSTDIR "$PROGRAMFILES64\Odoo ${VERSION}"
${Else}
StrCpy $INSTDIR "$PROGRAMFILES\Odoo ${VERSION}"
${EndIf}
StrCpy $INSTDIR "$PROGRAMFILES64\Odoo ${VERSION}"
WriteRegStr HKLM "${REGISTRY_KEY}" "Install_dir" "$INSTDIR"
${EndIf}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment