我正在与应用程序一起部署 gstreamer winbuilds。主要问题是 gstreamer winbuilds 安装损坏。python 绑定不起作用,每次你用烦人的弹出窗口初始化 gstreamer 时它都会抱怨。所以,我发现我可以从 lib 文件夹中删除“libgstpython-v2.6.dll”来解决问题。但是,NSIS 不会删除该文件。请注意,我确定路径是正确的。
这是代码:
ReadRegStr $0 HKLM 'SOFTWARE\OSSBUILD\GStreamer' InstallDir
ReadRegStr $3 HKLM 'SOFTWARE\Wow6432Node\OSSBUILD\Gstreamer' InstallDir
${If} $0 == ''
${AndIf} $3 == ''
DetailPrint 'The HHPVideoServer plugin depends on Gstreamer, we will need to install the core Gstreamer Components.'
DetailPrint 'Installing Gstreamer.'
ExecWait '"msiexec" /i "$INSTDIR\GStreamer-WinBuilds-GPL-x86-Beta04-0.10.7.msi" /q /norestart' $1
DetailPrint 'Finished installing Gstreamer with error code $1'
ReadRegStr $0 HKLM 'SOFTWARE\OSSBUILD\GStreamer' InstallDir
ReadRegStr $3 HKLM 'SOFTWARE\Wow6432Node\OSSBUILD\Gstreamer' InstallDir
${If} $0 != ''
DetailPrint 'Gstreamer Plugins installed to $0'
DetailPrint 'Deleting $0lib\gstreamer-0.10\libgstpython-v2.6.dll'
DELETE '$0lib\gstreamer-0.10\libgstpython-v2.6.dll''
${ElseIF} $3 != ''
DetailPrint 'Gstreamer Plugins installed to $3'
DetailPrint 'Deleting $3lib\gstreamer-0.10\libgstpython-v2.6.dll'
DELETE '$3lib\gstreamer-0.10\libgstpython-v2.6.dll'
${EndIf}
${Else}
DetailPrint 'Gstreamer already installed.'
${EndIf}
删除调用永远不会起作用。如果我手动删除该文件,它会修复 gstreamer 的错误消息。此外,安装程序以管理员权限运行。