diff --git a/copyq.pro b/copyq.pro index 07ebc9f7a9..a4f5cab459 100644 --- a/copyq.pro +++ b/copyq.pro @@ -57,9 +57,4 @@ macx { bundle_mac.target = CopyQ.app bundle_mac.commands = mv copyq.app CopyQ.app QMAKE_EXTRA_TARGETS += bundle_mac - - # Create a dmg file - dmg.commands = $$_PRO_FILE_PWD_/utils/create_dmg.sh - dmg.depends = bundle_mac - QMAKE_EXTRA_TARGETS += dmg } diff --git a/shared/dmg_settings.py b/shared/dmg_settings.py deleted file mode 100755 index 186eb321b5..0000000000 --- a/shared/dmg_settings.py +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -""" -Settings file for dmgbuild. - -Use like this: dmgbuild -Dapp_path=/path/to/copqy.app -s /path/to/dmg_settings.py "CopyQ 2.2" copyq22.dmg - -http://dmgbuild.readthedocs.org/en/latest/settings.html -""" - -from __future__ import unicode_literals - - -import os - -def get_size(start_path = '.'): - total_size = 0 - for dirpath, dirnames, filenames in os.walk(start_path): - for f in filenames: - fp = os.path.join(dirpath, f) - total_size += os.path.getsize(fp) - return total_size - -app_path = defines['app_path'] -app_name = os.path.basename(app_path) - -# Volume format (see hdiutil create -help) -format = "UDBZ" - -# Volume size (must be large enough for your files) -_copyq_size_mb = get_size(app_path) / 1024 / 1024 -size = "%sm" % (_copyq_size_mb + 30) - -# Files and symlinks to include -files = [app_path] -symlinks = { 'Applications': '/Applications' } - -# Icon -badge_icon = "%s/Contents/Resources/icon.icns" % app_path - -# Display settings - -icon_locations = { - app_name: (140, 120), - 'Applications': (500, 120) -} - -# Window position in ((x, y), (w, h)) format -window_rect = ((100, 100), (640, 280)) - -background = 'builtin-arrow' diff --git a/utils/create_dmg.sh b/utils/create_dmg.sh deleted file mode 100755 index c9d65795fe..0000000000 --- a/utils/create_dmg.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -set -e -x - -# Creates a .dmg file for CopyQ - -script_path=$(cd $(dirname $0); pwd) -app_path=${1:-$(pwd)/CopyQ.app} - -if ! python -c 'from Quartz import *' &>/dev/null || ! which dmgbuild &>/dev/null -then - echo "$(basename $0) requires dmgbuild and pyobjc-framework-Quartz to be installed." 1>&2 - echo "These can be installed with 'pip install dmgbuild pyobjc-framework-Quartz'" 1>&2 - exit 1 -fi - -binary="${app_path}/Contents/MacOS/copyq" -settings="${script_path}/../shared/dmg_settings.py" - -! [[ -f "${settings}" ]] && echo "${settings} is not a file" && exit 1 -! [[ -d "${app_path}" ]] && echo "${app_path} is not a directory" && exit 1 -! [[ -x "${binary}" ]] && echo "unable to execute ${binary}" && exit 1 - -version=$(${binary} --version | grep 'CopyQ' | sed 's/.*v\([0-9.]*\) .*/\1/') - -dmg="${app_path}/../CopyQ-${version}.dmg" -name="CopyQ ${version}" -echo "Creating ${dmg} for \"${name}\"" - -dmgbuild -Dapp_path="${app_path}" -s "${settings}" "${name}" "${dmg}"