=46rom=20539e7f74e436c0184628d347f51fbbec4e402b0b=20Mon=20Sep=2017=20=
00:00:00=202001=0AFrom:=20Keith=20Hubbard=20<keith@bangj.com>=0ADate:=20=
Mon,=2022=20Dec=202008=2017:04:27=20-0500=0ASubject:=20[PATCH]=20=
Generate=20icons=20in=20the=20Xcode=20build=20directory.=0A=0A---=0A=20=
.gitignore=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=20=20=201=20-=0A=20=
src/MacVim/MacVim.xcodeproj/project.pbxproj=20|=20=20=20=202=20+-=0A=20=
src/MacVim/icons/Makefile=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20|=20=20=20=208=20+++++---=0A=20src/MacVim/icons/make_icons.py=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20|=20=20=2015=20++++++++++-----=0A=20=
4=20files=20changed,=2016=20insertions(+),=2010=20deletions(-)=0A=0Adiff=20=
--git=20a/.gitignore=20b/.gitignore=0Aindex=2090fb2dd..1664a5c=20100644=0A=
---=20a/.gitignore=0A+++=20b/.gitignore=0A@@=20-3,7=20+3,6=20@@=0A=20=
src/MacVim/MacVim.xcodeproj/*.mode1=0A=20=
src/MacVim/MacVim.xcodeproj/*.mode1v3=0A=20=
src/MacVim/MacVim.xcodeproj/*.pbxuser=0A-src/MacVim/icons/MacVim-*.icns=0A=
=20src/MacVim/icons/makeicns/*.o=0A=20src/MacVim/icons/makeicns/makeicns=0A=
=20src/MacVim/PSMTabBarControl/PSMTabBarControl.xcodeproj/*.mode1=0Adiff=20=
--git=20a/src/MacVim/MacVim.xcodeproj/project.pbxproj=20=
b/src/MacVim/MacVim.xcodeproj/project.pbxproj=0Aindex=20faaed42..d04fb3f=20=
100644=0A---=20a/src/MacVim/MacVim.xcodeproj/project.pbxproj=0A+++=20=
b/src/MacVim/MacVim.xcodeproj/project.pbxproj=0A@@=20-648,7=20+648,7=20=
@@=0A=20=09=09=09);=0A=20=09=09=09runOnlyForDeploymentPostprocessing=20=3D=
=200;=0A=20=09=09=09shellPath=20=3D=20/bin/sh;=0A-=09=09=09shellScript=20=
=3D=20"#=20Clear=20deployment=20target,=20else=20the=20python=20script=20=
always=20thinks=20we're=20building=20on=20=
Tiger\nMVIM_OLD_DEP_TGT=3D$MACOSX_DEPLOYMENT_TARGET\nunset=20=
MACOSX_DEPLOYMENT_TARGET\n\n#=20Generate=20the=20icons=20(redirect=20=
stderr=20to=20ignore=20warnings)\ncd=20$PROJECT_DIR/icons/\nmake=202>=20=
/dev/null\n\n#=20Restore=20deployment=20=
target\nMACOSX_DEPLOYMENT_TARGET=3D$MVIM_OLD_DEP_TGT\n\n#=20Copy=20=
icons,=20ensuring=20we=20write=20over=20existing=20ones=20and=20that=20=
symlinks=20are=20copied=20as-is\ncp=20-fpR=20*.icns=20=
$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/";=0A+=09=09=09=
shellScript=20=3D=20"#=20Clear=20deployment=20target,=20else=20the=20=
python=20script=20always=20thinks=20we're=20building=20on=20Tiger\nunset=20=
MACOSX_DEPLOYMENT_TARGET\n\n#=20Generate=20the=20icons=20(redirect=20=
stderr=20to=20ignore=20warnings)\ncd=20$PROJECT_DIR/icons/\nmake=20=
OUTDIR=3D$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH=202>=20=
/dev/null\n";=0A=20=09=09=09showEnvVarsInLog=20=3D=200;=0A=20=09=09};=0A=20=
/*=20End=20PBXShellScriptBuildPhase=20section=20*/=0Adiff=20--git=20=
a/src/MacVim/icons/Makefile=20b/src/MacVim/icons/Makefile=0Aindex=20=
be22154..ed14ee2=20100644=0A---=20a/src/MacVim/icons/Makefile=0A+++=20=
b/src/MacVim/icons/Makefile=0A@@=20-1,9=20+1,11=20@@=0A=20.PHONY:=20=
clean=0A=20=0A-MacVim-generic.icns:=20make_icons.py=20=
vim-noshadow-512.png=0A+OUTDIR=20?=3D=20.=0A+=0A=
+$(OUTDIR)/MacVim-generic.icns:=20make_icons.py=20vim-noshadow-512.png=0A=
=20=09$(MAKE)=20-C=20makeicns=0A-=09python=20make_icons.py=0A+=09=
/usr/bin/python=20make_icons.py=20$(OUTDIR)=0A=20=0A=20clean:=0A=20=09=
$(MAKE)=20-C=20makeicns=20clean=0A-=09rm=20-f=20MacVim-*.icns=0A+=09rm=20=
-f=20$(OUTDIR)/MacVim-*.icns=0Adiff=20--git=20=
a/src/MacVim/icons/make_icons.py=20b/src/MacVim/icons/make_icons.py=0A=
index=20b4b2974..51a8002=20100644=0A---=20=
a/src/MacVim/icons/make_icons.py=0A+++=20=
b/src/MacVim/icons/make_icons.py=0A@@=20-141,6=20+141,11=20@@=20def=20=
createIcon(outname,=20text,=20iconname=3DAPPICON,=20bgname=3DBACKGROUND):=0A=
=20=0A=20TMPFILE=20=3D=20'make_icons_tmp.png'=0A=20def=20main():=0A+=20=20=
srcdir=20=3D=20os.getcwd()=0A+=20=20if=20len(sys.argv)=20>=201:=0A+=20=20=
=20=20os.chdir(sys.argv[1])=0A+=20=20appIcon=20=3D=20=
os.path.join(srcdir,=20APPICON)=0A+=20=20makeIcns=20=3D=20=
os.path.join(srcdir,=20MAKEICNS)=0A=20=0A=20=20=20if=20dont_create:=0A=20=
=20=20=20=20print=20"PyObjC=20not=20found,=20only=20using=20a=20stock=20=
icon=20for=20document=20icons."=0A@@=20-161,8=20+166,8=20@@=20def=20=
main():=0A=20=20=20#createIcon('test.png',=0A=20=20=20=20=20=20=20=
#NSString.stringWithString_(u'PDF'),=20iconname=3D'preview.icns')=0A=20=0A=
-=20=20if=20not=20os.access(MAKEICNS,=20os.X_OK):=0A-=20=20=20=20print=20=
'Cannot=20find=20makeicns=20at',=20MAKEICNS=0A+=20=20if=20not=20=
os.access(makeIcns,=20os.X_OK):=0A+=20=20=20=20print=20'Cannot=20find=20=
makeicns=20at',=20makeIcns=0A=20=20=20=20=20return=0A=20=0A=20=20=20#=20=
create=20LARGE=20and=20SMALL=20icons=20first...=0A@@=20-172,12=20+177,12=20=
@@=20def=20main():=0A=20=20=20=20=20print=20name=0A=20=20=20=20=20=
icnsName=20=3D=20'%s.icns'=20%=20name=0A=20=0A-=20=20=20=20=
createIcon(TMPFILE,=20NSString.stringWithString_(text))=0A+=20=20=20=20=
createIcon(TMPFILE,=20NSString.stringWithString_(text),=20appIcon)=0A=20=20=
=20=20=20if=20size=20=3D=3D=20LARGE:=0A-=20=20=20=20=20=20os.system('%s=20=
-512=20%s=20-128=20%s=20-32=20%s=20-16=20%s=20-out=20%s'=20%=20=
(MAKEICNS,=0A+=20=20=20=20=20=20os.system('%s=20-512=20%s=20-128=20%s=20=
-32=20%s=20-16=20%s=20-out=20%s'=20%=20(makeIcns,=0A=20=20=20=20=20=20=20=
=20=20TMPFILE,=20TMPFILE,=20TMPFILE,=20TMPFILE,=20icnsName))=0A=20=20=20=20=
=20elif=20size=20=3D=3D=20SMALL:=0A-=20=20=20=20=20=20os.system('%s=20=
-128=20%s=20-32=20%s=20-16=20%s=20-out=20%s'=20%=20(MAKEICNS,=0A+=20=20=20=
=20=20=20os.system('%s=20-128=20%s=20-32=20%s=20-16=20%s=20-out=20%s'=20=
%=20(makeIcns,=0A=20=20=20=20=20=20=20=20=20TMPFILE,=20TMPFILE,=20=
TMPFILE,=20icnsName))=0A=20=0A=20=20=20#=20...create=20links=20later=20=
(to=20make=20sure=20the=20link=20targets=20exist)=0A--=20=0A1.6.0.4=0A=0A=
