举例pkg包名
Patcher.pkg
- 解压包
# 将Patcher.pkg 文件解压到 pd目录下
xar -xf Patcher.pkg -C pd
- 查看目录架构
╰─ tree ─╯
.
├── Distribution
├── Resources
│ └── background.png
└── pd_patcher.pkg
├── Bom
├── PackageInfo
├── Payload
└── Scripts
- 解压安装中的脚本调用
cd pd_patcher.pkg
cat Scripts | cpio -i
tree ─╯
.
├── Bom
├── PackageInfo
├── Payload
├── Scripts
├── postinstall
└── preinstall
# postinstall 与 preinstall 是安装中使用到的脚本。打开查看就不是乱码了。
brew install pbzx
pbzx -n Payload | cpio -i
tree ─╯
.
├── Applications
│ └── Parallels Desktop.app
│ └── Contents
│ └── MacOS
│ ├── launch_helper.sh
│ └── launcher.sh
├── Bom
├── Library
│ └── Preferences
│ └── Parallels
│ └── licenses.json
├── PackageInfo
├── Payload
├── Scripts
├── postinstall
└── preinstall
# Applications 与 Library 是Payload解压出来的文件
- 结束
以上操作就已结束pkg的文件解压了,你可以看到安装时的脚本调用,还有资源文件。如何打包pkg下次再说。
参考链接:https://www.oomake.com/question/12574660
标签:解压,Patcher,软件包,Mac,pkg,pd,Scripts,Payload From: https://www.cnblogs.com/98record/p/mac-jiepkg-ruan-jian-bao.html