• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Searching for ExternalObject library fails on some macOS systems, why?

Enthusiast ,
Jun 11, 2018 Jun 11, 2018

Copy link to clipboard

Copied

Hi There!  I hope all are well, and thanks for taking the time to read through this post.

I've got some code that effectively looks for an ExternalObject file on the disk.  The file, let's call it mylib.bundle is stored within /Library/Application Support/MyApp

In my ExtendScript code I've got:

ExternalObject.log = true;

ExternalObject.searchFolders = "Plugins;Plug-Ins;Frameworks;.;../../../Plugins;../../../Plug-ins;../Frameworks;../../..;/Library/Application Support/MyApp";

var TEST = new ExternalObject("lib:dlic");

$.writeln(TEST);

When I look at the ESTK Javascript console, I get the following returned since I set the ExternalObject.log method to true:

ExtObj: trying /Applications/Adobe After Effects CC 2018/Adobe After Effects CC 2018.app/Contents/MacOS/Plugins/mylib.bundle

ExtObj: trying /Applications/Adobe After Effects CC 2018/Adobe After Effects CC 2018.app/Contents/MacOS/Plugins/mylib.framework

ExtObj: trying /Applications/Adobe After Effects CC 2018/Adobe After Effects CC 2018.app/Contents/MacOS/Plug-Ins/mylib.bundle

ExtObj: trying /Applications/Adobe After Effects CC 2018/Adobe After Effects CC 2018.app/Contents/MacOS/Plug-Ins/mylib.framework

ExtObj: trying /Applications/Adobe After Effects CC 2018/Adobe After Effects CC 2018.app/Contents/MacOS/Frameworks/mylib.bundle

ExtObj: trying /Applications/Adobe After Effects CC 2018/Adobe After Effects CC 2018.app/Contents/MacOS/Frameworks/mylib.framework

ExtObj: trying /Applications/Adobe After Effects CC 2018/Adobe After Effects CC 2018.app/Contents/MacOS/./mylib.bundle

ExtObj: trying /Applications/Adobe After Effects CC 2018/Adobe After Effects CC 2018.app/Contents/MacOS/./mylib.framework

ExtObj: trying /Applications/Adobe After Effects CC 2018/Plugins/mylib.bundle

ExtObj: trying /Applications/Adobe After Effects CC 2018/Plugins/mylib.framework

ExtObj: trying /Applications/Adobe After Effects CC 2018/Plug-ins/mylib.bundle

ExtObj: trying /Applications/Adobe After Effects CC 2018/Plug-ins/mylib.framework

ExtObj: trying /Applications/Adobe After Effects CC 2018/Adobe After Effects CC 2018.app/Contents/Frameworks/mylib.bundle

ExtObj: trying /Applications/Adobe After Effects CC 2018/Adobe After Effects CC 2018.app/Contents/Frameworks/mylib.framework

ExtObj: trying /Applications/Adobe After Effects CC 2018/mylib.bundle

ExtObj: trying /Applications/Adobe After Effects CC 2018/mylib.framework

ExtObj: trying /Library/Application Support/MyApp/mylib.bundle

[object ExternalObject]

Result: undefined

Everything is fine and the "TEST" variable is assigned the ExternalObject just fine. 

The problem is that on some users' machines, the string specified in the .searchFolders method of the ExternalObject does not work.  Apparently, on some macOS systems, ExtendScript will search at /Volumes/Library/Application Support/MyApp — effectively appending /Volumes to the actual path where the mylib.bundle file exists.  So, the same code listing above on a different machine produces the following result in the ESTK window:

ExtObj: trying /Applications/Adobe ExtendScript Toolkit CC/ExtendScript Toolkit.app/Contents/MacOS/Plugins/mylib.bundle

ExtObj: trying /Applications/Adobe ExtendScript Toolkit CC/ExtendScript Toolkit.app/Contents/MacOS/Plugins/mylib.framework

ExtObj: trying /Applications/Adobe ExtendScript Toolkit CC/ExtendScript Toolkit.app/Contents/MacOS/Plug-Ins/mylib.bundle

ExtObj: trying /Applications/Adobe ExtendScript Toolkit CC/ExtendScript Toolkit.app/Contents/MacOS/Plug-Ins/mylib.framework

ExtObj: trying /Applications/Adobe ExtendScript Toolkit CC/ExtendScript Toolkit.app/Contents/MacOS/Frameworks/mylib.bundle

ExtObj: trying /Applications/Adobe ExtendScript Toolkit CC/ExtendScript Toolkit.app/Contents/MacOS/Frameworks/mylib.framework

ExtObj: trying /Applications/Adobe ExtendScript Toolkit CC/ExtendScript Toolkit.app/Contents/MacOS/./mylib.bundle

ExtObj: trying /Applications/Adobe ExtendScript Toolkit CC/ExtendScript Toolkit.app/Contents/MacOS/./mylib.framework

ExtObj: trying /Applications/Adobe ExtendScript Toolkit CC/Plugins/mylib.bundle

ExtObj: trying /Applications/Adobe ExtendScript Toolkit CC/Plugins/mylib.framework

ExtObj: trying /Applications/Adobe ExtendScript Toolkit CC/Plug-ins/mylib.bundle

ExtObj: trying /Applications/Adobe ExtendScript Toolkit CC/Plug-ins/mylib.framework

ExtObj: trying /Applications/Adobe ExtendScript Toolkit CC/ExtendScript Toolkit.app/Contents/Frameworks/mylib.bundle

ExtObj: trying /Applications/Adobe ExtendScript Toolkit CC/ExtendScript Toolkit.app/Contents/Frameworks/mylib.framework

ExtObj: trying /Applications/Adobe ExtendScript Toolkit CC/mylib.bundle

ExtObj: trying /Applications/Adobe ExtendScript Toolkit CC/mylib.framework

ExtObj: trying /Volumes/Library/Application Support/MyApp/mylib.bundle

ExtObj: trying /Volumes/Library/Application Support/MyApp/mylib.framework

Notice in the red lines, that /Volumes is somehow appended to the /Library path.  However, it really shouldn't be, and the string specifier in the .searchFolders method doesn't have that.  Why does ExtendScript insist on trying at /Volumes/Library... when there is no such directory in the disk system nor is it specified in the code.

Any ideas?

Thanks,

Arie

TOPICS
Scripting

Views

206

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation