Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to deploy specific platform plugins #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Djolivald
Copy link

Resolves #88, Add the feature to allow to chose platform plugins from environment variable.

@Djolivald
Copy link
Author

I think there may be an issue with the runner the i386 build action runs on, it errors out saying The requested image's platform (linux/386) does not match the detected host platform (linux/amd64) and no specific platform was requested . Feels like a i386 docker image running on a x86.

@TheAssassin
Copy link
Member

That's most likely the issue, yeah. I'll fix that on master, then we'll rebase your branch on it.

@TheAssassin
Copy link
Member

That first issue was gone after a rebuild. I fixed another one, though. Please rebase.

Copy link
Member

@TheAssassin TheAssassin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks quite promising overall, but I have a few remarks and change requests.

@@ -57,6 +57,7 @@ Just like all linuxdeploy plugins, the Qt plugin's behavior can be configured so
**Qt specific:**
- `$QMAKE=/path/to/my/qmake`: use another `qmake` binary to detect paths of plugins and other resources (usually doesn't need to be set manually, most Qt environments ship scripts changing `$PATH`)
- `$EXTRA_QT_PLUGINS=pluginA;pluginB`: Plugins to deploy even if not found automatically by linuxdeploy-plugin-qt
- `$PLATFORM_PLUGIN=pltformA.so;platformB.so`: Platforms to deploy, defaults to `libqxcb.so`. Platform must be available from `QT_INSTALL_PLUGINS/platforms`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name should be plural, I suppose that's a typo.

I'd also rather not have people manually add libqxcb but deploy it by default. Therefore, the name should be $EXTRA_PLATFORM_PLUGINS.

ci/test.sh Show resolved Hide resolved
std::move(qtTranslationsPath),
std::move(qtDataPath)) {
// check if the platform plugins are set in env
const auto* const platformPluginsFromEnvData = getenv("PLATFORM_PLUGINS");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As said above, I'd rather enforce the deployment of libqxcb.so. Instead of PLATFORM_PLUGINS, I would like to have some EXTRA_PLATFORM_PLUGINS.

std::move(installLibsPath),
std::move(qtTranslationsPath),
std::move(qtDataPath)) {
// check if the platform plugins are set in env
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure whether it's a great idea to implement a custom constructor. Of course, software design wise, that's probably the way to go, given that we need to create that list below. However, it adds a fair amount of boilerplate code that will have to be maintained. What do you think about moving the evaluation of the environment variable into deploy()? I am undecided which version would be better in the long term.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem like platformToDeploy is used at all outside of the deploy function, and that function is only called once per instance, so I think it could just be a local variable.

@dantti
Copy link
Contributor

dantti commented Jun 12, 2024

I think this PR should be closed due #118

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.

Use of different platforms
4 participants