Skip to content

Conversation

@vahook
Copy link
Contributor

@vahook vahook commented Aug 2, 2025

This PR aims to streamline compiling (mainly the Client) on Linux using msvc-wine. I plan on submitting a full write-up about the process to the wiki.

This PR replaces CertUtil with 7za.exe inside utils/buildactions/utils.lua. This is needed, because Wine (as of writing) doesn't implement CertUtil, hence os.sha256_file would fail otherwise. On Windows, this shouldn't break anything.

The PR also introduces a helper build script ./wine-build.sh. ./win-build.bat can't be used, since the msbuild wrapper script that's shipped by msvc-wine fails to correctly set the paths in the environment variables if it's invoked from withing Wine. Also, vswhere.exe would just never work on Wine. This script is not strictly necessary for things to work though, as the individual commands can be invoked directly:

wine win-create-projects.bat < /dev/null
/path/to/msvc-wine-install-dir/bin/x64/msbuild" Build/MTASA.sln -property:Configuration=Release -property:Platform=Win32 -maxCpuCount

Thus it can be removed from this PR, if requested.

vahook added 4 commits August 2, 2025 13:27
Running win-build.bat inside Wine would be impractical, since the msbuild wrapper script shipped by msvc-wine cannot properly set up the environment variables if invoked from within Wine.
@vahook vahook marked this pull request as draft August 2, 2025 14:18
@vahook vahook marked this pull request as ready for review August 2, 2025 14:57
@Fernando-A-Rocha
Copy link
Contributor

Congrats on the initiative!
We are slowly migrating documentation of things from the Wiki to the new wiki (stepping away from MediaWiki), so please reach out on Dev Discord #data-driven-docs channel so we can decide the best way and format to document this.

@botder botder merged commit a9bd854 into multitheftauto:master Aug 3, 2025
6 checks passed
@botder botder added this to the 1.7.1 milestone Aug 3, 2025
@botder botder added enhancement New feature or request os/linux This specifically happens on Linux labels Aug 3, 2025
MTABot pushed a commit that referenced this pull request Aug 3, 2025
a9bd854 Make cross compiling the project using msvc-wine on Linux possible (PR #4332)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request os/linux This specifically happens on Linux

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants