1
0
Fork 0

- unify the refernces of the exes and DLLs for windows

- put them all into bin, else we would have to copy the dlls twice.
This commit is contained in:
Wilfried Goesgens 2016-10-12 17:27:10 +02:00
parent 5cb6b12372
commit 84bc6fa8a5
5 changed files with 22 additions and 18 deletions

View File

@ -778,14 +778,14 @@ Section "-Core installation"
;Create shortcuts
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Arango Shell.lnk" "$INSTDIR\usr\bin\arangosh.exe" '' '$INSTDIR\resources\arangodb.ico' '0' SW_SHOWMAXIMIZED
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Arango Server.lnk" "$INSTDIR\usr\sbin\arangod.exe" '' '$INSTDIR\resources\arangodb.ico' '0' SW_SHOWMAXIMIZED
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Arango Shell.lnk" "$INSTDIR\@CMAKE_BIN_DIR@\arangosh.exe" '' '$INSTDIR\resources\arangodb.ico' '0' SW_SHOWMAXIMIZED
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Arango Server.lnk" "$INSTDIR\@CMAKE_SBIN_DIR@\arangod.exe" '' '$INSTDIR\resources\arangodb.ico' '0' SW_SHOWMAXIMIZED
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
;Read a value from an InstallOptions INI file
StrCmp "0" "$INSTALL_DESKTOP" noDesktopIcon
CreateShortCut "$DESKTOP\Arango Shell.lnk" "$INSTDIR\bin\arangosh.exe" '' '$INSTDIR\resources\arangodb.ico' '0' SW_SHOWMAXIMIZED
CreateShortCut "$DESKTOP\Arango Shell.lnk" "$INSTDIR\@CMAKE_BIN_DIR@\arangosh.exe" '' '$INSTDIR\resources\arangodb.ico' '0' SW_SHOWMAXIMIZED
CreateShortCut "$DESKTOP\Arango Management Interface.lnk" "http://127.0.0.1:8529" '' '$INSTDIR\resources\arangodb.ico' '0' SW_SHOWMAXIMIZED
noDesktopIcon:
@ -810,7 +810,7 @@ Section "-Core installation"
System::Call 'Kernel32::SetEnvironmentVariable(t, t)i ("ARANGODB_DEFAULT_ROOT_PASSWORD", "$PASSWORD").r0'
StrCmp $0 0 error
ExecWait "$INSTDIR\usr\sbin\arangod.exe --database.init-database"
ExecWait "$INSTDIR\@CMAKE_SBIN_DIR@\arangod.exe --database.init-database"
Goto done
error:
MessageBox MB_OK "Failed to initialize database password."
@ -819,7 +819,7 @@ Section "-Core installation"
StrCmp $TRI_INSTALL_TYPE 'Service' 0 nothing
SimpleSC::StopService '${TRI_SVC_NAME}' 0 30
SimpleSC::RemoveService '${TRI_SVC_NAME}'
SimpleSC::InstallService '${TRI_SVC_NAME}' '${TRI_SVC_NAME}' '16' '2' '"$INSTDIR\usr\sbin\arangod.exe" --start-service' '' '' ''
SimpleSC::InstallService '${TRI_SVC_NAME}' '${TRI_SVC_NAME}' '16' '2' '"$INSTDIR\@CMAKE_SBIN_DIR@\arangod.exe" --start-service' '' '' ''
SimpleSC::SetServiceDescription '${TRI_SVC_NAME}' '${TRI_FRIENDLY_SVC_NAME}'
SimpleSC::StartService '${TRI_SVC_NAME}' '' 30
Call WaitForServiceUp
@ -833,7 +833,7 @@ Function .onInstSuccess
FunctionEnd
Section "-Add to path"
Push $INSTDIR\usr\bin
Push $INSTDIR\@CMAKE_BIN_DIR@
StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 doNotAddToPath
StrCmp $DO_NOT_ADD_TO_PATH "1" doNotAddToPath 0
Call AddToPath
@ -1182,9 +1182,9 @@ Section "Uninstall"
SimpleSC::GetServiceBinaryPath '${TRI_SVC_NAME}'
Pop $0 ; returns an errorcode (<>0) otherwise success (0)
Pop $1 ; returns the binary path of the service
; $1 should contain '"$INSTDIR\usr\sbin\arangod.exe" --start-service' - if $INSTDIR is equal
; $1 should contain '"$INSTDIR\@CMAKE_SBIN_DIR@\arangod.exe" --start-service' - if $INSTDIR is equal
; to our $INSTDIR uninstall the service - else its another installation and we jump to Done instead.
StrCmp $1 '"$INSTDIR\usr\sbin\arangod.exe" --start-service' '' Done
StrCmp $1 '"$INSTDIR\@CMAKE_BIN_DIR@\arangod.exe" --start-service' '' Done
DetailPrint 'Shutting down Service'
SimpleSC::StopService '${TRI_SVC_NAME}' 0 30
SimpleSC::RemoveService '${TRI_SVC_NAME}'
@ -1275,7 +1275,7 @@ Section "Uninstall"
${EndIf}
DeleteRegKey HKLM "${TRI_UNINSTALL_REG_PATH}"
Push $INSTDIR\usr\bin
Push $INSTDIR\@CMAKE_BIN_DIR@
StrCmp $DO_NOT_ADD_TO_PATH_ "1" doNotRemoveFromPath 0
Call un.RemoveFromPath
doNotRemoveFromPath:

