Figuring out whats wrong with my PKG

yarin
New Contributor II

I created a pkg that will deploy Snagit 2020 and with post-install to remove some plugins and disable users from adding new ones. So pretty simple pkg I attached the screenshot.

The issue is that Snagit is not copied to the Application dir.
No issues at the end of the setup. Postinstall is working.
a08acbd71a8242429e2d42c8f0142bb1

4 REPLIES 4

rqomsiya
Contributor III

Are you copying it to the ~/Applications/ folder or the /Applications folder?

shaquir
Contributor III

Hi @yarin ,
Was this app built in Composer? Also, is the postinstall script the only thing that modifies the app? Modifying apps gets tricky with Apple's notarization. Any modified piece of the app can lead to packages and apps not properly being installed. Does the app install properly without the postinstall?

yarin
New Contributor II

I built it just like the rest of my apps with buildpkg and not Composer.
I copy the files to /Applications and not ~/Applicatoins/

The PostInstall only do "chmod 555 to /Applications/Snagiit 2020.app/Plugins/*"
The Preinstall only do killall "Snagit 2020" (something like that)

donmontalvo
Esteemed Contributor III

755 and root:admin is the usual way to set things that you put into /Applications.

If the app was distributed on a DMG, might want to mount the DMG as the source, and drag the app from the mounted DMG into Composer without making any changes.

If your source is /Applications/Snagit 2020.app, depending on how the app got there, the owner:group and permissions might be bonked. To set /Applications/Snagit 2020.app (source) permissions:

sudo find /Applications/Snagit 2020.app -type d -print0 | xargs -0 chmod 755
sudo find /Applications/Snagit 2020.app -type f -print0 | xargs -0 chmod 644

This way you're not doing a recursive 755 which would set non-executables to executable, and you won't be creating globally writable folders in /Applications/ which would raise a flag if you're audited.

PS, not sure but guessing 555 was a typo. :)

--
https://donmontalvo.com