diff --git a/CHANGELOG b/CHANGELOG index f265844e99c9..72a7fb552be0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,11 @@ devel ----- +* Fixed BTS-582: ArangoDB client EXE package for Windows has incorrect metadata. + +* Fixed BTS-575: Windows EXE installer doesn't replace service during upgrade in + silent (non-UI) mode. + * APM-121: allow the UPSERT query to have indexHint as an extra parameter for OPTIONS. It will be used as a hint by the inner FOR loop that is performed as part of the UPSERT query, and would help in cases such as UPSERT not diff --git a/Installation/Windows/Templates/NSIS.template.in b/Installation/Windows/Templates/NSIS.template.in index d6cf6db9b059..e451bbe2529b 100755 --- a/Installation/Windows/Templates/NSIS.template.in +++ b/Installation/Windows/Templates/NSIS.template.in @@ -226,6 +226,9 @@ Function check_previous_install StrCpy $UpgradeInstall "0" IfFileExists "$DATADIR\@INC_CPACK_ARANGO_DATA_DIR@\SERVER" OldFound IfFileExists "$DATADIR\@INC_CPACK_ARANGO_DATA_DIR@\ENGINE" OldFound + IfSilent 0 continueNoDirectMatch + IfFileExists "$DATADIR\ENGINE" OldFound +continueNoDirectMatch: DetailPrint "This is a fresh install." return OldFound: @@ -238,7 +241,16 @@ Function stop_old_service SimpleSC::StopService '${TRI_SVC_NAME}' 0 30 Call WaitForServiceDown SimpleSC::RemoveService '${TRI_SVC_NAME}' + Pop $0 ; returns an errorcode (<>0) otherwise success (0) + IntCmp $0 0 Done_stop_old + IntCmp $0 1060 Done_stop_old ; service not there, we don't care. + Push $0 + SimpleSC::GetErrorMessage + Pop $0 + DetailPrint 'Stopping ArangoDB fails - Reason: $0' + MessageBox MB_OK 'Stopping ArangoDB fails - Reason: $0' ${EndIf} +Done_stop_old: FunctionEnd @@ -731,7 +743,7 @@ Function UpgradeExisting push ${ARANGO_EXIT_ALREADY_RUNNING} pop $0 retryDetectUpgradeNeeded: - ExecWait "$INSTDIR\${SBIN_DIR}\arangod.exe --server.rest-server false --log.foreground-tty false --database.check-version" $0 + ExecWait "$INSTDIR\${SBIN_DIR}\arangod.exe --server.rest-server false --log.foreground-tty false --database.check-version $DATADIR" $0 DetailPrint "done Checking whether an existing database needs upgrade: $0" ${If} $0 == ${ARANGO_EXIT_ALREADY_RUNNING} ${OrIf} $0 == ${ARANGO_EXIT_COULD_NOT_LOCK} @@ -759,7 +771,7 @@ retryDetectUpgradeNeeded: ${EndIf} DetailPrint "Attempting to run database upgrade: " ; Now actually do the upgrade - ExecWait "$INSTDIR\${SBIN_DIR}\arangod.exe --server.rest-server false --log.level error --database.auto-upgrade true" $0 + ExecWait "$INSTDIR\${SBIN_DIR}\arangod.exe --server.rest-server false --log.level error --database.auto-upgrade true $DATADIR" $0 DetailPrint "Done running database upgrade: $0" ${If} $0 != 0 !insertmacro printExitCode $0 "the Upgrade failed, please do a manual upgrade" "" @@ -886,6 +898,13 @@ FunctionEnd ;Installer Sections Section "-Core installation" + IfSilent 0 continueBaseInstall + ; this would be called inside the UI code: + Call check_previous_install + ${If} $UpgradeInstall == "1" + Call stop_old_service + ${EndIf} +continueBaseInstall: ;Use the entire tree produced by the INSTALL target. Keep the ;list of directories here in sync with the RMDir commands below. SetOutPath "$INSTDIR" @@ -970,9 +989,6 @@ Section "-Core installation" CreateDirectory $LOGDIR ${EndIf} - ; non-interactive install only hits us here? - Call check_previous_install - CreateDirectory $APPDIR Call assignFileRights ${If} $UpgradeInstall == "1" @@ -1255,6 +1271,7 @@ SectionEnd ; "Program Files" for AllUsers, "My Documents" for JustMe... var CMDINSTDIR +var CMDUPGRADE Function .onInit ; are we allowed to install admin in first place? @@ -1292,7 +1309,17 @@ Function .onInit ${EndIf} noInstDir: - # we only want to manipulate APPDIR here if /APPDIR is really set! + # $AUTOMATIC_UPDATE would be set later in the UI code (if) + StrCpy $AUTOMATIC_UPDATE "0" + ${GetParameters} $R0 + ClearErrors + ${GetOptions} $R0 "/UPGRADE=" $CMDUPGRADE + IfErrors noUpgrade 0 + IfSilent 0 noUpgrade + StrCpy $AUTOMATIC_UPDATE "$CMDUPGRADE" +noUpgrade: + + # we only want to manipulate APPDIR here if /APPDIR is really set! ${GetParameters} $R0 ClearErrors ${GetOptions} $R0 "/APPDIR=" $CMDINSTDIR diff --git a/cmake/packages/client/nsis.txt b/cmake/packages/client/nsis.txt index ba3a1f96aade..5f8029dff043 100644 --- a/cmake/packages/client/nsis.txt +++ b/cmake/packages/client/nsis.txt @@ -38,6 +38,7 @@ set(ARANGODB_URL_INFO_ABOUT "@ARANGODB_URL_INFO_ABOUT@") set(ARANGODB_SOURCE_DIR "@ARANGODB_SOURCE_DIR@") set(ARANGODB_VERSION "@ARANGODB_VERSION@") set(ARANGODB_PACKAGE_ARCHITECTURE "@ARANGODB_PACKAGE_ARCHITECTURE@") +set(ARANGODB_PACKAGE_VENDOR "@ARANGODB_PACKAGE_VENDOR@") set(ARANGODB_PACKAGE_CONTACT "@ARANGODB_PACKAGE_CONTACT@") set(CMAKE_INSTALL_FULL_BINDIR "@CMAKE_INSTALL_FULL_BINDIR@") @@ -73,6 +74,7 @@ set(ARANGODB_JS_VERSION "@ARANGODB_JS_VERSION@") ################################################################################ set(CPACK_PACKAGE_VERSION "${ARANGODB_VERSION}") +set(CPACK_PACKAGE_VENDOR ${ARANGODB_PACKAGE_VENDOR}) set(CPACK_PACKAGE_CONTACT ${ARANGODB_PACKAGE_CONTACT}) if (${USE_ENTERPRISE}) @@ -127,7 +129,7 @@ INSTALL(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT} DESTINATION ${CMAKE_INST set (ICON_PATH "${W_INSTALL_FILES}/Icons/") install(DIRECTORY "${ICON_PATH}" DESTINATION "resources") -file(TO_NATIVE_PATH "resources/Icons/arangodb.ico" RELATIVE_ARANGO_ICON) +file(TO_NATIVE_PATH "resources/arangodb.ico" RELATIVE_ARANGO_ICON) file(TO_NATIVE_PATH "${ICON_PATH}arangodb.bmp" ARANGO_IMG) file(TO_NATIVE_PATH "${ICON_PATH}/arangodb.ico" ARANGO_ICON)