[IMP] nsi version simplification

bzr revid: al@openerp.com-20111219160025-pu6ru62z1uuaktzg
This commit is contained in:
Antony Lesuisse 2011-12-19 17:00:25 +01:00
parent 4995ea62cc
commit b5122c4689
1 changed files with 25 additions and 33 deletions

View File

@ -31,23 +31,13 @@
!define PUBLISHER 'OpenERP S.A.'
!ifndef MAJOR_VERSION
!define MAJOR_VERSION '6'
!endif
!ifndef MINOR_VERSION
!define MINOR_VERSION '0'
!endif
!ifndef REVISION_VERSION
!define REVISION_VERSION '0'
!endif
!ifndef BUILD_VERSION
!define VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${REVISION_VERSION}"
!else
!define VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${REVISION_VERSION}-${BUILD_VERSION}"
!ifndef VERSION
!define VERSION '0'
!endif
#!define VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${REVISION_VERSION}"
!define PRODUCT_NAME "OpenERP Server"
!define DISPLAY_NAME "${PRODUCT_NAME} ${MAJOR_VERSION}.${MINOR_VERSION}"
!define DISPLAY_NAME "${PRODUCT_NAME} ${VERSION}"
!define UNINSTALL_REGISTRY_ROOT HKLM
!define UNINSTALL_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${DISPLAY_NAME}"
@ -68,7 +58,7 @@ ShowInstDetails show
XPStyle on
InstallDir "$PROGRAMFILES\OpenERP ${MAJOR_VERSION}.${MINOR_VERSION}\Server"
InstallDir "$PROGRAMFILES\OpenERP ${VERSION}\Server"
InstallDirRegKey HKCU "${REGISTRY_KEY}" ""
BrandingText '${PRODUCT_NAME} ${VERSION}'
@ -162,9 +152,9 @@ LangString DESC_FinishPage_Link ${LANG_FRENCH} "Contactez OpenERP pour un Parten
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"
LangString WARNING_PortIsWrong ${LANG_FRENCH} "Le port pour la connection au serveur PostgreSQL est erroné (défaut: 5432)"
LangString WARNING_PortIsWrong ${LANG_FRENCH} "Le port pour la connection au serveur PostgreSQL est erron? (d?faut: 5432)"
LangString DESC_PostgreSQLPage ${LANG_FRENCH} "Configurez les informations de connection pour le serveur PostgreSQL"
LangString DESC_PostgreSQL_Hostname ${LANG_FRENCH} "Hôte"
LangString DESC_PostgreSQL_Hostname ${LANG_FRENCH} "H?te"
LangString DESC_PostgreSQL_Port ${LANG_FRENCH} "Port"
LangString DESC_PostgreSQL_Username ${LANG_FRENCH} "Utilisateur"
LangString DESC_PostgreSQL_Password ${LANG_FRENCH} "Mot de passe"
@ -187,14 +177,16 @@ Section OpenERP_Server SectionOpenERP_Server
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
;Create shortcuts
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\OpenERP Server.lnk" "$INSTDIR\openerp-server.exe"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Start service.lnk" "$INSTDIR\service\start.bat"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Stop service.lnk" "$INSTDIR\service\stop.bat"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Edit config.lnk" "notepad.exe" "$INSTDIR\openerp-server.conf"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\View log.lnk" "notepad.exe" "$INSTDIR\openerp-server.log"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\uninstall.exe"
!insertmacro CreateInternetShortcut "$SMPROGRAMS\$STARTMENU_FOLDER\Forum" "http://www.openerp.com/forum"
!insertmacro CreateInternetShortcut "$SMPROGRAMS\$STARTMENU_FOLDER\Translation" "https://translations.launchpad.net/openobject"
; CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\OpenERP Server.lnk" "$INSTDIR\openerp-server.exe"
; CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Start service.lnk" "$INSTDIR\service\start.bat"
; CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Stop service.lnk" "$INSTDIR\service\stop.bat"
; CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Edit config.lnk" "notepad.exe" "$INSTDIR\openerp-server.conf"
; CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\View log.lnk" "notepad.exe" "$INSTDIR\openerp-server.log"
; CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\OpenERP.lnk" "start" "http://127.0.0.1:8069/"
; CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\uninstall.exe"
; !insertmacro CreateInternetShortcut "$SMPROGRAMS\$STARTMENU_FOLDER\Forum" "http://www.openerp.com/forum"
; !insertmacro CreateInternetShortcut "$SMPROGRAMS\$STARTMENU_FOLDER\Translation" "https://translations.launchpad.net/openobject"
!insertmacro CreateInternetShortcut "$SMPROGRAMS\$STARTMENU_FOLDER\OpenERP" "http://127.0.0.1:8069/"
!insertmacro MUI_STARTMENU_WRITE_END
@ -225,15 +217,15 @@ Section -Post
WriteRegExpandStr HKLM "${UNINSTALL_REGISTRY_KEY}" "UninstallString" "$INSTDIR\Uninstall.exe"
WriteRegExpandStr HKLM "${UNINSTALL_REGISTRY_KEY}" "InstallLocation" "$INSTDIR"
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "DisplayName" "${DISPLAY_NAME}"
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "DisplayVersion" "${MAJOR_VERSION}.${MINOR_VERSION}"
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "DisplayVersion" "${VERSION}"
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "Publisher" "${PUBLISHER}"
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@openerp.com"
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "HelpTelephone" "+32.81.81.37.00"
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "URLInfoAbout" "http://www.openerp.com"
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "Contact" "sales@openerp.com"
; 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@openerp.com"
; WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "HelpTelephone" "+32.81.81.37.00"
; WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "URLInfoAbout" "http://www.openerp.com"
; WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "Contact" "sales@openerp.com"
WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "NoModify" "1"
WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "NoRepair" "1"
WriteUninstaller "$INSTDIR\Uninstall.exe"