Skip to content

Beautify MacVim's dmg installer background and volume icon #1540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions src/MacVim/Credits.rtf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{\rtf1\ansi\ansicpg1252\cocoartf2709
{\rtf1\ansi\ansicpg1252\cocoartf2821
\cocoascreenfonts1\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;\f2\fswiss\fcharset0 Helvetica-Oblique;
}
{\colortbl;\red255\green255\blue255;}
Expand Down Expand Up @@ -51,15 +51,10 @@ Dmitry Vazhov\
\f1\i0 \cf0 \
...and many others who have helped by reporting bugs etc.\
\
\
Thank you to {\field{\*\fldinst{HYPERLINK "http://www.positivespinmedia.com"}}{\fldrslt Positive Spin Media}} for the PSMTabBarControl Framework.\
\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\cf0 The MacVim icon was designed by {\field{\*\fldinst{HYPERLINK "https://jasonlong.me/"}}{\fldrslt Jason Long}}.\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\cf0 \
Thank you to {\field{\*\fldinst{HYPERLINK "https://whomwah.github.io/qlstephen/"}}{\fldrslt Duncan Robertson}} for the QLStephen QuickLook plugin.\
\
Toolbar icons by {\field{\*\fldinst{HYPERLINK "http://www.mattballdesign.com/"}}{\fldrslt Matt Ball}} (free Developer Icons), {\field{\*\fldinst{HYPERLINK "http://www.jonasraskdesign.com/"}}{\fldrslt Jonas Rask}} (Danish Royalty Free icon set), and {\field{\*\fldinst{HYPERLINK "http://www.everaldo.com"}}{\fldrslt Everaldo Coelho}} (Crystal Project Icons, released under LGPL license).\
\
Revamped MacVim icon by RIC.\
\
Thanks to Andy Matuschak for {\field{\*\fldinst{HYPERLINK "http://sparkle-project.org"}}{\fldrslt Sparkle}}.\
\
Thanks to Damien Guard for {\field{\*\fldinst{HYPERLINK "http://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released"}}{\fldrslt Envy Code R}} (used in MacVim's 16x16 document icons).}
Thanks to Andy Matuschak and the Sparkle Project for {\field{\*\fldinst{HYPERLINK "http://sparkle-project.org"}}{\fldrslt Sparkle}}.}
Binary file removed src/MacVim/dmg/background.png
Binary file not shown.
Binary file removed src/MacVim/dmg/background.pxd
Binary file not shown.
Binary file added src/MacVim/dmg/background@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/MacVim/dmg/background@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/MacVim/dmg/volume_icons/icon_128x128@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/MacVim/dmg/volume_icons/icon_16x16@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/MacVim/dmg/volume_icons/icon_256x256@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/MacVim/dmg/volume_icons/icon_32x32@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/MacVim/dmg/volume_icons/icon_512x512@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/MacVim/dmg/volume_icons/icon_512x512@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/MacVim/dmg/volume_icons/icon_64x64@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions src/MacVim/scripts/create_icns
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/sh

# Utility script to create an icns file from an iconset folder. It will handle
# duplicating the necessary images for 1x/2x use so we don't have to commit
# identical images to the repository.

if [[ $# == 0 || $# == 1 || $# == 2 ]]; then
echo "Usage: create_icns <folder> <output_folder> <icns_name>"
exit -1
fi

set -e

icons_folder=$1
output_folder=$2
output_name=$3

cp -R "$icons_folder" "$output_folder/$output_name.iconset"

cd "$output_folder/$output_name.iconset"

cp icon_32x32@1x.png icon_16x16@2x.png
cp icon_64x64@1x.png icon_32x32@2x.png
cp icon_128x128@1x.png icon_64x64@2x.png
cp icon_256x256@1x.png icon_128x128@2x.png
cp icon_512x512@1x.png icon_256x256@2x.png

cd ..
iconutil --convert icns $output_name.iconset --out $output_name.icns
22 changes: 16 additions & 6 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3744,21 +3744,31 @@ macvim-dmg-legacy: DMGFILESYSTEM = HFS+
macvim-dmg-legacy: DMGFORMAT = UDZO
macvim-dmg-legacy: macvim-dmg

# Build the dmg installer.
# First, create 1x/2x versions of backgorund images and volume icons.
# Second, use create-dmg to create the image.
# - Note: Background is 472 pt high, but the macOS title bar is an additional
# 28. Add them up (472+28=500) so the window can show the entire image
# without being clipped. Note that if the user has "Show Path Bar" set in
# Finder this will still clip the bottom but there's nothing we can do about
# that.
macvim-dmg:
rm -rf $(DMGDIR)
mkdir -p $(DMGDIR)
cp -a $(RELEASEDIR)/MacVim.app $(DMGDIR)/
tiffutil -cathidpicheck MacVim/dmg/background@1x.png MacVim/dmg/background@2x.png -out $(DMGDIR)/background.tiff
MacVim/scripts/create_icns MacVim/dmg/volume_icons $(DMGDIR) volume
rm -rf $(RELEASEDIR)/$(DMGFILE)
MacVim/create-dmg/create-dmg \
--filesystem "$(DMGFILESYSTEM)" \
--format "$(DMGFORMAT)" \
--volname "MacVim" \
--volicon MacVim/icons/MacVim.icns \
--background MacVim/dmg/background.png \
--window-size 650 470 \
--icon-size 80 \
--icon MacVim.app 240 320 \
--app-drop-link 410 320 \
--volicon $(DMGDIR)/volume.icns \
--background $(DMGDIR)/background.tiff \
--window-size 650 500 \
--icon-size 128 \
--icon MacVim.app 210 290 \
--app-drop-link 440 290 \
$(CREATEDMG_FLAGS) $(RELEASEDIR)/$(DMGFILE) $(DMGDIR)

macvimclean:
Expand Down