flathub / io.qt.qtwebengine.BaseApp

9 stars 13 forks source link

Integration into io.qt.QtCreator #358

Closed marbub closed 5 months ago

marbub commented 5 months ago

I would like to integrate it into the Qt Creator flatpak, like the Py Side base app too. Is there a possibility to share it? Maybe like shared modules?

bbhtt commented 5 months ago

Just add it as a baeapp to your application?

Pyside baseapp is this baseapp+pyside6 so you can add that one instead of this.

You can only add one baseapp in the manifest.

marbub commented 5 months ago

Qt Creator is an IDE? ;-) It would be easier if Web Engine were an SDK extension. However, it would not work as a base app because Qt Creator uses org.kde.Sdk as runtime. So, I want to add them so the IDE user can use them.

bbhtt commented 5 months ago

No it won't work as an SDK extension. Extensions are optional user installed modules.

Qtwebengine is required by applications at build and runtime and a mandatory dependency.

It should ideally be in the SDK itself but KDE does not want to maintain this so this is a baseapp.

bbhtt commented 5 months ago

However, it would not work as a base app because Qt Creator uses org.kde.Sdk as runtime. 

Why does that matter?

Lots of KDE applications use the baseapp. The runtime you use does not matter here.

If you add this as a Baseapp to your app, the contents of this baseapp will be copied to your application at buildtime. You do not need to do anything else to have it in your app.

bbhtt commented 5 months ago

Maybe like shared modules?

Also shared modules won't work for this. Anything in shared modules is being built by multiple applications if they add it.

The webengine has a ridiculously long build time due to Chromium that puts strain on infra.

The main reason to have it as a baseapp is so that we can build it once and applications can share the result of the build. They don't need to build it themselves. Multiple apps building this would be very problematic for infra.

Also shared-modules is generally for low maintainance stuff that doesn't get updated often. This Baseapp is complicated to maintain and gets regular Qt updates and has several branches for Qt 5, 6.6 and 6.7. This won't fit into shared modules.

marbub commented 5 months ago

No it won't work as an SDK extension. Extensions are optional user installed modules.

Qtwebengine is required by applications at build and runtime and a mandatory dependency.

You can make an extension, which is then copied to the baseapp. I do that with llvm extension. So it is compiled once, but can be used by different applications.

marbub commented 5 months ago

The webengine has a ridiculously long build time due to Chromium that puts strain on infra.

The main reason to have it as a baseapp is so that we can build it once and applications can share the result of the build. They don't need to build it themselves. Multiple apps building this would be very problematic for infra.

Okay, so what about the llvm approach. You build it as extension, but you copy it in the base app and other applications. Flatpak takes care of the duplicates.

bbhtt commented 5 months ago

That is basically what the baseapp does by default? Copies the content to the target app.

What specific issue do you have with using this as a baseapp?

marbub commented 5 months ago

Can you look at io.qt.QtCreator flatpak? How I can use base app to provide an optional extension?

bbhtt commented 5 months ago

This doesn't work as an optional module. If you expect it to be used it in the app, bundle it with the basepp.

Also KDE runtime or Sdk does not have an extension point for this, all the extension points are in org.freesesktop.Sdk or runtime and are based off those two. This needs Qt from the KDE runtime to be present to be usable.

marbub commented 5 months ago

So how does that works if I want to support PySide and Qt Web Engine?

And I need the header too, because otherwise it is not very useful in the IDE.

bbhtt commented 5 months ago

Headers are kept as is if you don't add the cleanup command (see the readme)

bbhtt commented 5 months ago

PySide

pyside is not being built here and it has no baseapp either. You have to either build it or use their binary wheels.

Building pyside6 from source tarball is complicated.

marbub commented 5 months ago

There is the PyQt BaseApp. And Qt wants to add PySide too: https://bugreports.qt.io/browse/PYSIDE-2702

It don't want to discuss, what approach is better. I simply want to provide a good out of the box solution for QtCreator.

And I really think the base app solution of flatpak in general does not work well with it.

marbub commented 5 months ago

Is it possible to make an application extension? You could copy the content, and I could provide it as loadable extension?

bbhtt commented 5 months ago

I'm not sure if extensions can use baseapp in them. You can try to see if it works.

You have to define an extension point in Qtcreator first then write an extension manifest which uses the baseapp.

bbhtt commented 5 months ago

In general extensions are even more PITA to maintain than baseapps. Flatpak itself has several issues related to extensions.

I'm not sure if the extension will pass submission review.

bbhtt commented 2 weeks ago

Follow https://invent.kde.org/packaging/flatpak-kde-runtime/-/issues/64 for moving it to the runtime.