如何使用iconutil手动创建icns文件? [英] How to manually create icns files using iconutil?
问题描述
当我验证我的应用程式时,我收到以下错误:
应用程式包不包含ICNS格式的图示,包含
512x512
和512x512 @ 2x
图片。
我用来使用 Img2icns 应用程序制作icns图标,直到今天它总是工作得很好。但现在我得到这个错误,没有办法使它的工作。我尝试在 512x512 和 1024x1024
) .img2icnsapp.com /> Img2icns ,但我总是得到的错误。我也尝试按照苹果的OS X人机界面指南的说明,但是当我尝试使图标集我得到这个终端错误:
-bash:语法错误接近意外的标记'newline'
我对终端命令不是很好,所以也许我在做有问题。我写了:
iconutil -c icns< / Users / myname / SDK Mac Apps / MyApp / grafica / icon.iconset>
如果任何人可以帮助,将非常感谢。
请检查以下说明( link ):
使用iconutil手动创建icns文件
将一组图标转换为icns文件 >
iconutil
命令行工具将iconset
文件夹到部署就绪的高分辨率icns文件。 (您可以在Terminal中输入man iconutil
,找到此工具的完整文档。)使用此工具还会压缩生成的icns
在终端窗口中输入此命令:
iconutil -c icns< iconset filename&
其中
< iconset filename>
是包含集您要转换为icns
的图标。除非您指定了如下所示的输出文件,否则输出将写入与iconset文件
相同的位置:
iconutil -c icns -o< icon filename> < iconset filename>
换句话说,您需要替换 ; iconset filename>
的路径:
/ Users / myname / SDK Mac Apps / MyApp / grafica / icon.iconset
由于路径包含空格,因此您需要使用双引号,例如:
iconutil -c icns/ Users / myname / SDK Mac Apps / MyApp / grafica / icon.iconset
此命令应该能正常工作。
When I'm validating my app I get this error:
the application bundle does not contain an icon in ICNS format, containing both a
512x512
and a512x512@2x
image.
I use to make the icns icons with Img2icns app and till today it always worked good. But now I'm getting that error and there's no way to make it work. I tryed to put two PNG files togheter (512x512
and 1024x1024
) in Img2icns but I always get the error. I also tryed to follow instructions on OS X Human Interface Guideline of Apple but when I try to make the icon sets I get this terminal error:
-bash: syntax error near unexpected token 'newline'
I am not very good with terminal command and so maybe I'm doing something wrong. I wrote:
iconutil -c icns </Users/myname/SDK Mac Apps/MyApp/grafica/icon.iconset>
If anyone could help it would be very much appreciated. Thanks, Massy.
Checkout the following instructions (link):
Use iconutil to Create an icns File Manually
The
iconutil
command-line tool convertsiconset
folders to deployment-ready, high-resolution icns files. (You can find complete documentation for this tool by enteringman iconutil
in Terminal.) Using this tool also compresses the resultingicns
file, so there is no need for you to perform additional compression.To convert a set of icons to an icns file
Enter this command into the Terminal window:
iconutil -c icns <iconset filename>
where
<iconset filename>
is the path to the folder containing the set of icons you want to convert toicns
. The output is written to the same location as theiconset file
, unless you specify an output file as shown:
iconutil -c icns -o <icon filename> <iconset filename>
In other words, you need to replace <iconset filename>
by the path:
/Users/myname/SDK Mac Apps/MyApp/grafica/icon.iconset
Since the path contains spaces, you need to use double quotes, for example:
iconutil -c icns "/Users/myname/SDK Mac Apps/MyApp/grafica/icon.iconset"
This command should work properly.
这篇关于如何使用iconutil手动创建icns文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!