Skip to content

Add Linux build support with msvc-wine - #7

Open
fyryNy wants to merge 1 commit into
Patrix9999:mainfrom
fyryNy:feature/linux-msvc-wine
Open

Add Linux build support with msvc-wine#7
fyryNy wants to merge 1 commit into
Patrix9999:mainfrom
fyryNy:feature/linux-msvc-wine

Conversation

@fyryNy

@fyryNy fyryNy commented Jul 28, 2026

Copy link
Copy Markdown

Summary

This PR adds Linux support to the Union plugin template using
mstorsjo/msvc-wine.

The generated plugins still use the real 32-bit MSVC toolchain and produce
Windows-compatible PE32 DLLs.

Changes

  • Added Linux configure and build presets for:
    • G1
    • G1A
    • G2
    • G2A
    • MP
    • Debug and Release
  • Added a configurable msvc-wine x86 toolchain.
  • Added MSVC_WINE_ROOT support through:
    • CMakeUserConfigPresets.json
    • the environment
    • a default $HOME/my_msvc/opt/msvc location
  • Added a Wine-compatible linker wrapper.
  • Added preset-aware compile_commands.json generation.
  • Added direct IntelliSense entries for .ipp sources with the correct:
    • engine
    • Gothic namespace
    • build configuration
    • MSVC and Windows SDK include directories
  • Added separate automatically selected VS Code configurations:
    • Linux uses the generated compilation database.
    • Win32 uses the CMake Tools configuration provider.
  • Added Linux VDF packaging through Wine.
  • Ensured UnionAPI.dll is copied before VDF packaging.
  • Added verification that GothicVDFS actually creates a new archive.
  • Updated the README with Linux installation, building, packaging, and
    IntelliSense instructions.

Usage

Install msvc-wine and configure its location in
CMakeUserConfigPresets.json:

{
  "name": "msvc-wine-config",
  "hidden": true,
  "cacheVariables": {
    "MSVC_WINE_ROOT": "$env{HOME}/my_msvc/opt/msvc"
  }
}

Then configure and build the required preset:

cmake --fresh --preset G2A-Release-msvc-wine
cmake --build --preset G2A-Release-msvc-wine

Validation

Tested successfully on Linux with:

  • G1-Debug-msvc-wine
  • G2A-Release-msvc-wine
  • MP-Release-msvc-wine

Validation included:

  • Successful Debug and Release compilation.
  • PE32 Intel i386 plugin and Union API DLLs.
  • Correct single-engine source selection.
  • Correct four-engine MP compilation.
  • Successful VDF generation through Wine.
  • VDF containing both UnionPlugin.dll and UnionAPI.dll.
  • clangd validation of src/Plugin.ipp with zero errors.
  • Correct preset-specific engine definitions and include paths.
  • No editor-only IntelliSense targets included in normal builds.

The existing .ipp translation-unit generator was not modified.

- add Linux configure and build presets for all Gothic targets
- add configurable msvc-wine x86 toolchain and linker wrapper
- generate preset-aware IntelliSense compilation entries
- provide separate Linux and Windows VS Code configurations
- package VDF files through Wine on Linux
- ensure UnionAPI.dll is copied before VDF packaging
- document Linux setup, building, packaging, and IntelliSense
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