I am currently creating a package for installing DaVinci Resolve software. This package includes a shortcut targeting the string "C:\Program Files\Blackmagic Design\DaVinci Resolve\Resolve.exe" -pg
The shortcut is created using a shortcut dictionary in the setup.py file as follows:
Defining the shortcut parameters:
Code: Select all
mat_rac = {r'Multimedia':[{'shortcutname':'DaVinci Blackmagic Proxy Generator Lite','cible':r'"C:\Program Files\Blackmagic Design\DaVinci Resolve\Resolve.exe" -pg','wdir':r'C:\Program Files\Blackmagic Design\DaVinci Resolve'},]}
Code: Select all
for matiere in mat_rac:
for shortcut in mat_rac[matiere]:
if not isfile(r'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\\'+matiere+'\\'+shortcut['shortcutname']):
create_programs_menu_shortcut(shortcut['shortcutname'],target=shortcut['cible'],folder=matiere,wDir=shortcut['wdir'])
During installation, a parameter error occurs with the following messages:
Traceback (most recent call last):
File "C:\Program Files (x86)\wapt\common.py", line 4074, in install_wapt
exitstatus = setup.install()
File "C:\waptdev\col73-davinci-resolve_18.1.4.9_Windows_DEV\setup.py", line 49, in install
create_programs_menu_shortcut(shortcut['shortcutname'],target=shortcut['cible'],folder=matiere,wDir=shortcut['wdir'])
File "C:\Program Files (x86)\wapt\setuphelpers_windows.py", line 3941, in create_programs_menu_shortcut
create_shortcut(sc, target, arguments, wDir, icon)
File "C:\Program Files (x86)\wapt\setuphelpers_windows.py", line 3840, in create_shortcut
winshell.CreateShortcut(path, target, arguments, wDir, (icon, 0), '')
File "C:\Program Files (x86)\wapt\Scripts\lib\site-packages\winshell.py", line 887, in CreateShortcut
lnk = shortcut (Target)
File "C:\Program Files (x86)\wapt\Scripts\lib\site-packages\winshell.py", line 507, in shortcut
return Shortcut.from_target (source)
File "C:\Program Files (x86)\wapt\Scripts\lib\site-packages\winshell.py", line 414, in from_target
return cls (
File "C:\Program Files (x86)\wapt\Scripts\lib\site-packages\winshell.py", line 391, in __init__
setattr (self, k, v)
File "C:\Program Files (x86)\wapt\Scripts\lib\site-packages\winshell.py", line 456, in _set_path
self._shell_link.SetPath (path)
pywintypes.com_error: (-2147024809, 'Incorrect parameter.', None, None)
FATAL ERROR: 0x80070057: Incorrect parameter.
Exit code: 3.
This error does not occur when double quotes "" are removed from inside the single quote delimited string ' ' in the shortcut target, but the shortcut is then no longer operational.
Is there a way to solve this problem?
