User Script Libraries not included in Export Run-Only Application

I am using SD8.0.5 on Monterey. I have a script I developed that uses a script library I also developed. When trying to export the parent script the script library does not get included in the bundle. From my understanding it should be included in /Content/Libraries/Script Libraries. The source script library is in ~/Library/Script Libraries, the script name shows in the “Show Manifest” of SD8 for the parent script. The parent script has the “use script my.scpt” included.

When I manually copy the script library to /Content/Library/Script Libraries the application works as expected. It is just not included in the export read-only - enhanced application export process.

Any ideas or suggestions would be greatly appreciated.

Pete

Under the File Menu>Bundle and Export Settings

Is the box for “Include used user script libraries” checked?

Yes, “Include used user script libraries”, “Include used user frameworks” and “Make included scripts and libraries run-only” are all clicked.

Manifest

use script

Script Libraries

Would you be able to send me an example? The lib, a file that uses it, and what gets exported? Thanks.

You’re saving an existing app. Is it Notarized?

What happens if you save as a new app?

Do you mean “sign to run locally” as being Notarized? Maybe I’m missing something on that subject but thought that’s all I needed to do.

I had the original script saved as a “compiled script” then I edited it to use the script library.

Just now copied everything from that script and pasted it into a new script, saved as Application Enhanced, then export read-only and the script libraries are included in that export. But I truly don’t understand why it wouldn’t work with the original script when it was saved as a compiled script.

No, Notarized is a step beyond that which involves sending it to Apple and getting their blessing.

Why it’s working on a new App, but not an old one is beyond me. @ShaneStanley ?

I think I’ve identified some of the behavior I’m seeing.

If I save the original script as a “compiled script” (.scpt) it will not export with the script libraries.
If I save the original script as a “compiled script bundle” (.scptd) it will export the script libraries.
If I save the original script as an “application” (.app) it will export the script libraries.

Was my issue simply that I was expecting to export the script libraries from an .scpt script?

This behavior is confirmed as a bug to be fixed in a later version of SD. As a workaround I’m using a compiled script bundle.

It should work, but you may have identified a bug. The settings aren’t stored as robustly in a .scpt file, but as long as they are showing, they should be honoured. Let me look into it further.

Just to confirm, this is a bug, and will be fixed in a future maintenance release.

Thanks for confirming.

As a side note - Ed inspired me to do better, I’m now set up and successfully Notarizing my apps with SD Notary.

Thanks,
Pete

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.