diff --git a/COPYING b/COPYING index 7aa9c0333..fe199fcd4 100644 --- a/COPYING +++ b/COPYING @@ -235,3 +235,7 @@ Files: src/gui/KMessageWidget.h Copyright: 2011 Aurélien Gâteau 2014 Dominik Haumann License: LGPL-2.1 + +Files: share/macosx/dmg-background.tiff +Copyright: 2008-2014, Andrey Tarantsov +License: MIT diff --git a/LICENSE.MIT b/LICENSE.MIT new file mode 100644 index 000000000..d13cc4b26 --- /dev/null +++ b/LICENSE.MIT @@ -0,0 +1,19 @@ +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/release-tool b/release-tool index 93e964bc3..492f7c08c 100755 --- a/release-tool +++ b/release-tool @@ -317,13 +317,6 @@ checkCodesignCommandExists() { fi } -checkCreateDMGCommandExists() { - command -v create-dmg > /dev/null - if [ 0 -ne $? ]; then - exitError "create-dmg command not found on the PATH! Please install it using 'npm install --global create-dmg'." - fi -} - checkQt5LUpdateExists() { command -v lupdate > /dev/null if [ 0 -eq $? ] && ! $(lupdate -version | grep -q "lupdate version 5\."); then @@ -813,17 +806,16 @@ appsign() { fi checkCodesignCommandExists - checkCreateDMGCommandExists local orig_dir="$(pwd)" for f in "${sign_files[@]}"; do if [[ ${f: -4} == '.dmg' ]]; then logInfo "Unpacking disk image '${f}'..." local tmp_dir="/tmp/KeePassXC_${RANDOM}" - mkdir -p ${tmp_dir}/{mnt,app} + mkdir -p ${tmp_dir}/mnt hdiutil attach -quiet -noautoopen -mountpoint ${tmp_dir}/mnt "${f}" cd ${tmp_dir} - cp -a ./mnt/KeePassXC.app ./app + cp -a ./mnt ./app hdiutil detach -quiet ${tmp_dir}/mnt if [ ! -d ./app/KeePassXC.app ]; then @@ -839,10 +831,17 @@ appsign() { exitError "Signing failed!" fi - logInfo "Repacking and signing disk image..." - create-dmg ./app/KeePassXC.app + logInfo "Repacking disk image..." + hdiutil create \ + -volname "KeePassXC" \ + -size $((1000 * ($(du -sk ./app | cut -f1) + 5000))) \ + -srcfolder ./app \ + -fs HFS+ \ + -fsargs "-c c=64,a=16,e=16" \ + -format UDBZ \ + "${tmp_dir}/$(basename "${f}")" cd "${orig_dir}" - cp -f ${tmp_dir}/KeePassXC-*.dmg "${f}" + cp -f "${tmp_dir}/$(basename "${f}")" "${f}" rm -Rf ${tmp_dir} else logInfo "Skipping non-DMG file '${f}'..." diff --git a/share/macosx/DS_Store.in b/share/macosx/DS_Store.in new file mode 100644 index 000000000..9f03769c1 Binary files /dev/null and b/share/macosx/DS_Store.in differ diff --git a/share/macosx/Info.plist.cmake b/share/macosx/Info.plist.cmake index ea1a9bc2c..b38ca2844 100644 --- a/share/macosx/Info.plist.cmake +++ b/share/macosx/Info.plist.cmake @@ -29,7 +29,7 @@ CFBundleVersion ${KEEPASSXC_VERSION_NUM} NSHumanReadableCopyright - Copyright 2016-2017 KeePassXC Development Team + Copyright 2016-2018 KeePassXC Development Team CFBundleDocumentTypes diff --git a/share/macosx/background.tiff b/share/macosx/background.tiff new file mode 100644 index 000000000..99ae807ec Binary files /dev/null and b/share/macosx/background.tiff differ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b007f0f93..6a9638959 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -305,6 +305,8 @@ if(APPLE AND WITH_APP_BUNDLE) set(CPACK_GENERATOR "DragNDrop") set(CPACK_DMG_FORMAT "UDBZ") + set(CPACK_DMG_DS_STORE "${CMAKE_SOURCE_DIR}/share/macosx/DS_Store.in") + set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_SOURCE_DIR}/share/macosx/background.tiff") set(CPACK_DMG_VOLUME_NAME "${PROGNAME}") set(CPACK_SYSTEM_NAME "OSX") set(CPACK_STRIP_FILES ON)