Universal updates for Myriad Tables, SQLite Lib2, and BridgePlus

I’ve released new versions of three of my script libraries: Myriad Tables Lib, SQLite Lib2, and BridgePlus. They are functionally identical to the previous versions, but the included frameworks are universal Intel/arm64 versions, and all three are distributed together in a single application.

You can download them here under the link for Shane's Script Library Pack:
https://latenightsw.com/support/freeware/

This will download a disk image containing an applet, which contains the libraries plus their documentation. Once it has been dragged to your startup disk and launched, the libraries will be available just like libraries installed as separate .scptd files in ~/Library/Script Libraries/.

(You will probably have to launch it a second time, after approving the first launch, but you can quit it for good after that.)

Short explanation

Script Debugger 8 running on Macs with Apple silicon will require these versions. Applets saved under macOS Big Sur by Script Debugger 8 will also require them to run on Apple silicon Macs, even if the apps were originally saved/exported on an Intel Mac.

They are being distributed embedded in a notarized application because this way they can be provided in a form directly acceptable to Gatekeeper.

Longer explanation

These three script libraries all include embedded Objective-C frameworks. To be used on both Intel and Apple silicon Macs, they need the frameworks to be universal binaries, meaning they need to contain both types of binary. (AppleScript code is just AppleScript code — it has no platform requirements.)

Which slice of the binary is used depends on the host running them: if it is a universal app, such as Script Debugger 8, the arm64 code will be used when it is run on a Mac with Apple silicon, whereas if it’s an Intel app such as Script Debugger 7, the Intel code will be used regardless of the platform (running under Rosetta on Apple silicon Macs).

Similarly, applets saved from universal apps running under macOS Big Sur will be universal applets, so they will require universal forms of these libraries when run on Apple silicon Macs. Applets saved by Script Debugger 7, or Script Debugger 8 running under a version of macOS before Big Sur, will not need the universal forms — those applets will run under Rosetta on Apple silicon Macs, and therefore so will the library code. (Of course they can still use the universal versions.)

The reason for distributing the libraries via an application rather than as standard script library .scptd files is so they can be notarized and therefore be accepted by Gatekeeper. This requires them to be code-signed, unlike .scptd versions.

Before Apple silicon Macs, the fact that .scptd library files didn’t need to be signed was an advantage, because it made it possible to embed them in unsigned applications, which is what most people produced. However, the situation has changed: binary code will not run on Apple silicon Macs unless it is code-signed, so whenever you save an applet under Big Sur using Script Debugger 8 or Script Editor, it is signed automatically.

So the trade-off between simpler embedding vs simpler installation has effectively disappeared in Big Sur: the convenience of installation via an app wins. And one app is more convenient than separate apps for each library.

If you want to be able to embed a copy of the new version of one of the libraries in an exported applet, you need to put your copy of Shane's Script Library Pack.app directly in ~/Library/Script Libraries/. Then choose File -> Bundle & Export Settings…, and check the option Include used user script libraries.

Also, the libraries’ dictionaries will automatically appear in Script Debugger 8’s Dictionary window under the new Libraries section only if the app is installed in /Applications/, ~/Applications/, or ~/Library/Script Libraries/.

AppleScript looks for standalone libraries before looking for ones embedded in applications, so any existing versions will have priority.

Any future updates to these libraries will be distributed in this form.

I’m not sure in which app one is supposed to look in the file menu, but I couldn’t find any “Bundle & Export Settings” in Shane’s Script Library Pack or in Script Debugger 7.

I was, however, able to click the more button from the main window in Shane’s Script Library Pack and then export the individual script libraries to ~/Library/Script Libraries/ so hopefully that will mean they will be included when exporting applets from Script Debugger 7 in accordance with the usual SD settings. Is that right?

What’s the deal with your other script libraries, Shane, like Dialog Toolkit Plus, Prefs Storage, Regex etc – do they not need universal binaries or have you just not had time to include those in the app yet? If the latter, do you intend to when time permits?

PS Thanks for taking the time to keep these excellent and free libraries up to date!

Yes — Bundle & Export Settings is new to Script Debugger 8.

None of them contain code binaries, so there’s nothing to make universal.

1 Like