Skip to content

Comments

Fix execution on Linux. Brocken by windows only darkmode args in #278#284

Merged
gr5 merged 2 commits intogithubdoe:masterfrom
Lucassifoni:windows_platform_darkmode
Nov 26, 2025
Merged

Fix execution on Linux. Brocken by windows only darkmode args in #278#284
gr5 merged 2 commits intogithubdoe:masterfrom
Lucassifoni:windows_platform_darkmode

Conversation

@Lucassifoni
Copy link
Contributor

Hello,
I do not know anything about QT nor windows development in general, so this might be wrong. To build and run on linux without passing a platform flag, I have been forced to add those preprocessor directives. This might not be the correct way to fix this, and it might even be a documentation / README issue ?

Let me know if more information is needed to determine if this is specific to my system or not. Hope I am not wasting anyone's time here.

main.cpp Outdated
Comment on lines 126 to 155
Copy link
Collaborator

@atsju atsju Nov 25, 2025

Choose a reason for hiding this comment

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

put one single #ifdef _WIN32 around whole bloc 126 to 155

and then #else
SingleApplication app( argc, argv, true );

makes more sense with #278 #280

Copy link
Collaborator

Choose a reason for hiding this comment

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

also change to #ifdef _WIN32 to be coherent with the rest of the code please

@atsju
Copy link
Collaborator

atsju commented Nov 25, 2025

You are not wasting time. Feedback is welcome.

Build on linux was passing on continuous integration so I'm suprised this change is needed to build.
But I haven't tried execution. I will execute and let you know.

@Lucassifoni
Copy link
Contributor Author

DFTFringe built fine without this change. But it did not run.

lucas@lucas-ThinkPad-X270-W10DG:~/DFTFringe-8.2.0$ ./DFTFringe
qt.qpa.plugin: Could not find the Qt platform plugin "windows" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: wayland, wayland-egl, vkkhrdisplay, minimal, offscreen, eglfs, minimalegl, linuxfb, vnc, xcb.
Abandon (core dumped)
lucas@lucas-ThinkPad-X270-W10DG:~/DFTFringe-8.2.0$ QT_QPA_PLATFORM=xcb ./DFTFringe 
qt.qpa.plugin: Could not find the Qt platform plugin "windows" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: wayland, wayland-egl, vkkhrdisplay, minimal, offscreen, eglfs, minimalegl, linuxfb, vnc, xcb.
Abandon (core dumped)

@Lucassifoni
Copy link
Contributor Author

I did not try to pass the platform flag before making the source change though, assuming the auto-prepending would override my flag.

@atsju
Copy link
Collaborator

atsju commented Nov 25, 2025

I confirm builds fine but no execution

./DFTFringe
qt.qpa.plugin: Could not find the Qt platform plugin "windows" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: wayland, eglfs, offscreen, xcb, linuxfb, vnc, minimal, vkkhrdisplay, wayland-egl, minimalegl.

Aborted (core dumped)

I agree the correct way to address is code change. Do you want me to do the PR or you do the modification of yours ?

@atsju atsju changed the title Windows platform arguments being systematically prepended Fix execution on Linux. Brocken by windows only darkmode args in #278 Nov 25, 2025
@Lucassifoni
Copy link
Contributor Author

I will make the changes according to your comments if that's fine for you

@gr5
Copy link
Collaborator

gr5 commented Nov 25, 2025

I will make the changes according to your comments if that's fine for you

That's preferred. I want you to get credit and it's always good to see more "authors" on this project. Thanks for testing and finding the fix. Do you use Ubuntu or some other flavor of linux?

@Lucassifoni
Copy link
Contributor Author

Hi,
I'm under Xubuntu 25.04 right now but compiling DFTFringe a few times a year under a new system or VMs with the distro du jour.

@Lucassifoni
Copy link
Contributor Author

Also, for some reason, the README instructions did not work as-is on my distro.
The second qmake invocation did not find a project autonomously, I had to point it to DFTFringe.pro
Not sure is this is system-specific or if the instructions should be updated, since I've seen it works fine in the CI.

@atsju
Copy link
Collaborator

atsju commented Nov 26, 2025

Also, for some reason, the README instructions did not work as-is on my distro. The second qmake invocation did not find a project autonomously, I had to point it to DFTFringe.pro Not sure is this is system-specific or if the instructions should be updated, since I've seen it works fine in the CI.

Indeed README is correct and works on CI and my computer. I don't know how to address this.

@Lucassifoni
Copy link
Contributor Author

Also, for some reason, the README instructions did not work as-is on my distro. The second qmake invocation did not find a project autonomously, I had to point it to DFTFringe.pro Not sure is this is system-specific or if the instructions should be updated, since I've seen it works fine in the CI.

Indeed README is correct and works on CI and my computer. I don't know how to address this.

I can maybe add a conditional to the README in another PR ?

Ex :

Note : if the second invocation of qmake, at the root of the source directory does not succeed, you might need to explicitly pass the project file, /usr/lib/qt6/bin/qmake DFTFringe.pro.

@atsju
Copy link
Collaborator

atsju commented Nov 26, 2025

Also, for some reason, the README instructions did not work as-is on my distro. The second qmake invocation did not find a project autonomously, I had to point it to DFTFringe.pro Not sure is this is system-specific or if the instructions should be updated, since I've seen it works fine in the CI.

Indeed README is correct and works on CI and my computer. I don't know how to address this.

I can maybe add a conditional to the README in another PR ?

Ex :

Note : if the second invocation of qmake, at the root of the source directory does not succeed, you might need to explicitly pass the project file, /usr/lib/qt6/bin/qmake DFTFringe.pro.

Do an other PR and just update the README with the pedentic version. It doesn't harm. No need for notes nobody will read.

@atsju atsju self-requested a review November 26, 2025 08:20
@atsju
Copy link
Collaborator

atsju commented Nov 26, 2025

Windows build fails because PR comes from a fork. It's fine though.
@gr5 please review and merge

@atsju atsju requested a review from gr5 November 26, 2025 08:21
@gr5
Copy link
Collaborator

gr5 commented Nov 26, 2025

How is it that merge is allowed even though there is a failing check?

@gr5 gr5 merged commit fc45716 into githubdoe:master Nov 26, 2025
13 of 14 checks passed
@atsju
Copy link
Collaborator

atsju commented Nov 26, 2025

How is it that merge is allowed even though there is a failing check?

I usually disable this as you expect but this is a config only Dale has access to (because its githubdoe personal orga and not a real collaborative orga).
In this case it plays in our favor so I don't care too much

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.

3 participants