Skip to content

armgit / krita

Public Imported from GitHub
0

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.style
index 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 view
set toolbar visible of container window to false
set 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 window
set 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 96
set 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 applications
delay 1
close
end tell
-end tell
\ No newline at end of file
+end tell
diff --git a/packaging/macos/dmgstyle.sh b/packaging/macos/dmgstyle.sh
index 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 view
set toolbar visible of container window to false
set 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 window
set 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 96
set 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 applications
close
end tell
@@ -45,6 +49,8 @@ get_dmgfolder_props() {
log v_tb
set v_stat to statusbar visible of container window
log v_stat
+ set v_path to pathbar visible of container window
+ log v_path
set v_bounds to the bounds of container window
log v_bounds
set theViewOptions to the icon view options of container window
@@ -58,6 +64,8 @@ get_dmgfolder_props() {
log v_pos_ap
set v_pos_term to position of item "Terms of Use" of container window
log v_pos_term
+ set v_pos_bg to position of item ".background" of container window
+ log v_pos_bg
update without registering applications
end tell
end tell
@@ -75,15 +83,20 @@ print_osascript_cmd() {
set current view of container window to %s
set toolbar visible of container window to %s
set statusbar visible of container window to %s
+ set pathbar visible of container window to %s
set the bounds of container window to {%s}
set theViewOptions to the icon view options of container window
set arrangement of theViewOptions to %s
+ set shows item info of theViewOptions to false
set icon size of theViewOptions to %s
set 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 applications
delay 1
close
end 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" ]]; then
mkdir "${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"
fi
diff --git a/packaging/macos/krita_dmgBG.jpg b/packaging/macos/krita_dmgBG.jpg
deleted file mode 100644
index 801689509e..0000000000
Binary files a/packaging/macos/krita_dmgBG.jpg and /dev/null differ
diff --git a/packaging/macos/krita_dmgBG.png b/packaging/macos/krita_dmgBG.png
new file mode 100644
index 0000000000..3636903bb9
Binary files /dev/null and b/packaging/macos/krita_dmgBG.png differ
diff --git a/packaging/macos/osxdeploy.sh b/packaging/macos/osxdeploy.sh
index 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 ]]; then
echo "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 DMG
cp -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 over
sync
@@ -967,7 +966,7 @@ createDMG () {
printf "${DMG_NAME}" | batch_codesign
fi
- notarize_build "${BUILDROOT}" "${DMG_NAME}"
+ # notarize_build "${BUILDROOT}" "${DMG_NAME}"
if [[ ! -d "${BUILDROOT}/_packaging" ]]; then
mkdir "${BUILDROOT}/_packaging"