From c2ead0e2657ddfeecb8e7b34841dd79c791d451b Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Sat, 13 Jan 2018 22:10:26 +0100 Subject: [PATCH] Fix macOS building and code signing, resolves #1344 --- COPYING | 4 ++++ LICENSE.MIT | 19 +++++++++++++++++++ release-tool | 25 ++++++++++++------------- share/macosx/DS_Store.in | Bin 0 -> 10244 bytes share/macosx/Info.plist.cmake | 2 +- share/macosx/background.tiff | Bin 0 -> 17836 bytes src/CMakeLists.txt | 2 ++ 7 files changed, 38 insertions(+), 14 deletions(-) create mode 100644 LICENSE.MIT create mode 100644 share/macosx/DS_Store.in create mode 100644 share/macosx/background.tiff 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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sZ=TR_D+hWyY*EsdwQbC=+Nx4to z&cWJnWP>{>#B%t8+8%x4T3Sq00AB5lGul?$S>ZVlW4RgvpkxHS=67HoWVRoLrx1Yuk3Se=HvV z4BNm!Y9duomE}Z4&90^*2~|-d3kfwD$!7B_D}_uv8BZ^`erdwDyR(NrvTyD?c?p4? z5O#a-Kx7c^!?ArCW4gYrZal{7wm!Gr5^W+TD{pn3zWsCMQ-J+;Gns3PrUWbho65# z{^fVWG>HO>OyKkGZG19K~E)9MoNvRN}8&av%NPu z4F36blIj_AY{XNGv0ZUh=&hIgUM}btmI~Q&rzL9QSHty8$900QX%_6a2W*Fsc8rwRmN#BL$YadUuR*4sp zC7K)->7D&o!R|9o-6|A}osN#n>kA+Jn04;o+xQ21H?Q=0@|z9YxcB(~i~!OvlgxLm z6>R?x`TM`!$$NMa@FMWP838F!C>HXV8($KRBfi(kC|f8@+^_3!TLlmM>IaT1hF#(N z{o{-wQn<%fK@Y?2u J{$Kt5|98%B0-68- literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..99ae807ec865cd1321f715bd520601d3056c4de4 GIT binary patch literal 17836 zcmeI22UHYUy2o#IqRBZ5(jZBsNfMgS(B!OS5J7>a$vF!mAc&GA2#5p;DvF9?APFcS z2uctT1O=2JNkMTGb9mM2s60z$AB7VIGY#D=RYda4#B+=(mJM#TPBQtX z?p7+t@A@ehZSk;bc=Repv(((vT2+)Q-Qc*Tm-Q8jQt{SP*4{R%Cv2|W<|e$+R7JF#NKuWsBw zVte!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