Zero-byte Application being installed

el2493
Contributor III

I created an application to map network drives using @bentoms 's instructions at https://macmule.com/2011/09/08/how-to-map-drives-printers-based-on-ad-group-membership-on-osx/#comme.... It works great, but I'm having a problem packaging it. I create the package with the .app, the LaunchAgent (which triggers a script rather than the .app), and a script that waits until the computer has network connection before launching the .app. I've tried packaging in both Composer and Packages, but whenever I run the installer it creates a DriveMap.app in the Applications folder but it doesn't show the custom .icns I defined, is Zero bytes, and when I run it it gives an error message "You can't open the application "DriveMap" because it may be damaged or incomplete."

The LaunchAgent and Script are created correctly when the package is run, but since the .app is un-run-able it doesn't ultimately work. Has anyone else run into issues where packaging a custom app results in this behavior?

2 REPLIES 2

marklamont
Contributor III

I can't say for sure but most issues I've had with this error were due to permissions not being applied on the sub folders of the .app folder.

el2493
Contributor III

It looks like you are 100% right, I had set the permissions/ownership of the .app but not of the contained files/folders. After changing those it seems to be working correctly. Thanks!