View File

@ -638,13 +638,13 @@ Section "-Core installation"
;Create shortcuts
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Arango Shell.lnk" "$INSTDIR\usr\bin\arangosh.exe" '' '$INSTDIR\resources\arangodb.ico' '0' SW_SHOWMAXIMIZED
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Arango Shell.lnk" "$INSTDIR\@CMAKE_BIN_DIR@\arangosh.exe" '' '$INSTDIR\resources\arangodb.ico' '0' SW_SHOWMAXIMIZED
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
;Read a value from an InstallOptions INI file
StrCmp "0" "$INSTALL_DESKTOP" noDesktopIcon
CreateShortCut "$DESKTOP\Arango Shell.lnk" "$INSTDIR\usr\bin\arangosh.exe" '' '$INSTDIR\resources\arangodb.ico' '0' SW_SHOWMAXIMIZED
CreateShortCut "$DESKTOP\Arango Shell.lnk" "$INSTDIR\@CMAKE_BIN_DIR@\arangosh.exe" '' '$INSTDIR\resources\arangodb.ico' '0' SW_SHOWMAXIMIZED
CreateShortCut "$DESKTOP\Arango Management Interface.lnk" "http://127.0.0.1:8529" '' '$INSTDIR\resources\arangodb.ico' '0' SW_SHOWMAXIMIZED
noDesktopIcon:
@ -674,7 +674,7 @@ Function .onInstSuccess
FunctionEnd
Section "-Add to path"
Push $INSTDIR\usr\bin
Push $INSTDIR\@CMAKE_BIN_DIR@
StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 doNotAddToPath
StrCmp $DO_NOT_ADD_TO_PATH "1" doNotAddToPath 0
Call AddToPath
@ -981,7 +981,7 @@ Section "Uninstall"
DeleteRegKey HKCU "Software\@CPACK_NSIS_PACKAGE_NAME@"
DeleteRegKey HKLM "${TRI_UNINSTALL_REG_PATH}"
Push $INSTDIR\usr\bin
Push $INSTDIR\@CMAKE_BIN_DIR@
StrCmp $DO_NOT_ADD_TO_PATH_ "1" doNotRemoveFromPath 0
Call un.RemoveFromPath
doNotRemoveFromPath:

View File

@ -1,5 +1,8 @@
include(${CMAKE_SOURCE_DIR}/cmake/GNUInstallDirs.cmake)
if (MSVC)
# if we wouldn't do this, we would have to deploy the DLLs twice.
set(CMAKE_SBIN_DIR CMAKE_BIN_DIR)
endif()
set(ARANGODB_SOURCE_DIR ${CMAKE_SOURCE_DIR})
set(CMAKE_INSTALL_SYSCONFDIR_ARANGO "${CMAKE_INSTALL_SYSCONFDIR}/${CMAKE_PROJECT_NAME}")
set(CMAKE_INSTALL_FULL_SYSCONFDIR_ARANGO "${CMAKE_INSTALL_FULL_SYSCONFDIR}/${CMAKE_PROJECT_NAME}")

View File

@ -24,6 +24,7 @@ set(BIN_ARANGOIMP @BIN_ARANGOIMP@)
set(BIN_ARANGORESTORE @BIN_ARANGORESTORE@)
set(BIN_ARANGOSH @BIN_ARANGOSH@)
set(BIN_ARANGOVPACK @BIN_ARANGOVPACK@)
set(CMAKE_BIN_DIR @CMAKE_BIN_DIR@)
################################################################################
# build specific variables:
@ -117,8 +118,8 @@ include(${ORIGINAL_SOURCE_DIR}/cmake/InstallMacros.cmake)
# install the visual studio runtime:
set(CMAKE_INSTALL_UCRT_LIBRARIES 1)
include(InstallRequiredSystemLibraries)
INSTALL(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION bin COMPONENT Libraries)
INSTALL(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT} DESTINATION bin COMPONENT Libraries)
INSTALL(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ${CMAKE_BIN_DIR} COMPONENT Libraries)
INSTALL(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT} DESTINATION ${CMAKE_BIN_DIR} COMPONENT Libraries)
# install openssl
if (NOT LIB_EAY_RELEASE_DLL OR NOT SSL_EAY_RELEASE_DLL)

View File

@ -32,8 +32,8 @@ install_readme(README.windows README.windows.txt)
# install the visual studio runtime:
set(CMAKE_INSTALL_UCRT_LIBRARIES 1)
include(InstallRequiredSystemLibraries)
INSTALL(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION bin COMPONENT Libraries)
INSTALL(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT} DESTINATION bin COMPONENT Libraries)
INSTALL(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ${CMAKE_BIN_DIR} COMPONENT Libraries)
INSTALL(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT} DESTINATION ${CMAKE_BIN_DIR} COMPONENT Libraries)
# install openssl
if (NOT LIB_EAY_RELEASE_DLL OR NOT SSL_EAY_RELEASE_DLL)