diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2020-04-02 10:24:58 +0300 |
---|---|---|
committer | Hannah von Reth <hannah.vonreth@owncloud.com> | 2020-04-02 10:24:58 +0300 |
commit | 080a569fff128a1880243602359d599eff955ffc (patch) | |
tree | a2114cec0399eacba1fc241bd9c304fb012bb104 /admin | |
parent | 20fbaf8d9bc59742f4325dbfac3c553f7fee3eed (diff) | |
parent | 7964e47a28411605930d81441400acdb30953c8c (diff) |
Merge remote-tracking branch 'origin/2.6'
Diffstat (limited to 'admin')
-rw-r--r-- | admin/osx/CMakeLists.txt | 12 | ||||
-rw-r--r-- | admin/osx/macosx.pkgproj.cmake | 168 | ||||
-rw-r--r-- | admin/osx/post_install.sh.cmake | 12 | ||||
-rw-r--r-- | admin/osx/pre_install.sh.cmake | 10 |
4 files changed, 157 insertions, 45 deletions
diff --git a/admin/osx/CMakeLists.txt b/admin/osx/CMakeLists.txt index 5531223fb..720015c0d 100644 --- a/admin/osx/CMakeLists.txt +++ b/admin/osx/CMakeLists.txt @@ -6,13 +6,13 @@ # includes CMAKE_SOURCE_DIR or so. if (DEFINED MAC_INSTALLER_BACKGROUND_FILE ) - set(MAC_INSTALLER_DO_CUSTOM_BACKGROUND "1") + set(MAC_INSTALLER_DO_CUSTOM_BACKGROUND "true") else() - set(MAC_INSTALLER_DO_CUSTOM_BACKGROUND "0") + set(MAC_INSTALLER_DO_CUSTOM_BACKGROUND "false") endif() find_package(Qt5 5.6 COMPONENTS Core REQUIRED) -configure_file(create_mac.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/create_mac.sh) -configure_file(macosx.pkgproj.cmake ${CMAKE_CURRENT_BINARY_DIR}/macosx.pkgproj) -configure_file(pre_install.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/pre_install.sh) -configure_file(post_install.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/post_install.sh) +configure_file(create_mac.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/create_mac.sh @ONLY) +configure_file(macosx.pkgproj.cmake ${CMAKE_CURRENT_BINARY_DIR}/macosx.pkgproj @ONLY) +configure_file(pre_install.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/pre_install.sh @ONLY) +configure_file(post_install.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/post_install.sh @ONLY) diff --git a/admin/osx/macosx.pkgproj.cmake b/admin/osx/macosx.pkgproj.cmake index 0552e1c32..762df146e 100644 --- a/admin/osx/macosx.pkgproj.cmake +++ b/admin/osx/macosx.pkgproj.cmake @@ -5,6 +5,10 @@ <key>PACKAGES</key> <array> <dict> + <key>MUST-CLOSE-APPLICATION-ITEMS</key> + <array/> + <key>MUST-CLOSE-APPLICATIONS</key> + <false/> <key>PACKAGE_FILES</key> <dict> <key>DEFAULT_INSTALL_LOCATION</key> @@ -251,7 +255,7 @@ <key>PATH_TYPE</key> <integer>0</integer> <key>PERMISSIONS</key> - <integer>493</integer> + <integer>1005</integer> <key>TYPE</key> <integer>1</integer> <key>UID</key> @@ -353,6 +357,38 @@ <key>UID</key> <integer>0</integer> </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>Automator</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> + <dict> + <key>CHILDREN</key> + <array/> + <key>GID</key> + <integer>0</integer> + <key>PATH</key> + <string>Extensions</string> + <key>PATH_TYPE</key> + <integer>0</integer> + <key>PERMISSIONS</key> + <integer>493</integer> + <key>TYPE</key> + <integer>1</integer> + <key>UID</key> + <integer>0</integer> + </dict> </array> <key>GID</key> <integer>0</integer> @@ -466,43 +502,65 @@ </dict> <key>PAYLOAD_TYPE</key> <integer>0</integer> + <key>PRESERVE_EXTENDED_ATTRIBUTES</key> + <false/> + <key>SHOW_INVISIBLE</key> + <false/> + <key>SPLIT_FORKS</key> + <true/> + <key>TREAT_MISSING_FILES_AS_WARNING</key> + <false/> <key>VERSION</key> - <integer>2</integer> + <integer>5</integer> </dict> <key>PACKAGE_SCRIPTS</key> <dict> - <key>POSTINSTALL_PATH</key> - <dict> - <key>PATH</key> - <string>@CMAKE_CURRENT_BINARY_DIR@/post_install.sh</string> - <key>PATH_TYPE</key> - <integer>0</integer> - </dict> - <key>PREINSTALL_PATH</key> - <dict> - <key>PATH</key> - <string>@CMAKE_CURRENT_BINARY_DIR@/pre_install.sh</string> - <key>PATH_TYPE</key> - <integer>0</integer> - </dict> - <key>RESOURCES</key> - <array/> - </dict> + <key>POSTINSTALL_PATH</key> + <dict> + <key>PATH</key> + <string>@CMAKE_CURRENT_BINARY_DIR@/post_install.sh</string> + <key>PATH_TYPE</key> + <integer>0</integer> + </dict> + <key>PREINSTALL_PATH</key> + <dict> + <key>PATH</key> + <string>@CMAKE_CURRENT_BINARY_DIR@/pre_install.sh</string> + <key>PATH_TYPE</key> + <integer>0</integer> + </dict> + <key>RESOURCES</key> + <array/> + </dict> <key>PACKAGE_SETTINGS</key> <dict> <key>AUTHENTICATION</key> <integer>1</integer> <key>CONCLUSION_ACTION</key> <integer>0</integer> + <key>FOLLOW_SYMBOLIC_LINKS</key> + <false/> <key>IDENTIFIER</key> <string>@APPLICATION_REV_DOMAIN_INSTALLER@</string> + <key>LOCATION</key> + <integer>0</integer> <key>NAME</key> <string>@APPLICATION_NAME_XML_ESCAPED@</string> <key>OVERWRITE_PERMISSIONS</key> <false/> + <key>PAYLOAD_SIZE</key> + <integer>-1</integer> + <key>REFERENCE_PATH</key> + <string></string> + <key>RELOCATABLE</key> + <false/> + <key>USE_HFS+_COMPRESSION</key> + <false/> <key>VERSION</key> <string>@MIRALL_VERSION_FULL@</string> </dict> + <key>TYPE</key> + <integer>0</integer> <key>UUID</key> <string>7D7219B7-1897-48C3-8533-842BDEC46F71</string> </dict> @@ -532,6 +590,45 @@ <dict> <key>ALIGNMENT</key> <integer>6</integer> + <key>APPAREANCES</key> + <dict> + <key>DARK_AQUA</key> + <dict> + <key>ALIGNMENT</key> + <integer>6</integer> + <key>BACKGROUND_PATH</key> + <dict> + <key>PATH</key> + <string>@MAC_INSTALLER_BACKGROUND_FILE@</string> + <key>PATH_TYPE</key> + <integer>0</integer> + </dict> + <key>CUSTOM</key> + <true/> + <key>LAYOUT_DIRECTION</key> + <integer>0</integer> + <key>SCALING</key> + <integer>0</integer> + </dict> + <key>LIGHT_AQUA</key> + <dict> + <key>ALIGNMENT</key> + <integer>6</integer> + <key>BACKGROUND_PATH</key> + <dict> + <key>PATH</key> + <string>@MAC_INSTALLER_BACKGROUND_FILE@</string> + <key>PATH_TYPE</key> + <integer>0</integer> + </dict> + <key>CUSTOM</key> + <true/> + <key>LAYOUT_DIRECTION</key> + <integer>0</integer> + <key>SCALING</key> + <integer>0</integer> + </dict> + </dict> <key>BACKGROUND_PATH</key> <dict> <key>PATH</key> @@ -540,9 +637,13 @@ <integer>0</integer> </dict> <key>CUSTOM</key> - <integer>@MAC_INSTALLER_DO_CUSTOM_BACKGROUND@</integer> + <@MAC_INSTALLER_DO_CUSTOM_BACKGROUND@/> + <key>LAYOUT_DIRECTION</key> + <integer>0</integer> <key>SCALING</key> <integer>0</integer> + <key>SHARED_SETTINGS_FOR_ALL_APPAREANCES</key> + <true/> </dict> <key>INSTALLATION TYPE</key> <dict> @@ -578,10 +679,8 @@ <dict/> </dict> </dict> - <key>INSTALLATION TYPE</key> - <integer>1</integer> - <key>MODE</key> - <integer>1</integer> + <key>MODE</key> + <integer>1</integer> </dict> <key>INSTALLATION_STEPS</key> <array> @@ -649,8 +748,6 @@ </dict> <key>LICENSE</key> <dict> - <key>KEYWORDS</key> - <dict/> <key>LOCALIZATIONS</key> <array/> <key>MODE</key> @@ -683,10 +780,6 @@ <dict> <key>LIST</key> <array/> - <key>POSTINSTALL_PATH</key> - <dict/> - <key>PREINSTALL_PATH</key> - <dict/> <key>RESOURCES</key> <array/> <key>ROOT_VOLUME_ONLY</key> @@ -694,14 +787,17 @@ </dict> <key>PROJECT_SETTINGS</key> <dict> - <key>ADVANCED_OPTIONS</key> - <dict/> + <key>ADVANCED_OPTIONS</key> + <dict> + <key>installer-script.domains:enable_localSystem</key> + <integer>1</integer> + </dict> <key>BUILD_FORMAT</key> <integer>0</integer> <key>BUILD_PATH</key> <dict> <key>PATH</key> - <string>@CMAKE_INSTALL_PREFIX@/.</string> + <string>@CMAKE_INSTALL_PREFIX@/.</string> <key>PATH_TYPE</key> <integer>3</integer> </dict> @@ -875,8 +971,12 @@ </array> <key>NAME</key> <string>@APPLICATION_NAME_XML_ESCAPED@ Installer</string> + <key>PAYLOAD_ONLY</key> + <false/> <key>REFERENCE_FOLDER_PATH</key> - <string>@CMAKE_INSTALL_DIR@</string> + <string></string> + <key>TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING</key> + <false/> </dict> </dict> <key>TYPE</key> diff --git a/admin/osx/post_install.sh.cmake b/admin/osx/post_install.sh.cmake index 55d5e1c1d..dbc14eb53 100644 --- a/admin/osx/post_install.sh.cmake +++ b/admin/osx/post_install.sh.cmake @@ -1,7 +1,9 @@ -#!/bin/sh +#!/bin/bash + +LOGGED_IN_USER_ID=$(id -u "${USER}") # Always enable the new 10.10 finder plugin if available -if [ -x "$(command -v pluginkit)" ]; then +if [[ -x "$(command -v pluginkit)" ]]; then # add it to DB. This happens automatically too but we try to push it a bit harder for issue #3463 pluginkit -a "/Applications/@APPLICATION_EXECUTABLE@.app/Contents/PlugIns/FinderSyncExt.appex/" # Since El Capitan we need to sleep #4650 @@ -10,4 +12,10 @@ if [ -x "$(command -v pluginkit)" ]; then pluginkit -e use -i @APPLICATION_REV_DOMAIN@.FinderSyncExt fi +if [[ -f "${INSTALLER_TEMP}/OC_RESTART_NEEDED" ]]; then + if [[ "${COMMAND_LINE_INSTALL}" = "" ]]; then + /bin/launchctl asuser "${LOGGED_IN_USER_ID}" /usr/bin/open -g "/Applications/@APPLICATION_EXECUTABLE@.app" + fi +fi + exit 0 diff --git a/admin/osx/pre_install.sh.cmake b/admin/osx/pre_install.sh.cmake index cd909e29a..51809adc4 100644 --- a/admin/osx/pre_install.sh.cmake +++ b/admin/osx/pre_install.sh.cmake @@ -1,6 +1,10 @@ -#!/bin/sh +#!/bin/bash -# kill the old version. see issue #2044 -killall @APPLICATION_EXECUTABLE@ +OC_INSTANCE=$(ps aux | grep "/Applications/@APPLICATION_EXECUTABLE@.app/Contents/MacOS/@APPLICATION_EXECUTABLE@") + +if [[ "${OC_INSTANCE}" != "" ]]; then + kill $(echo ${OC_INSTANCE} | awk '{print $2}') + touch $INSTALLER_TEMP/OC_RESTART_NEEDED +fi exit 0 |