In CEP I’m able to get path information of Premiere Pro app with app.path.
Then I can read some app data, which is located in application folder.
In UXP, I don’t see any app.path equivalent, so I construct path manually, but there 2 possible issues:
I use require('uxp').host to get app version, and construct path from there, but I don’t know if it is Beta or not
this is not a conflict case at the moment, since UXP for Premiere is only available in Beta, but it will be in the future, after it will become accessible in regular version
If user will install application in custom location, all manual construction will be futile
I would like to be able to get application path. Or at least know if it is beta version or not.
I’m adapting my extension Spell Book to UXP, which allows to trigger extensions’ commands on shortcuts press.
Spell Book monitors active app and if active app matches Adobe host app from which Spell Book was launched, it will listen for shortcuts pressed by user (so there is no listener when host app is not active).
To make it work I need host app path. For now I create path manually.
e.g. these two are different Adobe Premiere Pro 2025.app vs Adobe Premiere Pro (Beta).app
Of course I can match loosely, and just search for Adobe Premiere Pro in the name of app, but I prefer to be strict here.
Also Spell Book accounts for shortcuts already used by host app.
For that I’m getting path to current active shortcut profile, read it and don’t allow users to set shortcuts already used by host app.
In case of Premiere Pro, keyboard shortcuts are stored in 2 different directories in Documents folder, depending if it is beta or not.
Overall I got Spell Book working already in UXP, but I would like to be sure about edge cases, which will happen eventually.