Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
macos: dmg style change update
Ivan Yossi2f3450b451bd
diff --git a/packaging/macos/default.style b/packaging/macos/default.styleindex f6d1392a8a..29288c93f6 100644--- a/packaging/macos/default.style+++ b/packaging/macos/default.style@@ -4,16 +4,21 @@ tell application "Finder"set current view of container window to icon viewset toolbar visible of container window to falseset statusbar visible of container window to false- set the bounds of container window to {539, 238, 1331, 652}+ set pathbar visible of container window to false+ set the bounds of container window to {329, 220, 1142, 689}set theViewOptions to the icon view options of container windowset arrangement of theViewOptions to not arranged- set icon size of theViewOptions to 72+ set shows item info of theViewOptions to false+ set icon size of theViewOptions to 96set background picture of theViewOptions to file ".background:%s"- set position of item "krita.app" of container window to {606, 85}- set position of item "Applications" of container window to {606, 241}- set position of item "Terms of Use" of container window to {718, 85}- update without registering applications+ set position of item "krita.app" of container window to {344, 216}+ set position of item "Applications" of container window to {590, 216}+ set position of item "Terms of Use" of container window to {163, 216}+ set position of item ".background" of container window to {1300, 64}+ set position of item ".fseventsd" of container window to {1300, 150}+ set position of item ".VolumeIcon.icns" of container window to {1300, 230}+ -- update without registering applicationsdelay 1closeend tell-end tell\ No newline at end of file+end telldiff --git a/packaging/macos/dmgstyle.sh b/packaging/macos/dmgstyle.shindex b0193609a0..6ec5765c4c 100755--- a/packaging/macos/dmgstyle.sh+++ b/packaging/macos/dmgstyle.sh@@ -8,8 +8,7 @@# the dmg image file.set_dmgfolder_props() {- cp ${DMG_background} "${DMG_STYLE_DIR}/.background"- BG_FILENAME=${DMG_background##*/}+ cp ${DMG_background} "${DMG_STYLE_DIR}/.background/${BG_FILENAME}"printf 'tell application "Finder"tell folder "%s" of %s@@ -17,14 +16,19 @@ set_dmgfolder_props() {set current view of container window to icon viewset toolbar visible of container window to falseset statusbar visible of container window to false- set the bounds of container window to {186, 156, 956, 592}+ set pathbar visible of container window to false+ set the bounds of container window to {329, 220, 1142, 689}set theViewOptions to the icon view options of container windowset arrangement of theViewOptions to not arranged- set icon size of theViewOptions to 80+ set shows item info of theViewOptions to false+ set icon size of theViewOptions to 96set background picture of theViewOptions to file ".background:%s"- set position of item "krita.app" of container window to {279, 272}- set position of item "Applications" of container window to {597, 272}- set position of item "Terms of Use" of container window to {597, 110}+ set position of item "krita.app" of container window to {344, 216}+ set position of item "Applications" of container window to {590, 216}+ set position of item "Terms of Use" of container window to {163, 216}+ set position of item ".background" of container window to {1300,64}+ set position of item ".fseventsd" of container window to {1300, 150}+ set position of item ".VolumeIcon.icns" of container window to {1300, 230}update without registering applicationscloseend tell@@ -45,6 +49,8 @@ get_dmgfolder_props() {log v_tbset v_stat to statusbar visible of container windowlog v_stat+ set v_path to pathbar visible of container window+ log v_pathset v_bounds to the bounds of container windowlog v_boundsset theViewOptions to the icon view options of container window@@ -58,6 +64,8 @@ get_dmgfolder_props() {log v_pos_apset v_pos_term to position of item "Terms of Use" of container windowlog v_pos_term+ set v_pos_bg to position of item ".background" of container window+ log v_pos_bgupdate without registering applicationsend tellend tell@@ -75,15 +83,20 @@ print_osascript_cmd() {set current view of container window to %sset toolbar visible of container window to %sset statusbar visible of container window to %s+ set pathbar visible of container window to %sset the bounds of container window to {%s}set theViewOptions to the icon view options of container windowset arrangement of theViewOptions to %s+ set shows item info of theViewOptions to falseset icon size of theViewOptions to %sset background picture of theViewOptions to file ".background:%%s"set position of item "krita.app" of container window to {%s}set position of item "Applications" of container window to {%s}set position of item "Terms of Use" of container window to {%s}- update without registering applications+ set position of item ".background" of container window to {%s}+ set position of item ".fseventsd" of container window to {1300, 150}+ set position of item ".VolumeIcon.icns" of container window to {1300, 200}+ -- update without registering applicationsdelay 1closeend tell@@ -135,7 +148,8 @@ DMG_DUMMY_NAME="dmg_style_dummy"DMG_STYLE_DIR="${BUILDROOT}/${DMG_DUMMY_NAME}"DMG_STYLE_DIR_OSA=$(printf "%s/%s" ${build_folder} ${DMG_DUMMY_NAME} | tr / :)DMG_STYLE_LOCATION=${dmg_vol_name}-KIS_INSTALL_DIR="${BUILDROOT}/i"+KIS_INSTALL_DIR="${BUILDROOT}/install"+BG_FILENAME="[email protected]"if [[ ${1} = "-h" || ${1} = "--help" ]]; then@@ -149,6 +163,8 @@ if [[ ${1} = "set" ]]; thenmkdir "${DMG_STYLE_DIR}"mkdir "${DMG_STYLE_DIR}/Terms of Use"mkdir "${DMG_STYLE_DIR}/.background"+ mkdir "${DMG_STYLE_DIR}/.fseventsd"+ ln -s "${BUILDROOT}/krita/packaging/macos/KritaIcon.icns" "${DMG_STYLE_DIR}/.VolumeIcon.icns"ln -s "/Applications" "${DMG_STYLE_DIR}/Applications"ln -s "${KIS_INSTALL_DIR}/bin/krita.app" "${DMG_STYLE_DIR}/krita.app"fidiff --git a/packaging/macos/krita_dmgBG.jpg b/packaging/macos/krita_dmgBG.jpgdeleted file mode 100644index 801689509e..0000000000Binary files a/packaging/macos/krita_dmgBG.jpg and /dev/null differdiff --git a/packaging/macos/krita_dmgBG.png b/packaging/macos/krita_dmgBG.pngnew file mode 100644index 0000000000..3636903bb9Binary files /dev/null and b/packaging/macos/krita_dmgBG.png differdiff --git a/packaging/macos/osxdeploy.sh b/packaging/macos/osxdeploy.shindex 3f1a740ed7..a6ae6d063b 100755--- a/packaging/macos/osxdeploy.sh+++ b/packaging/macos/osxdeploy.sh@@ -285,7 +285,7 @@ print_msg "Using style from: %s" "${DMG_STYLE}"if [[ ${DMG_validBG} -eq 0 ]]; thenecho "No jpg or png valid file detected!!"echo "Using default style"- DMG_background="${KIS_SRC_DIR}/packaging/macos/krita_dmgBG.jpg"+ DMG_background="${KIS_SRC_DIR}/packaging/macos/krita_dmgBG.png"fi@@ -942,16 +942,15 @@ createDMG () {cp -v "${KIS_SRC_DIR}/packaging/macos/Terms_of_use.rtf" "/Volumes/${DMG_title}/Terms of Use/"ln -s "/Applications" "/Volumes/${DMG_title}/Applications"- ## Apple script to set style- style="$(<"${DMG_STYLE}")"- printf "${style}" "${DMG_title}" "${DMG_background##*/}" | osascript-#Set Icon for DMGcp -v "${KIS_SRC_DIR}/packaging/macos/KritaIcon.icns" "/Volumes/${DMG_title}/.VolumeIcon.icns"SetFile -a C "/Volumes/${DMG_title}"- chmod -Rf go-w "/Volumes/${DMG_title}"+ ## Apple script to set style+ style="$(<"${DMG_STYLE}")"+ printf "${style}" "${DMG_title}" "${DMG_background##*/}" | osascript+ chmod -Rf go-w "/Volumes/${DMG_title}"# ensure all writing operations to dmg are oversync@@ -967,7 +966,7 @@ createDMG () {printf "${DMG_NAME}" | batch_codesignfi- notarize_build "${BUILDROOT}" "${DMG_NAME}"+ # notarize_build "${BUILDROOT}" "${DMG_NAME}"if [[ ! -d "${BUILDROOT}/_packaging" ]]; thenmkdir "${BUILDROOT}/_packaging"