mirror of
https://github.com/willfaust/Madeira.git
synced 2026-10-02 00:28:44 +08:00
Licensing: publication boundary, corrected notice, complete build scripts
- The converter exception now takes effect when the copyright holder completes an adoption line in LICENSE-EXCEPTION.md, which must happen before any public push, since distribution begins with the push and not with a release tag. .githooks/pre-push refuses a push to a non-local remote while the file is a draft (enable with core.hooksPath). The fork copies and the contribution terms follow that adoption. The file also notes that whether the repository's co-location of the converter, or the built app, forms a combined work is for the legal review. - The bundled third-party notice no longer claims that recipients can rebuild and relink; it states where the source and the documented procedure are and that the clean-checkout rebuild has not been demonstrated. - docs/BUILDING.md no longer refers to prose or private notes for steps: build/wine-pe/build-ntdll.sh (configure, build, strip, pad to SizeOfImage + 0x50000, copy), build/fex-arm64ec/build.sh and build/fex-ios/build.sh (first-run configure with the recorded options, then build and copy). Verification status per step is recorded. - Submodule pointers advance to the forks' wording commits. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
aaee87bd54
commit
a6361ecddd
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
# Refuse to push to a non-local remote while the converter exception is still a
|
||||
# draft. Distribution starts with the push, not with a tag. Enable with:
|
||||
# git config core.hooksPath .githooks
|
||||
url="$2"
|
||||
case "$url" in /*|file:*) exit 0 ;; esac
|
||||
if grep -q "^Adopted on: *$" LICENSE-EXCEPTION.md 2>/dev/null || grep -q "DRAFT" LICENSE-EXCEPTION.md 2>/dev/null; then
|
||||
echo "pre-push: LICENSE-EXCEPTION.md is still a draft (adoption line not completed); refusing to publish to $url" >&2
|
||||
exit 1
|
||||
fi
|
||||
+1
-1
@@ -21,6 +21,6 @@ Madeira links with Apple's proprietary Metal Shader Converter library and
|
||||
Apple system frameworks. Contributions to this repository are accepted under
|
||||
GPL-3.0-or-later **with the Madeira Converter Exception, version 1** (the
|
||||
additional permission in `LICENSE-EXCEPTION.md`, a draft of 2026-09-16 that
|
||||
takes effect only when adopted in a tagged release), so that the combination
|
||||
takes effect when its adoption line is completed, before any public push), so that the combination
|
||||
can be conveyed. By submitting a contribution you
|
||||
agree that your contribution carries that additional permission too.
|
||||
|
||||
+1
-1
Submodule FEX updated: c75a94e0ef...c2af5574dd
+17
-6
@@ -1,16 +1,25 @@
|
||||
# Additional permission for the Apple Metal Shader Converter (GPL-3.0 section 7)
|
||||
|
||||
DRAFT prepared 2026-09-16 for review. NOT IN EFFECT until adopted in a
|
||||
tagged release; every copy of this text in the forks and the runtime is
|
||||
provisional in the same way. See "Scope and authority" for what it can and
|
||||
cannot cover.
|
||||
DRAFT prepared 2026-09-16 for review. NOT IN EFFECT until the copyright
|
||||
holder completes the adoption line below. Distribution begins with the first
|
||||
push to a public remote, not with a release tag, so the line must be
|
||||
completed BEFORE any public push (the repository's `.githooks/pre-push`
|
||||
refuses a remote push while this file is a draft; enable it with
|
||||
`git config core.hooksPath .githooks`). Every copy of this text in the
|
||||
forks and the runtime follows this adoption. See "Scope and authority" for
|
||||
what it can and cannot cover.
|
||||
|
||||
Adopted on:
|
||||
By:
|
||||
|
||||
(Both blank = draft. Once completed, remove the word DRAFT from this file.)
|
||||
|
||||
Madeira is licensed under the GNU General Public License, version 3 or (at
|
||||
your option) any later version (see `COPYING`). The following additional
|
||||
permission applies to the parts of Madeira whose copyright is held by the
|
||||
Madeira authors (see "Scope and authority"):
|
||||
|
||||
### Madeira Converter Exception, version 1 (DRAFT of 2026-09-16; not in effect until adopted)
|
||||
### Madeira Converter Exception, version 1 (DRAFT of 2026-09-16; in effect from the adoption date above)
|
||||
|
||||
Additional permission under GNU GPL version 3 section 7.
|
||||
|
||||
@@ -53,7 +62,9 @@ It does NOT cover, and nothing here changes:
|
||||
Madeira-authored patches reapplied under LGPL-2.1-or-later, documented in
|
||||
`docs/wine-lgpl-provenance.md`;
|
||||
- the Apple libraries themselves. The converter library is tracked in this
|
||||
repository and distributed only under Apple's agreement
|
||||
repository (whether that co-location, or the built app, forms a combined
|
||||
work with the GPL code is a question for the legal review, not settled by
|
||||
this file) and it is distributed only under Apple's agreement
|
||||
(`app/Madeira/d3d12/METAL-SHADER-CONVERTER-AGREEMENT.txt`, section 2.B:
|
||||
distribution "for the sole purpose of shader conversion").
|
||||
|
||||
|
||||
@@ -29,9 +29,11 @@ Dynamically loaded at runtime:
|
||||
(d3d12/LICENSE-metal-shader-converter-headers.txt).
|
||||
|
||||
LGPL notice: this application uses the LGPL-licensed libraries above. Their
|
||||
complete corresponding source is in the Madeira repository, and the
|
||||
application's own source there allows a recipient to rebuild and relink it
|
||||
with modified versions of those libraries (the recipient rebuild procedure
|
||||
is documented in docs/LICENSING.md, where its verification status is also
|
||||
recorded). Reverse engineering the combined work for debugging such
|
||||
complete corresponding source, and the application's own source and build
|
||||
scripts, are in the Madeira repository. The procedure for rebuilding the
|
||||
application against modified versions of those libraries is documented in
|
||||
docs/BUILDING.md in that repository, together with the inputs it needs that
|
||||
the repository does not contain and the verification status of each step;
|
||||
as of 2026-09-16 that end-to-end rebuild has not been demonstrated from a
|
||||
clean checkout. Reverse engineering the combined work for debugging such
|
||||
modifications is permitted.
|
||||
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
# Configure (first time) and build the ARM64EC FEX module (libarm64ecfex.dll,
|
||||
# shipped as xtajit64.dll). Options mirror the development build's CMakeCache.
|
||||
set -eu
|
||||
R="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
export PATH="$R/toolchains/llvm-mingw-20260421-ucrt-macos-universal/bin:$PATH"
|
||||
B="$R/FEX/build-arm64ec"
|
||||
if [ ! -f "$B/CMakeCache.txt" ]; then
|
||||
cmake -S "$R/FEX" -B "$B" -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_TOOLCHAIN_FILE="$R/FEX/Data/CMake/toolchain_mingw.cmake" \
|
||||
-DENABLE_FEX_ALLOCATOR=ON -DENABLE_JEMALLOC_GLIBC_ALLOC=ON -DENABLE_OFFLINE_RUNTIME=ON \
|
||||
-DBUILD_FEXCONFIG=ON -DENABLE_CLANG_THUNKS=ON -DENABLE_CCACHE=ON \
|
||||
-DBUILD_TESTING=OFF -DBUILD_THUNKS=OFF -DENABLE_ASSERTIONS=OFF
|
||||
fi
|
||||
cmake --build "$B" --target arm64ecfex
|
||||
cp "$B/Bin/libarm64ecfex.dll" "$R/app/Madeira/arm64ec-windows/xtajit64.dll" && ls -l "$R/app/Madeira/arm64ec-windows/xtajit64.dll"
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# Configure (first time) and build the FEXCore static libraries the app links
|
||||
# (FEX/build-ios/FEXCore/Source/*.a and External/*). Options mirror the
|
||||
# development build's CMakeCache.
|
||||
set -eu
|
||||
R="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
B="$R/FEX/build-ios"
|
||||
if [ ! -f "$B/CMakeCache.txt" ]; then
|
||||
cmake -S "$R/FEX" -B "$B" -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 \
|
||||
-DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_DEPLOYMENT_TARGET=17.0 -DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_TESTING=OFF -DBUILD_THUNKS=OFF -DBUILD_FEXCONFIG=OFF -DBUILD_FEX_LINUX_TESTS=OFF \
|
||||
-DENABLE_FEX_ALLOCATOR=OFF -DENABLE_ASSERTIONS=OFF -DENABLE_CLANG_THUNKS=ON -DENABLE_CCACHE=ON
|
||||
fi
|
||||
cmake --build "$B" --target FEXCore FEXCore_Base
|
||||
ls "$B/FEXCore/Source/"*.a
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
# Build the ARM64EC PE ntdll from the wine submodule and post-process it the way
|
||||
# the app needs: strip, then pad with zeros to SizeOfImage + 0x50000 (the loader
|
||||
# maps the file image; the padding is the slack the iOS mapping path relies on).
|
||||
# Other PE modules: `make -C dlls/<name>` in the same build tree, then copy the
|
||||
# .dll from dlls/<name>/arm64ec-windows/ to app/Madeira/arm64ec-windows/ (no
|
||||
# strip/pad for those). Requires the llvm-mingw toolchain (docs/BUILDING.md).
|
||||
set -eu
|
||||
R="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
TC="$R/toolchains/llvm-mingw-20260421-ucrt-macos-universal/bin"
|
||||
export PATH="$TC:$PATH"
|
||||
B="$R/wine/build-arm64ec"
|
||||
if [ ! -f "$B/config.status" ]; then
|
||||
mkdir -p "$B" && cd "$B" && ../configure --enable-archs=arm64ec --without-x --disable-tests
|
||||
fi
|
||||
cd "$B" && make -C dlls/ntdll
|
||||
SRC="$B/dlls/ntdll/arm64ec-windows/ntdll.dll"; OUT="$R/app/Madeira/arm64ec-windows/ntdll.dll"
|
||||
cp "$SRC" "$OUT.tmp"
|
||||
"$TC/arm64ec-w64-mingw32-strip" "$OUT.tmp"
|
||||
python3 - "$OUT.tmp" <<'PY'
|
||||
import struct, sys
|
||||
p = sys.argv[1]; d = open(p, 'rb').read()
|
||||
pe = struct.unpack_from('<I', d, 0x3c)[0]
|
||||
soi = struct.unpack_from('<I', d, pe + 24 + 56)[0] # OptionalHeader.SizeOfImage
|
||||
assert len(d) == soi, "stripped size %d != SizeOfImage %d" % (len(d), soi)
|
||||
open(p, 'ab').write(b'\0' * 0x50000)
|
||||
print("ntdll.dll: %d bytes = SizeOfImage %d + 0x50000" % (soi + 0x50000, soi))
|
||||
PY
|
||||
mv "$OUT.tmp" "$OUT"; ls -l "$OUT"
|
||||
+3
-3
@@ -35,12 +35,12 @@ git-ignored and consumed by the app project.
|
||||
also tracked). Verified: built on the development machine; not re-run
|
||||
from a clean checkout.
|
||||
2. FEX (submodule, branch ios-port-2607):
|
||||
- `FEX/build-ios`: `cmake -S FEX -B FEX/build-ios -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_DEPLOYMENT_TARGET=17.0 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DBUILD_THUNKS=OFF -DENABLE_FEX_ALLOCATOR=OFF -DENABLE_ASSERTIONS=OFF` then build the FEXCore targets -> `FEX/build-ios/FEXCore/Source/lib{FEXCore,FEXCore_Base,JemallocLibs}.a` and `External/{cephes,fmt,SoftFloat-3e,xxhash}` archives (values read back from CMakeCache). UNVERIFIED from clean.
|
||||
- `FEX/build-arm64ec`: with the llvm-mingw `bin` on PATH, `make arm64ecfex` -> `Bin/libarm64ecfex.dll`, copied to `app/Madeira/arm64ec-windows/xtajit64.dll`. Verified this session (rebuilt ml905).
|
||||
- `FEX/build-ios`: `build/fex-ios/build.sh` (same options as the development CMakeCache) -> `FEX/build-ios/FEXCore/Source/lib{FEXCore,FEXCore_Base,JemallocLibs}.a` and the `External/{cephes,fmt,SoftFloat-3e,xxhash}` archives. UNVERIFIED from clean.
|
||||
- `FEX/build-arm64ec`: `build/fex-arm64ec/build.sh` (configures with `FEX/Data/CMake/toolchain_mingw.cmake` and the recorded options on first run, builds target `arm64ecfex`, copies `Bin/libarm64ecfex.dll` to `app/Madeira/arm64ec-windows/xtajit64.dll`). The build step was verified this session; the first-run configure in the script is reconstructed from CMakeCache and UNVERIFIED.
|
||||
3. Wine (submodule, branch madeira-lgpl):
|
||||
- unix side: `build/ntdll-unix/build.sh`, `build/wineserver/build.sh`,
|
||||
`build/win32u-unix/build.sh` -> `app/Madeira/lib{ntdll_unix,wineserver,win32u_unix}.a`. Verified on the development machine.
|
||||
- PE side: `wine/build-arm64ec` configured with `--enable-archs=arm64ec --without-x --disable-tests` (from config.status), llvm-mingw on PATH, `make -C dlls/ntdll` etc.; ntdll.dll is then stripped and padded (memory: reference_build_and_deploy_chains) and the PE modules copied to `app/Madeira/arm64ec-windows/` (tracked). UNVERIFIED from clean.
|
||||
- PE side: `build/wine-pe/build-ntdll.sh` (configures `wine/build-arm64ec` with `--enable-archs=arm64ec --without-x --disable-tests` on first run, builds `dlls/ntdll`, strips, pads to SizeOfImage + 0x50000, copies to the app). Other PE modules: `make -C dlls/<name>` in that tree and copy the DLL, as the script's header says. The strip/pad step was verified this session; the configure step is UNVERIFIED from clean.
|
||||
4. DXMT (submodule, branch ios-port):
|
||||
- unix side: `build/dxmt-ios/build.sh` (needs `toolchains/llvm-ios-build`) -> `app/Madeira/libdxmt_combined.a` (ignored; the app links it). Verified this session.
|
||||
- PE side: `meson setup research/dxmt/build-arm64ec research/dxmt -Dbuildtype=release -Dwine_build_path=../../wine/build-arm64ec --cross-file=research/dxmt/build-arm64ec-win.txt` then `ninja -C research/dxmt/build-arm64ec src/winemetal/winemetal.dll` (and d3d11.dll) -> copied to `app/Madeira/arm64ec-windows/`. Verified this session (winemetal.dll).
|
||||
|
||||
+1
-1
Submodule research/dxmt updated: b3075b2284...7365002139
@@ -11,8 +11,8 @@ The Madeira Converter Exception, version 1 (../../LICENSE-EXCEPTION.md in this
|
||||
repository: an additional
|
||||
permission under GPL-3.0 section 7 for combining with the Apple Metal
|
||||
Shader Converter dynamic library and Apple system frameworks) is offered
|
||||
for this runtime as a DRAFT of 2026-09-16 and is not in effect until it is
|
||||
adopted in a tagged release.
|
||||
for this runtime as a DRAFT of 2026-09-16 and is not in effect until the
|
||||
adoption line in that file is completed.
|
||||
|
||||
The Apple Metal Shader Converter headers it compiles against are Apache-2.0
|
||||
(see app/Madeira/d3d12/LICENSE-metal-shader-converter-headers.txt); the
|
||||
|
||||
Reference in New Issue
Block a user