Skip to content

Conversation

@crueter
Copy link
Contributor

@crueter crueter commented Dec 24, 2025

Rather than manually creating a Qt 5 and Qt 6 QRC, instead we create a
single qrc that references a flattened directory. Then, we copy each of
its dependents (main, dialogs, icon) into the binary directory as-is,
resulting in just one qrc rather than having to maintain one for each.

Signed-off-by: crueter [email protected]

@crueter
Copy link
Contributor Author

crueter commented Dec 25, 2025

So Qt 5 doesn't support QML modules from CMake. I guess qmldir it is 😵‍💫

@crueter crueter force-pushed the qt-modules branch 2 times, most recently from b44fddc to 00a5b1e Compare December 25, 2025 04:25
@crueter crueter changed the title [cmake] FEXConfig: prefer qt_add_qml_module over qrc [cmake] FEXConfig: automatically generate qrc Dec 25, 2025
@crueter crueter force-pushed the qt-modules branch 2 times, most recently from 618d299 to e1b7b3c Compare December 25, 2025 04:30
@crueter
Copy link
Contributor Author

crueter commented Dec 25, 2025

Note for self: Qt 5 supports only old var style https://doc.qt.io/archives/qt-5.15/qtcore-cmake-qt5-add-resources.html

No idea what to do at this point. The evil part of me says "drop Qt 5" but the 3 Ubuntu 20.04 users will impale me with pitchforks. The evil but slightly less pitchfork-risky solution is to just write the file manually. The slightly less evil idea is to do configure_file or something

@Sonicadvance1
Copy link
Member

Note for self: Qt 5 supports only old var style https://doc.qt.io/archives/qt-5.15/qtcore-cmake-qt5-add-resources.html

No idea what to do at this point. The evil part of me says "drop Qt 5" but the 3 Ubuntu 20.04 users will impale me with pitchforks. The evil but slightly less pitchfork-risky solution is to just write the file manually. The slightly less evil idea is to do configure_file or something

Well, we only support back to Ubuntu 22.04, but it also doesn't have QT6 in the base packages (It's in backports I think?) which means the PPA builder can't rely on it.

@crueter
Copy link
Contributor Author

crueter commented Dec 25, 2025

Actually the package search indicates 6.2 is just in Universe https://packages.ubuntu.com/search?suite=jammy&arch=any&searchon=names&keywords=qt6-declarative

@crueter
Copy link
Contributor Author

crueter commented Dec 25, 2025

Okay so at this point there are two options:

  1. Drop Qt 5 support since 22.04 has Qt 6 in base, and just use qt_add_qml_module
  2. Use a single qrc, but flatten things in the CMAKE_CURRENT_BINARY_DIR

Final decision is not up to me, but option 1 should probably be done in a more formal manner where the deprecation/dropping is warned to users and developers + via the wiki. So my vote is for option 2 even though it somewhat pains me.

@crueter crueter changed the title [cmake] FEXConfig: automatically generate qrc [cmake] FEXConfig: use one qrc Dec 25, 2025
@crueter
Copy link
Contributor Author

crueter commented Dec 26, 2025

I forgot to git add

Rather than manually creating a Qt 5 and Qt 6 QRC, instead we create a
single qrc that references a flattened directory. Then, we copy each of
its dependents (main, dialogs, icon) into the binary directory as-is,
resulting in just one qrc rather than having to maintain one for each.

Signed-off-by: crueter <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants