如何制作下载后自动打开的 dmg 安装程序?
我看到一些 dmg 不仅在下载后安装,而且还会将安装程序复制到下载文件夹中并在安装程序应用程序中打开安装程序。
我不知道该怎么办?
有人可以帮忙吗?
I have seen some dmg's which not only mounts after download but also copies the installer in the download folder and open the installer in Installer Application.
I don't know how to do it?
Can anyone help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我还没有看到自动打开 dmg 文件,但可以在用户安装 dmg 文件后自动打开文件夹。
创建 dmg 文件,挂载它,然后发出以下命令:
bless --folder /Volumes/NAME --openfolder /Volumes/DIRECTORY
NAME 是您挂载的文件夹名称,DIRECTORY 是您要创建的目录希望自动打开,往往NAME和DIRECTORY是相同的。
I haven't seen automatically opening dmg files, but it's possible to make folder open automatically after user mounts the dmg file.
Once you have created the dmg file, mount it and then issue following command:
bless --folder /Volumes/NAME --openfolder /Volumes/DIRECTORY
The NAME is your the mounted folder name and DIRECTORY is the directory that you wish to open automatically, often NAME and DIRECTORY are the same.
如果只是希望 dmg 在安装后自动打开查找器文件夹窗口,则不需要
--folder
选项NAME 是安装的文件夹名称,
DIRECTORY
code> 是您希望自动打开的目录,通常NAME
和DIRECTORY
是相同的。the
--folder
option is not necessary if just want the dmg to open the finder folder window automatically once mountedThe
NAME
is the mounted folder name andDIRECTORY
is the directory that you wish to open automatically, oftenNAME
andDIRECTORY
are the same.DropDMG 对我来说非常有用:
http://c-command.com/dropdmg/
我不知道如何实现这一目标(免费替代/手动)。
DropDMG works great for me:
http://c-command.com/dropdmg/
I don't know how to achieve this otherwise (free alternative / manually).
将为您执行此操作的脚本:
https://github.com/andreyvit/create-dmg
示例:
Script that will do this for you:
https://github.com/andreyvit/create-dmg
Example: