lmms icon indicating copy to clipboard operation
lmms copied to clipboard

SVG images are broken on Windows installers

Open PhysSong opened this issue 5 years ago • 5 comments

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, linuxdeployqt will 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-w64 doesn't match with qt5base-mingw-w64.).

PhysSong avatar Nov 29 '20 08:11 PhysSong

Fixed AppImages from CircleCI via LMMS/lmms-ci-docker#9, but spectrum analyzer on Windows is still an issue.

PhysSong avatar Nov 30 '20 08:11 PhysSong

@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?

Rossmaxx avatar Aug 10 '24 03:08 Rossmaxx

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.

DomClark avatar Aug 10 '24 15:08 DomClark

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.

Rossmaxx avatar Oct 02 '24 15:10 Rossmaxx

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.

he29-net avatar Oct 07 '24 12:10 he29-net

Broken on macOS too. I'm taking a look now.

Image

tresf avatar Jan 26 '25 04:01 tresf

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 avatar Jan 26 '25 06:01 tresf

@tresf done

Rossmaxx avatar Jan 26 '25 06:01 Rossmaxx

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.

tresf avatar Jan 26 '25 21:01 tresf

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.

tresf avatar Jan 26 '25 23:01 tresf

.. 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.

tresf avatar Jan 27 '25 04:01 tresf

Fixed in #7667

Rossmaxx avatar Jan 28 '25 05:01 Rossmaxx