Skip to content

Conversation

@vincentullmann
Copy link

draft PR while I'm waiting for user feedback

Changelog Description

Add support for a custom RESOLVE_ROOT environment variable to specify resolve install location

Additional review information

This change introduces a check for a RESOLVE_ROOT environment variable to determine Resolves installation directory. If the variable is not defined, the logic falls back to the default path: /opt/resolve.

Testing notes:

  1. install resolve in a non standard location
  2. define RESOLVE_ROOT to point to that location
  3. launch resolve.

To be discussed:

For the current implemented I've picked the simplest approach to allow user testing.
However while revieing I started wondering whether it might be more flexible to allow users to define RESOLVE_SCRIPT_API, RESOLVE_SCRIPT_LIB, and RESOLVE_UTILITY_SCRIPTS_DIR directly instead introducing a new variable.

        if not self.launch_context.env.get("RESOLVE_SCRIPT_API"):
            # current logic 
            # ...
            #
            self.launch_context.env["RESOLVE_SCRIPT_API"] = resolve_script_api.as_posix()

        if not self.launch_context.env.get("RESOLVE_SCRIPT_LIB"):
            # current logic 
            # ...
            #
            self.launch_context.env["RESOLVE_SCRIPT_LIB"] = resolve_script_lib.as_posix()

This would provide more granular control while still preserving backward compatibility. Open to feedback on whether this direction makes more sense.

Comment on lines +31 to +44
if sys.platform.startswith("darwin"):
expected_path = ("/Library/Application Support/Blackmagic Design"
"/DaVinci Resolve/Developer/Scripting/Modules")
elif sys.platform.startswith("win") \
or sys.platform.startswith("cygwin"):
expected_path = os.path.normpath(
os.getenv('PROGRAMDATA') + (
"/Blackmagic Design/DaVinci Resolve/Support/Developer"
"/Scripting/Modules"
)
)
elif sys.platform.startswith("linux"):
expected_path = "/opt/resolve/libs/Fusion/Modules"
resolve_root = os.getenv("RESOLVE_ROOT", "/opt/resolve")
expected_path = f"{resolve_root}/libs/Fusion/Modules"
Copy link
Contributor

@BigRoy BigRoy Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would need to apply to all platforms - not just linux. Right?
Or is there a reason why this may only apply to Linux?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preferrably yes, we should apply the same logic for all platforms.

a complication I can see is that the folder layout doesn't share the same root folder, as it does on linux.

RESOLVE_SCRIPT_API:
    win: "{PROGRAMDATA}/Blackmagic Design/DaVinci Resolve/Support/Developer/Scripting"
    darwin: /Library/Application Support/Blackmagic Design/DaVinci Resolve/Developer/Scripting"
    linux: /opt/resolve/Developer/Scripting

RESOLVE_SCRIPT_LIB:
    win: "{PROGRAMFILES}/Blackmagic Design/DaVinci Resolve/fusionscript.dll"
    darwin: /Applications/DaVinci Resolve/DaVinci Resolve.app/Contents/Libraries/Fusion/fusionscript.so
    linux: /opt/resolve/libs/Fusion/fusionscript.so

RESOLVE_UTILITY_SCRIPTS_DIR:
    win: "{PROGRAMDATA}/Blackmagic Design/DaVinci Resolve/Fusion/Scripts/Comp"
    darwin: /Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Scripts/Comp
    linux: /opt/resolve/Fusion/Scripts/Comp

@BigRoy
Copy link
Contributor

BigRoy commented Nov 19, 2025

However while revieing I started wondering whether it might be more flexible to allow users to define RESOLVE_SCRIPT_API, RESOLVE_SCRIPT_LIB, and RESOLVE_UTILITY_SCRIPTS_DIR directly instead introducing a new variable.

I'm not sure how often it may be the case these vary from the actual resolve root - if it doesn't then I think RESOLVE_ROOT is sufficient if all the others are constant relatively to it, per platform.

@BigRoy BigRoy added type: enhancement Improvement of existing functionality or minor addition community Issues and PRs coming from the community members labels Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Issues and PRs coming from the community members type: enhancement Improvement of existing functionality or minor addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants