|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
|
# Part of Odoo,Flectra. See LICENSE file for full copyright and licensing details.
|
|
|
|
|
|
|
|
|
|
# TODO: Avoid to uninstall the database
|
|
|
|
|
# TODO: We can update the server or the clients without to uninstall the all-in-one
|
|
|
|
@ -38,10 +38,10 @@
|
|
|
|
|
Exch $R2
|
|
|
|
|
!macroend
|
|
|
|
|
|
|
|
|
|
!define PUBLISHER 'Odoo S.A.'
|
|
|
|
|
!define PUBLISHER 'FlectraHQ'
|
|
|
|
|
|
|
|
|
|
!ifndef MAJOR_VERSION
|
|
|
|
|
!define MAJOR_VERSION '11'
|
|
|
|
|
!define MAJOR_VERSION '1'
|
|
|
|
|
!endif
|
|
|
|
|
|
|
|
|
|
!ifndef MINOR_VERSION
|
|
|
|
@ -57,14 +57,14 @@
|
|
|
|
|
#!define VERSION "${MAJOR_VERSION}.${MINOR_VERSION}-r${REVISION_VERSION}"
|
|
|
|
|
!endif
|
|
|
|
|
|
|
|
|
|
!define PRODUCT_NAME "Odoo"
|
|
|
|
|
!define PRODUCT_NAME "Flectra"
|
|
|
|
|
!define DISPLAY_NAME "${PRODUCT_NAME} ${MAJOR_VERSION}.${MINOR_VERSION}"
|
|
|
|
|
|
|
|
|
|
!define REGISTRY_ROOT HKLM
|
|
|
|
|
!define UNINSTALL_BASE_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall"
|
|
|
|
|
!define UNINSTALL_REGISTRY_KEY "${UNINSTALL_BASE_REGISTRY_KEY}\${DISPLAY_NAME}"
|
|
|
|
|
|
|
|
|
|
!define UNINSTALL_REGISTRY_KEY_SERVER "${UNINSTALL_BASE_REGISTRY_KEY}\Odoo Server ${VERSION}"
|
|
|
|
|
!define UNINSTALL_REGISTRY_KEY_SERVER "${UNINSTALL_BASE_REGISTRY_KEY}\Flectra Server ${VERSION}"
|
|
|
|
|
|
|
|
|
|
!define REGISTRY_KEY "Software\${DISPLAY_NAME}"
|
|
|
|
|
|
|
|
|
@ -75,14 +75,14 @@
|
|
|
|
|
|
|
|
|
|
Name '${DISPLAY_NAME}'
|
|
|
|
|
Caption "${PRODUCT_NAME} ${VERSION} Setup"
|
|
|
|
|
OutFile "openerp-allinone-setup-${VERSION}.exe"
|
|
|
|
|
OutFile "flectra-allinone-setup-${VERSION}.exe"
|
|
|
|
|
SetCompressor /FINAL lzma
|
|
|
|
|
#SetCompress auto
|
|
|
|
|
ShowInstDetails show
|
|
|
|
|
|
|
|
|
|
#XPStyle on
|
|
|
|
|
|
|
|
|
|
InstallDir "$PROGRAMFILES\Odoo ${VERSION}"
|
|
|
|
|
InstallDir "$PROGRAMFILES\Flectra ${VERSION}"
|
|
|
|
|
InstallDirRegKey HKCU "${REGISTRY_KEY}" ""
|
|
|
|
|
|
|
|
|
|
BrandingText '${PRODUCT_NAME} ${VERSION}'
|
|
|
|
@ -93,7 +93,7 @@ RequestExecutionLevel admin
|
|
|
|
|
#VIAddVersionKey "CompanyName" "${PUBLISHER}"
|
|
|
|
|
#VIAddVersionKey "FileDescription" "Installer of ${DISPLAY_NAME}"
|
|
|
|
|
#VIAddVersionKey "LegalCopyright" "${PUBLISHER}"
|
|
|
|
|
#VIAddVersionKey "LegalTrademark" "OpenERP is a trademark of ${PUBLISHER}"
|
|
|
|
|
#VIAddVersionKey "LegalTrademark" "FLECTRA is a trademark of ${PUBLISHER}"
|
|
|
|
|
#VIAddVersionKey "FileVersion" "${MAJOR_VERSION}.${MINOR_VERSION}.${REVISION_VERSION}"
|
|
|
|
|
#VIProductVersion "${MAJOR_VERSION}.${MINOR_VERSION}.${REVISION_VERSION}"
|
|
|
|
|
|
|
|
|
@ -120,12 +120,12 @@ Var HWNDPostgreSQLPassword
|
|
|
|
|
!define POSTGRESQL_EXE "${STATIC_PATH}\${POSTGRESQL_EXE_FILENAME}"
|
|
|
|
|
|
|
|
|
|
!define MUI_ABORTWARNING
|
|
|
|
|
!define MUI_ICON "${PIXMAPS_PATH}\openerp-icon.ico"
|
|
|
|
|
!define MUI_ICON "${PIXMAPS_PATH}\flectra-icon.ico"
|
|
|
|
|
|
|
|
|
|
!define MUI_WELCOMEFINISHPAGE_BITMAP "${PIXMAPS_PATH}\openerp-intro.bmp"
|
|
|
|
|
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${PIXMAPS_PATH}\openerp-intro.bmp"
|
|
|
|
|
!define MUI_WELCOMEFINISHPAGE_BITMAP "${PIXMAPS_PATH}\flectra-intro.bmp"
|
|
|
|
|
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${PIXMAPS_PATH}\flectra-intro.bmp"
|
|
|
|
|
!define MUI_HEADERIMAGE
|
|
|
|
|
!define MUI_HEADERIMAGE_BITMAP "${PIXMAPS_PATH}\openerp-slogan.bmp"
|
|
|
|
|
!define MUI_HEADERIMAGE_BITMAP "${PIXMAPS_PATH}\flectra-slogan.bmp"
|
|
|
|
|
!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH
|
|
|
|
|
!define MUI_HEADER_TRANSPARENT_TEXT ""
|
|
|
|
|
|
|
|
|
@ -144,7 +144,7 @@ Page Custom ShowPostgreSQL LeavePostgreSQL
|
|
|
|
|
!define MUI_FINISHPAGE_RUN_TEXT "$(DESC_FinishPageText)"
|
|
|
|
|
!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink"
|
|
|
|
|
!define MUI_FINISHPAGE_LINK $(DESC_FinishPage_Link)
|
|
|
|
|
!define MUI_FINISHPAGE_LINK_LOCATION "https://www.odoo.com/page/contactus"
|
|
|
|
|
!define MUI_FINISHPAGE_LINK_LOCATION "https://flectrahq.com/page/contactus"
|
|
|
|
|
!insertmacro MUI_PAGE_FINISH
|
|
|
|
|
|
|
|
|
|
!insertmacro MUI_UNPAGE_WELCOME
|
|
|
|
@ -157,11 +157,11 @@ Page Custom ShowPostgreSQL LeavePostgreSQL
|
|
|
|
|
!insertmacro MUI_RESERVEFILE_LANGDLL
|
|
|
|
|
|
|
|
|
|
; English
|
|
|
|
|
LangString DESC_OpenERP_Server ${LANG_ENGLISH} "Install the Odoo Server with all the Odoo standard modules."
|
|
|
|
|
LangString DESC_PostgreSQL ${LANG_ENGLISH} "Install the PostgreSQL RDBMS used by Odoo."
|
|
|
|
|
LangString DESC_FinishPage_Link ${LANG_ENGLISH} "Contact Odoo for Partnership and/or Support"
|
|
|
|
|
LangString DESC_FLECTRA_Server ${LANG_ENGLISH} "Install the Flectra Server with all the Flectra standard modules."
|
|
|
|
|
LangString DESC_PostgreSQL ${LANG_ENGLISH} "Install the PostgreSQL RDBMS used by Flectra."
|
|
|
|
|
LangString DESC_FinishPage_Link ${LANG_ENGLISH} "Contact Flectra for Partnership and/or Support"
|
|
|
|
|
LangString DESC_AtLeastOneComponent ${LANG_ENGLISH} "You have to choose at least one component"
|
|
|
|
|
LangString DESC_CanNotInstallPostgreSQL ${LANG_ENGLISH} "You can not install the PostgreSQL database without the Odoo Server"
|
|
|
|
|
LangString DESC_CanNotInstallPostgreSQL ${LANG_ENGLISH} "You can not install the PostgreSQL database without the Flectra Server"
|
|
|
|
|
LangString WARNING_HostNameIsEmpty ${LANG_ENGLISH} "The hostname for the connection to the PostgreSQL Server is empty"
|
|
|
|
|
LangString WARNING_UserNameIsEmpty ${LANG_ENGLISH} "The username for the connection to the PostgreSQL Server is empty"
|
|
|
|
|
LangString WARNING_PasswordIsEmpty ${LANG_ENGLISH} "The password for the connection to the PostgreSQL Server is empty"
|
|
|
|
@ -173,16 +173,16 @@ LangString DESC_PostgreSQL_Username ${LANG_ENGLISH} "Username"
|
|
|
|
|
LangString DESC_PostgreSQL_Password ${LANG_ENGLISH} "Password"
|
|
|
|
|
LangString Profile_AllInOne ${LANG_ENGLISH} "All In One"
|
|
|
|
|
LangString Profile_Server ${LANG_ENGLISH} "Server only"
|
|
|
|
|
LangString TITLE_OpenERP_Server ${LANG_ENGLISH} "Odoo Server"
|
|
|
|
|
LangString TITLE_FLECTRA_Server ${LANG_ENGLISH} "Flectra Server"
|
|
|
|
|
LangString TITLE_PostgreSQL ${LANG_ENGLISH} "PostgreSQL Database"
|
|
|
|
|
LangString DESC_FinishPageText ${LANG_ENGLISH} "Start Odoo"
|
|
|
|
|
LangString DESC_FinishPageText ${LANG_ENGLISH} "Start Flectra"
|
|
|
|
|
|
|
|
|
|
; French
|
|
|
|
|
LangString DESC_OpenERP_Server ${LANG_FRENCH} "Installation du Serveur Odoo avec tous les modules Odoo standards."
|
|
|
|
|
LangString DESC_PostgreSQL ${LANG_FRENCH} "Installation de la base de données PostgreSQL utilisée par Odoo."
|
|
|
|
|
LangString DESC_FinishPage_Link ${LANG_FRENCH} "Contactez Odoo pour un Partenariat et/ou du Support"
|
|
|
|
|
LangString DESC_FLECTRA_Server ${LANG_FRENCH} "Installation du Serveur Flectra avec tous les modules Flectra standards."
|
|
|
|
|
LangString DESC_PostgreSQL ${LANG_FRENCH} "Installation de la base de données PostgreSQL utilisée par Flectra."
|
|
|
|
|
LangString DESC_FinishPage_Link ${LANG_FRENCH} "Contactez Flectra pour un Partenariat et/ou du Support"
|
|
|
|
|
LangString DESC_AtLeastOneComponent ${LANG_FRENCH} "Vous devez choisir au moins un composant"
|
|
|
|
|
LangString DESC_CanNotInstallPostgreSQL ${LANG_FRENCH} "Vous ne pouvez pas installer la base de données PostgreSQL sans le serveur Odoo"
|
|
|
|
|
LangString DESC_CanNotInstallPostgreSQL ${LANG_FRENCH} "Vous ne pouvez pas installer la base de données PostgreSQL sans le serveur Flectra"
|
|
|
|
|
LangString WARNING_HostNameIsEmpty ${LANG_FRENCH} "L'adresse pour la connection au serveur PostgreSQL est vide"
|
|
|
|
|
LangString WARNING_UserNameIsEmpty ${LANG_FRENCH} "Le nom d'utilisateur pour la connection au serveur PostgreSQL est vide"
|
|
|
|
|
LangString WARNING_PasswordIsEmpty ${LANG_FRENCH} "Le mot de passe pour la connection au serveur PostgreSQL est vide"
|
|
|
|
@ -194,14 +194,14 @@ LangString DESC_PostgreSQL_Username ${LANG_FRENCH} "Utilisateur"
|
|
|
|
|
LangString DESC_PostgreSQL_Password ${LANG_FRENCH} "Mot de passe"
|
|
|
|
|
LangString Profile_AllInOne ${LANG_FRENCH} "All In One"
|
|
|
|
|
LangString Profile_Server ${LANG_FRENCH} "Seulement le serveur"
|
|
|
|
|
LangString TITLE_OpenERP_Server ${LANG_FRENCH} "Serveur Odoo"
|
|
|
|
|
LangString TITLE_FLECTRA_Server ${LANG_FRENCH} "Serveur Flectra"
|
|
|
|
|
LangString TITLE_PostgreSQL ${LANG_FRENCH} "Installation du serveur de base de données PostgreSQL"
|
|
|
|
|
LangString DESC_FinishPageText ${LANG_FRENCH} "Démarrer Odoo"
|
|
|
|
|
LangString DESC_FinishPageText ${LANG_FRENCH} "Démarrer Flectra"
|
|
|
|
|
|
|
|
|
|
InstType $(Profile_AllInOne)
|
|
|
|
|
InstType $(Profile_Server)
|
|
|
|
|
|
|
|
|
|
Section $(TITLE_OpenERP_Server) SectionOpenERP_Server
|
|
|
|
|
Section $(TITLE_FLECTRA_Server) SectionFLECTRA_Server
|
|
|
|
|
SectionIn 1 2
|
|
|
|
|
|
|
|
|
|
# TODO: install in a temp dir before
|
|
|
|
@ -231,31 +231,31 @@ Section $(TITLE_OpenERP_Server) SectionOpenERP_Server
|
|
|
|
|
File /r "${STATIC_PATH}\wkhtmltopdf\*"
|
|
|
|
|
File /r "${STATIC_PATH}\less\*"
|
|
|
|
|
|
|
|
|
|
# If there is a previous install of the OpenERP Server, keep the login/password from the config file
|
|
|
|
|
WriteIniStr "$INSTDIR\server\odoo.conf" "options" "db_host" $TextPostgreSQLHostname
|
|
|
|
|
WriteIniStr "$INSTDIR\server\odoo.conf" "options" "db_user" $TextPostgreSQLUsername
|
|
|
|
|
WriteIniStr "$INSTDIR\server\odoo.conf" "options" "db_password" $TextPostgreSQLPassword
|
|
|
|
|
WriteIniStr "$INSTDIR\server\odoo.conf" "options" "db_port" $TextPostgreSQLPort
|
|
|
|
|
# If there is a previous install of the FLECTRA Server, keep the login/password from the config file
|
|
|
|
|
WriteIniStr "$INSTDIR\server\flectra.conf" "options" "db_host" $TextPostgreSQLHostname
|
|
|
|
|
WriteIniStr "$INSTDIR\server\flectra.conf" "options" "db_user" $TextPostgreSQLUsername
|
|
|
|
|
WriteIniStr "$INSTDIR\server\flectra.conf" "options" "db_password" $TextPostgreSQLPassword
|
|
|
|
|
WriteIniStr "$INSTDIR\server\flectra.conf" "options" "db_port" $TextPostgreSQLPort
|
|
|
|
|
# Fix the addons path
|
|
|
|
|
WriteIniStr "$INSTDIR\server\odoo.conf" "options" "addons_path" "$INSTDIR\server\odoo\addons"
|
|
|
|
|
WriteIniStr "$INSTDIR\server\odoo.conf" "options" "bin_path" "$INSTDIR\thirdparty"
|
|
|
|
|
WriteIniStr "$INSTDIR\server\flectra.conf" "options" "addons_path" "$INSTDIR\server\flectra\addons"
|
|
|
|
|
WriteIniStr "$INSTDIR\server\flectra.conf" "options" "bin_path" "$INSTDIR\thirdparty"
|
|
|
|
|
|
|
|
|
|
# if we're going to install postgresql force it's path,
|
|
|
|
|
# otherwise we consider it's always done and/or correctly tune by users
|
|
|
|
|
${If} $HasPostgreSQL == 0
|
|
|
|
|
WriteIniStr "$INSTDIR\server\odoo.conf" "options" "pg_path" "$INSTDIR\PostgreSQL\bin"
|
|
|
|
|
WriteIniStr "$INSTDIR\server\flectra.conf" "options" "pg_path" "$INSTDIR\PostgreSQL\bin"
|
|
|
|
|
${EndIf}
|
|
|
|
|
|
|
|
|
|
DetailPrint "Installing Windows service"
|
|
|
|
|
nsExec::ExecTOLog '"$INSTDIR\python\python.exe" "$INSTDIR\server\odoo-bin" --stop-after-init --logfile "$INSTDIR\server\odoo.log" -s'
|
|
|
|
|
nsExec::ExecTOLog '"$INSTDIR\python\python.exe" "$INSTDIR\server\flectra-bin" --stop-after-init --logfile "$INSTDIR\server\flectra.log" -s'
|
|
|
|
|
${If} ${RunningX64}
|
|
|
|
|
nsExec::ExecToLog '"$INSTDIR\nssm\win64\nssm.exe" install ${SERVICENAME} "$INSTDIR\python\python.exe" "\"$INSTDIR\server\odoo-bin\""'
|
|
|
|
|
nsExec::ExecToLog '"$INSTDIR\nssm\win64\nssm.exe" install ${SERVICENAME} "$INSTDIR\python\python.exe" "\"$INSTDIR\server\flectra-bin\""'
|
|
|
|
|
nsExec::ExecToLog '"$INSTDIR\nssm\win64\nssm.exe" set ${SERVICENAME} AppDirectory "$\"$INSTDIR\server$\""'
|
|
|
|
|
${Else}
|
|
|
|
|
nsExec::ExecToLog '"$INSTDIR\nssm\win32\nssm.exe" install ${SERVICENAME} "$INSTDIR\python\python.exe" "\"$INSTDIR\server\odoo-bin\""'
|
|
|
|
|
nsExec::ExecToLog '"$INSTDIR\nssm\win32\nssm.exe" install ${SERVICENAME} "$INSTDIR\python\python.exe" "\"$INSTDIR\server\flectra-bin\""'
|
|
|
|
|
nsExec::ExecToLog '"$INSTDIR\nssm\win32\nssm.exe" set ${SERVICENAME} AppDirectory "$\"$INSTDIR\server$\""'
|
|
|
|
|
${EndIf}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nsExec::Exec "net stop ${SERVICENAME}"
|
|
|
|
|
sleep 2
|
|
|
|
|
|
|
|
|
@ -282,7 +282,7 @@ Section $(TITLE_PostgreSQL) SectionPostgreSQL
|
|
|
|
|
--mode unattended \
|
|
|
|
|
--prefix "$INSTDIR\PostgreSQL" \
|
|
|
|
|
--datadir "$INSTDIR\PostgreSQL\data" \
|
|
|
|
|
--servicename "PostgreSQL_For_Odoo" \
|
|
|
|
|
--servicename "PostgreSQL_For_Flectra" \
|
|
|
|
|
--serviceaccount "openpgsvc" --servicepassword "0p3npgsvcPWD" \
|
|
|
|
|
--superaccount "$TextPostgreSQLUsername" --superpassword "$TextPostgreSQLPassword" \
|
|
|
|
|
--serverport $TextPostgreSQLPort'
|
|
|
|
@ -297,17 +297,17 @@ Section -Post
|
|
|
|
|
; WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "Version" "${VERSION}"
|
|
|
|
|
; WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "VersionMajor" "${MAJOR_VERSION}.${MINOR_VERSION}"
|
|
|
|
|
; WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "VersionMinor" "${REVISION_VERSION}"
|
|
|
|
|
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "HelpLink" "support@odoo.com"
|
|
|
|
|
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "HelpTelephone" "+32.81.81.37.00"
|
|
|
|
|
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "URLInfoAbout" "https://www.odoo.com"
|
|
|
|
|
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "Contact" "sales@odoo.com"
|
|
|
|
|
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "HelpLink" "support@flectrahq.com"
|
|
|
|
|
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "HelpTelephone" "+65.00.00.00.00"
|
|
|
|
|
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "URLInfoAbout" "https://flectrahq.com"
|
|
|
|
|
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "Contact" "sales@flectrahq.com"
|
|
|
|
|
WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "NoModify" "1"
|
|
|
|
|
WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "NoRepair" "1"
|
|
|
|
|
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
|
|
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${SectionOpenERP_Server} $(DESC_OpenERP_Server)
|
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${SectionFLECTRA_Server} $(DESC_FLECTRA_Server)
|
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${SectionPostgreSQL} $(DESC_PostgreSQL)
|
|
|
|
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
|
|
|
|
|
|
|
|
@ -383,7 +383,7 @@ Function PostgreSQLOnBack
|
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
|
|
Function ShowPostgreSQL
|
|
|
|
|
SectionGetFlags ${SectionOpenERP_Server} $0
|
|
|
|
|
SectionGetFlags ${SectionFLECTRA_Server} $0
|
|
|
|
|
IntOp $0 $0 & ${SF_SELECTED}
|
|
|
|
|
IntCmp $0 ${SF_SELECTED} LaunchPostgreSQLConfiguration
|
|
|
|
|
Abort
|
|
|
|
@ -454,7 +454,7 @@ Function LeavePostgreSQL
|
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
|
|
Function ComponentLeave
|
|
|
|
|
SectionGetFlags ${SectionOpenERP_Server} $0
|
|
|
|
|
SectionGetFlags ${SectionFLECTRA_Server} $0
|
|
|
|
|
IntOp $0 $0 & ${SF_SELECTED}
|
|
|
|
|
IntCmp $0 ${SF_SELECTED} Done
|
|
|
|
|
|
|
|
|
@ -473,5 +473,5 @@ Function ComponentLeave
|
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
|
|
Function LaunchLink
|
|
|
|
|
ExecShell "open" "http://localhost:8069/"
|
|
|
|
|
ExecShell "open" "http://localhost:7073/"
|
|
|
|
|
FunctionEnd
|
|
|
|
|