【问题标题】:Error while using setfile to set icon for dmg created via hdiutil in mac使用 setfile 为通过 mac 中的 hdiutil 创建的 dmg 设置图标时出错
【发布时间】:2017-11-09 11:02:50
【问题描述】:

我创建了一个应用程序并使用“开发者 ID 应用程序:x”证书进行了签名。 然后使用 hdiutil 我创建了 dmg

hdiutil create -size 1.5m -format UDRW myapp.dmg -srcfolder ./myapp/ -fs HFS+

在我执行以下命令时设置驱动器图标会引发错误

# custom drive volume icon..
#cp drive_icon.icns /Volumes/myapp/.VolumeIcon.icns
#SetFile -c icnC /Volumes/myapp/.VolumeIcon.icns //(throws error -5000)
dev:Unexpected error. (-5000) on file: /Volumes/myapp/.VolumeIcon.icns

我认为这与大小有关,并将 dmg 的大小从 1.5m 增加到 4.5m,但这也无济于事,图像大小为 291kb,整个应用程序大小为 666kb。

我在构建机器 (mac 10.10 xcode6.2) 中创建了 .app,并尝试在我们的代码设计服务器 (mac 10.11) 中创建这个 hdutil。 谁能告诉我哪里出错了。

在手册页中我看到不推荐使用 setfile 是否还有其他等效命令可以执行

感谢和问候, 萨拉瓦娜

【问题讨论】:

    标签: macos icons dmg


    【解决方案1】:

    找到另一种设置图标的方法。 右键单击 DMG 文件,然后单击“GetInfo” 将图标文件拖放到 GetInfo 对话框中的图标位置。 它设置。

    感谢和问候, 萨拉瓦娜

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-09-14
      • 1970-01-01
      • 2015-08-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-09-10
      • 1970-01-01
      相关资源
      最近更新 更多