如何设置PackageMaker安装后在桌面上创建图标?

发布于 2024-10-28 06:05:35 字数 88 浏览 9 评论 0原文

我需要在安装后创建桌面图标,但我不知道如何做。我正在使用包生成器创建 Mac 安装包 (.pkg) 我知道在桌面上创建快捷方式不是最佳实践,但这是一个重要的要求。

I have a requirement to create desktop icon after installation, and I can't find out how. I am using package maker to create a Mac install package (.pkg) I am aware that it is not the best practice to create shortcuts on desktop, but this an important requirement.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寂寞陪衬 2024-11-04 06:05:35

此功能未内置于 PackageMaker 中,并且通常在任何 Mac 应用程序中都看不到。这并不意味着您可以通过编写将在安装完成后运行并将文件复制到桌面的 bash 脚本来手动执行此操作。只需包含一个组件并将其安装到 \tmp,然后在该包的安装后脚本中 mv 将文件复制到 $USER 的桌面。

前任。 mv /tmp/icon.sh /Users/$USER/Desktop/icon.sh

This functionality isn't built into PackageMaker and usually isn't seen with any Mac apps. That doesn't mean you can do this manually by writing a bash script that will run on completion of the installation and copy a file to the desktop. Just include a component and install it to \tmp then in the Postinstall script for that package mv the file to the $USER's desktop.

ex. mv /tmp/icon.sh /Users/$USER/Desktop/icon.sh

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文