-
Notifications
You must be signed in to change notification settings - Fork 87
qt-build-utils can invoke qmake when it is a script #1284
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
base: main
Are you sure you want to change the base?
Conversation
I only tested this so far on the "happy case" on Windows (that is to say: when using a qmake .bat wrapper). Will test on other platforms too. |
I marked as ready for review. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1284 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 75 75
Lines 12772 12772
=========================================
Hits 12772 12772 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
crates/qt-build-utils/src/lib.rs
Outdated
} | ||
|
||
/// Query the qmake executable which was previously | ||
/// verified. Panic on error. | ||
pub fn qmake_query(&self, var_name: &str) -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note as part of refactorings going on to the build system, this code has moved to
let qmake_version = match Command::new(&qmake_path) |
The problem itself appears to be that the path to qmake might not be a binary executable but a script? Wonder if we should have a general Command wrapper to always call things via sh or not 🤔
Or whether instead the user should have to provide a binary, doesn't seem to tricky to just write a bash/batch script and execute on that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where this led to failure was with a .bat script on Windows. I don't think there is a way to make a .bat "more executable". Probably, executable scripts on Linux already work, although I didn't test that.
Thanks for the heads-up, I will adapt to the refactor that was done. My PR so far solved it locally. Would you prefer such a generic Command wrapper, or do you think the current approach in the PR is OK?
I ran into some build failures on your CI I still need to investigate. Locally the PR works on Linux and Windows, with .sh and .bat qmake wrapper scripts.
f08b25c
to
e4ef4fa
Compare
e4ef4fa
to
031f080
Compare
In the refactored qt-build-utils, the change was a lot more straightforward. |
Ensure qmake is called either through
cmd
(Windows) orsh
(Linux/MacOS).The main change is this invocation. The rest of the code change is: