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
feat: Building on MSVC #366
Conversation
I'll also take the opportunity to document what I've learned about cmake's install step with If it's run in an environment that's been prepared by MSYS2 however doesn't inherit all of the environment variables (namely additions to PATH), this can be corrected by setting path-type to |
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.
also, don't forget to update the release workflow to add the new files!
yeah, fixup_bundle/getprerequisites is weird in general, and it's also deprecated, but the alternative kinda sucks :p |
95d3f91
to
18f9db4
Compare
Dunno if I've modified the release workflow correctly, not sure how to test that |
0b3f584
to
2b87a35
Compare
Now rebase and you'll have the stack size fix. EDIT: oh nvm. It's in here too. |
2b87a35
to
ff0e659
Compare
I should actually note that the legacy builds are on MSVC are Qt 5.15.2 instead of Qt 5.15.6 as that is the latest version that aqtinstall can grab, hopefully that isn't an issue. Legacy Mac is using the same version anyway. Also seems like aqtinstall tripped up on the openssl libs, seems Qt updated it's OpenSSL libs today so maybe not everything aqt needs has gotten the memo, hopefully that resolves itself |
MSVC uses a different search mechanism that ends up picking the mete Version.h Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
ff0e659
to
701e1e6
Compare
We should probably pin all versions to known working ones 👀 |
it's not a big issue, and it's also the only version we can pick without compiling Qt from source :/ |
MSYS2 is rolling release, so we can't do that there |
Would be cool if we had Nix on Windows to pin dependencies |
we has |
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Clang-cl fails to select the correct function and instead errors Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
701e1e6
to
396a799
Compare
Thanks a lot! |
This PR contains the work I've done getting PrismLauncher to build with MSVC
I'm willing to split this into smaller PRs if desired.
On a cache hit GitHub actions takes 2-3 minutes to build and 15 seconds to package, bringing it more inline with the other builds see run on my branch
You will need vc redist 2022/latest and, because of Qt5's OpenSSL dlls, vc redist 2010
The debug builds produced by the CI link to the release runtime, so Visual Studio is not required to run those builds
If you produce debug builds without
-DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreadedDLL"
then prism links to the debug runtime, giving better debugging capability. (Release builds withoutCMAKE_MSVC_RUNTIME_LIBRARY
set still link with the release runtime)zlib is bundled, but that only used if
Launcher_FORCE_BUNDLED_LIBS
is set or system zlib is not found by CMake.ECM is also bundled, and is only used if the system ECM is not found.
I dropped the
CMP0020 OLD
policy to make my life a bit easier (and for Clang-cl), looking at git blame it was added to suppress cmake warnings,I believe
qtmain
just has a calls ourmain()
function anywayThe CI action I've added used the msbuild generators, as at the time I couldn't get Ninja to use ccache.
I did later have an idea on the issue and volunteered someone to test it (it worked), at that point, however, I had already switched to msbuild, but I should be able to switch back and keep ccache working if desired.
Fully supporting msbuild did require modifying the CMake file to support multi config generators, it still maintains support for single config generators like Ninja
An interesting experiment might be to see if the Ninja Multi-Config generator works as expected.
Code changes at the start of the series are fixing build issues with MSVC, code fixes at the end of the series is for Clang-cl
Clang-cl issues where spotted by getchoo in the discord, although I did not use their patch as-is