My understanding was that, if a script library could not be found in ~/Library/Script Libraries/, or /Library/Script Libraries/, or some other similar paths (not necessarily in that order), that it would eventually (perhaps as a last resort) look to see if the script library is in any of the app bundles in the user’s Applications folder. But this doesn’t seem to be working for me.
I have a machine separate from my development machine that I keep free of dev stuff and use for testing. It’s the machine that I use for my day job but I also deliberately keep it free of dev stuff so that it is a good proxy for what my users’ first run experience will be like and so I use it for testing pre-release builds.
But I’ve run into an issue with some compiled scrips that use a script library that is bundled with one or more applets that I have installed in the Applications folder on the test machine. The scripts won’t compile or run and throw an error that the script library can’t be found. Any reason why that might be happening? It’s not expected behaviour, right?
I don’t have any libraries in ~/Library/Script Libraries/ on the test machine so that, as mentioned, it better approximates an average user’s machine. The compiled scripts I’m trying to run on the test machine are usually just for some kind of testing or one off type purpose.
Why not deploy a script bundle you ask? I’ve actually had an issue (possibly related, possibly unrelated) with a script bundle that also had a similar issue, but I plan to address that in a separate post as it’s been a while since I’ve tested that aspect and it might be a separate issue. For now just assume that I don’t want to use a script bundle if I can get away with just using the version of the script library that is already bundled with another applet.