Is there a way to query what version of SG Desktop someone is running from Toolkit (with the assumption that the code running was launched from SG Desktop)?
The use case is I’d like to collect some metrics for error/bug reporting without having to require users to go to the
About... menu in SG Desktop and send a screenshot.
I’m specifically looking for the “App Version” highlighted here:
That string is defined in the file
bootstrap_version.py in the hierarchy of the installed desktop.
Unfortunately you will need to set your PYTHONPATH accordingly to be able to
import the file.
% PYTHONPATH=/Applications/Shotgun.app/Contents/Resources/Desktop/Python/helpers python3 -c 'from bootstrap_version import DESTKOP_APPLICATION_VERSION; print(DESTKOP_APPLICATION_VERSION)'
Might be easier just to
grep for it…
% grep DESTKOP_APPLICATION_VERSION /Applications/Shotgun.app/Contents/Resources/Desktop/Python/helpers/bootstrap_version.py
DESTKOP_APPLICATION_VERSION = "v1.7.3"
Thanks Patrick, this is perfect!
Hey @patrick-hubert-adsk, it’s worth pointing out the global var name in that file has a typo in it that tripped me up for a bit this morning
DESTKOP_APPLICATION_VERSION should be
for your next update…
Thanks for the heads-up @kporangehat !
I (obviously) did not even notice. The brains works in mysterious and funny (haha) ways.