X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=setup.nsi;h=87a6202646ba2cfbbf3084ed7f1c0d7aaf5d9be8;hb=11dd44ec360d4130c824bda10bd2bee1f8a31a2c;hp=185a87c5cbeb16e11b4e604690678c55890379f0;hpb=b5122c4689967467697581f087a2307d0d8acf5e;p=odoo%2Fodoo.git diff --git a/setup.nsi b/setup.nsi index 185a87c..87a6202 100644 --- a/setup.nsi +++ b/setup.nsi @@ -58,7 +58,7 @@ ShowInstDetails show XPStyle on -InstallDir "$PROGRAMFILES\OpenERP ${VERSION}\Server" +InstallDir "$PROGRAMFILES\OpenERP ${VERSION}" InstallDirRegKey HKCU "${REGISTRY_KEY}" "" BrandingText '${PRODUCT_NAME} ${VERSION}' @@ -160,14 +160,15 @@ LangString DESC_PostgreSQL_Username ${LANG_FRENCH} "Utilisateur" LangString DESC_PostgreSQL_Password ${LANG_FRENCH} "Mot de passe" Section -StopService - nsExec::Exec "net stop openerp-server-6.0" + nsExec::Exec "net stop openerp-server-6.1" sleep 2 SectionEnd Section OpenERP_Server SectionOpenERP_Server - SetOutPath '$INSTDIR' + SetOutPath '$INSTDIR\server' File /r "dist\*" + File /r "win32\wkhtmltopdf\*" SetOutPath "$INSTDIR\service" File /r "win32\dist\*" @@ -177,20 +178,12 @@ 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\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 CreateInternetShortcut "$SMPROGRAMS\$STARTMENU_FOLDER\OpenERP" "http://localhost:8069/" !insertmacro MUI_STARTMENU_WRITE_END FileOpen $9 '$INSTDIR\install.log' w + FileWrite $9 "INSTDIR $INSTDIR$\r$\n" FileWrite $9 "Hostname $TextPostgreSQLHostname$\r$\n" FileWrite $9 "Port $TextPostgreSQLPort$\r$\n" FileWrite $9 "Username $TextPostgreSQLUsername$\r$\n" @@ -198,23 +191,23 @@ Section OpenERP_Server SectionOpenERP_Server FileClose $9 # If there is a previous install of the OpenERP Server, keep the login/password from the config file - WriteIniStr "$INSTDIR\openerp-server.conf" "options" "db_host" $TextPostgreSQLHostname - WriteIniStr "$INSTDIR\openerp-server.conf" "options" "db_user" $TextPostgreSQLUsername - WriteIniStr "$INSTDIR\openerp-server.conf" "options" "db_password" $TextPostgreSQLPassword - WriteIniStr "$INSTDIR\openerp-server.conf" "options" "db_port" $TextPostgreSQLPort - WriteIniStr "$INSTDIR\openerp-server.conf" "options" "pg_path" "$INSTDIR\PostgreSQL\bin" + WriteIniStr "$INSTDIR\server\openerp-server.conf" "options" "db_host" $TextPostgreSQLHostname + WriteIniStr "$INSTDIR\server\openerp-server.conf" "options" "db_user" $TextPostgreSQLUsername + WriteIniStr "$INSTDIR\server\openerp-server.conf" "options" "db_password" $TextPostgreSQLPassword + WriteIniStr "$INSTDIR\server\openerp-server.conf" "options" "db_port" $TextPostgreSQLPort + WriteIniStr "$INSTDIR\server\openerp-server.conf" "options" "pg_path" "$INSTDIR\PostgreSQL\bin" - nsExec::Exec '"$INSTDIR\openerp-server.exe" --stop-after-init --logfile "$INSTDIR\openerp-server.log" -s' + nsExec::Exec '"$INSTDIR\server\openerp-server.exe" --stop-after-init --logfile "$INSTDIR\server\openerp-server.log" -s' nsExec::Exec '"$INSTDIR\service\OpenERPServerService.exe" -auto -install' SectionEnd Section -RestartServer - nsExec::Exec "net start openerp-server-6.0" + nsExec::Exec "net start openerp-server-6.1" sleep 2 SectionEnd Section -Post - WriteRegExpandStr HKLM "${UNINSTALL_REGISTRY_KEY}" "UninstallString" "$INSTDIR\Uninstall.exe" + WriteRegExpandStr HKLM "${UNINSTALL_REGISTRY_KEY}" "UninstallString" "$INSTDIR\server\Uninstall.exe" WriteRegExpandStr HKLM "${UNINSTALL_REGISTRY_KEY}" "InstallLocation" "$INSTDIR" WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "DisplayName" "${DISPLAY_NAME}" WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "DisplayVersion" "${VERSION}" @@ -222,37 +215,30 @@ 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@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" + 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" + WriteUninstaller "$INSTDIR\server\Uninstall.exe" SectionEnd Section "Uninstall" ; Stop the NT Service - nsExec::Exec "net stop openerp-server-6.0" + nsExec::Exec "net stop openerp-server-6.1" sleep 2 ; Uninstall the OpenERP Service - nsExec::Exec '"$INSTDIR\service\OpenERPServerService.exe" -remove' + nsExec::Exec '"$INSTDIR\..\service\OpenERPServerService.exe" -remove' sleep 2 - Rmdir /r "$INSTDIR" + Rmdir /r "$INSTDIR\service" + Rmdir /r "$INSTDIR\server" !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP - Delete "$SMPROGRAMS\$MUI_TEMP\Forum.url" - Delete "$SMPROGRAMS\$MUI_TEMP\Translation.url" - Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" - Delete "$SMPROGRAMS\$MUI_TEMP\OpenERP Server.lnk" - Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" - Delete "$SMPROGRAMS\$MUI_TEMP\Start service.lnk" - Delete "$SMPROGRAMS\$MUI_TEMP\Stop service.lnk" - Delete "$SMPROGRAMS\$MUI_TEMP\Edit config.lnk" - Delete "$SMPROGRAMS\$MUI_TEMP\View log.lnk" + Delete "$SMPROGRAMS\$MUI_TEMP\OpenERP.url" ; ;Delete empty start menu parent diretories StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"