diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a93c1cf..1be1f38 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,9 +1,19 @@ name: Build # Builds the Space Engineers Linux binary dependencies (FFmpeg, DXVK Native, -# Steamworks.NET) and publishes them, together with the committed proprietary -# vendor blobs and the third-party licence texts, as a single tar.gz release -# asset. Pulsar for Linux and Magnetar both consume that archive. +# vkd3d-proton, OpenAL Soft, Steamworks.NET) and publishes them, together +# with the committed vendor blobs and the third-party licence texts, as +# three tar.gz release assets: +# +# * se1-dependencies.tar.gz Space Engineers 1 — consumed by Pulsar for +# Linux and Magnetar. +# * se2-dependencies.tar.gz Space Engineers 2 — the same patched DXVK +# build plus vkd3d-proton and the FMOD runtime. +# * steam-dependencies.tar.gz Steamworks.NET.dll + libsteam_api.so, +# consumed alongside either of the above. +# +# DXVK is built once with its Patches/ series applied; the identical +# binaries ship in both game archives. vkd3d-proton is SE2-only. # # * push to main -> build, then publish a PUBLIC release tagged # v1.0. and marked "latest". @@ -43,7 +53,11 @@ jobs: set -euo pipefail sudo apt-get update # build-essential/pkg-config/nasm -> FFmpeg - # meson/ninja-build/glslang-tools/libvulkan-dev -> DXVK Native + # meson/ninja-build/glslang-tools/libvulkan-dev -> DXVK Native and + # vkd3d-proton + # mingw-w64-tools -> widl, the IDL compiler vkd3d-proton uses to + # generate its COM headers (Scripts/build_vkd3d_proton.sh + # shims the x86_64-w64-mingw32-widl name onto PATH) # cmake -> the pinned SDL3 that DXVK compiles against (ubuntu-24.04 # has no libsdl3-dev, so Scripts/build_sdl3.sh builds one) # and OpenAL Soft @@ -57,7 +71,7 @@ jobs: sudo apt-get install -y --no-install-recommends \ build-essential pkg-config make cmake curl tar git \ nasm patchelf binutils zlib1g-dev \ - meson ninja-build glslang-tools libvulkan-dev \ + meson ninja-build glslang-tools libvulkan-dev mingw-w64-tools \ libpulse-dev libasound2-dev libpipewire-0.3-dev - name: Set up .NET SDK @@ -76,7 +90,10 @@ jobs: uses: actions/upload-artifact@v7 with: name: linux-dependencies - path: dist/linux-dependencies.tar.gz + path: | + dist/se1-dependencies.tar.gz + dist/se2-dependencies.tar.gz + dist/steam-dependencies.tar.gz if-no-files-found: error # Skipped for pull requests from forks: GITHUB_TOKEN is read-only for @@ -89,7 +106,9 @@ jobs: GH_TOKEN: ${{ github.token }} run: | set -euo pipefail - asset="dist/linux-dependencies.tar.gz" + assets=(dist/se1-dependencies.tar.gz + dist/se2-dependencies.tar.gz + dist/steam-dependencies.tar.gz) if [ "${{ github.event_name }}" = "push" ]; then # Push to main -> public, tagged, latest. @@ -100,7 +119,7 @@ jobs: --target "${{ github.sha }}" \ --title "Linux Dependencies $tag" \ --notes "Automated build of the Space Engineers Linux binary dependencies from commit ${{ github.sha }}." \ - "$asset" + "${assets[@]}" else # Non-draft PR -> draft release: not public, not latest, and no git # tag is created until a maintainer publishes it. One draft is kept @@ -118,5 +137,5 @@ jobs: --target "${{ github.event.pull_request.head.sha }}" \ --title "Linux Dependencies (PR #${{ github.event.pull_request.number }})" \ --notes "Draft build for PR #${{ github.event.pull_request.number }} (commit ${{ github.event.pull_request.head.sha }})." \ - "$asset" + "${assets[@]}" fi diff --git a/.gitignore b/.gitignore index 494487d..8c6a57e 100644 --- a/.gitignore +++ b/.gitignore @@ -219,7 +219,8 @@ __marimo__/ # Project-specific # -# The proprietary EOS and Steamworks runtimes are deliberately committed under -# Vendor/ - they have no public source and no fetchable binary. See -# Vendor/README.md. The blanket *.so rule above would otherwise exclude them. +# The proprietary EOS, Steamworks and FMOD runtimes are deliberately committed +# under Vendor/ - they have no public source and no fetchable binary. See +# Vendor/README.md. The blanket *.so rule above would otherwise exclude the +# first two (the FMOD files end in .so.14, which *.so does not match). !Vendor/*.so diff --git a/Licenses/README.txt b/Licenses/README.txt index 1889916..c6e0ea5 100644 --- a/Licenses/README.txt +++ b/Licenses/README.txt @@ -10,19 +10,23 @@ Files in this directory: FFmpeg-LGPL-2.1.txt LGPL-2.1 text covering libav*.so* / libsw*.so* FFmpeg-README.txt Build provenance + LGPL relinking notes - DXVK-LICENSE.txt zlib licence covering libdxvk_*.so* + DXVK-LICENSE.txt zlib licence covering libdxvk_*.so* (built + with the patch series published under + Patches/dxvk/ of this repository) OpenAL-Soft-LGPL-2.0.txt LGPL-2.0 text covering libopenal.so* OpenAL-Soft-README.txt Build provenance + LGPL relinking notes OpenAL-Soft-NOTICES.txt BSD-3-Clause and PFFFT notices for the portions of OpenAL Soft under those terms EOS-NOTICE.txt Attribution for libEOSSDK-Linux-Shipping.so (proprietary, Epic Games) - Steam-NOTICE.txt Attribution for libsteam_api.so - (proprietary, Valve Corporation) - Steamworks.NET-LICENSE.txt MIT licence covering Steamworks.NET.dll The native wrapper libraries (libD3DCompiler.so, libHavok.so, libRecastDetour.so, libVRageNative.so) are MIT-licensed and are NOT part of this archive; they are published separately by the CometWorks/linux-native-wrappers repository, which ships its own licence text. + +The Space Engineers 2 companion archive (se2-dependencies.tar.gz) and the +Steam companion archive (steam-dependencies.tar.gz) carry their own LICENSES +directories, sourced from the se2/ and steam/ subdirectories of the +repository's Licenses/ folder; none of those notices ship here. diff --git a/Licenses/se2/FMOD-EULA.txt b/Licenses/se2/FMOD-EULA.txt new file mode 100755 index 0000000..2ce86fa --- /dev/null +++ b/Licenses/se2/FMOD-EULA.txt @@ -0,0 +1,1053 @@ + FMOD END USER LICENCE AGREEMENT + =============================== + +This End User Licence Agreement (EULA) is a legal agreement between you and +Firelight Technologies Pty Ltd (ACN 099 182 448) (us or we) and governs your +use of FMOD Studio and FMOD Engine, together the Software. + +1. GRANT OF LICENCE + +1.1 FMOD Studio + +This EULA grants you the right to use FMOD Studio, being the desktop +application for adaptive audio content creation, for all use, including +Commercial use, subject to the following: + + i. FMOD Studio is used to create content for use with the FMOD Engine + only; + ii. FMOD Studio is not redistributed in any form. + +1.2 FMOD Engine + +This EULA grants you the right to use the FMOD Engine, 'FMOD Ex' or 'FMOD 3' +being the run-time engines for adaptive audio playback, without payment, for +personal (hobbyist), educational (students and teachers) or Non-Commercial use, +subject to the following: + + i. FMOD Engine is integrated and redistributed in a software application + (Product) only; + ii. FMOD Engine is not distributed as part of a game engine or tool set; + iii. FMOD Engine is not used in any Commercial enterprise or for any + Commercial production or subcontracting, except for the purposes of + Evaluation or Development of a Commercial Product; + iv. Non-Commercial use does not involve any form of monetisation, + sponsorship or promotion; + v. Product includes attribution in accordance with Clause 3. + +This EULA grants you the right to use FMOD Engine, for limited Commercial +use, subject to the following: + + i. Development budget of the project is less than $600k USD (Refer to + https://www.fmod.com/licensing#licensing-faq) for information); + ii. Total gross revenue / funding per year for the developer, before + expenses, is less than $200k USD (Refer to + https://www.fmod.com/licensing#licensing-faq for information); + iii. FMOD Engine is integrated and redistributed in a game application + (Product) only; + iv. FMOD Engine is not distributed as part of a game engine or tool set; + v. FMOD Engine is not distributed as part of a Product with the intent + to be commercially exploited by another business or institution; + vi. Project is registered in your profile page at + https://www.fmod.com/profile#projects; + vii. Product includes attribution in accordance with Clause 3. + +This EULA does not grant you the right to use 'FMOD Ex' or 'FMOD 3', for +Commercial use. A custom commercial license must be acquired from Firelight +Technologies by contacting sales@fmod.com. + +1.3 FMOD SDK + +This EULA grants you the right to use the FMOD SDK, interfacing either 'FMOD +Engine', 'FMOD Ex' or 'FMOD 3', comprising the programming interface +specification, documentation and examples subject to the following: + + i. FMOD SDK is used to develop a software application using the FMOD + Engine; + ii. FMOD SDK is used to develop an external DSP, Output or Codec plugin; + iii. FMOD SDK files are not be distributed with the exception of the FMOD + Engine run-time libraries (.DLL, .SO for example). + +1.4 FMOD example code and media + +This EULA grants you the right to use FMOD example code, being all or snippets +of source code files located in the FMOD API examples folder and scripting +examples in the documentation, for all use, including Commercial use, subject +to the following: + + i. Media files included in FMOD examples, including wav, ogg, mp3, fsb + and bank files, are not to be redistributed. + +2.OTHER USE + +For all Commercial use, and any Non Commercial use not permitted by this +license, a separate license is required. Refer to www.fmod.com/licensing for +information. + +3. CREDITS + +All Products require an in game credit line which must include the words "FMOD" +and "Firelight Technologies Pty Ltd." Refer to www.fmod.com/attribution for +examples. + +4. INTELLECTUAL PROPERTY RIGHTS + +We are and remain at all times the owner of the Software (including all +intellectual property rights in or to the Software). For the avoidance of doubt, +nothing in this EULA may be deemed to grant or assign to you any proprietary or +ownership interest or intellectual property rights in or to the Software other +than the rights licensed pursuant to Clause 1. + +You acknowledge and agree that you have no right, title or interest in and to +the intellectual property rights in the Software. + +5. SECURITY AND RISK + +You are responsible for protecting the Software and any related materials at all +times from unauthorised access, use or damage. + +6. WARRANTY AND LIMITATION OF LIABILITY + +The Software is provided by us “as is” and, to the maximum extent permitted by +law, any express or implied warranties of any kind, including (but not limited +to) all implied warranties of merchantability and fitness for a particular +purpose are disclaimed. + +In no event shall we (and our employees, contractors and subcontractors), +developers and contributors be liable for any direct, special, indirect or +consequential damages whatsoever resulting from loss of data or profits, whether +in an action of contract, negligence or other tortious conduct, arising out of +or in connection with the use or performance of the Software. + +7. OGG VORBIS CODEC + +FMOD uses the Ogg Vorbis codec © 2002, Xiph.Org Foundation. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + i. Redistributions of source code must retain the above copyright notice, + the list of conditions and the following disclaimer. + + ii. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other material provided with the distribution. + + iii. Neither the name of the Xiph.org Foundation nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +8. RESONANCE AUDIO SDK + +FMOD includes Resonance Audio SDK, licensed under the Apache Licence, Version +2.0 (the Licence); you may not use this file except in compliance with the +License. You may obtain a copy of the License at: + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + +8. ANDROID PLATFORM CODE + +Copyright (C) 2010 The Android Open Source Project All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +9. AUDIOMOTORS DEMO CONTENT + +The audiogaming_audiomotors_demo_engine.agp file is provided for evaluation +purposes only and is not to be redistributed. AudioMotors V2 Pro is required to +create your own engine content. Refer to https://lesound.io for information. + +10. Qt Toolkit + +FMOD uses Qt Toolkit Copyright (C) 2017 The Qt Company Ltd under the +GNU Lesser General Public License version 3. + +FMOD dynamically links to the unmodified Qt libraries, as provided by +The Qt Company in the pre-compiled binary format. If unable to obtain +source code from The Qt Company, we offer to provide it via the support +options available to all users outlined on our website. + +------------------------------------------------------------------------- + + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. + + +------------------------------------------------------------------------- + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright © 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies of this + license document, but changing it is not allowed. + +This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + +0. Additional Definitions. + + As used herein, “this License” refers to version 3 of the GNU Lesser +General Public License, and the “GNU GPL” refers to version 3 of the +GNU General Public License. + + “The Library” refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An “Application” is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A “Combined Work” is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the “Linked +Version”. + + The “Minimal Corresponding Source” for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The “Corresponding Application Code” for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + +1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + +2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort + to ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + +3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this + license document. + +4. Combined Works. + + You may convey a Combined Work under terms of your choice that, taken +together, effectively do not restrict modification of the portions of +the Library contained in the Combined Work and reverse engineering for +debugging such modifications, if you also do each of the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this + license document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of + this License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with + the Library. A suitable mechanism is one that (a) uses at run + time a copy of the Library already present on the user's + computer system, and (b) will operate properly with a modified + version of the Library that is interface-compatible with the + Linked Version. + + e) Provide Installation Information, but only if you would + otherwise be required to provide such information under section 6 + of the GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the Application + with a modified version of the Linked Version. (If you use option + 4d0, the Installation Information must accompany the Minimal + Corresponding Source and Corresponding Application Code. If you + use option 4d1, you must provide the Installation Information in + the manner specified by section 6 of the GNU GPL for conveying + Corresponding Source.) + +5. Combined Libraries. + + You may place library facilities that are a work based on the Library +side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities, conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of + it is a work based on the Library, and explaining where to find + the accompanying uncombined form of the same work. + +6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +as you received it specifies that a certain numbered version of the +GNU Lesser General Public License “or any later version” applies to +it, you have the option of following the terms and conditions either +of that published version or of any later version published by the +Free Software Foundation. If the Library as you received it does not +specify a version number of the GNU Lesser General Public License, +you may choose any version of the GNU Lesser General Public License +ever published by the Free Software Foundation. + +If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the Library. + +--------------------------- +Last updated 17th Jun 2024. \ No newline at end of file diff --git a/Licenses/se2/FMOD-NOTICE.txt b/Licenses/se2/FMOD-NOTICE.txt new file mode 100644 index 0000000..8d95866 --- /dev/null +++ b/Licenses/se2/FMOD-NOTICE.txt @@ -0,0 +1,31 @@ +FMOD Engine +=========== + +The shared libraries shipped alongside this notice as: + + libfmod.so (FMOD Core API runtime) + libfmodstudio.so (FMOD Studio API runtime) + +are the FMOD Engine runtime, distributed by Firelight Technologies Pty Ltd. + +License +------- +Proprietary. Use and redistribution of the FMOD Engine is governed by the +FMOD End User License Agreement (shipped next to this notice as +FMOD-EULA.txt), which permits redistribution of the unmodified runtime +libraries as part of a product. See also: + + https://www.fmod.com/legal + +Attribution +----------- +Made with FMOD Studio by Firelight Technologies Pty Ltd. + +"FMOD" and the FMOD logo are trademarks of Firelight Technologies Pty Ltd. + +These libraries are included solely to interoperate with Space Engineers 2's +existing FMOD audio integration. No part of the FMOD Engine source code or +tools is included; only the unmodified shipping binaries are redistributed. +The shipped version matches the FMOD version the game itself uses. + +Copyright (c) Firelight Technologies Pty Ltd. All rights reserved. diff --git a/Licenses/se2/README.txt b/Licenses/se2/README.txt new file mode 100644 index 0000000..f07fb23 --- /dev/null +++ b/Licenses/se2/README.txt @@ -0,0 +1,25 @@ +Third-party licences for the binaries shipped in ../ +==================================================== + +The libraries in the parent directory are each governed by their own +licence. This directory collects the licence text and attribution required +when redistributing them as part of a Space Engineers 2 Linux bundle. + +Files in this directory: + + DXVK-LICENSE.txt zlib licence covering libdxvk_*.so* (built + from upstream DXVK plus the patch series + published under Patches/dxvk/ in the + CometWorks/linux-dependencies repository) + VKD3D-LGPL-2.1.txt LGPL-2.1 text covering + libvkd3d-proton-d3d12*.so + vkd3d-proton-README.txt Build provenance + LGPL relinking notes + (patch series under Patches/vkd3d-proton/) + FMOD-EULA.txt FMOD End User License Agreement covering + libfmod.so and libfmodstudio.so + (proprietary, Firelight Technologies) + FMOD-NOTICE.txt FMOD attribution notice + +This is the SE2 companion archive (se2-dependencies.tar.gz). The +Space Engineers 1 libraries and their licences ship separately in +se1-dependencies.tar.gz; the patched DXVK binaries are identical in both. diff --git a/Licenses/se2/VKD3D-LGPL-2.1.txt b/Licenses/se2/VKD3D-LGPL-2.1.txt new file mode 100644 index 0000000..4362b49 --- /dev/null +++ b/Licenses/se2/VKD3D-LGPL-2.1.txt @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/Licenses/se2/vkd3d-proton-README.txt b/Licenses/se2/vkd3d-proton-README.txt new file mode 100644 index 0000000..03ccc9b --- /dev/null +++ b/Licenses/se2/vkd3d-proton-README.txt @@ -0,0 +1,30 @@ +vkd3d-proton build provenance +============================= + +The shared libraries shipped alongside this notice as: + + libvkd3d-proton-d3d12.so + libvkd3d-proton-d3d12core.so + +are built from vkd3d-proton (https://github.com/HansKristian-Work/vkd3d-proton), +a Direct3D 12 implementation over Vulkan, at the upstream commit pinned in +Scripts/build_vkd3d_proton.sh of the CometWorks/linux-dependencies repository, +with the patch series published under Patches/vkd3d-proton/ of the same +repository applied. + +License +------- +GNU Lesser General Public License version 2.1 — see VKD3D-LGPL-2.1.txt next +to this file. + +LGPL notes +---------- +The complete corresponding source of the shipped binaries is the pinned +upstream commit plus the published patch series, both recorded in the +CometWorks/linux-dependencies repository: + + https://github.com/CometWorks/linux-dependencies + +The libraries are ordinary shared objects; to exercise the LGPL right to +relink or replace them, rebuild with Scripts/build_vkd3d_proton.sh (or any +equivalent build of the same sources) and substitute the resulting files. diff --git a/Licenses/steam/README.txt b/Licenses/steam/README.txt new file mode 100644 index 0000000..b89616f --- /dev/null +++ b/Licenses/steam/README.txt @@ -0,0 +1,16 @@ +Third-party licences for the binaries shipped in ../ +==================================================== + +The files in the parent directory are each governed by their own licence. +This directory collects the licence text and attribution required when +redistributing them as part of a Space Engineers Linux bundle. + +Files in this directory: + + Steamworks.NET-LICENSE.txt MIT licence covering Steamworks.NET.dll + Steam-NOTICE.txt Attribution for libsteam_api.so + (proprietary, Valve Corporation) + +This is the Steam companion archive (steam-dependencies.tar.gz), consumed +alongside se1-dependencies.tar.gz or se2-dependencies.tar.gz by any bundle +that integrates with Steam. diff --git a/Licenses/Steam-NOTICE.txt b/Licenses/steam/Steam-NOTICE.txt similarity index 100% rename from Licenses/Steam-NOTICE.txt rename to Licenses/steam/Steam-NOTICE.txt diff --git a/Licenses/Steamworks.NET-LICENSE.txt b/Licenses/steam/Steamworks.NET-LICENSE.txt similarity index 100% rename from Licenses/Steamworks.NET-LICENSE.txt rename to Licenses/steam/Steamworks.NET-LICENSE.txt diff --git a/Patches/dxvk/0001-dxgi-windows-abi-16-bit-wchar.patch b/Patches/dxvk/0001-dxgi-windows-abi-16-bit-wchar.patch new file mode 100644 index 0000000..a58fed4 --- /dev/null +++ b/Patches/dxvk/0001-dxgi-windows-abi-16-bit-wchar.patch @@ -0,0 +1,109 @@ +diff --git a/include/native/windows/windows_base.h b/include/native/windows/windows_base.h +index f008a53..2b9195d 100644 +--- a/include/native/windows/windows_base.h ++++ b/include/native/windows/windows_base.h +@@ -27,7 +27,10 @@ typedef int32_t *LPLONG; + + typedef int32_t HRESULT; + +-typedef wchar_t WCHAR; ++// Windows ABI: WCHAR is a 16-bit type. Managed interop layers (Vortice, ++// SharpDX) marshal WCHAR fields and strings with the Windows ABI, so the ++// native build must not substitute the 32-bit Linux wchar_t here. ++typedef uint16_t WCHAR; + typedef WCHAR *NWPSTR, *LPWSTR, *PWSTR; + typedef unsigned char UCHAR, *PUCHAR; + +@@ -131,9 +134,9 @@ typedef UINT_PTR* PUINT_PTR; + #endif /*STRICT*/ + + typedef char* LPSTR; +-typedef wchar_t* LPWSTR; ++typedef WCHAR* LPWSTR; + typedef const char* LPCSTR; +-typedef const wchar_t* LPCWSTR; ++typedef const WCHAR* LPCWSTR; + + typedef struct LUID { + DWORD LowPart; +diff --git a/src/dxgi/dxgi_adapter.cpp b/src/dxgi/dxgi_adapter.cpp +index c9160dc..47c93c8 100644 +--- a/src/dxgi/dxgi_adapter.cpp ++++ b/src/dxgi/dxgi_adapter.cpp +@@ -17,6 +17,13 @@ + + namespace dxvk { + ++ // The adapter descriptions are copied into caller-provided buffers, and ++ // managed callers allocate them with the Windows x64 layout (16-bit ++ // WCHAR). A size drift here corrupts the caller's memory silently. ++ static_assert(sizeof(DXGI_ADAPTER_DESC) == 304); ++ static_assert(sizeof(DXGI_ADAPTER_DESC1) == 312); ++ static_assert(sizeof(DXGI_ADAPTER_DESC3) == 320); ++ + DxgiVkAdapter::DxgiVkAdapter(DxgiAdapter* pAdapter) + : m_adapter(pAdapter) { + +diff --git a/src/dxgi/dxgi_output.cpp b/src/dxgi/dxgi_output.cpp +index 8814f5c..a57e809 100644 +--- a/src/dxgi/dxgi_output.cpp ++++ b/src/dxgi/dxgi_output.cpp +@@ -20,6 +20,10 @@ + + namespace dxvk { + ++ // See the matching asserts in dxgi_adapter.cpp: the output description is ++ // copied into a caller-provided buffer with the Windows x64 layout. ++ static_assert(sizeof(DXGI_OUTPUT_DESC) == 96); ++ + DxgiOutput::DxgiOutput( + const Com& factory, + const Com& adapter, +diff --git a/src/wsi/sdl2/wsi_monitor_sdl2.cpp b/src/wsi/sdl2/wsi_monitor_sdl2.cpp +index d021346..8fbb696 100644 +--- a/src/wsi/sdl2/wsi_monitor_sdl2.cpp ++++ b/src/wsi/sdl2/wsi_monitor_sdl2.cpp +@@ -37,13 +37,14 @@ namespace dxvk::wsi { + if (!isDisplayValid(displayId)) + return false; + +- std::wstringstream nameStream; +- nameStream << LR"(\\.\DISPLAY)" << (displayId + 1); +- +- std::wstring name = nameStream.str(); ++ // WCHAR is a 16-bit type on the native build, so the display name is ++ // assembled as UTF-8 and transcoded into the Windows-ABI buffer. ++ std::string name = str::format(R"(\\.\DISPLAY)", displayId + 1); + + std::memset(Name, 0, sizeof(Name)); +- name.copy(Name, name.length(), 0); ++ str::transcodeString(Name, ++ sizeof(Name) / sizeof(Name[0]) - 1, ++ name.c_str(), name.size()); + + return true; + } +diff --git a/src/wsi/sdl3/wsi_monitor_sdl3.cpp b/src/wsi/sdl3/wsi_monitor_sdl3.cpp +index f568847..03f1306 100644 +--- a/src/wsi/sdl3/wsi_monitor_sdl3.cpp ++++ b/src/wsi/sdl3/wsi_monitor_sdl3.cpp +@@ -46,13 +46,14 @@ namespace dxvk::wsi { + if (!displayId) + return false; + +- std::wstringstream nameStream; +- nameStream << LR"(\\.\DISPLAY)" << displayId; +- +- std::wstring name = nameStream.str(); ++ // WCHAR is a 16-bit type on the native build, so the display name is ++ // assembled as UTF-8 and transcoded into the Windows-ABI buffer. ++ std::string name = str::format(R"(\\.\DISPLAY)", displayId); + + std::memset(Name, 0, sizeof(Name)); +- name.copy(Name, name.length(), 0); ++ str::transcodeString(Name, ++ sizeof(Name) / sizeof(Name[0]) - 1, ++ name.c_str(), name.size()); + + return true; + } diff --git a/Patches/dxvk/README.md b/Patches/dxvk/README.md new file mode 100644 index 0000000..c5b05d0 --- /dev/null +++ b/Patches/dxvk/README.md @@ -0,0 +1,38 @@ +# DXVK patch series + +Patches in this directory are applied on top of the pinned upstream DXVK tag +(see `DXVK_VERSION` in [Scripts/build_dxvk.sh](../../Scripts/build_dxvk.sh)) +before building `libdxvk_d3d11.so` / `libdxvk_dxgi.so`. DXVK is built **once** +with the series applied, and the same binaries ship in both release archives +(SE1 and SE2). + +These are source-level fixes for DXVK bugs that the Space Engineers clients +hit; fixing them here replaces what would otherwise be a much larger set of +managed (Harmony) runtime patches in the Linux compatibility layers. + +## How the series is applied + +* Files matching `*.patch` are applied with `git apply`, in byte-wise + (`LC_ALL=C`) filename order. Name them `NNNN-short-title.patch` + (`0001-...`, `0002-...`) so the order is explicit. +* The series hash is part of the build cache key: adding, editing or removing + a patch automatically invalidates `build/dxvk.stamp` and triggers a rebuild. +* A patch that fails to apply fails the build with an error naming the patch. + That is the signal that a `DXVK_VERSION` bump needs the series rebased — + see [docs/maintenance.md](../../docs/maintenance.md). +* An empty series is valid: the build is then pristine upstream. + +## Provenance + +Record for every patch where it came from, so the series can be refreshed: + +| Patch | Fixes | Source | +| --- | --- | --- | +| `0001-dxgi-windows-abi-16-bit-wchar.patch` | `WCHAR` is 32-bit `wchar_t` on the native build, so `IDXGIAdapter::GetDesc*` / `IDXGIOutput::GetDesc` write a 560-byte structure into the caller's 304-byte Windows-ABI buffer, corrupting managed memory (Vortice/SharpDX marshal with 16-bit `WCHAR`). The patch makes `WCHAR` 16-bit, transcodes the SDL display name at the WSI boundary, and adds compile-time asserts for the Windows x64 sizes of `DXGI_ADAPTER_DESC` (304), `DXGI_ADAPTER_DESC1` (312), `DXGI_ADAPTER_DESC3` (320) and `DXGI_OUTPUT_DESC` (96). | Reimplementation of the fix described in `dotnet-game2-local` Finding 012 (their dedicated DXVK checkout, commit `d592777f`, was not preserved); authored against v2.7.1 and verified with a raw-vtable `GetDesc` guard-word test. | + +## Licensing + +DXVK is zlib-licensed; modified builds may be distributed under the same +terms. The archive ships `LICENSES/DXVK-LICENSE.txt` alongside the patched +binaries, and this directory (published with the repo) is the corresponding +source of the modifications. diff --git a/Patches/vkd3d-proton/README.md b/Patches/vkd3d-proton/README.md new file mode 100644 index 0000000..f65e55c --- /dev/null +++ b/Patches/vkd3d-proton/README.md @@ -0,0 +1,30 @@ +# vkd3d-proton patch series + +Patches in this directory are applied on top of the pinned upstream +vkd3d-proton commit (see `VKD3D_PROTON_COMMIT` in +[Scripts/build_vkd3d_proton.sh](../../Scripts/build_vkd3d_proton.sh)) before +building `libvkd3d-proton-d3d12.so` / `libvkd3d-proton-d3d12core.so`, which +ship in the **SE2 archive only** — Space Engineers 1 never shipped a D3D12 +layer, and the SE1 archive's library set stays as it was. + +The application rules are the same as for [Patches/dxvk/](../dxvk/README.md): +`*.patch` files applied with `git apply` in byte-wise filename order, series +hash in the cache stamp, a failing patch fails the build. + +## Provenance + +Both patches come from the SE2 Linux port repository +(`dotnet-game2-local/LinuxCompat/Native/`), developed and tested against +upstream commit `3dfc6f07d0953b1` — the reason the pin is that commit. + +| Patch | Fixes | +| --- | --- | +| `vkd3d-proton-native-dxgi.patch` | Native `D3D12CreateDevice` receives the DXGI adapter from managed code but does not retain it as the device parent on Linux. DXVK unconditionally asks the vkd3d swapchain presenter for that parent adapter, causing a null dereference during `CreateSwapChainForHwnd`. The patch retains the supplied adapter for DXGI identity and COM lifetime only; Vulkan physical-device selection is unchanged. | +| `vkd3d-proton-cpu-fp64.patch` | Gated by the `SE2_CPU_RENDERING` environment variable (inert otherwise): reports FP64 shader support when llvmpipe exposes `shaderFloat64` but not FP64 denorm preservation, allowing SE2's double-precision compute pipelines to compile in the CPU-rendering test harness. Must not be enabled for normal GPU rendering. | + +## Licensing + +vkd3d-proton is LGPL-2.1-licensed. The SE2 archive ships +`LICENSES/VKD3D-LGPL-2.1.txt` and `LICENSES/vkd3d-proton-README.txt` (build +provenance and relinking notes) alongside the binaries, and this directory +(published with the repo) is the corresponding source of the modifications. diff --git a/Patches/vkd3d-proton/vkd3d-proton-cpu-fp64.patch b/Patches/vkd3d-proton/vkd3d-proton-cpu-fp64.patch new file mode 100644 index 0000000..cc4343f --- /dev/null +++ b/Patches/vkd3d-proton/vkd3d-proton-cpu-fp64.patch @@ -0,0 +1,13 @@ +diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c +index f6db6954..a63c7cad 100644 +--- a/libs/vkd3d/device.c ++++ b/libs/vkd3d/device.c +@@ -10146,7 +10146,7 @@ static void d3d12_device_caps_init_feature_options(struct d3d12_device *device) + + /* FP64 must preserve denorms (oof). */ + options->DoublePrecisionFloatShaderOps = features->shaderFloat64 && +- supports_denorm_fp64 && ++ (supports_denorm_fp64 || getenv("SE2_CPU_RENDERING")) && + device->device_info.vulkan_1_2_properties.denormBehaviorIndependence != VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE; + + options->OutputMergerLogicOp = features->logicOp; diff --git a/Patches/vkd3d-proton/vkd3d-proton-native-dxgi.patch b/Patches/vkd3d-proton/vkd3d-proton-native-dxgi.patch new file mode 100644 index 0000000..a7facbd --- /dev/null +++ b/Patches/vkd3d-proton/vkd3d-proton-native-dxgi.patch @@ -0,0 +1,21 @@ +diff --git a/libs/d3d12core/main.c b/libs/d3d12core/main.c +index d5788af4..b5c66a42 100644 +--- a/libs/d3d12core/main.c ++++ b/libs/d3d12core/main.c +@@ -683,6 +683,2 @@ static HRESULT STDMETHODCALLTYPE d3d12core_CreateDeviceFromFactory( + passthrough_unix_environment("VKD3D_UNIX_ENV"); +-#else +- /* TODO: We need to attempt to dlopen() native DXVK DXGI and handle this more gracefully. */ +- if (adapter) +- FIXME("Ignoring adapter.\n"); + #endif +@@ -699,5 +695,9 @@ static HRESULT STDMETHODCALLTYPE d3d12core_CreateDeviceFromFactory( + device_create_info.optional_device_extensions = optional_device_extensions; + device_create_info.optional_device_extension_count = ARRAY_SIZE(optional_device_extensions); + device_create_info.independent = factory != NULL; ++#ifndef _WIN32 ++ /* Native DXVK queries this parent while constructing its D3D12 swapchain. */ ++ device_create_info.parent = adapter; ++#endif + if (factory) + device_create_info.device_factory_flags = ID3D12DeviceFactory_GetFlags(factory); diff --git a/README.md b/README.md index d2398c3..76c4818 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # Linux Dependencies Build and release of the Linux library dependencies of the Space Engineers -client and server (version 1). +client and server (version 1), plus a companion archive for the Space +Engineers 2 client. Used by the Linux builds of [Pulsar](https://github.com/CometWorks/Pulsar) and [Magnetar](https://github.com/CometWorks/magnetar), which download the @@ -9,29 +10,51 @@ published release archive instead of building these libraries themselves. ## What it ships +Three release assets. The game archives carry the game-specific libraries +(the patched DXVK build is byte-identical in both); the Steam bits ship in +their own archive, consumed alongside either game archive. + +### `se1-dependencies.tar.gz` — Space Engineers 1 + | Artefact | Version | Licence | | --- | --- | --- | | FFmpeg (`libavcodec`, `libavformat`, `libavutil`, `libswresample`, `libswscale`) | 8.1 | LGPL-2.1-or-later | -| DXVK Native (`libdxvk_d3d11.so`, `libdxvk_dxgi.so`) | 2.7.1 | zlib | +| DXVK Native (`libdxvk_d3d11.so`, `libdxvk_dxgi.so`) + [Patches/dxvk/](Patches/dxvk/) | 2.7.1 | zlib | | OpenAL Soft (`libopenal.so`) | 1.25.2 | LGPL-2.0-or-later | -| `Steamworks.NET.dll` | pinned commit | MIT | | `libEOSSDK-Linux-Shipping.so` | vendor blob | proprietary (Epic) | + +### `se2-dependencies.tar.gz` — Space Engineers 2 + +| Artefact | Version | Licence | +| --- | --- | --- | +| DXVK Native — same patched build as above | 2.7.1 | zlib | +| vkd3d-proton (`libvkd3d-proton-d3d12.so`, `libvkd3d-proton-d3d12core.so`) + [Patches/vkd3d-proton/](Patches/vkd3d-proton/) | pinned commit | LGPL-2.1 | +| FMOD Engine (`libfmod.so`, `libfmodstudio.so`) | 2.03.11, matching the game | proprietary (Firelight) | + +### `steam-dependencies.tar.gz` — Steam integration + +| Artefact | Version | Licence | +| --- | --- | --- | +| `Steamworks.NET.dll` | pinned commit | MIT | | `libsteam_api.so` | vendor blob | proprietary (Valve) | -All of it, plus the third-party licence texts, is published as a single -`linux-dependencies.tar.gz` asset on every release. +Everything, plus the third-party licence texts, is published as release +assets on every release. -The PE-loader wrapper libraries (`libD3DCompiler.so`, `libHavok.so`, -`libRecastDetour.so`, `libVRageNative.so`) are **not** part of this repo — they -come from +The native wrapper libraries — SE1's PE-loader shims (`libD3DCompiler.so`, +`libHavok.so`, `libRecastDetour.so`, `libVRageNative.so`) and SE2's +`libVRage.*.Native.so` set — are **not** part of this repo; they come from [CometWorks/linux-native-wrappers](https://github.com/CometWorks/linux-native-wrappers). ## Using it ```bash -curl -fL -o linux-dependencies.tar.gz \ - https://github.com/CometWorks/linux-dependencies/releases/latest/download/linux-dependencies.tar.gz -tar -xzf linux-dependencies.tar.gz -C +curl -fL -o se1-dependencies.tar.gz \ + https://github.com/CometWorks/linux-dependencies/releases/latest/download/se1-dependencies.tar.gz +curl -fL -o steam-dependencies.tar.gz \ + https://github.com/CometWorks/linux-dependencies/releases/latest/download/steam-dependencies.tar.gz +tar -xzf se1-dependencies.tar.gz -C +tar -xzf steam-dependencies.tar.gz -C ``` See [docs/consuming.md](docs/consuming.md) for how Pulsar and Magnetar wire @@ -43,9 +66,10 @@ this into their builds. ./build.sh ``` -Builds everything from source, stages `build/Libraries/`, and packages -`dist/linux-dependencies.tar.gz`. See [docs/building.md](docs/building.md) for -prerequisites and options. +Builds everything from source, stages `build/Libraries/` (SE1), +`build/Libraries-SE2/` (SE2) and `build/Libraries-Steam/` (Steam), and +packages the three archives under `dist/`. See +[docs/building.md](docs/building.md) for prerequisites and options. ## Documentation diff --git a/Scripts/build_dxvk.sh b/Scripts/build_dxvk.sh index 05d5964..6bf5114 100755 --- a/Scripts/build_dxvk.sh +++ b/Scripts/build_dxvk.sh @@ -2,11 +2,21 @@ # build_dxvk.sh # # Builds DXVK Native (the ELF/Linux variant of DXVK) from upstream sources -# at https://github.com/doitsujin/dxvk, then installs the two .so files -# the Space Engineers client needs into the build/Libraries staging folder: +# at https://github.com/doitsujin/dxvk with the patch series under +# Patches/dxvk/ applied first, then installs the two .so files the Space +# Engineers clients need into the build/Libraries staging folder: # -# libdxvk_d3d11.so (SONAME libdxvk_d3d11.so.0; we ship both via a symlink) -# libdxvk_dxgi.so (SONAME libdxvk_dxgi.so.0; same) +# libdxvk_d3d11.so +# libdxvk_dxgi.so +# +# The archives carry no symlinks and no version-suffixed filenames, so only +# these two real files are staged. libdxvk_d3d11's NEEDED reference to the +# dxgi library is rewritten from the SONAME (libdxvk_dxgi.so.0) to the bare +# file name so DT_RUNPATH=$ORIGIN keeps resolving it next to the library. +# +# DXVK is built ONCE and the same patched binaries ship in both release +# archives (SE1 and SE2) — see Patches/dxvk/README.md for what the series +# fixes and where it came from. # # DXVK Native is built by running upstream's package-native.sh helper at the # pinned tag; we pass --64-only --no-package so the 32-bit build is skipped @@ -19,7 +29,7 @@ # ├── Libraries/ staging dir all dep scripts populate # ├── dxvk/ shallow clone of doitsujin/dxvk at tag # ├── dxvk-out/ package-native.sh destdir (recreated) -# └── dxvk.stamp last-built tag (cache key) +# └── dxvk.stamp last-built tag + patch-series hash # # Usage: # ./build_dxvk.sh Build (or no-op if cached). @@ -29,7 +39,7 @@ # DXVK Native's window-system integration compiles against SDL3 headers and # dlopens libSDL3.so.0 at runtime. Ubuntu 24.04 has no libsdl3-dev package, so # a pinned SDL3 is built into build/sdl3-prefix/ and put on PKG_CONFIG_PATH -# here. Nothing from SDL3 ends up in the release archive. +# here. Nothing from SDL3 ends up in the release archives. # # Env-var overrides (defaults shown): # DXVK_VERSION = 2.7.1 @@ -59,31 +69,41 @@ LIBRARIES_DIR="${LIBRARIES_DIR:-$BUILD_DIR/Libraries}" SDL3_PREFIX="${SDL3_PREFIX:-$BUILD_DIR/sdl3-prefix}" JOBS="${JOBS:-$(nproc)}" +PATCHES_DIR="$REPO_DIR/Patches/dxvk" + DXVK_SRC_DIR="$BUILD_DIR/dxvk" DXVK_OUT_DIR="$BUILD_DIR/dxvk-out" STAMP_FILE="$BUILD_DIR/dxvk.stamp" EXPECTED_LIBS=(libdxvk_d3d11.so libdxvk_dxgi.so) -# What the cache check must find for a rebuild to be skippable: the libraries -# AND the SONAME aliases, because build.sh asserts on the aliases too. Checking -# only the bare .so names would let a missing libdxvk_d3d11.so.0 report -# "cached, skipping rebuild" and then fail the caller's assertion, recoverable -# only by a full ~10-minute --clean rebuild. -EXPECTED_STAGED=( - libdxvk_d3d11.so libdxvk_d3d11.so.0 - libdxvk_dxgi.so libdxvk_dxgi.so.0 -) - CLEAN=0 for arg in "$@"; do case "$arg" in --clean) CLEAN=1 ;; - -h|--help) sed -n '2,46p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;; + -h|--help) sed -n '2,53p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;; *) echo "ERROR: unknown arg: $arg" >&2; exit 2 ;; esac done +# The patch series is part of the cache key: adding, editing or removing a +# patch must invalidate the cached build. LC_ALL=C pins the sort order so the +# hash does not depend on the host locale. An empty (or absent) series is +# valid — the build is then pristine upstream. +PATCH_FILES=() +if [ -d "$PATCHES_DIR" ]; then + while IFS= read -r p; do + PATCH_FILES+=("$p") + done < <(find "$PATCHES_DIR" -maxdepth 1 -name '*.patch' | LC_ALL=C sort) +fi + +if [ "${#PATCH_FILES[@]}" -gt 0 ]; then + PATCH_HASH="$(cat "${PATCH_FILES[@]}" | sha256sum | cut -d' ' -f1)" +else + PATCH_HASH="no-patches" +fi +STAMP_CONTENT="$DXVK_VERSION patches=$PATCH_HASH" + # ---- preflight -------------------------------------------------------------- for tool in git meson ninja glslangValidator pkg-config gcc g++ patchelf cmake; do @@ -98,15 +118,19 @@ mkdir -p "$BUILD_DIR" "$LIBRARIES_DIR" # ---- cache check ------------------------------------------------------------ ALL_LIBS_PRESENT=1 -for lib in "${EXPECTED_STAGED[@]}"; do - [ -e "$LIBRARIES_DIR/$lib" ] || ALL_LIBS_PRESENT=0 +for lib in "${EXPECTED_LIBS[@]}"; do + # The pre-bare-name layout staged .so.0 symlinks next to the real files; + # treat their presence as a cache miss so a rerun cleans them up. + if [ ! -e "$LIBRARIES_DIR/$lib" ] || [ -e "$LIBRARIES_DIR/${lib}.0" ]; then + ALL_LIBS_PRESENT=0 + fi done if [ "$CLEAN" = "1" ]; then rm -rf "$DXVK_SRC_DIR" "$DXVK_OUT_DIR" elif [ "$ALL_LIBS_PRESENT" = "1" ] \ && [ -f "$STAMP_FILE" ] \ - && [ "$(cat "$STAMP_FILE")" = "$DXVK_VERSION" ]; then + && [ "$(cat "$STAMP_FILE")" = "$STAMP_CONTENT" ]; then echo "==> Cached build matches DXVK $DXVK_VERSION; skipping rebuild" echo "==> DXVK libs already in $LIBRARIES_DIR:" ( cd "$LIBRARIES_DIR" && ls -1 libdxvk_*.so* ) @@ -127,6 +151,32 @@ else git -C "$DXVK_SRC_DIR" submodule update --init --recursive --depth 1 fi +# ---- reset to pristine, then apply the patch series ------------------------- +# The clone is cached across runs, so before applying patches the tree is +# forced back to the pristine tag state — a previous run's applied patches (or +# an edited series) would otherwise stack or conflict. This forfeits ninja +# incrementality (clean -fdx removes the meson build dirs), which is the +# price of a guaranteed pristine base for every series. + +echo "==> Resetting DXVK source tree to pristine v$DXVK_VERSION" +git -C "$DXVK_SRC_DIR" checkout -- . +git -C "$DXVK_SRC_DIR" clean -fdx --quiet +git -C "$DXVK_SRC_DIR" submodule foreach --recursive --quiet \ + 'git checkout -- . && git clean -fdx --quiet' + +if [ "${#PATCH_FILES[@]}" -eq 0 ]; then + echo "==> No patches under $PATCHES_DIR; building pristine upstream" +fi +for p in ${PATCH_FILES[@]+"${PATCH_FILES[@]}"}; do + echo "==> Applying $(basename "$p")" + if ! git -C "$DXVK_SRC_DIR" apply "$p"; then + echo "ERROR: patch failed to apply: $p" >&2 + echo " The series under Patches/dxvk/ needs a rebase onto" >&2 + echo " DXVK v$DXVK_VERSION. See docs/maintenance.md." >&2 + exit 1 + fi +done + # ---- SDL3 (build-time only) ------------------------------------------------- # DXVK's meson build errors out with "SDL3, SDL2, or GLFW are required to build # dxvk-native" unless one of them is discoverable. Build the pinned SDL3 and @@ -166,20 +216,26 @@ echo "==> Running DXVK package-native.sh (64-only, no-package)" # (e.g. usr/lib64/, multiarch subdir) doesn't silently break the script. echo "==> Staging DXVK libs into $LIBRARIES_DIR" +find "$LIBRARIES_DIR" -maxdepth 1 -name 'libdxvk_*.so*' -delete for lib in "${EXPECTED_LIBS[@]}"; do # `-L` so find follows the unversioned .so symlink chain to the real # versioned file (libdxvk_*.so -> libdxvk_*.so.0 -> libdxvk_*.so.0.). - # `install` then copies the dereferenced file under the bare .so name, - # matching the pre-existing Libraries/ layout. + # `install` then copies the dereferenced file under the bare .so name. src="$(find -L "$DXVK_OUT_DIR" -type f -name "$lib" -print -quit)" if [ -z "$src" ]; then echo "ERROR: package-native.sh did not produce $lib under $DXVK_OUT_DIR" >&2 exit 1 fi install -m 0755 "$src" "$LIBRARIES_DIR/$lib" - # Recreate the SONAME alias as a symlink so anything dlopen()ing the - # SONAME directly (rare, but matches the pre-existing layout) finds it. - ln -sfn "$lib" "$LIBRARIES_DIR/${lib}.0" +done + +# Rewrite the cross-DXVK NEEDED entry to the bare file name: no SONAME-named +# file ships, so the reference must match what is actually next to the +# library. A no-op on libdxvk_dxgi.so, which has no such entry. +echo "==> Rewriting cross-DXVK NEEDED entries to the bare names" +for lib in "${EXPECTED_LIBS[@]}"; do + patchelf --replace-needed libdxvk_dxgi.so.0 libdxvk_dxgi.so \ + "$LIBRARIES_DIR/$lib" done # ---- patch DT_RUNPATH=$ORIGIN onto each .so -------------------------------- @@ -195,7 +251,7 @@ done # ---- update cache stamp ---------------------------------------------------- -printf '%s\n' "$DXVK_VERSION" > "$STAMP_FILE" +printf '%s\n' "$STAMP_CONTENT" > "$STAMP_FILE" echo echo "==> Staged DXVK libs into $LIBRARIES_DIR:" diff --git a/Scripts/build_ffmpeg.sh b/Scripts/build_ffmpeg.sh index a3f7c90..7d5f74d 100755 --- a/Scripts/build_ffmpeg.sh +++ b/Scripts/build_ffmpeg.sh @@ -361,21 +361,24 @@ find "$LIBRARIES_DIR" -maxdepth 1 \ \( -name 'libav*.so*' -o -name 'libsw*.so*' \) -delete echo "==> Staging outputs into $LIBRARIES_DIR" -# Copy realpath files first, then recreate the symlink chain. This avoids -# `cp -a` accidentally turning a relative symlink into a dangling absolute -# one across filesystems. -for f in "$LIB_SRC"/lib*.so.*; do - [ -L "$f" ] && continue - cp -a "$f" "$LIBRARIES_DIR/$(basename "$f")" +# The archives carry no symlinks and no version-suffixed filenames: each +# library ships as a single real file under its bare name (libavcodec.so). +# The SONAMEs inside the binaries stay as upstream produced them, but the +# cross-FFmpeg NEEDED entries are rewritten below to the bare names so +# DT_RUNPATH=$ORIGIN keeps resolving siblings next to the loaded library. +for name in "${!EXPECTED_SOVER[@]}"; do + sover="${EXPECTED_SOVER[$name]}" + install -m 0755 "$LIB_SRC/lib${name}.so.${sover}" "$LIBRARIES_DIR/lib${name}.so" done -# -sfn, not a skip-if-exists guard: the aliases must always be re-pointed at -# the build we just staged. -for link in "$LIB_SRC"/lib*.so*; do - [ -L "$link" ] || continue - target="$(readlink "$link")" # relative target name, e.g. libavcodec.so.62.0.100 - name="$(basename "$link")" - ln -sfn "$target" "$LIBRARIES_DIR/$name" +echo "==> Rewriting cross-FFmpeg NEEDED entries to the bare names" +for name in "${!EXPECTED_SOVER[@]}"; do + f="$LIBRARIES_DIR/lib${name}.so" + for dep in "${!EXPECTED_SOVER[@]}"; do + # No-op when the entry is absent; only actual references are renamed. + patchelf --replace-needed \ + "lib${dep}.so.${EXPECTED_SOVER[$dep]}" "lib${dep}.so" "$f" + done done echo diff --git a/Scripts/build_openal.sh b/Scripts/build_openal.sh index 840b40a..7245cad 100755 --- a/Scripts/build_openal.sh +++ b/Scripts/build_openal.sh @@ -88,8 +88,8 @@ mkdir -p "$BUILD_DIR" "$LIBRARIES_DIR" if [ "$CLEAN" = "1" ]; then rm -rf "$OPENAL_SRC_DIR" -elif [ -e "$LIBRARIES_DIR/$EXPECTED_SONAME" ] \ - && [ -e "$LIBRARIES_DIR/libopenal.so" ] \ +elif [ -e "$LIBRARIES_DIR/libopenal.so" ] \ + && [ ! -L "$LIBRARIES_DIR/libopenal.so" ] \ && [ -f "$STAMP_FILE" ] \ && [ "$(cat "$STAMP_FILE")" = "$OPENAL_VERSION" ]; then echo "==> Cached build matches OpenAL Soft $OPENAL_VERSION; skipping rebuild" @@ -242,15 +242,16 @@ if [ "$DEP_LEAK" = "1" ]; then fi # ---- stage ------------------------------------------------------------------ -# Ship the real file under its SONAME plus an unversioned alias, matching how -# the FFmpeg libraries are laid out. Clear the previous build's files first so -# a version bump cannot leave a stale copy behind. +# Ship the real file under the bare unversioned name — the archives carry no +# symlinks and no version-suffixed filenames. The SONAME inside the binary is +# left as upstream produced it (asserted above); consumers load the library +# by file name. Clear the previous build's files first so a version bump (or +# the pre-bare-name layout) cannot leave a stale copy behind. echo "==> Staging OpenAL into $LIBRARIES_DIR" find "$LIBRARIES_DIR" -maxdepth 1 -name 'libopenal.so*' -delete -install -m 0755 "$REAL_LIB" "$LIBRARIES_DIR/$EXPECTED_SONAME" -ln -sfn "$EXPECTED_SONAME" "$LIBRARIES_DIR/libopenal.so" +install -m 0755 "$REAL_LIB" "$LIBRARIES_DIR/libopenal.so" printf '%s\n' "$OPENAL_VERSION" > "$STAMP_FILE" diff --git a/Scripts/build_steamworks_net.sh b/Scripts/build_steamworks_net.sh index a31ff11..fb2011d 100755 --- a/Scripts/build_steamworks_net.sh +++ b/Scripts/build_steamworks_net.sh @@ -3,7 +3,8 @@ # # Builds Steamworks.NET.dll from upstream sources at # https://github.com/rlabrecque/Steamworks.NET and installs it into the -# build/Libraries staging folder. +# build/Libraries-Steam staging folder, from which the steam-dependencies +# archive is packaged (Steam bits ship separately from the SE1/SE2 archives). # # We pin to a specific commit SHA (not a tag) because rlabrecque tags # correspond to Steamworks SDK versions while the .dll Pulsar and Magnetar @@ -18,7 +19,7 @@ # Source layout (under the gitignored build/ folder of this repo): # # build/ -# ├── Libraries/ staging dir all dep scripts populate +# ├── Libraries-Steam/ Steam staging dir this script populates # ├── Steamworks.NET/ clone of rlabrecque/Steamworks.NET (cached) # └── steamworks-net.stamp last-built commit SHA (cache key) # @@ -33,7 +34,7 @@ # Libraries/Steamworks.NET.dll's # AssemblyInformationalVersion) # BUILD_DIR = /build -# LIBRARIES_DIR = $BUILD_DIR/Libraries +# LIBRARIES_STEAM_DIR = $BUILD_DIR/Libraries-Steam # # Requirements: git, dotnet SDK (with net8.0 targeting pack). @@ -47,7 +48,7 @@ REPO_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" BUILD_DIR_DEFAULT="$REPO_DIR/build" BUILD_DIR="${BUILD_DIR:-$BUILD_DIR_DEFAULT}" -LIBRARIES_DIR="${LIBRARIES_DIR:-$BUILD_DIR/Libraries}" +LIBRARIES_STEAM_DIR="${LIBRARIES_STEAM_DIR:-$BUILD_DIR/Libraries-Steam}" CLONE_DIR="$BUILD_DIR/Steamworks.NET" CSPROJ="$CLONE_DIR/Standalone3.0/Steamworks.NET.csproj" @@ -72,17 +73,17 @@ for tool in git dotnet; do } done -mkdir -p "$BUILD_DIR" "$LIBRARIES_DIR" +mkdir -p "$BUILD_DIR" "$LIBRARIES_STEAM_DIR" # ---- cache check ------------------------------------------------------------ if [ "$CLEAN" = "1" ]; then rm -rf "$CLONE_DIR/Standalone3.0/bin" "$CLONE_DIR/Standalone3.0/obj" -elif [ -f "$LIBRARIES_DIR/$DLL_NAME" ] \ +elif [ -f "$LIBRARIES_STEAM_DIR/$DLL_NAME" ] \ && [ -f "$STAMP_FILE" ] \ && [ "$(cat "$STAMP_FILE")" = "$STEAMWORKS_NET_COMMIT" ]; then echo "==> Cached build matches commit $STEAMWORKS_NET_COMMIT; skipping rebuild" - echo "==> $DLL_NAME already in $LIBRARIES_DIR" + echo "==> $DLL_NAME already in $LIBRARIES_STEAM_DIR" exit 0 fi @@ -136,11 +137,11 @@ if [ -z "$DLL_SRC" ]; then exit 1 fi -echo "==> Staging $DLL_NAME into $LIBRARIES_DIR" -install -m 0644 "$DLL_SRC" "$LIBRARIES_DIR/$DLL_NAME" +echo "==> Staging $DLL_NAME into $LIBRARIES_STEAM_DIR" +install -m 0644 "$DLL_SRC" "$LIBRARIES_STEAM_DIR/$DLL_NAME" printf '%s\n' "$STEAMWORKS_NET_COMMIT" > "$STAMP_FILE" echo -echo "==> Staged $DLL_NAME into $LIBRARIES_DIR:" -ls -l "$LIBRARIES_DIR/$DLL_NAME" +echo "==> Staged $DLL_NAME into $LIBRARIES_STEAM_DIR:" +ls -l "$LIBRARIES_STEAM_DIR/$DLL_NAME" diff --git a/Scripts/build_vkd3d_proton.sh b/Scripts/build_vkd3d_proton.sh new file mode 100755 index 0000000..7aec775 --- /dev/null +++ b/Scripts/build_vkd3d_proton.sh @@ -0,0 +1,228 @@ +#!/usr/bin/env bash +# build_vkd3d_proton.sh +# +# Builds vkd3d-proton (the Proton fork of vkd3d: a Direct3D 12 implementation +# over Vulkan) from upstream sources at +# https://github.com/HansKristian-Work/vkd3d-proton, with the patch series +# under Patches/vkd3d-proton/ applied first, then installs the two native .so +# files the Space Engineers 2 client needs into the build/Libraries-SE2 +# staging folder: +# +# libvkd3d-proton-d3d12.so +# libvkd3d-proton-d3d12core.so +# +# The patches fix bugs the Space Engineers 2 client hits (see +# Patches/vkd3d-proton/README.md). Unlike DXVK — which Space Engineers 1 +# already shipped and therefore stays in both archives — vkd3d-proton is new +# with the SE2 port, so it ships in the SE2 archive only and the SE1 archive +# keeps its pre-existing library set. +# +# The pin is a commit SHA rather than a tag because the patch series was +# developed and tested against this exact upstream state. +# +# Source layout (under the gitignored build/ folder of this repo): +# +# build/ +# ├── Libraries-SE2/ SE2 staging dir this script populates +# ├── vkd3d-proton/ clone at the pinned commit +# ├── vkd3d-proton-out/ meson install destdir (recreated) +# └── vkd3d-proton.stamp last-built commit + patch-series hash +# +# Usage: +# ./build_vkd3d_proton.sh Build (or no-op if cached). +# ./build_vkd3d_proton.sh --clean Wipe build dirs and rebuild from scratch. +# +# Env-var overrides (defaults shown): +# VKD3D_PROTON_COMMIT = 3dfc6f07d0953b1e8b41705275c2c59cc7374fc5 +# VKD3D_PROTON_REPO = https://github.com/HansKristian-Work/vkd3d-proton.git +# BUILD_DIR = /build +# LIBRARIES_SE2_DIR = $BUILD_DIR/Libraries-SE2 +# JOBS = $(nproc) +# +# Requirements: git, meson (>=0.58), ninja, glslang (glslangValidator), +# pkg-config, gcc, g++, patchelf, and widl (the Wine IDL compiler, used by +# vkd3d-proton to generate its COM headers). On Debian/Ubuntu widl comes from +# the mingw-w64-tools package (as x86_64-w64-mingw32-widl, which this script +# shims onto PATH under the name meson looks for) or from wine64-tools. + +set -euo pipefail + +VKD3D_PROTON_COMMIT="${VKD3D_PROTON_COMMIT:-3dfc6f07d0953b1e8b41705275c2c59cc7374fc5}" +VKD3D_PROTON_REPO="${VKD3D_PROTON_REPO:-https://github.com/HansKristian-Work/vkd3d-proton.git}" + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" +BUILD_DIR_DEFAULT="$REPO_DIR/build" + +BUILD_DIR="${BUILD_DIR:-$BUILD_DIR_DEFAULT}" +LIBRARIES_SE2_DIR="${LIBRARIES_SE2_DIR:-$BUILD_DIR/Libraries-SE2}" +JOBS="${JOBS:-$(nproc)}" + +PATCHES_DIR="$REPO_DIR/Patches/vkd3d-proton" + +SRC_DIR="$BUILD_DIR/vkd3d-proton" +OUT_DIR="$BUILD_DIR/vkd3d-proton-out" +STAMP_FILE="$BUILD_DIR/vkd3d-proton.stamp" + +EXPECTED_LIBS=(libvkd3d-proton-d3d12.so libvkd3d-proton-d3d12core.so) + +CLEAN=0 +for arg in "$@"; do + case "$arg" in + --clean) CLEAN=1 ;; + -h|--help) sed -n '2,40p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;; + *) echo "ERROR: unknown arg: $arg" >&2; exit 2 ;; + esac +done + +# The patch series is part of the cache key: adding, editing or removing a +# patch must invalidate the cached build. LC_ALL=C pins the sort order so the +# hash does not depend on the host locale. +PATCH_FILES=() +if [ -d "$PATCHES_DIR" ]; then + while IFS= read -r p; do + PATCH_FILES+=("$p") + done < <(find "$PATCHES_DIR" -maxdepth 1 -name '*.patch' | LC_ALL=C sort) +fi + +if [ "${#PATCH_FILES[@]}" -gt 0 ]; then + PATCH_HASH="$(cat "${PATCH_FILES[@]}" | sha256sum | cut -d' ' -f1)" +else + PATCH_HASH="no-patches" +fi +STAMP_CONTENT="$VKD3D_PROTON_COMMIT patches=$PATCH_HASH" + +# ---- preflight -------------------------------------------------------------- + +for tool in git meson ninja glslangValidator pkg-config gcc g++ patchelf; do + command -v "$tool" >/dev/null 2>&1 || { + echo "ERROR: required tool not found in PATH: $tool" >&2 + exit 1 + } +done + +# vkd3d-proton's meson looks for `widl` (or `widl-stable`). Ubuntu's +# mingw-w64-tools ships it as x86_64-w64-mingw32-widl only, so when that is +# the one available, expose it to meson through a shim directory on PATH. +if ! command -v widl >/dev/null 2>&1 && ! command -v widl-stable >/dev/null 2>&1; then + if command -v x86_64-w64-mingw32-widl >/dev/null 2>&1; then + WIDL_SHIM_DIR="$BUILD_DIR/widl-shim" + mkdir -p "$WIDL_SHIM_DIR" + ln -sfn "$(command -v x86_64-w64-mingw32-widl)" "$WIDL_SHIM_DIR/widl" + export PATH="$WIDL_SHIM_DIR:$PATH" + else + echo "ERROR: widl (Wine IDL compiler) not found in PATH." >&2 + echo " Install mingw-w64-tools (Debian/Ubuntu) or wine64-tools." >&2 + exit 1 + fi +fi + +mkdir -p "$BUILD_DIR" "$LIBRARIES_SE2_DIR" + +# ---- cache check ------------------------------------------------------------ + +ALL_LIBS_PRESENT=1 +for lib in "${EXPECTED_LIBS[@]}"; do + [ -e "$LIBRARIES_SE2_DIR/$lib" ] || ALL_LIBS_PRESENT=0 +done + +if [ "$CLEAN" = "1" ]; then + rm -rf "$SRC_DIR" "$OUT_DIR" +elif [ "$ALL_LIBS_PRESENT" = "1" ] \ + && [ -f "$STAMP_FILE" ] \ + && [ "$(cat "$STAMP_FILE")" = "$STAMP_CONTENT" ]; then + echo "==> Cached build matches vkd3d-proton ${VKD3D_PROTON_COMMIT:0:12}; skipping rebuild" + echo "==> vkd3d-proton libs already in $LIBRARIES_SE2_DIR:" + ( cd "$LIBRARIES_SE2_DIR" && ls -1 libvkd3d-proton-*.so* ) + exit 0 +fi + +# ---- clone (cached) --------------------------------------------------------- +# The pin is a bare commit SHA, which a --branch shallow clone cannot fetch. +# GitHub allows fetching arbitrary reachable SHAs, so init + fetch-by-SHA +# gives a depth-1 checkout of exactly the pinned state. + +if [ ! -d "$SRC_DIR/.git" ]; then + echo "==> Fetching $VKD3D_PROTON_REPO @ ${VKD3D_PROTON_COMMIT:0:12} -> $SRC_DIR" + rm -rf "$SRC_DIR" + git init -q "$SRC_DIR" + git -C "$SRC_DIR" remote add origin "$VKD3D_PROTON_REPO" +fi +if ! git -C "$SRC_DIR" cat-file -e "$VKD3D_PROTON_COMMIT^{commit}" 2>/dev/null; then + git -C "$SRC_DIR" fetch --depth 1 origin "$VKD3D_PROTON_COMMIT" +fi +git -C "$SRC_DIR" -c advice.detachedHead=false checkout "$VKD3D_PROTON_COMMIT" +git -C "$SRC_DIR" submodule update --init --recursive --depth 1 + +# ---- reset to pristine, then apply the patch series ------------------------- +# The clone is cached across runs, so the tree is forced back to the pristine +# pinned state before the series is applied — a previous run's applied patches +# (or an edited series) would otherwise stack or conflict. + +echo "==> Resetting vkd3d-proton source tree to pristine ${VKD3D_PROTON_COMMIT:0:12}" +git -C "$SRC_DIR" checkout -- . +git -C "$SRC_DIR" clean -fdx --quiet +git -C "$SRC_DIR" submodule foreach --recursive --quiet \ + 'git checkout -- . && git clean -fdx --quiet' + +if [ "${#PATCH_FILES[@]}" -eq 0 ]; then + echo "==> No patches under $PATCHES_DIR; building pristine upstream" +fi +for p in ${PATCH_FILES[@]+"${PATCH_FILES[@]}"}; do + echo "==> Applying $(basename "$p")" + if ! git -C "$SRC_DIR" apply "$p"; then + echo "ERROR: patch failed to apply: $p" >&2 + echo " The series under Patches/vkd3d-proton/ needs a rebase" >&2 + echo " onto commit $VKD3D_PROTON_COMMIT. See docs/maintenance.md." >&2 + exit 1 + fi +done + +# ---- build ------------------------------------------------------------------ +# A plain native meson build produces the libvkd3d-proton-d3d12.so and +# libvkd3d-proton-d3d12core.so shared libraries. The install step is used so +# the outputs land in a predictable destdir, mirroring the DXVK build. + +rm -rf "$OUT_DIR" +mkdir -p "$OUT_DIR" + +echo "==> Building vkd3d-proton (native, release)" +( + cd "$SRC_DIR" + meson setup build-native \ + --buildtype release \ + --prefix "$OUT_DIR" \ + --libdir lib + ninja -C build-native -j "$JOBS" + meson install -C build-native --quiet +) + +# ---- locate + stage the .so outputs ----------------------------------------- + +echo "==> Staging vkd3d-proton libs into $LIBRARIES_SE2_DIR" +for lib in "${EXPECTED_LIBS[@]}"; do + src="$(find -L "$OUT_DIR" -type f -name "$lib" -print -quit)" + if [ -z "$src" ]; then + echo "ERROR: the build did not produce $lib under $OUT_DIR" >&2 + exit 1 + fi + install -m 0755 "$src" "$LIBRARIES_SE2_DIR/$lib" +done + +# ---- patch DT_RUNPATH=$ORIGIN onto each .so --------------------------------- +# Parity with the FFmpeg and DXVK payloads: ld.so resolves any sibling NEEDED +# entries (d3d12 -> d3d12core) via the loaded lib's own directory, so the +# consumer's launcher doesn't need to manipulate LD_LIBRARY_PATH. + +echo "==> Patching DT_RUNPATH=\$ORIGIN onto vkd3d-proton libs" +for lib in "${EXPECTED_LIBS[@]}"; do + patchelf --set-rpath '$ORIGIN' "$LIBRARIES_SE2_DIR/$lib" +done + +# ---- update cache stamp ----------------------------------------------------- + +printf '%s\n' "$STAMP_CONTENT" > "$STAMP_FILE" + +echo +echo "==> Staged vkd3d-proton libs into $LIBRARIES_SE2_DIR:" +( cd "$LIBRARIES_SE2_DIR" && ls -1 libvkd3d-proton-*.so* ) diff --git a/Vendor/README.md b/Vendor/README.md index ccb4f4a..e4c3c33 100644 --- a/Vendor/README.md +++ b/Vendor/README.md @@ -1,7 +1,7 @@ # Vendor blobs This directory contains the **proprietary** native libraries that this repo -ships inside its release archive. They are committed here instead of being +ships inside its release archives. They are committed here instead of being downloaded by the build pipeline because their distribution requires accepting per-vendor agreements that the maintainer has signed once, and the upstream download endpoints are gated behind logged-in partner portals (no @@ -15,7 +15,8 @@ to `main` publishes a release containing the updated blob. ### `libEOSSDK-Linux-Shipping.so` -The Linux x86_64 runtime of the **Epic Online Services SDK**. +The Linux x86_64 runtime of the **Epic Online Services SDK**. Ships in the +SE1 archive. * Source: -> your product -> SDK Downloads -> "EOS SDK for C" -> Linux build. @@ -27,7 +28,7 @@ The Linux x86_64 runtime of the **Epic Online Services SDK**. ### `libsteam_api.so` -The Linux x86_64 runtime of the **Steamworks SDK**. +The Linux x86_64 runtime of the **Steamworks SDK**. Ships in the SE1 archive. * Source: -> Steamworks SDK (`sdk/redistributable_bin/linux64/libsteam_api.so`). @@ -37,16 +38,39 @@ The Linux x86_64 runtime of the **Steamworks SDK**. Steamworks SDK source code is included; only the unmodified shipping `.so` is redistributed. +### `libfmod.so.14` and `libfmodstudio.so.14` + +The Linux x86_64 runtimes of the **FMOD Engine** (Core and Studio APIs). +Ship in the SE2 archive only — Space Engineers 1 does not use FMOD. + +* Source: (login required) -> FMOD Engine -> + Linux -> version **2.03.11**, matching the FMOD the game ships (verified + against the `FileVersion` resource of the game's `fmod.dll`: + 2.03.11 build 158528). The committed file names carry the upstream SONAMEs + (`libfmod.so.14`) for provenance; `build.sh` stages them into the archive + under the bare names (`libfmod.so`, `libfmodstudio.so`), binaries + unmodified. Release variants, **not** the `L` (logging) builds. +* License: proprietary; redistribution of the unmodified runtime is + permitted by the FMOD EULA. Shipped alongside as `LICENSES/FMOD-EULA.txt` + and `LICENSES/FMOD-NOTICE.txt` (sources under + [Licenses/se2/](../Licenses/se2/)). +* **Version rule:** the FMOD API is version-locked — the managed wrapper + inside SE2 is generated for the game's FMOD version, so these blobs must + match it at least to the minor release. When the game updates its FMOD, + update these in lockstep; if the SONAME digit changes, update the committed + file names and the copy step in `build.sh` together (the archive names stay + bare). See [docs/maintenance.md](../docs/maintenance.md). + ## Why these are committed (and the others are not) -The remaining libraries in the release archive (FFmpeg, DXVK, Steamworks.NET) -are built from source by the scripts under [Scripts/](../Scripts/) and -therefore do not need to be committed. EOS and Steamworks have no public -source and no publicly-fetchable binary, so this directory is the only -practical place for them. +The remaining libraries in the release archives (FFmpeg, DXVK, vkd3d-proton, +OpenAL, Steamworks.NET) are built from source by the scripts under +[Scripts/](../Scripts/) and therefore do not need to be committed. EOS, +Steamworks and FMOD have no public source and no publicly-fetchable binary, +so this directory is the only practical place for them. -The native wrapper libraries (`libD3DCompiler.so`, `libHavok.so`, -`libRecastDetour.so`, `libVRageNative.so`) are **not** part of this repo at -all — they are built and released by +The native wrapper libraries — SE1's `libD3DCompiler.so`, `libHavok.so`, +`libRecastDetour.so`, `libVRageNative.so`, and SE2's `libVRage.*.Native.so` +set — are **not** part of this repo at all: they are built and released by [CometWorks/linux-native-wrappers](https://github.com/CometWorks/linux-native-wrappers) and consumers fetch them from there directly. diff --git a/Vendor/libfmod.so.14 b/Vendor/libfmod.so.14 new file mode 100755 index 0000000..a7e8617 Binary files /dev/null and b/Vendor/libfmod.so.14 differ diff --git a/Vendor/libfmodstudio.so.14 b/Vendor/libfmodstudio.so.14 new file mode 100755 index 0000000..968bac6 Binary files /dev/null and b/Vendor/libfmodstudio.so.14 differ diff --git a/build.sh b/build.sh index 335eea4..7f008aa 100755 --- a/build.sh +++ b/build.sh @@ -2,22 +2,46 @@ # build.sh # # Top-level orchestrator for the Space Engineers Linux binary dependencies. -# Builds every library from source, stages the result in build/Libraries/, -# verifies the staged tree, and packages it as the release archive -# dist/linux-dependencies.tar.gz. +# Builds every library from source ONCE, stages the results in +# build/Libraries/ (Space Engineers 1), build/Libraries-SE2/ (Space +# Engineers 2) and build/Libraries-Steam/ (Steam integration), verifies the +# staged trees, and packages them as three release archives: +# +# dist/se1-dependencies.tar.gz SE1 (Pulsar for Linux, Magnetar) +# dist/se2-dependencies.tar.gz SE2 (Space Engineers 2 Linux port) +# dist/steam-dependencies.tar.gz Steamworks.NET.dll + libsteam_api.so, +# consumed alongside either of the above +# +# The SE1 archive's DXVK files are the patched build (Patches/dxvk/), shared +# byte-identically with the SE2 archive, and nothing is built twice. +# Everything new with the SE2 port (vkd3d-proton, FMOD) ships in the SE2 +# archive only; the Steam bits ship in their own archive so a Steamworks +# update does not republish the game-specific payloads. # # Pipeline (in order): # -# 1. Scripts/build_ffmpeg.sh FFmpeg 8.1 (libav*.so* / libsw*.so*) -# 2. Scripts/build_dxvk.sh DXVK Native v2.7.1 -# (libdxvk_d3d11.so + libdxvk_dxgi.so + .0 links) -# 3. Scripts/build_openal.sh OpenAL Soft 1.25.2 (libopenal.so*) -# 4. Scripts/build_steamworks_net.sh Steamworks.NET.dll -# 5. Vendor copy: libEOSSDK-Linux-Shipping.so + libsteam_api.so +# 1. Scripts/build_ffmpeg.sh FFmpeg 8.1 (libav*.so / libsw*.so) +# 2. Scripts/build_dxvk.sh DXVK Native v2.7.1 + Patches/dxvk/ +# (libdxvk_d3d11.so + libdxvk_dxgi.so) +# 3. Scripts/build_vkd3d_proton.sh vkd3d-proton (pinned commit) + +# Patches/vkd3d-proton/, staged straight +# into Libraries-SE2/ +# 4. Scripts/build_openal.sh OpenAL Soft 1.25.2 (libopenal.so) +# 5. Scripts/build_steamworks_net.sh Steamworks.NET.dll, staged straight +# into Libraries-Steam/ +# 6. Shared-artefact copy: the patched DXVK files from +# Libraries/ into Libraries-SE2/ +# 7. Vendor copy: libEOSSDK-Linux-Shipping.so -> SE1, +# libsteam_api.so -> Steam # (proprietary, committed under Vendor/) -# 6. License copy: Licenses/*.txt -> LICENSES/ subdir -# 7. Final assertion: every expected artefact is present -# 8. Package: dist/linux-dependencies.tar.gz +# 8. SE2 vendor copy: the FMOD runtime from Vendor/, staged +# under the bare names (libfmod.so + +# libfmodstudio.so) +# 9. License copy: Licenses/*.txt -> LICENSES/ (SE1); +# DXVK + Licenses/se2/*.txt -> LICENSES/ (SE2); +# Licenses/steam/*.txt -> LICENSES/ (Steam) +# 10. Final assertion: every expected artefact is present +# 11. Package: all three archives under dist/ # # The native wrapper libraries (libD3DCompiler.so, libHavok.so, # libRecastDetour.so, libVRageNative.so) are deliberately NOT part of this @@ -37,13 +61,15 @@ # final assertion is reported but not fatal and packaging is skipped. # # Env-var overrides (defaults shown): -# REPO_DIR = -# BUILD_DIR = $REPO_DIR/build -# LIBRARIES_DIR = $BUILD_DIR/Libraries -# OUTPUT_DIR = $REPO_DIR/dist -# VENDOR_DIR = $REPO_DIR/Vendor -# LICENSES_SRC = $REPO_DIR/Licenses -# JOBS = $(nproc) +# REPO_DIR = +# BUILD_DIR = $REPO_DIR/build +# LIBRARIES_DIR = $BUILD_DIR/Libraries +# LIBRARIES_SE2_DIR = $BUILD_DIR/Libraries-SE2 +# LIBRARIES_STEAM_DIR = $BUILD_DIR/Libraries-Steam +# OUTPUT_DIR = $REPO_DIR/dist +# VENDOR_DIR = $REPO_DIR/Vendor +# LICENSES_SRC = $REPO_DIR/Licenses +# JOBS = $(nproc) # # Requirements: see docs/building.md. In short: gcc, g++, make, meson, ninja, # glslangValidator, pkg-config, curl, tar, git, nasm (or yasm), patchelf, @@ -57,13 +83,17 @@ SCRIPTS_DIR="$SCRIPT_DIR/Scripts" REPO_DIR="${REPO_DIR:-$SCRIPT_DIR}" BUILD_DIR="${BUILD_DIR:-$REPO_DIR/build}" LIBRARIES_DIR="${LIBRARIES_DIR:-$BUILD_DIR/Libraries}" +LIBRARIES_SE2_DIR="${LIBRARIES_SE2_DIR:-$BUILD_DIR/Libraries-SE2}" +LIBRARIES_STEAM_DIR="${LIBRARIES_STEAM_DIR:-$BUILD_DIR/Libraries-Steam}" OUTPUT_DIR="${OUTPUT_DIR:-$REPO_DIR/dist}" VENDOR_DIR="${VENDOR_DIR:-$REPO_DIR/Vendor}" LICENSES_SRC="${LICENSES_SRC:-$REPO_DIR/Licenses}" -ARCHIVE_NAME="linux-dependencies.tar.gz" +ARCHIVE_NAME="se1-dependencies.tar.gz" +ARCHIVE_NAME_SE2="se2-dependencies.tar.gz" +ARCHIVE_NAME_STEAM="steam-dependencies.tar.gz" -export REPO_DIR BUILD_DIR LIBRARIES_DIR +export REPO_DIR BUILD_DIR LIBRARIES_DIR LIBRARIES_SE2_DIR LIBRARIES_STEAM_DIR # ---- arg parsing ------------------------------------------------------------ @@ -91,7 +121,7 @@ fi # Reject unknown step names. Without this a typo (--only=steamworks_net with an # underscore) matches nothing, silently skips every build, and reports only # that staging is incomplete. -STEP_NAMES="ffmpeg dxvk openal steamworks-net" +STEP_NAMES="ffmpeg dxvk vkd3d-proton openal steamworks-net" for spec in "$ONLY" "$SKIP"; do [ -n "$spec" ] || continue IFS=',' read -ra names <<< "$spec" @@ -124,7 +154,8 @@ want_step() { # ---- preflight -------------------------------------------------------------- -mkdir -p "$LIBRARIES_DIR/LICENSES" +mkdir -p "$LIBRARIES_DIR/LICENSES" "$LIBRARIES_SE2_DIR/LICENSES" \ + "$LIBRARIES_STEAM_DIR/LICENSES" [ -d "$VENDOR_DIR" ] || { echo "ERROR: $VENDOR_DIR not found." >&2 @@ -139,12 +170,14 @@ mkdir -p "$LIBRARIES_DIR/LICENSES" exit 1 } -echo "==> Repo dir : $REPO_DIR" -echo "==> Build dir : $BUILD_DIR" -echo "==> Staging dir : $LIBRARIES_DIR" -echo "==> Output dir : $OUTPUT_DIR" +echo "==> Repo dir : $REPO_DIR" +echo "==> Build dir : $BUILD_DIR" +echo "==> SE1 staging dir : $LIBRARIES_DIR" +echo "==> SE2 staging dir : $LIBRARIES_SE2_DIR" +echo "==> Steam staging dir : $LIBRARIES_STEAM_DIR" +echo "==> Output dir : $OUTPUT_DIR" -# ---- 1..4. per-dependency build scripts ------------------------------------ +# ---- 1..5. per-dependency build scripts ------------------------------------ run_step() { local name="$1"; shift @@ -163,62 +196,135 @@ run_step() { run_step ffmpeg "$SCRIPTS_DIR/build_ffmpeg.sh" run_step dxvk "$SCRIPTS_DIR/build_dxvk.sh" +run_step vkd3d-proton "$SCRIPTS_DIR/build_vkd3d_proton.sh" run_step openal "$SCRIPTS_DIR/build_openal.sh" run_step steamworks-net "$SCRIPTS_DIR/build_steamworks_net.sh" -# ---- 5. Vendor blobs -------------------------------------------------------- +# ---- 6. shared artefacts: patched DXVK -> Libraries-SE2/ -------------------- +# The patched DXVK libraries ship in BOTH archives but are built only once, +# into Libraries/. Copy them into the SE2 staging tree. Skipped file-by-file +# under --only / --skip filters, when the source files were not staged this +# run. echo echo "############################################################" -echo "# build: vendor blobs (Vendor/ -> Libraries/)" +echo "# build: shared artefacts (Libraries/ -> Libraries-SE2/)" echo "############################################################" -for blob in libEOSSDK-Linux-Shipping.so libsteam_api.so; do +SHARED_FILES=( + libdxvk_d3d11.so + libdxvk_dxgi.so +) +for f in "${SHARED_FILES[@]}"; do + if [ -e "$LIBRARIES_DIR/$f" ]; then + install -m 0755 "$LIBRARIES_DIR/$f" "$LIBRARIES_SE2_DIR/$f" + echo " copied $f" + elif [ "$FILTERED" = "1" ]; then + echo " skipped $f (not staged under the active --only/--skip filter)" + else + echo "ERROR: expected shared artefact missing: $LIBRARIES_DIR/$f" >&2 + exit 1 + fi +done + +# ---- 7. Vendor blobs -------------------------------------------------------- + +echo +echo "############################################################" +echo "# build: vendor blobs (Vendor/ -> Libraries/, Libraries-Steam/)" +echo "############################################################" +# libEOSSDK goes to the SE1 archive; libsteam_api ships in the Steam archive +# next to Steamworks.NET.dll, its managed binding. +for spec in "libEOSSDK-Linux-Shipping.so:$LIBRARIES_DIR" \ + "libsteam_api.so:$LIBRARIES_STEAM_DIR"; do + blob="${spec%%:*}" + dest="${spec#*:}" src="$VENDOR_DIR/$blob" if [ ! -f "$src" ]; then echo "ERROR: missing vendor blob: $src" >&2 echo " These SDKs are proprietary and must stay committed under Vendor/." >&2 exit 1 fi - install -m 0755 "$src" "$LIBRARIES_DIR/$blob" - echo " copied $blob" + install -m 0755 "$src" "$dest/$blob" + echo " copied $blob -> ${dest##*/}/" +done + +# ---- 8. SE2 vendor blobs (FMOD) --------------------------------------------- +# The proprietary FMOD Engine runtime (login-gated download, committed under +# Vendor/ like EOS and Steamworks). SE1 does not use FMOD, so it ships only +# in the SE2 archive. The committed files keep their upstream SONAME names +# (libfmod.so.14) for provenance, but the archive carries no version-suffixed +# filenames, so they are staged under the bare names. The binaries are NOT +# modified: libfmodstudio's internal NEEDED entry still references +# libfmod.so.14, so the consumer must load libfmod.so before libfmodstudio.so +# (see docs/consuming.md). The SE2 native wrappers are NOT here: like the SE1 +# wrappers, they are built and released by CometWorks/linux-native-wrappers +# and consumers fetch them separately. + +echo +echo "############################################################" +echo "# build: SE2 vendor blobs (Vendor/ -> Libraries-SE2/)" +echo "############################################################" +find "$LIBRARIES_SE2_DIR" -maxdepth 1 -name 'libfmod*.so*' -delete +for name in libfmod libfmodstudio; do + src="$VENDOR_DIR/$name.so.14" + if [ ! -f "$src" ]; then + echo "ERROR: missing vendor blob: $src" >&2 + echo " These SDKs are proprietary and must stay committed under Vendor/." >&2 + exit 1 + fi + install -m 0755 "$src" "$LIBRARIES_SE2_DIR/$name.so" + echo " copied $name.so.14 -> $name.so" done -# ---- 6. Licenses ------------------------------------------------------------ +# ---- 9. Licenses ------------------------------------------------------------ +# SE1 archive: every top-level Licenses/*.txt. SE2 archive: the shared DXVK +# licence plus the SE2-specific notices under Licenses/se2/. Steam archive: +# the notices under Licenses/steam/. The subdirectories exist precisely so +# the SE1 glob below does not pick their contents up. echo echo "############################################################" -echo "# build: licenses (Licenses/ -> Libraries/LICENSES/)" +echo "# build: licenses (Licenses/ -> Libraries*/LICENSES/)" echo "############################################################" shopt -s nullglob for f in "$LICENSES_SRC"/*.txt; do install -m 0644 "$f" "$LIBRARIES_DIR/LICENSES/$(basename "$f")" echo " copied $(basename "$f")" done +install -m 0644 "$LICENSES_SRC/DXVK-LICENSE.txt" \ + "$LIBRARIES_SE2_DIR/LICENSES/DXVK-LICENSE.txt" +echo " copied DXVK-LICENSE.txt (SE2)" +for f in "$LICENSES_SRC"/se2/*.txt; do + install -m 0644 "$f" "$LIBRARIES_SE2_DIR/LICENSES/$(basename "$f")" + echo " copied $(basename "$f") (SE2)" +done +for f in "$LICENSES_SRC"/steam/*.txt; do + install -m 0644 "$f" "$LIBRARIES_STEAM_DIR/LICENSES/$(basename "$f")" + echo " copied $(basename "$f") (Steam)" +done shopt -u nullglob -# ---- 7. final assertion ---------------------------------------------------- +# ---- 10. final assertion ---------------------------------------------------- # Confirm every artefact every consumer expects is present. Missing files here # are far easier to debug than a cryptic failure inside a consumer's build. # -# Keep this list in sync with docs/release-archive.md, which is the contract -# the consuming repos (Pulsar for Linux, Magnetar) rely on. +# Keep these lists in sync with docs/release-archive.md, which is the contract +# the consuming repos (Pulsar for Linux, Magnetar, the SE2 port) rely on. EXPECTED_FILES=( # FFmpeg - libavcodec.so libavcodec.so.62 libavcodec.so.62.28.100 - libavformat.so libavformat.so.62 libavformat.so.62.12.100 - libavutil.so libavutil.so.60 libavutil.so.60.26.100 - libswresample.so libswresample.so.6 libswresample.so.6.3.100 - libswscale.so libswscale.so.9 libswscale.so.9.5.100 - # DXVK - libdxvk_d3d11.so libdxvk_d3d11.so.0 - libdxvk_dxgi.so libdxvk_dxgi.so.0 + libavcodec.so + libavformat.so + libavutil.so + libswresample.so + libswscale.so + # DXVK (patched, shared with the SE2 archive) + libdxvk_d3d11.so + libdxvk_dxgi.so # OpenAL - libopenal.so libopenal.so.1 + libopenal.so # Vendor - libEOSSDK-Linux-Shipping.so libsteam_api.so - # Managed - Steamworks.NET.dll + libEOSSDK-Linux-Shipping.so # Licenses LICENSES/DXVK-LICENSE.txt LICENSES/EOS-NOTICE.txt @@ -228,10 +334,34 @@ EXPECTED_FILES=( LICENSES/OpenAL-Soft-NOTICES.txt LICENSES/OpenAL-Soft-README.txt LICENSES/README.txt +) + +EXPECTED_FILES_STEAM=( + Steamworks.NET.dll + libsteam_api.so + LICENSES/README.txt LICENSES/Steam-NOTICE.txt LICENSES/Steamworks.NET-LICENSE.txt ) +EXPECTED_FILES_SE2=( + # DXVK (patched, identical to the SE1 archive's copy) + libdxvk_d3d11.so + libdxvk_dxgi.so + # vkd3d-proton (patched) + libvkd3d-proton-d3d12.so libvkd3d-proton-d3d12core.so + # FMOD (vendor blobs staged under bare names) + libfmod.so + libfmodstudio.so + # Licenses + LICENSES/DXVK-LICENSE.txt + LICENSES/FMOD-EULA.txt + LICENSES/FMOD-NOTICE.txt + LICENSES/README.txt + LICENSES/VKD3D-LGPL-2.1.txt + LICENSES/vkd3d-proton-README.txt +) + MISSING=0 for rel in "${EXPECTED_FILES[@]}"; do if [ ! -e "$LIBRARIES_DIR/$rel" ]; then @@ -239,6 +369,18 @@ for rel in "${EXPECTED_FILES[@]}"; do MISSING=1 fi done +for rel in "${EXPECTED_FILES_SE2[@]}"; do + if [ ! -e "$LIBRARIES_SE2_DIR/$rel" ]; then + echo "MISSING: $LIBRARIES_SE2_DIR/$rel" >&2 + MISSING=1 + fi +done +for rel in "${EXPECTED_FILES_STEAM[@]}"; do + if [ ! -e "$LIBRARIES_STEAM_DIR/$rel" ]; then + echo "MISSING: $LIBRARIES_STEAM_DIR/$rel" >&2 + MISSING=1 + fi +done if [ "$MISSING" = "1" ]; then if [ "$FILTERED" = "1" ]; then echo "Note: --only/--skip filters were active; partial staging is expected." >&2 @@ -251,16 +393,19 @@ fi echo echo "==> All expected artefacts present in $LIBRARIES_DIR" ( cd "$LIBRARIES_DIR" && ls -lh | sed 's/^/ /' ) +echo +echo "==> All expected artefacts present in $LIBRARIES_SE2_DIR" +( cd "$LIBRARIES_SE2_DIR" && ls -lh | sed 's/^/ /' ) +echo +echo "==> All expected artefacts present in $LIBRARIES_STEAM_DIR" +( cd "$LIBRARIES_STEAM_DIR" && ls -lh | sed 's/^/ /' ) -# ---- 8. package ------------------------------------------------------------- -# The archive mirrors build/Libraries/ exactly: every library at the archive -# root plus a LICENSES/ subdir. Consumers extract it straight into their own -# Libraries staging folder, so any layout change here is a breaking change -# for them — see docs/release-archive.md. -# -# Symlinks are stored AS symlinks (tar's default), which is what keeps the -# libavcodec.so -> .so.62 -> .so.62.28.100 chain intact on extraction and the -# archive small. +# ---- 11. package ------------------------------------------------------------ +# Each archive mirrors its staging tree exactly: every library at the archive +# root plus a LICENSES/ subdir, no symlinks, no version-suffixed filenames. +# Consumers extract it straight into their own Libraries staging folder, so +# any layout change here is a breaking change for them — see +# docs/release-archive.md. if [ "$FILTERED" = "1" ]; then echo @@ -274,26 +419,34 @@ if [ "$DO_PACKAGE" = "0" ]; then exit 0 fi -echo -echo "############################################################" -echo "# build: packaging -> $OUTPUT_DIR/$ARCHIVE_NAME" -echo "############################################################" +package_archive() { + # package_archive + local staging="$1" archive="$2" + echo + echo "############################################################" + echo "# build: packaging -> $OUTPUT_DIR/$archive" + echo "############################################################" + rm -f "$OUTPUT_DIR/$archive" + # --sort=name + a fixed mtime/owner make the archive byte-reproducible for + # a given set of inputs, so an unchanged rebuild produces an identical file. + tar --sort=name \ + --owner=0 --group=0 --numeric-owner \ + --mtime='UTC 2020-01-01' \ + -czf "$OUTPUT_DIR/$archive" \ + -C "$staging" . + echo "==> Archive contents:" + tar -tzf "$OUTPUT_DIR/$archive" | sed 's/^/ /' +} mkdir -p "$OUTPUT_DIR" -rm -f "$OUTPUT_DIR/$ARCHIVE_NAME" - -# --sort=name + a fixed mtime/owner make the archive byte-reproducible for a -# given set of inputs, so an unchanged rebuild produces an identical file. -tar --sort=name \ - --owner=0 --group=0 --numeric-owner \ - --mtime='UTC 2020-01-01' \ - -czf "$OUTPUT_DIR/$ARCHIVE_NAME" \ - -C "$LIBRARIES_DIR" . -echo "==> Archive contents:" -tar -tzf "$OUTPUT_DIR/$ARCHIVE_NAME" | sed 's/^/ /' +package_archive "$LIBRARIES_DIR" "$ARCHIVE_NAME" +package_archive "$LIBRARIES_SE2_DIR" "$ARCHIVE_NAME_SE2" +package_archive "$LIBRARIES_STEAM_DIR" "$ARCHIVE_NAME_STEAM" echo echo "############################################################" echo "# DONE $(du -h "$OUTPUT_DIR/$ARCHIVE_NAME" | awk '{print $1}') $OUTPUT_DIR/$ARCHIVE_NAME" +echo "# DONE $(du -h "$OUTPUT_DIR/$ARCHIVE_NAME_SE2" | awk '{print $1}') $OUTPUT_DIR/$ARCHIVE_NAME_SE2" +echo "# DONE $(du -h "$OUTPUT_DIR/$ARCHIVE_NAME_STEAM" | awk '{print $1}') $OUTPUT_DIR/$ARCHIVE_NAME_STEAM" echo "############################################################" diff --git a/docs/README.md b/docs/README.md index 893d464..69ffd36 100644 --- a/docs/README.md +++ b/docs/README.md @@ -22,6 +22,8 @@ Linux](https://github.com/CometWorks/Pulsar) and ./build.sh ``` -That builds everything from source, stages it in `build/Libraries/`, and -packages `dist/linux-dependencies.tar.gz`. See [building.md](building.md) for +That builds everything from source once, stages `build/Libraries/` (SE1), +`build/Libraries-SE2/` (SE2) and `build/Libraries-Steam/` (Steam), and +packages `dist/se1-dependencies.tar.gz`, `dist/se2-dependencies.tar.gz` and +`dist/steam-dependencies.tar.gz`. See [building.md](building.md) for prerequisites and options. diff --git a/docs/architecture.md b/docs/architecture.md index c83d23c..c230095 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -28,20 +28,38 @@ for the PE-loader shims. ### In scope — built or shipped here -| Artefact | Origin | -| --- | --- | -| `libavcodec` / `libavformat` / `libavutil` / `libswresample` / `libswscale` | FFmpeg 8.1, built from the upstream release tarball | -| `libdxvk_d3d11.so`, `libdxvk_dxgi.so` | DXVK Native 2.7.1, built from the upstream git tag | -| `libopenal.so` | OpenAL Soft 1.25.2, built from the upstream release tarball | -| `Steamworks.NET.dll` | Built from a pinned commit of rlabrecque/Steamworks.NET | -| `libEOSSDK-Linux-Shipping.so` | Proprietary Epic blob, committed under `Vendor/` | -| `libsteam_api.so` | Proprietary Valve blob, committed under `Vendor/` | -| `LICENSES/*.txt` | Third-party licence texts and attribution, committed under `Licenses/` | +| Artefact | Archives | Origin | +| --- | --- | --- | +| `libavcodec` / `libavformat` / `libavutil` / `libswresample` / `libswscale` | SE1 | FFmpeg 8.1, built from the upstream release tarball | +| `libdxvk_d3d11.so`, `libdxvk_dxgi.so` | both | DXVK Native 2.7.1 + the `Patches/dxvk/` series, built once from the upstream git tag | +| `libvkd3d-proton-d3d12.so`, `libvkd3d-proton-d3d12core.so` | SE2 | vkd3d-proton at a pinned commit + the `Patches/vkd3d-proton/` series | +| `libopenal.so` | SE1 | OpenAL Soft 1.25.2, built from the upstream release tarball | +| `Steamworks.NET.dll` | Steam | Built from a pinned commit of rlabrecque/Steamworks.NET | +| `libEOSSDK-Linux-Shipping.so` | SE1 | Proprietary Epic blob, committed under `Vendor/` | +| `libsteam_api.so` | Steam | Proprietary Valve blob, committed under `Vendor/` | +| `libfmod.so`, `libfmodstudio.so` | SE2 | Proprietary Firelight blobs, committed under `Vendor/` | +| `LICENSES/*.txt` | all | Third-party licence texts and attribution, committed under `Licenses/` | + +Three policies shape the archive split: + +* **Patched libraries are built once and shipped as the same bytes + everywhere they appear.** DXVK (see `Patches/dxvk/`) ships identically in + the SE1 and SE2 archives — one build to test, no variant drift. +* **Everything new with the SE2 port ships only in the SE2 archive.** + vkd3d-proton and FMOD go to `se2-dependencies.tar.gz` alone, so SE1 + consumers never download or ship libraries they cannot use. +* **The Steam bits ship in their own archive.** `Steamworks.NET.dll` and + `libsteam_api.so` belong together (the managed binding and its native + runtime) and are game-agnostic, so `steam-dependencies.tar.gz` is + consumed alongside either game archive and a Steamworks update republishes + neither game payload. ### Out of scope — deliberately not here -**The native wrapper libraries** (`libD3DCompiler.so`, `libHavok.so`, -`libRecastDetour.so`, `libVRageNative.so`) are built and released by +**The native wrapper libraries** — SE1's PE-loader shims +(`libD3DCompiler.so`, `libHavok.so`, `libRecastDetour.so`, +`libVRageNative.so`) and SE2's `libVRage.*.Native.so` set — are built and +released by [CometWorks/linux-native-wrappers](https://github.com/CometWorks/linux-native-wrappers). Consumers fetch that release directly, in addition to this one. @@ -57,9 +75,13 @@ releases, a wrapper fix reaches consumers as soon as its own CI is green. CometWorks/linux-dependencies CometWorks/linux-native-wrappers (this repo) (PE-loader shims) | | - | release asset: | release asset: - | linux-dependencies.tar.gz | linux-native-wrappers.tar.gz - | | + | release assets: | release asset: + | se1-dependencies.tar.gz | linux-native-wrappers.tar.gz + | se2-dependencies.tar.gz | + | steam-dependencies.tar.gz | + | (the SE2 asset is consumed by the SE2 | + | port, not shown below; the Steam asset | + | is consumed by all of them) | +---------------------+-----------------------+ | fetched at build time by @@ -104,14 +126,17 @@ a `DllNotFoundException` inside Space Engineers three repos downstream. ### `DT_RUNPATH=$ORIGIN` on every native library The shipped libraries reference each other (`libavformat` needs -`libavcodec.so.62`, which needs `libavutil.so.60`). Without an rpath, glibc -resolves those through the system search path, which does not include the +`libavcodec`, which needs `libavutil`). Without an rpath, glibc resolves +those through the system search path, which does not include the executable's own directory — so they would either fail to load or, worse, silently bind to a different-ABI FFmpeg from the host's `ld.so.cache`. -Baking `$ORIGIN` into `DT_RUNPATH` makes each library find its siblings next to -itself, which means the consumer's launcher does not have to manipulate -`LD_LIBRARY_PATH` at all. +Baking `$ORIGIN` into `DT_RUNPATH` makes each library find its siblings next +to itself, which means the consumer's launcher does not have to manipulate +`LD_LIBRARY_PATH` at all. Because the archives carry only bare, unversioned +file names, the built libraries' intra-bundle `NEEDED` entries are rewritten +to those bare names at staging time — otherwise they would ask the loader +for SONAME-named files that no longer ship. ### FFmpeg is built with almost everything disabled @@ -123,7 +148,7 @@ the `ldd` allow-list in `build_ffmpeg.sh` is what keeps it that way. See ### The proprietary blobs are committed, not downloaded -EOS and Steamworks have no public source and no publicly fetchable binary — the -downloads sit behind logged-in partner portals. Committing the two `.so` files -under `Vendor/` is the only practical option; see +EOS, Steamworks and FMOD have no public source and no publicly fetchable +binary — the downloads sit behind logged-in partner portals. Committing the +`.so` files under `Vendor/` is the only practical option; see [Vendor/README.md](../Vendor/README.md) for their provenance and licensing. diff --git a/docs/building.md b/docs/building.md index 6b24c53..4a17eda 100644 --- a/docs/building.md +++ b/docs/building.md @@ -10,7 +10,7 @@ opening a pull request. On Debian / Ubuntu: ```bash -sudo apt install build-essential pkg-config make cmake curl tar git nasm patchelf binutils zlib1g-dev meson ninja-build glslang-tools libvulkan-dev libpulse-dev libasound2-dev libpipewire-0.3-dev +sudo apt install build-essential pkg-config make cmake curl tar git nasm patchelf binutils zlib1g-dev meson ninja-build glslang-tools libvulkan-dev mingw-w64-tools libpulse-dev libasound2-dev libpipewire-0.3-dev ``` You also need the **.NET SDK** (8.0 or newer, with the `net8.0` targeting pack) @@ -22,7 +22,8 @@ What each group is for: | Tools | Needed by | | --- | --- | | `build-essential`, `pkg-config`, `make`, `nasm`, `zlib1g-dev` | FFmpeg (`nasm` provides the x86 SIMD assembler; `yasm` also works) | -| `meson`, `ninja-build`, `glslang-tools`, `libvulkan-dev` | DXVK Native | +| `meson`, `ninja-build`, `glslang-tools`, `libvulkan-dev` | DXVK Native and vkd3d-proton | +| `mingw-w64-tools` | `widl`, the Wine IDL compiler vkd3d-proton generates its COM headers with (`wine64-tools` works too; the build script shims whichever name is found) | | `cmake` | the pinned SDL3 that DXVK compiles against, and OpenAL Soft | | `libpulse-dev`, `libasound2-dev`, `libpipewire-0.3-dev` | OpenAL's audio backends — see below | | `patchelf`, `binutils` | `DT_RUNPATH=$ORIGIN` patching and the `readelf` verification | @@ -39,8 +40,11 @@ for. ./build.sh ``` -Builds every dependency, stages `build/Libraries/`, verifies the staged tree, -and packages `dist/linux-dependencies.tar.gz`. +Builds every dependency once, stages `build/Libraries/` (SE1), +`build/Libraries-SE2/` (SE2) and `build/Libraries-Steam/` (Steam), verifies +the staged trees, and packages `dist/se1-dependencies.tar.gz`, +`dist/se2-dependencies.tar.gz` and `dist/steam-dependencies.tar.gz`. The +patched DXVK binaries are copied into the SE2 tree rather than rebuilt. A cold first run takes roughly 10–20 minutes, dominated by FFmpeg and DXVK. Subsequent runs are near-instant when nothing changed — see @@ -52,7 +56,7 @@ Subsequent runs are near-instant when nothing changed — see | --- | --- | | `--clean` | Passes `--clean` to every sub-build: wipes cached source and build trees and rebuilds from scratch | | `--no-package` | Stages `build/Libraries/` but skips the tarball | -| `--only=ffmpeg,dxvk` | Runs only the listed sub-builds. Valid names: `ffmpeg`, `dxvk`, `openal`, `steamworks-net`. An unknown name is rejected rather than silently skipping everything | +| `--only=ffmpeg,dxvk` | Runs only the listed sub-builds. Valid names: `ffmpeg`, `dxvk`, `vkd3d-proton`, `openal`, `steamworks-net`. An unknown name is rejected rather than silently skipping everything | | `--skip=dxvk` | Runs every sub-build except the listed ones | | `-h`, `--help` | Prints the header comment | @@ -70,6 +74,8 @@ packaging is skipped. | `REPO_DIR` | directory containing `build.sh` | | `BUILD_DIR` | `$REPO_DIR/build` | | `LIBRARIES_DIR` | `$BUILD_DIR/Libraries` | +| `LIBRARIES_SE2_DIR` | `$BUILD_DIR/Libraries-SE2` | +| `LIBRARIES_STEAM_DIR` | `$BUILD_DIR/Libraries-Steam` | | `OUTPUT_DIR` | `$REPO_DIR/dist` | | `VENDOR_DIR` | `$REPO_DIR/Vendor` | | `LICENSES_SRC` | `$REPO_DIR/Licenses` | @@ -87,8 +93,10 @@ The scripts under `Scripts/` are standalone and can be run directly: ./Scripts/build_ffmpeg.sh --clean ``` -They stage into the same `build/Libraries/` folder. This is usually the fastest -way to iterate on one dependency. +They stage into the same `build/Libraries/` folder (`build_vkd3d_proton.sh` +into `build/Libraries-SE2/` and `build_steamworks_net.sh` into +`build/Libraries-Steam/`, matching the archive each ships in). This is +usually the fastest way to iterate on one dependency. ## Caching @@ -98,7 +106,8 @@ rerun does no work: | Dependency | Cache | Invalidated by | | --- | --- | --- | | FFmpeg | `build/ffmpeg-8.1.tar.xz` (download), `build/ffmpeg-8.1/` (source), `build/ffmpeg-8.1/_build/` (objects) | A changed `configure` flag set, tracked by a hash in `_build/.configure_flags`; otherwise an incremental `make` | -| DXVK | `build/dxvk/` (clone), `build/dxvk.stamp` | A changed `DXVK_VERSION` | +| DXVK | `build/dxvk/` (clone), `build/dxvk.stamp` | A changed `DXVK_VERSION` **or** any change to the `Patches/dxvk/*.patch` series (its SHA-256 is part of the stamp) | +| vkd3d-proton | `build/vkd3d-proton/` (clone), `build/vkd3d-proton.stamp` | A changed `VKD3D_PROTON_COMMIT` **or** any change to the `Patches/vkd3d-proton/*.patch` series | | SDL3 | `build/SDL/` (clone), `build/sdl3-prefix/`, `build/sdl3.stamp` | A changed `SDL3_VERSION` | | OpenAL | `build/openal-soft-1.25.2.tar.bz2`, `build/openal-soft-1.25.2/`, `build/openal.stamp` | A changed `OPENAL_VERSION` | | Steamworks.NET | `build/Steamworks.NET/` (clone), `build/steamworks-net.stamp` | A changed `STEAMWORKS_NET_COMMIT` | @@ -111,6 +120,7 @@ To force specific work: ```bash rm build/dxvk.stamp # rebuild DXVK only +rm build/vkd3d-proton.stamp # rebuild vkd3d-proton only rm -rf build/ffmpeg-8.1 # re-extract and reconfigure FFmpeg rm build/ffmpeg-8.1.tar.xz # re-download the FFmpeg tarball ./build.sh --clean # rebuild everything from scratch @@ -121,13 +131,16 @@ rm build/ffmpeg-8.1.tar.xz # re-download the FFmpeg tarball After a successful run: ``` -build/Libraries/ staged tree (what the archive mirrors) -dist/linux-dependencies.tar.gz the release archive +build/Libraries/ staged SE1 tree (what the SE1 archive mirrors) +build/Libraries-SE2/ staged SE2 tree +build/Libraries-Steam/ staged Steam tree +dist/se1-dependencies.tar.gz the SE1 release archive +dist/se2-dependencies.tar.gz the SE2 release archive +dist/steam-dependencies.tar.gz the Steam release archive ``` -Both directories are gitignored. See -[release-archive.md](release-archive.md) for the exact contents and the -guarantees consumers rely on. +All of it is gitignored. See [release-archive.md](release-archive.md) for the +exact contents and the guarantees consumers rely on. ## Troubleshooting @@ -135,9 +148,9 @@ guarantees consumers rely on. above says which dependency needs it. **`ERROR: expected lib not built: libavcodec.so.62`** — FFmpeg's SOVERSION -moved, which means the pinned version changed or upstream bumped it. See -[maintenance.md](maintenance.md); the `EXPECTED_SOVER` table and Pulsar's -`LibraryVersionMap` have to move together. +moved in the build tree, which means the pinned version changed or upstream +bumped it (an ABI break for the consumers even though the shipped file names +stay bare). See [maintenance.md](maintenance.md) for what to update. **OpenAL: `Required backend not found`** — a backend's development headers are missing. Install `libpulse-dev`, `libasound2-dev` and `libpipewire-0.3-dev`. @@ -157,6 +170,15 @@ real versioned file, not a symlink. not produce everything `build.sh` expects. The lines above it name each missing file. -**`ERROR: missing vendor blob:`** — `Vendor/libEOSSDK-Linux-Shipping.so` or -`Vendor/libsteam_api.so` is absent. These are committed; a fresh clone has -them, so this usually means a partial checkout. +**`ERROR: missing vendor blob:`** — a blob under `Vendor/` is absent. These +are committed; a fresh clone has them, so this usually means a partial +checkout. + +**`ERROR: patch failed to apply:`** — a patch under `Patches/dxvk/` or +`Patches/vkd3d-proton/` no longer applies to the pinned upstream version, +usually after a version bump. Rebase the series; see +[maintenance.md](maintenance.md#bumping-dxvk). + +**`ERROR: widl (Wine IDL compiler) not found in PATH.`** — install +`mingw-w64-tools` (Debian/Ubuntu) or `wine64-tools`; vkd3d-proton needs it +to generate its COM headers. diff --git a/docs/consuming.md b/docs/consuming.md index 1610150..85b6aa5 100644 --- a/docs/consuming.md +++ b/docs/consuming.md @@ -1,11 +1,16 @@ # Consuming the release Both [Pulsar for Linux](https://github.com/CometWorks/Pulsar) (`linux` branch) -and [Magnetar](https://github.com/CometWorks/magnetar) fetch the release -archive at build time instead of building these dependencies themselves. +and [Magnetar](https://github.com/CometWorks/magnetar) fetch the SE1 release +archive (`se1-dependencies.tar.gz`) **and** the Steam archive +(`steam-dependencies.tar.gz`, carrying `Steamworks.NET.dll` + +`libsteam_api.so`) at build time instead of building these dependencies +themselves. The SE2 archive (`se2-dependencies.tar.gz`) is for the Space +Engineers 2 Linux port — see [the SE2 archive](#the-se2-archive) below. Each consumer has a `Scripts/fetch_linux_dependencies.sh` that resolves a -release and downloads `linux-dependencies.tar.gz`. The two copies are +release and downloads the assets it needs (both game-relevant archives come +from the same release, so one tag pin covers them). The two copies are deliberately near-identical, and they mirror the existing `fetch_native_wrappers.sh` in both repos so there is one fetch pattern to understand rather than two. @@ -25,15 +30,15 @@ cache that its `build.sh` then copies the wanted files out of. staged. If it matches the resolved tag and every expected file is already present, the download is skipped. 3. **Clear what the previous release staged.** `tar` only overlays, so without - this a release that renames a file — an FFmpeg SOVERSION bump, say — would - leave the old one behind and the consumer would ship both. Pulsar extracts - into a directory it shares with the native-wrapper fetch, so it records a + this a release that renames or removes a file would leave the old one + behind and the consumer would ship both. Pulsar extracts into a directory + it shares with the native-wrapper fetch, so it records a `build/linux-dependencies.manifest` of the paths each release owns and removes only those. Magnetar extracts into a directory of its own and can - simply wipe it. -4. **Download and extract**, preserving symlinks — `tar -xz`, never a - dereferencing copy, or the `libavcodec.so` → `.so.62` → `.so.62.28.100` - chain that FFmpeg's SONAME resolution needs would be flattened. + simply wipe it. (This is what makes the bare-filename layout transition + safe: the versioned files and symlinks of older releases are cleared.) +4. **Download and extract.** The archives contain only real files under + bare, unversioned names — no symlink chains to preserve. 5. **Verify** that the files that consumer needs actually arrived. If the GitHub API is unreachable but a cached copy is already staged, the @@ -56,21 +61,22 @@ LINUX_DEPENDENCIES_TAG=v1.0.7 ./build.sh ## Pulsar for Linux -`Scripts/build_dependencies.sh` orchestrates two fetches and nothing else: +`Scripts/build_dependencies.sh` orchestrates the fetches and nothing else: ``` -Scripts/fetch_linux_dependencies.sh -> FFmpeg, DXVK, OpenAL, Steamworks.NET, - EOS + Steam blobs, LICENSES/ +Scripts/fetch_linux_dependencies.sh -> se1-dependencies.tar.gz (FFmpeg, + DXVK, OpenAL, EOS, LICENSES/) + + steam-dependencies.tar.gz + (Steamworks.NET.dll, libsteam_api.so) Scripts/fetch_native_wrappers.sh -> libD3DCompiler.so, libHavok.so, libRecastDetour.so, libVRageNative.so ``` -Both land directly in `build/Libraries/`, and the script's final assertion — -the full expected-file list, unchanged from before this split — confirms the -combined result. `Legacy/Legacy.csproj` copies that folder next to the apphost -in its `AfterBuild` and `AfterPublish` targets, and `Shared/Shared.csproj` -references `build/Libraries/Steamworks.NET.dll`; neither needed any change, -because `build/Libraries/` still ends up with exactly the same contents. +Everything lands directly in `build/Libraries/`, and the script's final +assertion — the full expected-file list — confirms the combined result. +`Legacy/Legacy.csproj` copies that folder next to the apphost in its +`AfterBuild` and `AfterPublish` targets, and `Shared/Shared.csproj` +references `build/Libraries/Steamworks.NET.dll`. Pulsar's own `Scripts/build_ffmpeg.sh`, `build_dxvk.sh` and `build_steamworks_net.sh` are gone, along with its `Vendor/` directory and @@ -79,10 +85,12 @@ compiling FFmpeg and DXVK. ## Magnetar -Magnetar is headless, so it takes `Steamworks.NET.dll` and the two proprietary -runtimes but not FFmpeg, DXVK or OpenAL — those stay unused in -`build/linux-deps/` and never reach the bundle. Its `build.sh` fetches both -releases and then stages only the files it wants into `build/Libraries/`. +Magnetar is headless, so from the SE1 archive it takes only +`libEOSSDK-Linux-Shipping.so` — FFmpeg, DXVK and OpenAL stay unused in +`build/linux-deps/` and never reach the bundle — and it takes the whole +Steam archive (`Steamworks.NET.dll` + `libsteam_api.so`). Its `build.sh` +fetches the releases and then stages only the files it wants into +`build/Libraries/`. That applies to the licence texts too. Copying `LICENSES/` wholesale would put FFmpeg, DXVK and OpenAL attribution into a bundle containing none of those @@ -111,6 +119,29 @@ Every library is probed in the same order, most specific first: So a locally supplied `.so` still wins over the release, and `build.sh` prints exactly which path each file came from. +## The SE2 archive + +The Space Engineers 2 Linux port consumes `se2-dependencies.tar.gz`, +which carries the patched DXVK build (byte-identical to the SE1 archive's +copy), the patched vkd3d-proton build, and the FMOD Engine runtime — see +[release-archive.md](release-archive.md#layout-se2-archive) for the exact +contents. It follows the same fetch pattern (same release, second asset name) +and the same rules: extract with symlink-preserving `tar`, keep `LICENSES/` +next to the binaries. The SE2 native wrappers (`libVRage.*.Native.so`) come +from the linux-native-wrappers release, fetched separately — the same split +as for SE1. + +Two SE2-specific notes: + +* The FMOD blobs ship **unmodified** (no patchelf) under the bare names, so + `libfmodstudio.so`'s internal `NEEDED` entry still references the upstream + SONAME `libfmod.so.14`, which no shipped file carries. **Load `libfmod.so` + (globally) before `libfmodstudio.so`** — the already-loaded library then + satisfies the reference by SONAME. +* The asset exists only from the release that introduced it onward; a fetch + script should fail with a clear message when the asset is missing from an + older pinned tag. + ## Adding a new consumer 1. Copy `fetch_linux_dependencies.sh` from either repo. diff --git a/docs/dependencies.md b/docs/dependencies.md index 5c0b738..9fa469c 100644 --- a/docs/dependencies.md +++ b/docs/dependencies.md @@ -1,18 +1,24 @@ # Dependencies -Every library in the release archive, where it comes from, and how it is +Every library in the release archives, where it comes from, and how it is pinned. To change any of these, see [maintenance.md](maintenance.md). ## Summary -| Dependency | Version / pin | Licence | Built by | -| --- | --- | --- | --- | -| FFmpeg | 8.1 (release tarball) | LGPL-2.1-or-later | `Scripts/build_ffmpeg.sh` | -| DXVK Native | tag `v2.7.1` | zlib | `Scripts/build_dxvk.sh` | -| OpenAL Soft | 1.25.2 (release tarball) | LGPL-2.0-or-later | `Scripts/build_openal.sh` | -| Steamworks.NET | commit `68e72a49caf03a07722d4d4b471bbc7c0785f80b` | MIT | `Scripts/build_steamworks_net.sh` | -| EOS SDK | vendor blob (manual) | proprietary (Epic) | committed under `Vendor/` | -| Steamworks SDK | vendor blob (manual) | proprietary (Valve) | committed under `Vendor/` | +Every library is built (or staged) **once**. The SE1 archive keeps exactly +its pre-SE2 library set; its DXVK files are the patched build, shared +byte-identically with the SE2 archive. + +| Dependency | Archives | Version / pin | Licence | Built by | +| --- | --- | --- | --- | --- | +| FFmpeg | SE1 | 8.1 (release tarball) | LGPL-2.1-or-later | `Scripts/build_ffmpeg.sh` | +| DXVK Native + `Patches/dxvk/` series | both | tag `v2.7.1` + patch-series hash | zlib | `Scripts/build_dxvk.sh` | +| vkd3d-proton + `Patches/vkd3d-proton/` series | SE2 | commit `3dfc6f07…` + patch-series hash | LGPL-2.1 | `Scripts/build_vkd3d_proton.sh` | +| OpenAL Soft | SE1 | 1.25.2 (release tarball) | LGPL-2.0-or-later | `Scripts/build_openal.sh` | +| Steamworks.NET | Steam | commit `68e72a49caf03a07722d4d4b471bbc7c0785f80b` | MIT | `Scripts/build_steamworks_net.sh` | +| EOS SDK | SE1 | vendor blob (manual) | proprietary (Epic) | committed under `Vendor/` | +| Steamworks SDK | Steam | vendor blob (manual) | proprietary (Valve) | committed under `Vendor/` | +| FMOD Engine | SE2 | vendor blob (manual), 2.03.11 to match the game | proprietary (Firelight) | committed under `Vendor/` | `Scripts/build_sdl3.sh` builds SDL3 3.4.12 as well, but nothing from it is shipped — it exists only so DXVK has headers to compile against. See @@ -22,19 +28,22 @@ shipped — it exists only so DXVK has headers to compile against. See ## FFmpeg 8.1 -**Produces:** `libavcodec.so.62`, `libavformat.so.62`, `libavutil.so.60`, -`libswresample.so.6`, `libswscale.so.9`, each with an unversioned `.so` alias -and a fully-versioned real file. +**Produces:** `libavcodec.so`, `libavformat.so`, `libavutil.so`, +`libswresample.so`, `libswscale.so` — one real file each under the bare +name (the archives carry no symlinks and no version-suffixed filenames). +The SONAMEs inside the binaries stay as upstream produced them +(`libavcodec.so.62`, …), but the cross-FFmpeg `NEEDED` entries are rewritten +to the bare names at staging time so `DT_RUNPATH=$ORIGIN` resolves siblings +against the files actually shipped. **Source:** `https://ffmpeg.org/releases/ffmpeg-8.1.tar.xz`, downloaded and cached under `build/`. -**Consumed by:** Pulsar's audio and video playback, through FFmpeg.AutoGen 8.1. -The SOVERSIONs are not incidental — `ClientPlugin/Audio/MySdlAudioInterop.cs` -in Pulsar contains a `LibraryVersionMap` that names them explicitly, so a -SOVERSION bump on either side without the other produces a -`DllNotFoundException` at runtime. `build_ffmpeg.sh` has an `EXPECTED_SOVER` -table that fails the build if the versions shift. +**Consumed by:** Pulsar's audio and video playback, through FFmpeg.AutoGen 8.1, +loading the libraries by their bare file names. The upstream SOVERSIONs are +still pinned: `build_ffmpeg.sh` has an `EXPECTED_SOVER` table that fails the +build if they shift, because a shift means an upstream ABI bump that the +consumers' FFmpeg.AutoGen version must match. ### Why the build is configured the way it is @@ -94,17 +103,21 @@ pointer accurate. --- -## DXVK Native 2.7.1 +## DXVK Native 2.7.1 (patched) -**Produces:** `libdxvk_d3d11.so` and `libdxvk_dxgi.so`, each with a `.so.0` -SONAME symlink. +**Produces:** `libdxvk_d3d11.so` and `libdxvk_dxgi.so` (bare names, no +SONAME symlinks; `libdxvk_d3d11`'s `NEEDED` reference to the dxgi library is +rewritten from the SONAME to the bare name), built once with the +[Patches/dxvk/](../Patches/dxvk/) series applied and shipped identically in +both archives. **Source:** `https://github.com/doitsujin/dxvk.git` at tag `v2.7.1`, shallow clone with submodules, cached under `build/dxvk/`. -**Consumed by:** Pulsar only. Magnetar is headless and does not need a D3D11 -implementation. (The archive is shared, so Magnetar simply ignores these two -files — see [consuming.md](consuming.md).) +**Consumed by:** Pulsar and the Space Engineers 2 Linux port. Magnetar is +headless and does not need a D3D11 implementation. (The SE1 archive is +shared, so Magnetar simply ignores these files — see +[consuming.md](consuming.md).) **How it is built:** by shelling out to upstream's own `package-native.sh` helper with `--64-only --no-package`, rather than re-implementing the meson @@ -147,14 +160,73 @@ Both choices were verified to be neutral: DXVK built against the pinned, console-only 3.4.12 is byte-identical to DXVK built against a full system SDL3 3.5.0. -**Caching:** `build/dxvk.stamp` records the built version. A rerun with the -same `DXVK_VERSION` and all outputs present skips the build entirely. +### The patch series + +The series under [Patches/dxvk/](../Patches/dxvk/) is applied onto the +pristine tag before every build. The patches are source-level fixes for DXVK +bugs the Space Engineers clients hit; fixing them here replaces what would +otherwise be a much larger set of managed (Harmony) runtime patches in the +Linux compatibility layers. The rationale for each patch is documented in +`Patches/dxvk/README.md` alongside its provenance. The most important one +makes `WCHAR` 16-bit (the Windows ABI) so `IDXGIAdapter::GetDesc*` cannot +overrun the caller's Windows-layout buffers. + +Mechanics worth knowing: + +* **Pristine base every run.** The cached clone is reset + (`git checkout -- .` + `git clean -fdx`, including submodules) before the + series is applied, so patches never stack across runs. This forfeits ninja + incrementality — the price of a guaranteed clean base. +* **The series is part of the cache key.** `build/dxvk.stamp` records + ` patches=`, so adding, editing or removing + a patch triggers a rebuild. An empty series is valid and builds pristine + upstream. +* **A patch that fails to apply fails the build**, naming the patch — the + signal that a `DXVK_VERSION` bump needs the series rebased. + +--- + +## vkd3d-proton (patched, SE2 archive only) + +**Produces:** `libvkd3d-proton-d3d12.so` and `libvkd3d-proton-d3d12core.so`, +built with the [Patches/vkd3d-proton/](../Patches/vkd3d-proton/) series +applied and staged straight into `build/Libraries-SE2/`. + +**Source:** `https://github.com/HansKristian-Work/vkd3d-proton.git` at commit +`3dfc6f07d0953b1e8b41705275c2c59cc7374fc5`, fetched by SHA (depth 1) with +submodules, cached under `build/vkd3d-proton/`. The pin is a commit rather +than a tag because the patch series was developed and tested against exactly +this upstream state. + +**Consumed by:** the Space Engineers 2 client, whose renderer is Direct3D 12 +(VRage3 Render12). Space Engineers 1 is Direct3D 11 and never shipped a +D3D12 layer, so vkd3d-proton stays out of the SE1 archive — the SE1 library +set is unchanged from before the SE2 split. + +**How it is built:** a plain native meson build (`--buildtype release`), +installed into `build/vkd3d-proton-out/` and staged from there. vkd3d-proton +generates its COM headers with `widl` (the Wine IDL compiler); the build +script accepts `widl`, `widl-stable`, or Ubuntu's +`x86_64-w64-mingw32-widl` from the `mingw-w64-tools` package, shimming the +latter onto `PATH` under the name meson expects. + +The patch series, cache stamp, pristine-reset and failure behaviour follow +the same rules as DXVK above; the patches themselves (a DXGI adapter-parent +fix required for `CreateSwapChainForHwnd`, and an env-gated llvmpipe FP64 +override used only by the CPU-rendering test harness) are documented in +`Patches/vkd3d-proton/README.md`. + +Being LGPL-2.1, the SE2 archive carries `LICENSES/VKD3D-LGPL-2.1.txt` plus +`LICENSES/vkd3d-proton-README.txt` with build provenance and relinking notes +— the same obligation pattern as FFmpeg. --- ## OpenAL Soft 1.25.2 -**Produces:** `libopenal.so.1`, with an unversioned `libopenal.so` alias. +**Produces:** `libopenal.so` — the real file under the bare name. The SONAME +inside the binary remains `libopenal.so.1` (asserted at build time) but no +file is named after it; consumers load the library by file name. **Source:** `https://openal-soft.org/openal-releases/openal-soft-1.25.2.tar.bz2`, downloaded and cached under `build/`. A tarball URL is mutable, so unlike the @@ -162,8 +234,8 @@ git-tag clones elsewhere the pin here is a SHA-256 checksum, verified on every run. **Consumed by:** Pulsar only. Space Engineers' Linux audio goes through -Silk.NET.OpenAL (used by se-linux-compat), which dlopens `libopenal.so.1` at -runtime. Magnetar is headless and does not stage it. +Silk.NET.OpenAL (used by se-linux-compat), loading the bundled `libopenal.so` +by file name. Magnetar is headless and does not stage it. **Why it lives here.** It used to be handled three different ways depending on the bundle: compiled from source inside Pulsar's Flatpak manifest, and left to @@ -198,16 +270,19 @@ hard-requires that specific audio stack. ### Post-build verification -The **SONAME is asserted** to be `libopenal.so.1`. Silk.NET dlopens by SONAME, -so a bump would leave the bundled copy unused while the application silently -fell back to the host's — or found none at all. `DT_RUNPATH=$ORIGIN` is patched -on and re-checked, as for FFmpeg and DXVK. +The **SONAME is asserted** to be `libopenal.so.1`. The shipped file is the +bare `libopenal.so` either way, but a SONAME bump signals an upstream +major-version (ABI) change that the consumers should review rather than pick +up silently. `DT_RUNPATH=$ORIGIN` is patched on and re-checked, as for +FFmpeg and DXVK. --- ## Steamworks.NET -**Produces:** `Steamworks.NET.dll` (managed, `net8.0`). +**Produces:** `Steamworks.NET.dll` (managed, `net8.0`), staged into +`build/Libraries-Steam/` and shipped in the Steam archive next to +`libsteam_api.so`, the native runtime it P/Invokes. **Source:** `https://github.com/rlabrecque/Steamworks.NET.git` at commit `68e72a49caf03a07722d4d4b471bbc7c0785f80b`, built from @@ -239,13 +314,31 @@ Two proprietary runtimes are committed under `Vendor/` rather than built: Needed by both consumers: Pulsar for the client's EOS integration, and Magnetar because `MySteamService.UpdateNetworkThread` drives `MyEOSNetworking` even under Steam-only networking. -* **`libsteam_api.so`** — the Steamworks SDK runtime. +* **`libsteam_api.so`** — the Steamworks SDK runtime, shipped in the Steam + archive next to `Steamworks.NET.dll`. Neither has a public source repository or a publicly fetchable binary; both downloads are gated behind logged-in partner portals. Updating them is a manual maintainer task documented in [maintenance.md](maintenance.md) and in [Vendor/README.md](../Vendor/README.md). +A third proprietary runtime ships in the SE2 archive only: + +* **`libfmod.so`, `libfmodstudio.so`** — the FMOD Engine runtime + (Core + Studio), version **2.03.11** to match the FMOD the game ships. + Committed under `Vendor/` with the upstream SONAME file names + (`libfmod.so.14`) for provenance, staged into the archive under the bare + names, binaries unmodified. The FMOD API is version-locked: SE2's managed + wrapper is generated for the game's FMOD version, so these must track it + at least to the minor release. SE1 does not use FMOD. + +Provenance and update rules: [Vendor/README.md](../Vendor/README.md). + +The SE2 native wrappers (`libVRage.*.Native.so`) are **not** shipped here — +like the SE1 PE-loader wrappers, they are built and released by +[CometWorks/linux-native-wrappers](https://github.com/CometWorks/linux-native-wrappers) +and consumers fetch them separately. + --- ## Licences diff --git a/docs/maintenance.md b/docs/maintenance.md index 8193201..931bade 100644 --- a/docs/maintenance.md +++ b/docs/maintenance.md @@ -19,36 +19,51 @@ Every push to `main` publishes a new public release, so the normal flow is: 1. Set `FFMPEG_VERSION` in `Scripts/build_ffmpeg.sh`. 2. Build. If the SOVERSIONs moved, the script fails with `expected lib not built: …` — that failure is the point. -3. On a SOVERSION change, update **all** of these together: - * `EXPECTED_SOVER` in `Scripts/build_ffmpeg.sh` - * `EXPECTED_FILES` in `build.sh` (the fully-versioned filenames too) - * the file list in [release-archive.md](release-archive.md) - * the version table in `Licenses/FFmpeg-README.txt` - * **Pulsar's `LibraryVersionMap`** in - `ClientPlugin/Audio/MySdlAudioInterop.cs` — FFmpeg.AutoGen resolves the - libraries by SOVERSION, so a mismatch is a runtime - `DllNotFoundException`, not a build error. +3. On a SOVERSION change, update `EXPECTED_SOVER` in + `Scripts/build_ffmpeg.sh` and update the version table in + `Licenses/FFmpeg-README.txt`. The archive file names are the bare, + unversioned ones, so `EXPECTED_FILES` and the consumers' file lists do + not change — but a SOVERSION shift is an upstream ABI bump, so confirm + the FFmpeg.AutoGen version Pulsar uses matches the new FFmpeg major + version before shipping it. 4. Check the `ldd` allow-list still passes. A new upstream release sometimes enables something by default that the disable list did not anticipate. -5. Confirm the FFmpeg.AutoGen version Pulsar uses still matches the FFmpeg - major version. - -The full-version filenames (`libavcodec.so.62.28.100`) change on almost every -FFmpeg release even when the SOVERSION does not, so expect step 3's file lists -to need editing regardless. ## Bumping DXVK 1. Set `DXVK_VERSION` in `Scripts/build_dxvk.sh` to the new tag (without the leading `v`; the script adds it). 2. Build. The stamp file invalidates automatically. -3. If upstream ever renames `package-native.sh` or changes its arguments, the +3. **Rebase the patch series.** If any patch under `Patches/dxvk/` no longer + applies, the build fails naming the patch. Regenerate the series against + the new tag (apply on a scratch clone, resolve, re-export with `git diff` + / `git format-patch`) and update the provenance table in + `Patches/dxvk/README.md`. +4. If upstream ever renames `package-native.sh` or changes its arguments, the build fails at that call — adjust the invocation rather than re-implementing the meson build. -4. DXVK's Vulkan requirements move over time. A newer DXVK may need a newer +5. DXVK's Vulkan requirements move over time. A newer DXVK may need a newer `libvulkan-dev` on the runner and a newer Vulkan driver on users' machines; check upstream's release notes before bumping across a major version. +## Bumping vkd3d-proton + +Same shape as DXVK: set `VKD3D_PROTON_COMMIT` in +`Scripts/build_vkd3d_proton.sh` (a full 40-character SHA), build, rebase +`Patches/vkd3d-proton/` if a patch stops applying, and update its README's +provenance notes. The current pin is the upstream state the SE2 port's patch +series was developed against, so treat a bump as requiring an SE2 smoke test. + +## Changing a patch series + +Add, edit or remove `Patches//NNNN-*.patch` files; each series' hash is +part of its dependency's cache stamp, so the next build rebuilds that +dependency automatically. The patched DXVK ships **in both archives** (built +once, copied), so a DXVK patch change affects SE1 and SE2 consumers alike — +test accordingly; vkd3d-proton ships in the SE2 archive only. For every +patch, record in the series' README.md what it fixes and where it came from. +Patches are applied with `git apply` in byte-wise filename order. + ## Bumping SDL3 SDL3 is not shipped — it only supplies headers for the DXVK build. Set @@ -65,11 +80,11 @@ against much newer headers than the SDL3 in the wild is still worth avoiding. 1. Set `OPENAL_VERSION` **and** `OPENAL_SHA256` in `Scripts/build_openal.sh`. The tarball URL is mutable, so the checksum is the pin — a version bump without a matching checksum fails the download verification, by design. -2. Build. If upstream bumps the SONAME past `libopenal.so.1`, the script fails - with an explicit message; update `EXPECTED_SONAME` there, `EXPECTED_FILES` - in `build.sh`, the file list in `release-archive.md`, and Pulsar's - expected-file lists and `/app/lib` symlink together. Silk.NET dlopens by - SONAME, so a mismatch means the bundled library is silently unused. +2. Build. If upstream bumps the SONAME past `libopenal.so.1`, the script + fails with an explicit message; update `EXPECTED_SONAME` there. The + shipped file name stays the bare `libopenal.so`, so no file list changes + — but a SONAME bump is an upstream ABI break, so review the consumers + before shipping it. 3. Check the `ldd` allow-list still passes. A new backend that links rather than dlopens would show up there. 4. Update the version in `Licenses/OpenAL-Soft-README.txt`, and re-copy @@ -105,12 +120,32 @@ manually maintained. Redistribution here relies on agreements the maintainers have accepted; see [Vendor/README.md](../Vendor/README.md). +## Updating the FMOD blobs (SE2 archive) + +`Vendor/libfmod.so.14` and `Vendor/libfmodstudio.so.14` are proprietary and +manually maintained like the blobs above — but version-locked to the game: +the FMOD wrapper inside Space Engineers 2 is generated for the FMOD version +the game ships, so the blobs must match it at least to the minor release. + +1. Find the game's FMOD version: + `strings -el "/fmod.dll" | grep -A1 FileVersion` +2. Download that FMOD Engine version for Linux from + (login required). +3. Copy the two x86_64 release-variant runtimes under their SONAME file + names — the exact paths and rules are in + [Vendor/README.md](../Vendor/README.md). The archive names stay the bare + `libfmod.so` / `libfmodstudio.so` regardless; if the SONAME digit changed + (a new FMOD major/minor), update the committed file names and the copy + step in `build.sh` together, and mention the new preload SONAME in + [consuming.md](consuming.md#the-se2-archive). +4. Commit and push. + ## Changing the archive layout -The archive layout is a contract with the consumers — see -[release-archive.md](release-archive.md). If you change it: +The archive layouts are a contract with the consumers — see +[release-archive.md](release-archive.md). If you change one: -1. Update `EXPECTED_FILES` in `build.sh`. +1. Update `EXPECTED_FILES` (SE1) or `EXPECTED_FILES_SE2` in `build.sh`. 2. Update the layout and file-list sections of `release-archive.md`. 3. Update both consumers' `fetch_linux_dependencies.sh` **before** merging here, because they will pick the new archive up on their next build with no @@ -138,6 +173,6 @@ note it in the release notes. * [ ] `docs/dependencies.md` version table updated * [ ] `docs/release-archive.md` file list updated if any filename changed * [ ] Licence texts still accurate for the new version -* [ ] Downstream impact considered (Pulsar's `LibraryVersionMap`, Magnetar's - expected files) +* [ ] Downstream impact considered (consumer expected-file lists, ABI + changes behind unchanged bare file names) * [ ] Draft release from the PR tested against at least one consumer diff --git a/docs/release-archive.md b/docs/release-archive.md index 41fd87e..531c5f0 100644 --- a/docs/release-archive.md +++ b/docs/release-archive.md @@ -1,56 +1,49 @@ -# The release archive +# The release archives This document is the **contract** between this repo and its consumers. Pulsar and Magnetar extract the archive straight into their own `build/Libraries/` staging folder, so its layout is an API: changing it breaks them. -## Asset +## Assets -Each release carries a single asset: +Each release carries three assets: ``` -linux-dependencies.tar.gz +se1-dependencies.tar.gz Space Engineers 1 (Pulsar for Linux, Magnetar) +se2-dependencies.tar.gz Space Engineers 2 (the SE2 Linux port) +steam-dependencies.tar.gz Steamworks.NET.dll + libsteam_api.so, consumed + alongside either game archive ``` -Roughly 24 MB, gzip-compressed tar, built by `build.sh`. +All are gzip-compressed tars built by `build.sh` (roughly 24 MB, 7 MB and +250 kB). The patched DXVK binaries are **byte-identical across the two game +archives** — built once, copied into both staging trees. -Download the latest with: +Download the latest with (same pattern for the other two assets): ```bash -curl -fL -o linux-dependencies.tar.gz \ - https://github.com/CometWorks/linux-dependencies/releases/latest/download/linux-dependencies.tar.gz +curl -fL -o se1-dependencies.tar.gz \ + https://github.com/CometWorks/linux-dependencies/releases/latest/download/se1-dependencies.tar.gz ``` -## Layout +## Layout (SE1 archive) -Every library sits at the archive root; licence texts sit in a single -`LICENSES/` subdirectory. There is no top-level wrapper directory, so -`tar -xzf linux-dependencies.tar.gz -C ` is the whole staging +Every library sits at the archive root as a **single real file under its +bare, unversioned name** — no symlinks, no version-suffixed filenames. +Licence texts sit in a single `LICENSES/` subdirectory. There is no +top-level wrapper directory, so +`tar -xzf se1-dependencies.tar.gz -C ` is the whole staging step. ``` -libavcodec.so -> libavcodec.so.62.28.100 (symlink) -libavcodec.so.62 -> libavcodec.so.62.28.100 (symlink) -libavcodec.so.62.28.100 -libavformat.so -> libavformat.so.62.12.100 (symlink) -libavformat.so.62 -> libavformat.so.62.12.100 (symlink) -libavformat.so.62.12.100 -libavutil.so -> libavutil.so.60.26.100 (symlink) -libavutil.so.60 -> libavutil.so.60.26.100 (symlink) -libavutil.so.60.26.100 -libswresample.so -> libswresample.so.6.3.100 (symlink) -libswresample.so.6 -> libswresample.so.6.3.100 (symlink) -libswresample.so.6.3.100 -libswscale.so -> libswscale.so.9.5.100 (symlink) -libswscale.so.9 -> libswscale.so.9.5.100 (symlink) -libswscale.so.9.5.100 -libdxvk_d3d11.so -libdxvk_d3d11.so.0 -> libdxvk_d3d11.so (symlink) -libdxvk_dxgi.so -libdxvk_dxgi.so.0 -> libdxvk_dxgi.so (symlink) +libavcodec.so +libavformat.so +libavutil.so +libswresample.so +libswscale.so +libdxvk_d3d11.so (patched, see Patches/dxvk/) +libdxvk_dxgi.so (patched) libEOSSDK-Linux-Shipping.so -libsteam_api.so -Steamworks.NET.dll LICENSES/DXVK-LICENSE.txt LICENSES/EOS-NOTICE.txt LICENSES/FFmpeg-LGPL-2.1.txt @@ -59,16 +52,19 @@ LICENSES/OpenAL-Soft-LGPL-2.0.txt LICENSES/OpenAL-Soft-NOTICES.txt LICENSES/OpenAL-Soft-README.txt LICENSES/README.txt -LICENSES/Steam-NOTICE.txt -LICENSES/Steamworks.NET-LICENSE.txt ``` ### Guarantees -* **Symlinks are stored as symlinks**, not dereferenced into duplicate files. - Extract with GNU `tar` (or anything that preserves them) so the - `libavcodec.so` → `.so.62` → `.so.62.28.100` chain survives. This is also why - the archive is 23 MB rather than several times that. +* **No symlinks and no version-suffixed filenames.** Each library is one + real file under its bare name. The SONAMEs *inside* the built binaries are + left as upstream produced them (useful for identifying the version with + `readelf`), but no file is named after them. +* **Intra-bundle `NEEDED` entries reference the bare file names.** The + built libraries' cross-references (libavformat → libavcodec → libavutil, + libdxvk_d3d11 → libdxvk_dxgi) are rewritten with + `patchelf --replace-needed` at staging time, so together with + `DT_RUNPATH=$ORIGIN` they resolve against the files actually present. * **Every native `.so` has `DT_RUNPATH=$ORIGIN`**, so the libraries find each other next to themselves and no `LD_LIBRARY_PATH` manipulation is needed. * **The FFmpeg libraries depend only on glibc and libz.** Verified by an `ldd` @@ -82,21 +78,79 @@ LICENSES/Steamworks.NET-LICENSE.txt `build.sh` asserts this exact file list before packaging. If you change the layout, update both that `EXPECTED_FILES` array and this document. +## Layout (SE2 archive) + +Same conventions: everything at the archive root, licences under `LICENSES/`, +extraction into the consumer's staging directory is the whole staging step. + +``` +libdxvk_d3d11.so identical to the SE1 archive's copy +libdxvk_dxgi.so identical to the SE1 archive's copy +libvkd3d-proton-d3d12.so patched, see Patches/vkd3d-proton/ (SE2 only) +libvkd3d-proton-d3d12core.so patched (SE2 only) +libfmod.so FMOD Core API runtime (unmodified vendor blob) +libfmodstudio.so FMOD Studio API runtime (unmodified vendor blob) +LICENSES/DXVK-LICENSE.txt +LICENSES/FMOD-EULA.txt +LICENSES/FMOD-NOTICE.txt +LICENSES/README.txt +LICENSES/VKD3D-LGPL-2.1.txt +LICENSES/vkd3d-proton-README.txt +``` + +The FMOD blobs are shipped **unmodified** (no patchelf), matching how the +EOS and Steamworks blobs are handled — only their file names are the bare +ones. That means `libfmodstudio.so`'s internal `NEEDED` entry still +references the upstream SONAME `libfmod.so.14`, which no shipped file +carries: **the consumer must load `libfmod.so` before `libfmodstudio.so`** +(the already-loaded library then satisfies the reference by SONAME). The +built libraries carry `DT_RUNPATH=$ORIGIN` and bare-name `NEEDED` entries as +in the SE1 archive. The SE2 native wrappers (`libVRage.*.Native.so`) are +**not** in this archive; like the SE1 wrappers, they come from +[CometWorks/linux-native-wrappers](https://github.com/CometWorks/linux-native-wrappers). + +`build.sh` asserts the corresponding `EXPECTED_FILES_SE2` array before +packaging, same as the SE1 list. + +## Layout (Steam archive) + +Same conventions. Consumed alongside either game archive by any bundle that +integrates with Steam; the two files belong together (the managed binding +and the native runtime it P/Invokes). + +``` +Steamworks.NET.dll +libsteam_api.so +LICENSES/README.txt +LICENSES/Steam-NOTICE.txt +LICENSES/Steamworks.NET-LICENSE.txt +``` + +`build.sh` asserts the corresponding `EXPECTED_FILES_STEAM` array before +packaging. + ## Which files each consumer needs -The archive is shared, so each consumer extracts all of it and uses the subset -it needs. Nothing breaks from staging an unused library, and keeping one -archive avoids a client/server split that would have to be maintained forever. +The SE1 archive is shared, so each SE1 consumer extracts all of it and uses +the subset it needs. Nothing breaks from staging an unused library, and +keeping one archive avoids a client/server split that would have to be +maintained forever. | File | Pulsar (client) | Magnetar (server) | | --- | :---: | :---: | | FFmpeg libraries | yes | no | | DXVK libraries | yes | no | | OpenAL library | yes | no | -| `Steamworks.NET.dll` | yes | yes | -| `libsteam_api.so` | yes | yes | | `libEOSSDK-Linux-Shipping.so` | yes | yes | | `LICENSES/` | yes | the subset covering what it ships | +| Steam archive (`Steamworks.NET.dll` + `libsteam_api.so`) | yes | yes | + +The SE2 archive is consumed only by the Space Engineers 2 Linux port, which +takes all of it (plus the Steam archive). The archives are kept separate — +rather than subdirectories of one archive — so consumers never download or +ship payload they cannot use, and a Steamworks update republishes neither +game payload; the DXVK files shared between the game archives are the same +bytes in both. ## Versioning and tags