从命令行 packagemaker 指定安装位置

发布于 2024-09-30 19:32:22 字数 204 浏览 5 评论 0原文

作为包装制造商的新手,我想我只是错过了一些东西。似乎 GUI 中的所有选项都不能从命令行获得。我已经阅读了手册页,但也许我只是不明白。

我最感兴趣的是如何指定文件的安装位置?

从命令行到我还需要将安装程序与 packagemaker 结合使用才能获得与 GUI packagemaker 相同的结果?如果有的话有什么例子可以推荐吗?

谢谢 文森特

Being new to packagemaker I assume I am just missing something. It does not seem all the options in the GUI are available from the command line. I have read the man page but maybe I just don't get it.

Of most interest to me is how do I specify the install locations of the files?

From the commandline to I need to also use installer in combination with packagemaker to get the same results of the GUI packagemaker? If so are there any examples you can recommend?

Thanks
Vincent

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

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

发布评论

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

评论(2

兲鉂ぱ嘚淚 2024-10-07 19:32:22

我最终从命令行更改安装目录:

  • 创建包,
  • 使用 pkgutil 字符串提取新包,
  • 在 pkg 文件的 PackageInfo 中搜索 install-location="/",替换为所需的安装 位置
  • 使用 pkgutil 重新打包

即可。

What I ended up doing to change the install directory from command line:

  • create the package
  • extract the new package with pkgutil
  • string search for install-location="/" in the pkg file's PackageInfo, replace with desired install location
  • repackage with pkgutil

That works.

等数载,海棠开 2024-10-07 19:32:22

如果您使用 packagemaker 的命令行模式创建包,则必须创建一个虚拟目录,其中包含位于正确位置的所有文件。例如,如果您必须在 /Library/Applications//Library/Application Support/< 处安装文件 AB /code> 分别,然后创建如下结构。

创建一个临时目录,例如 SourceFiles
将文件添加到此目录,如下所示 -

SourceFiles/Library/Applications/A
SourceFiles/Library/Application Support/B

现在在 packagemaker 命令行模式下使用标志 --root 。

packagemaker --root SourceFiles/ OTHER_OPTIONS

这个想法是,您不需要将单个文件的位置传递给命令,而是在临时目录中创建类似的结构,然后将该目录作为参数传递给 --root 标志。

有关 packagemaker 命令行模式的更多信息:
http://macinstallers.blogspot.in/

If you are creating packages using commandline mode of packagemaker, you will have to create a dummy directory which contains all your files in proper location. For example, if you have to install files A and B at /Library/Applications/ and /Library/Application Support/ respectively, then you create the structure as below.

Create a temp directory, say SourceFiles.
Add your files to this directory as follows-

SourceFiles/Library/Applications/A
SourceFiles/Library/Application Support/B

Now use the flag --root in packagemaker commandline mode.

packagemaker --root SourceFiles/ OTHER_OPTIONS

The idea is that instead of passing location of individual files to the command, you create a similar structure in a temporary directory and just pass that directory as argument to --root flag.

More for commandline mode of packagemaker:
http://macinstallers.blogspot.in/

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