0

I rebuild an existing pkg with productbuild.

My root path looks like this: ROOT > Applications/Scripts/Library/private/

In Applications/ is my .app , which works. However in Library for example is another folder "Desktop Pictures" and there is a background.png. I would like to have that exact path with the .png on the device that i install this package, so i can use it later for automatically set the background.

Not working tho

This is how the first pkg gets build:

pkgbuild --root "ROOT" \
--identifier "${IDENTIFIER}" \
--install-location "/" \
"${PACKAGE_NAME}_before.pkg"

this is how i rebuild it

productbuild \
--distribution distribution.dist \
--scripts "ROOT/Scripts" \
--sign "${IDENTITY}" \
--package-path "${PACKAGE_NAME}_before.pkg" \
"${PACKAGE_NAME}.pkg"
samecat
  • 335
  • 1
  • 11
  • What is your folder structure in "ROOT"? – Ifrit Sep 08 '18 at 00:00
  • I just got the "ROOT" folder there, and then a script to build that pkg. Also the pkg that gets build and send to another device via MDM. – samecat Sep 10 '18 at 06:39
  • Not sure I entirely understand your question. You simply want a `background.png` file to be installed in the `/Applications/Scripts/Library/Desktop Pictures/` directory? – Ifrit Sep 10 '18 at 12:23
  • No no.. In Root there are the folders "Application", and "Scripts" and "Library" and "private". And serveral following folder-structures where files are. For example : ROOT/Library/Desktop Pictures/my.png . – samecat Sep 11 '18 at 09:56
  • Gotcha. And when you install the package, you're not seeing ROOT/Library/Desktop Pictures/my.png? – Ifrit Sep 11 '18 at 17:42
  • Yes thats right. Probably because i have no rights to put anything in that path when installing a package.... SIP or something. It's only not happening in that case, when i install the package remote with MDM. When i install it manually on the other device, its working since i have admin rights (?) i guess – samecat Sep 13 '18 at 06:22

0 Answers0