Skip to content

Add the SE2 release archive - #3

Merged
viktor-ferenczi merged 6 commits into
mainfrom
se2-fmod
Aug 11, 2026
Merged

Add the SE2 release archive#3
viktor-ferenczi merged 6 commits into
mainfrom
se2-fmod

Conversation

@viktor-ferenczi

@viktor-ferenczi viktor-ferenczi commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Shared patched DXVK, SE2-only vkd3d-proton and FMOD, bare-named library layout. Split to three archives.

Details

Restructures the releases into three assets and adds Space Engineers 2 support, importing the native libraries and patches from the SE2 port workspace (dotnet-game2-local):

  • se1-dependencies.tar.gz (renamed from linux-dependencies.tar.gz) — the SE1 payload, with the DXVK binaries now being the patched build (byte-identical to the SE2 archive's copies).
  • se2-dependencies.tar.gz (new) — everything the SE2 Linux port needs.
  • steam-dependencies.tar.gz (new) — Steamworks.NET.dll + libsteam_api.so, the managed binding and its native runtime belong together. Pulsar depends only on this binary archive for its own Linux support.

Every library file is under its bare (unversioned) name (see the layout section below) and there are no versioned symlinks provided.

Every library is built once.

Archive contents

Artefact se1 se2 steam Origin
FFmpeg, OpenAL, EOS yes unchanged
DXVK 2.7.1 + Patches/dxvk/ yes yes (same bytes) built once
vkd3d-proton @ 3dfc6f07d095 + Patches/vkd3d-proton/ yes new, SE2-only (SE1 never shipped a D3D12 layer)
FMOD Engine 2.03.11 (libfmod.so, libfmodstudio.so) yes Vendor/ blob (SE1 does not use FMOD)
Steamworks.NET.dll + libsteam_api.so yes moved out of the SE1 payload

The SE2 native wrappers (libVRage.*.Native.so) are not shipped here — like the SE1 PE-loader shims, they are built and released by linux-native-wrappers and fetched separately.

Archive layout: bare names only

Both archives now contain only real files under bare, unversioned names — no symlinks, no .so.62/.so.14-style suffixes. To keep the bundles self-resolving under DT_RUNPATH=$ORIGIN, the built libraries' intra-bundle NEEDED entries are rewritten to the bare names with patchelf --replace-needed at staging (FFmpeg chain, libdxvk_d3d11libdxvk_dxgi); SONAMEs inside the binaries stay upstream, and the SOVERSION/SONAME assertions remain as ABI-bump tripwires. The FMOD blobs stay byte-unmodified, so libfmodstudio.so still references libfmod by SONAME internally — consumers must load libfmod.so before libfmodstudio.so (documented in consuming.md). Verified: zero symlinks/suffixed names in both archives, every staged library dlopens with sibling resolution from its own directory, FMOD preload order works.

The patches

  • DXVK — 0001-dxgi-windows-abi-16-bit-wchar.patch: DXVK Native defines WCHAR as Linux's 32-bit wchar_t, so IDXGIAdapter::GetDesc* writes 560 bytes into the caller's 304-byte Windows-ABI buffer (Vortice/SharpDX marshal 16-bit WCHAR), corrupting managed memory. The patch makes WCHAR 16-bit, transcodes the SDL display name at the WSI boundary, and adds compile-time asserts for the Windows x64 struct sizes. The SE2 port's original DXVK checkout (commit d592777f) was not preserved, so this is a reimplementation from its Finding 012 — verified with a raw-COM-vtable GetDesc test using guard words (exactly 304 bytes written, UTF-16 description) against the real adapter.
  • vkd3d-proton — imported verbatim from the SE2 repo: the DXGI adapter-parent fix (prevents a null dereference in CreateSwapChainForHwnd under native DXGI) and an SE2_CPU_RENDERING-gated llvmpipe FP64 override (inert unless the env var is set). Pinned to the upstream commit the series was tested against.

Build changes

  • build_dxvk.sh: single build, patch series always applied; series SHA-256 is part of the cache stamp; pristine reset before each apply. The patched files are copied into the SE2 staging tree (same bytes in both archives).
  • New Scripts/build_vkd3d_proton.sh: fetch-by-SHA (depth 1) + submodules, same patch/stamp mechanics, DT_RUNPATH=$ORIGIN, staged straight into Libraries-SE2/. Requires widl — CI installs mingw-w64-tools, the script shims x86_64-w64-mingw32-widl onto PATH, and local builders need that package too (documented in building.md).
  • FMOD blobs committed under Vendor/ next to EOS/steam_api, staged SE2-only.
  • Licenses: SE1 LICENSES/ unchanged; the SE2 archive adds FMOD EULA + notice and VKD3D LGPL-2.1 + a provenance/relinking notice (same LGPL obligation pattern as FFmpeg), sourced from Licenses/se2/.

Verified locally

  • Full ./build.sh: both archives packaged; the SE1 archive's file list matches the pre-split contract exactly; SE1/SE2 DXVK files are cmp-identical; DXGI ABI smoke test passes against the staged patched libdxvk_dxgi.so.
  • Patch mechanics: cache hit, series-hash invalidation, pristine reset, and clean failure on a non-applying patch all exercised.

Notes / follow-ups (not in this PR)

  • The DXC stack (DxcCompilerBridge + pinned libdxcompiler/libdxil from the port's RenderingLibs/) was deliberately left out — it is a cohesive follow-up needing DXC SDK headers.
  • linux-native-wrappers needs to publish the SE2 wrapper set (libVRage.*.Native.so) for SE2 consumers to fetch.
  • Breaking for consumers: (1) the asset renames — fetch scripts must download se1-dependencies.tar.gz and additionally steam-dependencies.tar.gz for the Steam bits, which are no longer inside the SE1 archive; (2) the bare-name layout — loaders referencing versioned names (libavcodec.so.62, libopenal.so.1, libdxvk_*.so.0) must switch to the bare names. Expected-file lists need updating; the consumers' existing stale-file cleanup handles the removed symlinks/versioned files.

…aging

Introduce a second release asset, linux-dependencies-se2.tar.gz, for the
Space Engineers 2 Linux port, keeping the SE1 archive byte-identical:

* build_dxvk.sh gains an --se2 variant that applies the Patches/dxvk/
  series onto the pinned tag in a separate cached clone and stages into
  build/Libraries-SE2/. The series hash is part of the cache stamp, a
  failing patch fails the build, and the SE1 variant stays pristine.
* Patches/dxvk/ holds the (currently empty) patch series with provenance
  tracking; the patches from the SE2 repo are imported separately.
* Vendor/se2/ is the home for the FMOD Engine runtime blobs (libfmod.so,
  libfmodstudio.so, 2.03.11 to match the game). Until they are committed,
  build.sh skips the SE2 archive with a warning so the SE1 release keeps
  shipping; committing them activates the SE2 asset. SONAME alias symlinks
  are derived from the blobs at staging time.
* Licenses/se2/ ships the FMOD notice and an SE2-specific LICENSES index
  alongside the shared DXVK licence.
* CI uploads and publishes both archives, the SE2 one when present.
@viktor-ferenczi viktor-ferenczi changed the title Add the SE2 release archive: patched DXVK variant and FMOD runtime staging FMOD and SE2 release archive Aug 10, 2026
…y once

Restructure per review of the SE2 port workspace (dotnet-game2-local):

* Patched libraries ship in BOTH archives, built once. build_dxvk.sh loses
  the --se2 variant; the Patches/dxvk/ series is applied to the single
  build, and build.sh copies the resulting binaries (plus vkd3d-proton)
  into the SE2 staging tree.
* New Patches/dxvk/0001-dxgi-windows-abi-16-bit-wchar.patch: WCHAR becomes
  the Windows ABI's 16-bit type so IDXGIAdapter::GetDesc* cannot overrun
  the 304-byte managed buffers (reimplementation of the fix from the SE2
  port's lost DXVK checkout; verified with a raw-vtable guard-word test).
* New Scripts/build_vkd3d_proton.sh: vkd3d-proton at the commit the SE2
  port tested against, with its two patches (DXGI adapter parent fix,
  env-gated llvmpipe FP64 override) under Patches/vkd3d-proton/. Needs
  widl; CI installs mingw-w64-tools and the script shims the name.
* Vendor/se2/ now committed: FMOD Engine 2.03.11 runtime (libfmod.so.14,
  libfmodstudio.so.14 — SE2-only, SE1 does not use FMOD) and the four
  libVRage.*.Native.so wrappers (MIT, built from linux-native-wrappers).
  The FMOD-absent bootstrap skip is gone: both archives always build.
* Licenses: FMOD EULA, wrappers MIT text, VKD3D LGPL-2.1 + provenance/
  relinking notice (vkd3d-proton ships in the SE1 archive too).
* Workflow and docs updated; stale dual-variant and bootstrap language
  removed.
@viktor-ferenczi viktor-ferenczi changed the title FMOD and SE2 release archive Add the SE2 release archive: shared patched DXVK/vkd3d-proton, FMOD and SE2 wrappers Aug 11, 2026
The SE2 native wrappers (libVRage.*.Native.so) are built and released by
the linux-native-wrappers sister repository, like the SE1 PE-loader shims,
so consumers fetch them from that release instead of this archive. Remove
them (and the MIT notice that covered them) from the repo and the SE2
archive.

With the se2 subdirectory down to the two FMOD blobs, flatten it:
libfmod.so.14 and libfmodstudio.so.14 now live directly under Vendor/
alongside the EOS and Steamworks runtimes, documented in Vendor/README.md.
The SE1 archive must not grow with SE2 work: libraries it already shipped
may be patched (DXVK is, and the patched binaries stay byte-identical
across both archives), but nothing new is added to it. vkd3d-proton is new
with the SE2 port, so:

* build_vkd3d_proton.sh stages straight into build/Libraries-SE2/
* build.sh's shared-artefact copy is DXVK-only, and the SE1 expected-file
  list is back to its pre-split contents
* the VKD3D licence texts move to Licenses/se2/, keeping the SE1 archive's
  LICENSES/ set unchanged as well
Remove every symlink and every version-suffixed filename from the release
archives: each library is now a single real file under its unversioned name
(libavcodec.so, libdxvk_d3d11.so, libopenal.so, libfmod.so, ...).

To keep the bundles self-resolving under DT_RUNPATH=$ORIGIN, the built
libraries' intra-bundle NEEDED entries are rewritten to the bare names with
patchelf --replace-needed at staging time (libavformat -> libavcodec ->
libavutil chain, libdxvk_d3d11 -> libdxvk_dxgi). SONAMEs inside the
binaries stay as upstream produced them, and the SOVERSION/SONAME build
assertions remain as ABI-bump tripwires.

The FMOD vendor blobs stay byte-unmodified (committed under their upstream
libfmod.so.14 names for provenance, staged bare), so libfmodstudio.so still
references libfmod by SONAME internally: consumers must load libfmod.so
before libfmodstudio.so, documented in consuming.md.

Verified: both archives contain zero symlinks and zero suffixed names;
every staged library dlopens with sibling resolution from its own
directory; the FMOD preload order works; the DXGI ABI smoke test passes.
@viktor-ferenczi viktor-ferenczi changed the title Add the SE2 release archive: shared patched DXVK/vkd3d-proton, FMOD and SE2 wrappers Add the SE2 release archive: shared patched DXVK, SE2-only vkd3d-proton and FMOD, bare-named library layout Aug 11, 2026
@viktor-ferenczi viktor-ferenczi changed the title Add the SE2 release archive: shared patched DXVK, SE2-only vkd3d-proton and FMOD, bare-named library layout Add the SE2 release archive Aug 11, 2026
…archives

Three release assets now:

  se1-dependencies.tar.gz     (was linux-dependencies.tar.gz, minus Steam)
  se2-dependencies.tar.gz     (was linux-dependencies-se2.tar.gz)
  steam-dependencies.tar.gz   Steamworks.NET.dll + libsteam_api.so + notices

The Steam pieces belong together (the managed binding and the native
runtime it P/Invokes) and are game-agnostic, so they ship in their own
archive consumed alongside either game archive, and a Steamworks update
republishes neither game payload.

build_steamworks_net.sh stages into the new build/Libraries-Steam/ tree,
libsteam_api.so moves there from the SE1 vendor copy, and the Steam licence
notices move to Licenses/steam/ with their own index. Workflow uploads and
publishes all three assets.
@viktor-ferenczi
viktor-ferenczi merged commit c2c55be into main Aug 11, 2026
1 check passed
@viktor-ferenczi
viktor-ferenczi deleted the se2-fmod branch August 11, 2026 21:16
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