SVG images are broken on Windows installers
First reported: https://github.com/LMMS/lmms/pull/5160#issuecomment-545522520 In order to make SVG images working in LMMS from Windows installers and/or Linux AppImages, the Qt SVG library and corresponding image format plugin should be deployed. Currently, however, they are not.
- AppImage: installing the Qt SVG library is sufficient,
linuxdeployqtwill take care of deployment(no development libraries required). - Windows: requires some CMake logic to bundle required DLLs, MinGW builds have an additional issues(the version of
qt5svg-mingw-w64doesn't match withqt5base-mingw-w64.).
Fixed AppImages from CircleCI via LMMS/lmms-ci-docker#9, but spectrum analyzer on Windows is still an issue.
@DomClark is there a chance transitioning to MSVC completely might fix the version inconsistency too? If not, what's the best route for a fix?
We use the official Qt distribution (albeit not via the official installer) for MSVC builds, so exclusively using MSVC builds would avoid the version inconsistency, yes. However, we still plan to support MinGW builds, and I'm not aware of any reason that an appropriate version of qt5svg-mingw-w64 couldn't be built.
I'm moving this out of the milestone for now. If anyone feels this should be a part of 1.3, feel free to add back in.
Should I perhaps look into adding a temporary workaround that replaces SVGs by bitmaps for Windows builds?
Having blurry or pixelated icons on Windows would probably be better than releasing a stable version with new spectrum analyzer full of randomly colored squares in place of a GUI. I have almost zero knowledge about our build system (let alone about Windows builds), so I can't really help with the underlying Qt SVG library issue.
Broken on macOS too. I'm taking a look now.
Should I perhaps look into adding a temporary workaround that replaces SVGs by bitmaps for Windows builds?
Yeah, if we can't support QtSvg in the codebase, we need to remove SVGs until we do. @Rossmaxx this needs to be re-added to 1.3
@tresf done
It's been a while since we tried to use a non-docker environment for building... Here's my attempt: https://github.com/tresf/lmms/blob/8ca5bee828166afbe79e2094137614f317c3622f/.github/workflows/build.yml.
It doesn't bomb-out on the QtSvg dependency and produces a Windows desktop installer. I don't think it's properly bundling the QtSvg lib though. Advice on where to look is welcome.
I don't think it's properly bundling the QtSvg lib though. Advice on where to look is welcome.
Found it...
SET(PLUGIN_FILES "")
IF(LMMS_BUILD_WIN32)
INSTALL(FILES $<TARGET_FILE:Qt5::QWindowsIntegrationPlugin> DESTINATION platforms)
+ INSTALL(FILES $<TARGET_FILE:Qt5::Svg> DESTINATION .)
ENDIF()
.. sadly this doesn't fix the symptom. I think I need to put it somewhere else. Investigating.
.. sadly this doesn't fix the symptom. I think I need to put it somewhere else. Investigating.
Got it...
IF(LMMS_BUILD_WIN32)
INSTALL(FILES $<TARGET_FILE:Qt5::QWindowsIntegrationPlugin> DESTINATION platforms)
+ INSTALL(FILES $<TARGET_FILE:Qt5::QSvgIconPlugin> DESTINATION iconengines)
+ INSTALL(FILES $<TARGET_FILE:Qt5::QSvgPlugin> DESTINATION imageformats)
+ INSTALL(FILES $<TARGET_FILE:Qt5::Svg> DESTINATION .)
ENDIF()
the version of qt5svg-mingw-w64 doesn't match with qt5base-mingw-w64.
This situation has since improved, the libs are identical versions now.
Fixed in #7667