-
Notifications
You must be signed in to change notification settings - Fork 10
Gh48 resolve breaks when not installed in opt #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Gh48 resolve breaks when not installed in opt #74
Conversation
| 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" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
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 |
draft PR while I'm waiting for user feedback
Changelog Description
Add support for a custom
RESOLVE_ROOTenvironment variable to specify resolve install locationAdditional review information
This change introduces a check for a
RESOLVE_ROOTenvironment variable to determine Resolves installation directory. If the variable is not defined, the logic falls back to the default path:/opt/resolve.Testing notes:
RESOLVE_ROOTto point to that locationTo 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, andRESOLVE_UTILITY_SCRIPTS_DIRdirectly instead introducing a new variable.This would provide more granular control while still preserving backward compatibility. Open to feedback on whether this direction makes more sense.