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

Set QT_HOST_PATH for parallel desktop installations #268

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jdpurcell
Copy link

@jdpurcell jdpurcell commented Dec 11, 2024

Qt wants QT_HOST_PATH when cross-compiling with CMake (docs, and relevant code to prove it reads the environment variable), and one needs to know this path in other cases like running windeployqt since it's only present in the host's installation.

I also fixed a regression introduced in 7595e10, where the regex was changed from something like:
msvc[^/]*_arm64
To:
msvc*_arm64

Before, * applied to the preceding [^/], meaning to match 0 or more non-slash characters. The regression made it look for 0 or more c characters (followed immediately by an underscore), so it wouldn't be able to match msvc2022_arm64 for example.

You can see my commit in a test project here where I was able to rely on install-qt-action setting the environment variable instead of doing it in my PowerShell script. Examining the corresponding log from the actions run, one can see that the QT_HOST_PATH environment variable is already set properly prior to entering the Build step.

image

action/src/main.ts Outdated Show resolved Hide resolved
@jdpurcell
Copy link
Author

Bonus fix: All the macOS tests are now working. Using older Xcode was a workaround for two separate QTBUGs, one of which broke things at compile time, and one of which causes crashes at runtime if the user isn't on at least macOS 14. The former seems to have been fixed in later Xcode versions, so the workaround is only required for things to build on the macos-13 runner. As for the latter, I don't know if Apple fixed it, but given that the older Xcode versions aren't present on the newer runners, we'll just skip the workaround since the build at least completes. Whether those builds would result in working binaries when run on macOS < 14, ¯\_(ツ)_/¯

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.

1 participant