mm2270 / ScreenSharingMonitor

A process for end user notifications of screen sharing session starts and ends
33 stars 6 forks source link

El Cap support? #1

Open jacobsalmela opened 8 years ago

jacobsalmela commented 8 years ago

On a fresh install of 10.11, the latest .pkg installer fails.

PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “Screen.Share.Monitor.1.0.pkg”." UserInfo={NSFilePath=./postinstall, NSURL=file://localhost/Users/username/Downloads/Screen.Share.Monitor.1.0.pkg, PKInstallPackageIdentifier=com.mm2270.ScreenShareNotifier, NSLocalizedDescription=An error occurred while running scripts from the package “Screen.Share.Monitor.1.0.pkg”.} {
        NSFilePath = "./postinstall";
        NSLocalizedDescription = "An error occurred while running scripts from the package \U201cScreen.Share.Monitor.1.0.pkg\U201d.";
        NSURL = "file://localhost/Users/username/Downloads/Screen.Share.Monitor.1.0.pkg";
        PKInstallPackageIdentifier = "com.mm2270.ScreenShareNotifier";
    }
mm2270 commented 8 years ago

Hey Jacob. Sorry it took me so long to respond to this. I just had an opportunity to test the install on a 10.11.2 Mac and I think I know what the issue is. My installer is using a launchctl bsexec command to load the LaunchAgent that gets installed in the user context. This is done in the postinstall script. The launchctl bsexec syntax no longer works in El Capitan, but launchctl asuser will. So I'll need to update my installer at some point to do the proper command based on the OS its installing against.

Despite the error I got, all the components were installed and after a log out / log in to the account to activate the LaunchAgent (or just using launchctl load) I tested remote access from another Mac and I got the Notification Center message come up as designed, so overall, it still works in 10.11. Just my installer is using some postinstall script code that is now outdated.

I've assigned this issue to myself so I won't forget to post up a new installer package at some point.

jacobsalmela commented 8 years ago

No problem. I can help out, too now that I know what to look for. If I can make some time, I'll try to fix it and make a PR for you.