I would like to know I we can easily setup a new Shotgun Desktop/Toolkit configuration that run over our customized cmd-terminal ( windows based ), that builds a full-featured enviroment and allows us to run fully configured DCCs through it ?
I am trying to figure-out what’s the best way to approach …
Run our customized cmd- terminal’s enviroment and then launch desktop’s executable directly in order to inherit our environment config too?
Maybe we could “inject” our customized cmd-terminal’s enviroment somewhere inside Shotgun Desktop’s initializing process ?
I would like to test Desktop’s features but without losing our currently fully featured cmd-terminal and it’s environment and filesystem configuration.
I’m sorry nobody has got back to you sooner.
I would say either approach might work. I believe that Shotgun Desktop should preserve any environment variables set, and it will append to the PYTHONPATH rather than replacing it with its own values.
Typically we recommend using the before_app_launch.py to set env vars before launching software:
However, if you have a cmd approach already setup then perhaps running Desktop from your cmd would work for you, though you would need to be careful not to pass any environment variables through that might conflict with SG Desktop’s setup, such as paths to Python modules not suited to the Python interpreter shipped with Desktop.
You could also maybe modify the app_launch.py hook and modify the launch command so that it launches the software through your cmd tool. However here you would need to be careful to preserve and Shotgun environment variables that have been set.