Welcome to WSL!

New to the forum? Please read this and this.

Has anyone succeeded in making a Windows exe that talks to Resolve?

User avatar
lateralfilms
Posts: 13
Joined: Fri Apr 09, 2021 2:32 pm
Real name: Robert Arnold

Has anyone succeeded in making a Windows exe that talks to Resolve?

#1

Post by lateralfilms »

I've been building a python app on Mac that I've bundled into an executable that will run even if a user doesn't have Python installed. It interacts with Resolve via the API. I'm now trying to port it to Windows, and it's seeming like fusionscript.dll, or some other dll it calls, is dependent upon a Python install to run, even when I've embedded all of the necessary runtime libraries using pyinstaller. Has anyone surmounted this obstacle?

User avatar
intelligent machine
Fusionista
Posts: 757
Joined: Fri May 13, 2016 10:01 pm
Answers: 9
Location: Austin, Texas, USA
Real name: Sam Treadway
Been thanked: 14 times
Contact:

Re: Has anyone succeeded in making a Windows exe that talks to Resolve?

#2

Post by intelligent machine »

Are you building the Windows version on a Windows machine?

User avatar
kiboost
Fusioneer
Posts: 55
Joined: Wed Jan 08, 2020 1:38 am
Been thanked: 6 times

Re: Has anyone succeeded in making a Windows exe that talks to Resolve?

#3

Post by kiboost »

You have to set a compiler on mac for mac version, and a compiler on windows for a windows version.
I use cx_freeze on windows without any problems on machines that never saw python, pyqt an such.

In you main script, I would also check that resolve is installed, what is its path to be sure to load the fusionscript.dll, and if not handle it with a warning. Resolve should be started (you can start one from python if needed), and I guess resolve Studio (not free) version is required.

User avatar
lateralfilms
Posts: 13
Joined: Fri Apr 09, 2021 2:32 pm
Real name: Robert Arnold

Re: Has anyone succeeded in making a Windows exe that talks to Resolve?

#4

Post by lateralfilms »

Yes, I am compiling on a Windows machine. I will try cx_freeze. I was trying to actually bundle fusionscript.dll with the installer, so if the user has Resolve installed in a non-standard location my exe can still run. I already have checks within my code that let the user know that they need to have Resolve open to a project with at least one timeline, if that's not the case.

Added in 46 seconds:
And thanks for the quick replies!

User avatar
lateralfilms
Posts: 13
Joined: Fri Apr 09, 2021 2:32 pm
Real name: Robert Arnold

Re: Has anyone succeeded in making a Windows exe that talks to Resolve?

#5

Post by lateralfilms »

I get the exact same results using cx_freeze. It works when there is a Python install, but if I hide the python files (by changing the name of the Python folder in Users\AppData\Programs), my executable just quits at the line where fusionscript.dll is imported.

from PyQt5.QtCore import QObject
import imp
import time
script_module = None
try:
print("trying import")
script_module = imp.load_dynamic("fusionscript", "C:\\Program Files\\Blackmagic Design\\DaVinci Resolve\\fusionscript.dll")
print("Made it past import")
except ImportError:
pass
print("script module = ",script_module)
time.sleep(5)