使用 Apple 的 PackageMaker 设置一次性安装程序

发布于 2024-07-15 04:20:18 字数 500 浏览 8 评论 0原文

我是这方面的新手,所以我将解释到目前为止我所做的事情:

  1. 打开 PackageMaker 并将我的 MyApp/Applications 拖到左侧边栏
  2. 将 MyApp 的所有者/组更改为 root/admin 和 rwxrwxr-x
  3. 创建了 postinstall shell 脚本并在“脚本”选项卡中选择了它

现在,我该如何添加我只想运行一次(第一次安装时)的可执行文件(Adobe AIR Installer)? 我是否也将其拖到左侧边栏中? 我尝试这样做,但它给了它一个 /Applications 的目的地,这是我不想要的。 我希望将其提取到临时位置、安装并删除。 另外,如何从 shell 脚本中引用它? 我会使用 open 命令来运行它吗? 希望这是有道理的......

I'm a newbie at this so I'll explain what I did so far:

  1. Open PackageMaker and drag my MyApp from /Applications into the left sidebar
  2. Changed the owner/group for MyApp to root/admin and rwxrwxr-x
  3. Created a postinstall shell script and selected it in the Scripts tab

So now, how do I add that executable (Adobe AIR Installer) that I want to run 1 time (on first install) only? Do I drag it into that left sidebar also? I tried doing that but it gives it a destination of /Applications, which I don't want. I want it extracted to a temp location, installed, and deleted. Also, how do I reference it from the shell script? Would I use the open command to run it? Hope this makes sense...

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

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

发布评论

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

评论(1

兲鉂ぱ嘚淚 2024-07-22 04:20:18

您应该能够将其添加到包资源文件夹中,然后使用 shell 脚本运行它:

open -a /path/to/the/air/installer.app

You should be able to add it to your package resources folder, then run it using from your shell script:

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