diff --git a/AGENTS.md b/AGENTS.md index 40d64e54..60736f13 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,7 +4,7 @@ Rules for coding agents (Codex reads this file; Claude Code imports it through ` ## Scope -- Windows 11 x64 WPF editor for RECOIL source projects (`data/` + `gamegen/`), reconstructed once from the original game files and exported back to ZBD files. C# 14, .NET 10, WPF Fluent, Direct3D 11 (Vortice.Windows); the format library (`zStudio.Core`) stays independent of UI and rendering. +- Windows 11 x64 WPF editor for RECOIL source projects (`data/` + `gamegen/`), reconstructed once from the original game files and exported back to ZBD files. C# 15, .NET 11, WPF Fluent, Direct3D 11 (Vortice.Windows); the format library (`zStudio.Core`) stays independent of UI and rendering. - Compiled game folders open only through MCP `open_root`, read-only: inspection, preview and export. Never add compiled-asset editing in code, GUI or MCP (owner decision). The July and August 1998 demos (version-13 worlds) are inspection only (the September 1998 demo reconstructs like a release). MechWarrior 3 supports the source pipeline, native in-app authoring and Blender round-trip for original 1.2; native mission selection replaces RECOIL-only difficulty/BFT/pickup/VTOL helpers ([MW3 sources](docs/mw3-source-project.md)). - Python exists only in the Blender extension (`blender/zstudio_recoil`), the Blender round-trip driver (`tools/blender-roundtrip.py`) and the optional export checker (`tools/check_exports.py`). The app, builds and the plain test suite never need Python or Blender. diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ebfdb61..d21b6442 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ Version numbers follow `MAJOR.MINOR.PATCH`; the 0.x series is under active development. Release tags and downloadable archives use the same version. +## 0.12.1 — Unreleased + +- zStudio is built on .NET 11 (included in `zStudio.exe`; nothing to install). + ## 0.12.0 — 2026-11-08 - Map diagnostics retain informational preview limitations and group unresolved animation calls by target, with call counts and bounded source details shared by Diagnostics and MCP. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aa7b4433..8f167b04 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,7 +27,7 @@ dotnet run --project tools/zStudio.PreviewCheck -c Release --no-build -- --mcp-c ## Pull requests 1. Fork the repository (or use a branch if you have access), starting from current `main`. -2. Keep the change focused and follow `.editorconfig` and [AGENTS.md](https://github.com/Vorta/zStudio/blob/main/AGENTS.md): C# 14, nullable types, bounded little-endian reads, actionable diagnostics, format models independent of UI and rendering. +2. Keep the change focused and follow `.editorconfig` and [AGENTS.md](https://github.com/Vorta/zStudio/blob/main/AGENTS.md): C# 15, nullable types, bounded little-endian reads, actionable diagnostics, format models independent of UI and rendering. 3. Preserve source bytes, unknown fields, record identities and order; never infer identity from names. Add only must-have tests ([test policy](https://github.com/Vorta/zStudio/blob/main/docs/agents/testing.md#minimal-must-have-tests)). A successful parse does not establish game compatibility. 4. Every user-facing feature also works over MCP through the shared command and editing services, with the same validation, identities, undo and save protections. Update the typed tool schemas, [the capability inventory](https://github.com/Vorta/zStudio/blob/main/docs/mcp-capabilities.json), [the MCP guide](docs/mcp.md) and a protocol check that exercises the new path. CI checks XAML action handlers against the inventory; reviews also cover bound and dynamically created controls. MCP returns explicit draft and conflict errors instead of opening a dialog or discarding input. 5. Document visible behaviour and limits in the relevant guide and add an entry under the Unreleased section of `CHANGELOG.md`. diff --git a/Directory.Build.props b/Directory.Build.props index 48284679..2a203f73 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - net10.0 - 14.0 + net11.0 + 15.0 enable enable true diff --git a/README.md b/README.md index 7e64fb42..f68799fa 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ Game files are not included; use your own copy of the game. - Some edits are available only through MCP, such as adding a model to a world or moving an object to another parent. - Previews show each mission's starting scene; they don't simulate gameplay. - `zStudio.exe` is unsigned. -- On the first start of each version, zStudio unpacks WPF's native files (about 8 MB) to `%TEMP%\.net\zStudio\`. Where a policy blocks programs in `%TEMP%`, set the environment variable `DOTNET_BUNDLE_EXTRACT_BASE_DIR` to another writable folder. Folders of older versions there can be deleted. +- On the first start of each version, zStudio unpacks WPF's native files (about 9 MB) to `%TEMP%\.net\zStudio\`. Where a policy blocks programs in `%TEMP%`, set the environment variable `DOTNET_BUNDLE_EXTRACT_BASE_DIR` to another writable folder. Folders of older versions there can be deleted. ## Contributing diff --git a/THIRD-PARTY-NOTICES.md b/THIRD-PARTY-NOTICES.md index debf72d6..24875c06 100644 --- a/THIRD-PARTY-NOTICES.md +++ b/THIRD-PARTY-NOTICES.md @@ -7,8 +7,6 @@ zStudio uses the following NuGet dependencies. Package versions are pinned in lo | Clipper2 | 2.0.0 | [BSL-1.0](#clipper2) | | CommunityToolkit.Mvvm | 8.4.2 | [MIT](#communitytoolkit) | | Microsoft.Extensions.AI.Abstractions | 10.11.0 | [MIT](#microsoft-extensions-ai) | -| Microsoft.Extensions.DependencyInjection.Abstractions | 10.0.14 | [MIT](#microsoft) | -| Microsoft.Extensions.Logging.Abstractions | 10.0.14 | [MIT](#microsoft) | | ModelContextProtocol.Core | 2.4.0 | [Apache-2.0, with retained MIT contributions; upstream license transition notice included](#model-context-protocol) | | NAudio.Core | 3.3.0 | [MIT](#naudio) | | NAudio.Wasapi | 3.3.0 | [MIT](#naudio) | @@ -102,7 +100,7 @@ SOFTWARE. ### Microsoft -Applies to `Microsoft.Extensions.DependencyInjection.Abstractions`, `Microsoft.Extensions.Logging.Abstractions` and `System.Numerics.Tensors`. +Applies to `System.Numerics.Tensors`. ```text © Microsoft Corporation. All rights reserved. @@ -488,7 +486,7 @@ License notice for ASP.NET ------------------------------- Copyright (c) .NET Foundation. All rights reserved. -Licensed under the Apache License, Version 2.0. +Licensed under the MIT License (MIT) Available at https://github.com/dotnet/aspnetcore/blob/main/LICENSE.txt @@ -578,33 +576,6 @@ http://www.apache.org/licenses/ Copyright The OpenTelemetry Authors -License notice for LinuxTracepoints ------------------------------------ - -https://github.com/microsoft/LinuxTracepoints/blob/main/LICENSE - -Copyright (c) Microsoft Corporation. - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE - License notice for Mono ------------------------------- @@ -1670,6 +1641,41 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWIS ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +License notice for zstd +----------------------- + +https://github.com/facebook/zstd/blob/dev/LICENSE + +BSD License + +For Zstandard software +Copyright (c) Meta Platforms, Inc. and affiliates. 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. + + * Neither the name Facebook, nor Meta, 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 HOLDER 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. + License notice for fmtlib/fmt ------------------------------- @@ -1891,4 +1897,278 @@ NIST-developed software is provided by NIST as a public service. You may use, co NIST-developed software is expressly provided "AS IS." NIST MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED, IN FACT, OR ARISING BY OPERATION OF LAW, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND DATA ACCURACY. NIST NEITHER REPRESENTS NOR WARRANTS THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT ANY DEFECTS WILL BE CORRECTED. NIST DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF THE SOFTWARE OR THE RESULTS THEREOF, INCLUDING BUT NOT LIMITED TO THE CORRECTNESS, ACCURACY, RELIABILITY, OR USEFULNESS OF THE SOFTWARE. You are solely responsible for determining the appropriateness of using and distributing the software and you assume all risks associated with its use, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and the unavailability or interruption of operation. This software is not intended to be used in any situation where a failure could cause risk of injury or damage to property. The software developed by NIST employees is not subject to copyright protection within the United States. + +License notice for ANTLR 4 +------------------------------- + +https://github.com/antlr/antlr4 + +Copyright (c) 2012-2022 The ANTLR 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: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. 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. + +3. Neither name of copyright holders 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 REGENTS 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. + +License for Project Wycheproof +-------------------------------------------------------------------- +Available at https://github.com/C2SP/wycheproof/blob/2fb7240f471b70bb3aa5cc9b0718cdff01632508/LICENSE + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + 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. + +License notice for Intel Decimal Floating-Point Math Library +------------------------------- + +https://www.intel.com/content/www/us/en/developer/articles/tool/intel-decimal-floating-point-math-library.html + +Copyright (c) 2007-2025, Intel Corp. + +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. + * Neither the name of Intel Corporation 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. ``` diff --git a/docs/agents/releasing.md b/docs/agents/releasing.md index 1531eac5..719d478e 100644 --- a/docs/agents/releasing.md +++ b/docs/agents/releasing.md @@ -29,10 +29,10 @@ - Owner decision (0.9.7): zStudio ships as one self-contained, compressed `zStudio.exe` with only the necessary files beside it. The ZIP root holds exactly `zStudio.exe`, `LICENSE`, `THIRD-PARTY-NOTICES.md` and the Blender extension `zStudio-Blender-extension-.zip` (the extension id inside stays `zstudio_recoil`); README, CHANGELOG, CONTRIBUTING, SECURITY and the user guides are not shipped (**Help** opens the guides online at the installed version's tag). Unsigned. - `zStudio.exe` is the .NET single-file bundle of `zStudio.Desktop`: `./tools/publish.ps1` publishes it with `-p:StudioPackage=true` (Desktop project: self-contained, single file, native libraries inside, compressed, per-assembly ReadyToRun because the SDK's composite default is larger and starts slower, the single-file analyzer off because its implicit ILLink package breaks locked restores; `Directory.Build.props`: embedded symbols) and renames it from `zStudio.Desktop.exe` (the bundle keeps its assembly name). It deletes the Desktop ReadyToRun intermediates first, so images of an earlier configuration (composite stubs) are never bundled. The icon is the checked-in `src/zStudio.Desktop/Assets/studio.ico` (the owner's artwork). -- At run time only the five WPF native libraries (about 8 MB) extract, once per build, to `%TEMP%\.net\zStudio\`; the managed assemblies load from the bundle and `AppContext.BaseDirectory` is the folder of `zStudio.exe`, where the app finds `zStudio-Blender-extension-.zip` (Edit in Blender's install offer, `source_blender_extension`). The installed extension checks its helper by version: `--blender-helper` `info` reports zStudio's version, which must equal the extension's. +- WPF's two mixed-mode (C++/CLI) assemblies of .NET 11, `DirectWriteForwarder.dll` and `System.Printing.dll`, cannot load from a bundle and need `ijwhost.dll` beside them on disk: the package embeds them in `zStudio.Desktop.dll` instead of bundling them (`EmbedMixedModeAssemblies`, `ExcludeMixedModeAssemblies`), and `MixedModeAssemblies` (a module initializer, before WPF's first type) writes them beside the extracted `ijwhost.dll` when WPF first asks and loads them from there; `verify-package.ps1` refuses a bundle that holds them. At run time only six native libraries (WPF's five and the C++/CLI host `ijwhost.dll`) and those two assemblies (about 9 MB together) extract, once per build, to `%TEMP%\.net\zStudio\`; the managed assemblies load from the bundle and `AppContext.BaseDirectory` is the folder of `zStudio.exe`, where the app finds `zStudio-Blender-extension-.zip` (Edit in Blender's install offer, `source_blender_extension`). The installed extension checks its helper by version: `--blender-helper` `info` reports zStudio's version, which must equal the extension's. - `THIRD-PARTY-NOTICES.md` holds every licence text (packages with identical texts share one section) and the .NET runtime's licence and notices; a dependency update changes its row and, when its terms change, its section. - Publishing stages both the package folder and ZIP below `artifacts/` and runs `tools/verify-package.ps1` on that staged pair before replacing `artifacts/zStudio-win-x64/` and `artifacts/zStudio--win-x64.zip`. A rejected package leaves the previous pair intact. Installation keeps backups of both until the new pair is installed; an installation failure restores the previous folder and ZIP, and a failed restoration reports the retained backup paths for recovery. Only a successful installation removes the superseded folder and older ZIPs. A custom `-Output` must also be below `artifacts/`; publication paths must not use directory links. Verification checks: the root inventory; the bundle (a format-6 bundle header, not extract-all, compressed, with `zStudio.Desktop.dll`, its `deps.json` and `runtimeconfig.json` and exactly the five WPF native libraries; no composite ReadyToRun image, symbol files, `.zbd`, `.zrd`, `.bndb`, `.pfx`, `.p12` or `.key`); the notices (every package in the bundled `deps.json` has a row of the same version, every row a shipped package, every row's link a heading of the file); the file and product version of `zStudio.exe`; `LICENSE` and the notices against the checkout; the Blender extension's version and file hashes against its sources; SHA-256 parity of every ZIP entry. -- Manual distribution check: extract into a folder with spaces, start `zStudio.exe` from an unrelated working directory with a dataset path containing spaces and installed-runtime discovery disabled; only the WPF native libraries appear under `%TEMP%\.net\zStudio`; the six RT_ICON resources match the six ICO frames. +- Manual distribution check: extract into a folder with spaces, start `zStudio.exe` from an unrelated working directory with a dataset path containing spaces and installed-runtime discovery disabled; only the six native libraries and the two mixed-mode assemblies appear under `%TEMP%\.net\zStudio`; the six RT_ICON resources match the six ICO frames. ## Local artifacts diff --git a/global.json b/global.json index 35613d09..1458e98f 100644 --- a/global.json +++ b/global.json @@ -1,4 +1,4 @@ { - "sdk": { "version": "10.0.401", "rollForward": "latestPatch" }, + "sdk": { "version": "11.0.100", "rollForward": "latestPatch" }, "test": { "runner": "Microsoft.Testing.Platform" } } diff --git a/src/zStudio.Application/packages.lock.json b/src/zStudio.Application/packages.lock.json index 0f43b377..8ba3d0f4 100644 --- a/src/zStudio.Application/packages.lock.json +++ b/src/zStudio.Application/packages.lock.json @@ -1,7 +1,7 @@ { "version": 2, "dependencies": { - "net10.0": {}, - "net10.0/win-x64": {} + "net11.0": {}, + "net11.0/win-x64": {} } } \ No newline at end of file diff --git a/src/zStudio.Core/Animation/AnimationSeconds.cs b/src/zStudio.Core/Animation/AnimationSeconds.cs index 48c46596..a4386887 100644 --- a/src/zStudio.Core/Animation/AnimationSeconds.cs +++ b/src/zStudio.Core/Animation/AnimationSeconds.cs @@ -30,6 +30,13 @@ public static string Short(double seconds) => /// The grid a drag snaps to. public static double Step(AnimationSnap snap) => snap switch { AnimationSnap.Coarse => CoarseStep, AnimationSnap.Free => FreeStep, _ => GridStep }; + /// + /// A time as the decimal its shortest text names (0.1 is 0.1), within ±3,600 s. A cast gives the double's exact binary + /// value from .NET 11 on (0.1000000000000000055…), which puts a time that is on a grid line just beside it. + /// + public static decimal Plain(double seconds) => + decimal.Parse(Math.Clamp(seconds, -Maximum, Maximum).ToString("R", CultureInfo.InvariantCulture), NumberStyles.Float, CultureInfo.InvariantCulture); + /// /// A dragged time on its grid, within 0–3,600 s. The value is rounded in decimal, so a snapped threshold writes a plain /// value such as 0.125 rather than a binary neighbour. @@ -37,8 +44,8 @@ public static string Short(double seconds) => public static double Snap(double seconds, AnimationSnap snap = AnimationSnap.Grid) { if (!double.IsFinite(seconds)) throw new ArgumentOutOfRangeException(nameof(seconds), "Use a finite time."); - decimal step = (decimal)Step(snap); - decimal clamped = (decimal)Math.Clamp(seconds, 0, Maximum); + decimal step = Plain(Step(snap)); + decimal clamped = Plain(Math.Clamp(seconds, 0, Maximum)); return (double)(Math.Round(clamped / step, MidpointRounding.AwayFromZero) * step); } @@ -46,8 +53,8 @@ public static double Snap(double seconds, AnimationSnap snap = AnimationSnap.Gri public static double SnapSigned(double seconds, AnimationSnap snap = AnimationSnap.Grid) { if (!double.IsFinite(seconds)) throw new ArgumentOutOfRangeException(nameof(seconds), "Use a finite time."); - decimal step = (decimal)Step(snap); - decimal clamped = (decimal)Math.Clamp(seconds, -Maximum, Maximum); + decimal step = Plain(Step(snap)); + decimal clamped = Plain(Math.Clamp(seconds, -Maximum, Maximum)); return (double)(Math.Round(clamped / step, MidpointRounding.AwayFromZero) * step); } diff --git a/src/zStudio.Core/packages.lock.json b/src/zStudio.Core/packages.lock.json index da532b1f..783a1c7d 100644 --- a/src/zStudio.Core/packages.lock.json +++ b/src/zStudio.Core/packages.lock.json @@ -1,7 +1,7 @@ { "version": 2, "dependencies": { - "net10.0": { + "net11.0": { "Clipper2": { "type": "Direct", "requested": "[2.0.0, )", @@ -9,6 +9,6 @@ "contentHash": "2X23RZxJrjRjOSZc20aqXY9jpmHLekDRy4PIMfrsi2LPNzxFYlnuqzX/nLdk77fbURHUeX+gMhUn2a1z9/wMTQ==" } }, - "net10.0/win-x64": {} + "net11.0/win-x64": {} } } \ No newline at end of file diff --git a/src/zStudio.Desktop/AnimationThresholdEditor.cs b/src/zStudio.Desktop/AnimationThresholdEditor.cs index a64e0918..e00ef463 100644 --- a/src/zStudio.Desktop/AnimationThresholdEditor.cs +++ b/src/zStudio.Desktop/AnimationThresholdEditor.cs @@ -141,7 +141,7 @@ private void RefreshClock() private double Nudge(int direction) { double step = Keyboard.Modifiers.HasFlag(ModifierKeys.Shift) ? AnimationSeconds.CoarseStep : AnimationSeconds.GridStep; - decimal grid = (decimal)step, current = (decimal)Math.Clamp(value, -AnimationSeconds.Maximum, AnimationSeconds.Maximum); + decimal grid = AnimationSeconds.Plain(step), current = AnimationSeconds.Plain(value); // The next grid line strictly beyond the stored value in that direction. decimal result = direction > 0 ? (Math.Floor(current / grid) + 1) * grid : (Math.Ceiling(current / grid) - 1) * grid; return Math.Clamp((double)result, -AnimationSeconds.Maximum, AnimationSeconds.Maximum); diff --git a/src/zStudio.Desktop/MainWindow.xaml.cs b/src/zStudio.Desktop/MainWindow.xaml.cs index af7d8929..4fe387d1 100644 --- a/src/zStudio.Desktop/MainWindow.xaml.cs +++ b/src/zStudio.Desktop/MainWindow.xaml.cs @@ -823,7 +823,7 @@ internal void CancelRunningOperation() private async void CloseCurrentClick(object sender, RoutedEventArgs e) { if (ViewModel.SelectedDocument is { } doc) await RunUi(() => ViewModel.CloseAsync(doc)); } private void ExitClick(object sender, RoutedEventArgs e) => Close(); private void ThemeClick(object sender, RoutedEventArgs e) => ApplyTheme(((MenuItem)sender).Header.ToString()!); - // .NET 10 still marks runtime Fluent theme switching as experimental. + // .NET 11 still marks runtime Fluent theme switching as experimental. #pragma warning disable WPF0001 private void ApplyTheme(string theme) { diff --git a/src/zStudio.Desktop/MixedModeAssemblies.cs b/src/zStudio.Desktop/MixedModeAssemblies.cs new file mode 100644 index 00000000..e20a89fd --- /dev/null +++ b/src/zStudio.Desktop/MixedModeAssemblies.cs @@ -0,0 +1,50 @@ +using System.IO; +using System.Runtime.CompilerServices; +using System.Runtime.Loader; + +namespace zStudio.Desktop; + +/// +/// .NET 11's WPF has two mixed-mode (C++/CLI) assemblies, DirectWriteForwarder and System.Printing. Such an assembly cannot +/// load from the single-file bundle and needs ijwhost.dll beside it on disk. The package therefore carries them inside +/// this assembly instead of in the bundle (zStudio.Desktop.csproj, StudioPackage); when WPF first asks for one it is written +/// beside the ijwhost.dll the bundle extracted and loaded from there. Other builds have no such resources and load +/// both from their own folder as usual. +/// +internal static class MixedModeAssemblies +{ + private const string Prefix = "zStudio.Mixed."; + + // The application's Main is generated and its first statement touches WPF: only a module initializer runs before it. + [ModuleInitializer] + internal static void Install() + { + var assembly = typeof(MixedModeAssemblies).Assembly; + if (!assembly.GetManifestResourceNames().Any(n => n.StartsWith(Prefix, StringComparison.Ordinal))) return; + AssemblyLoadContext.Default.Resolving += (context, name) => + { + string file = name.Name + ".dll"; + using var stream = assembly.GetManifestResourceStream(Prefix + file); + if (stream == null) return null; + string folder = ExtractionFolder() ?? throw new FileNotFoundException("zStudio could not find the folder its native libraries were unpacked to.", "ijwhost.dll"); + byte[] bytes = new byte[stream.Length]; stream.ReadExactly(bytes); + string path = Path.Combine(folder, file); + Write(path, bytes); + return context.LoadFromAssemblyPath(path); + }; + } + + /// The bundle's extraction folder for this build (%TEMP%\.net\zStudio\<bundle id>, or under DOTNET_BUNDLE_EXTRACT_BASE_DIR): where its ijwhost.dll is. + private static string? ExtractionFolder() => (AppContext.GetData("NATIVE_DLL_SEARCH_DIRECTORIES") as string)? + .Split(Path.PathSeparator, StringSplitOptions.RemoveEmptyEntries).FirstOrDefault(folder => File.Exists(Path.Combine(folder, "ijwhost.dll"))); + + /// Writes the assembly unless the folder already holds exactly it (another zStudio of this build may have it loaded). + private static void Write(string path, byte[] bytes) + { + try { if (File.Exists(path) && File.ReadAllBytes(path).AsSpan().SequenceEqual(bytes)) return; } + catch (IOException) { } + string temporary = path + "." + Guid.NewGuid().ToString("N") + ".tmp"; + try { File.WriteAllBytes(temporary, bytes); File.Move(temporary, path, overwrite: true); } + finally { try { File.Delete(temporary); } catch (IOException) { } } + } +} diff --git a/src/zStudio.Desktop/packages.lock.json b/src/zStudio.Desktop/packages.lock.json index ec9a8342..e651d225 100644 --- a/src/zStudio.Desktop/packages.lock.json +++ b/src/zStudio.Desktop/packages.lock.json @@ -1,7 +1,7 @@ { "version": 2, "dependencies": { - "net10.0-windows7.0": { + "net11.0-windows7.0": { "CommunityToolkit.Mvvm": { "type": "Direct", "requested": "[8.4.2, )", @@ -31,19 +31,6 @@ "resolved": "10.11.0", "contentHash": "h4DX/TdJU4fk1GGaf19n6Kujkj6VXbGeL4UEOsQ8+ZJC5fVApPauokCtvBP684BYbczUYZQNfo1mbmyHG4WVSg==" }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "Transitive", - "resolved": "10.0.14", - "contentHash": "QtpQzuSZVyTPCuHW058yCs9Nj0394uUkNyFHS813nOmK9UgUdBdaprJ5PPsBgsQIpxADTsTkbaMMonykem6qdw==" - }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "10.0.14", - "contentHash": "SwcbEBtkECq3D2oywvHkm46fyrX9Dd2JPWphDnHUc2+cUWR1Mdo41atAjh/9iZjgQxuvbKfZKXqostT/LZfefA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.14" - } - }, "SharpGen.Runtime": { "type": "Transitive", "resolved": "2.4.2-beta", @@ -115,8 +102,7 @@ "resolved": "2.4.0", "contentHash": "q98pZMlcxhsh0LpGXcT2ow7sGNveCPhDlJT3zJ7Cz5nNyPmPkm8P57dUIUpzv1w6qWbdSZcR/Z+RbZtNYjEmXQ==", "dependencies": { - "Microsoft.Extensions.AI.Abstractions": "10.11.0", - "Microsoft.Extensions.Logging.Abstractions": "10.0.14" + "Microsoft.Extensions.AI.Abstractions": "10.11.0" } }, "Vortice.D3DCompiler": { @@ -161,6 +147,6 @@ } } }, - "net10.0-windows7.0/win-x64": {} + "net11.0-windows7.0/win-x64": {} } } \ No newline at end of file diff --git a/src/zStudio.Desktop/zStudio.Desktop.csproj b/src/zStudio.Desktop/zStudio.Desktop.csproj index a19d7b00..5a69f4c5 100644 --- a/src/zStudio.Desktop/zStudio.Desktop.csproj +++ b/src/zStudio.Desktop/zStudio.Desktop.csproj @@ -3,7 +3,7 @@ zStudio.Desktop - WinExenet10.0-windowstrue + WinExenet11.0-windowstrue zStudio.Desktopapp.manifest zStudio Assets/studio.ico @@ -11,8 +11,8 @@ true true @@ -34,6 +34,21 @@ + + + + + + + + + + + + + diff --git a/src/zStudio.Mcp/packages.lock.json b/src/zStudio.Mcp/packages.lock.json index 53ea5792..0ab9b90b 100644 --- a/src/zStudio.Mcp/packages.lock.json +++ b/src/zStudio.Mcp/packages.lock.json @@ -1,15 +1,14 @@ { "version": 2, "dependencies": { - "net10.0-windows7.0": { + "net11.0-windows7.0": { "ModelContextProtocol.Core": { "type": "Direct", "requested": "[2.4.0, )", "resolved": "2.4.0", "contentHash": "q98pZMlcxhsh0LpGXcT2ow7sGNveCPhDlJT3zJ7Cz5nNyPmPkm8P57dUIUpzv1w6qWbdSZcR/Z+RbZtNYjEmXQ==", "dependencies": { - "Microsoft.Extensions.AI.Abstractions": "10.11.0", - "Microsoft.Extensions.Logging.Abstractions": "10.0.14" + "Microsoft.Extensions.AI.Abstractions": "10.11.0" } }, "Microsoft.Extensions.AI.Abstractions": { @@ -17,23 +16,10 @@ "resolved": "10.11.0", "contentHash": "h4DX/TdJU4fk1GGaf19n6Kujkj6VXbGeL4UEOsQ8+ZJC5fVApPauokCtvBP684BYbczUYZQNfo1mbmyHG4WVSg==" }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "Transitive", - "resolved": "10.0.14", - "contentHash": "QtpQzuSZVyTPCuHW058yCs9Nj0394uUkNyFHS813nOmK9UgUdBdaprJ5PPsBgsQIpxADTsTkbaMMonykem6qdw==" - }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "10.0.14", - "contentHash": "SwcbEBtkECq3D2oywvHkm46fyrX9Dd2JPWphDnHUc2+cUWR1Mdo41atAjh/9iZjgQxuvbKfZKXqostT/LZfefA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.14" - } - }, "zstudio.application": { "type": "Project" } }, - "net10.0-windows7.0/win-x64": {} + "net11.0-windows7.0/win-x64": {} } } \ No newline at end of file diff --git a/src/zStudio.Mcp/zStudio.Mcp.csproj b/src/zStudio.Mcp/zStudio.Mcp.csproj index cb995c16..674c568e 100644 --- a/src/zStudio.Mcp/zStudio.Mcp.csproj +++ b/src/zStudio.Mcp/zStudio.Mcp.csproj @@ -1,5 +1,5 @@ - zStudio.McpzStudio.Mcpnet10.0-windows + zStudio.McpzStudio.Mcpnet11.0-windows diff --git a/src/zStudio.Rendering/packages.lock.json b/src/zStudio.Rendering/packages.lock.json index eae4daae..ec0802b5 100644 --- a/src/zStudio.Rendering/packages.lock.json +++ b/src/zStudio.Rendering/packages.lock.json @@ -1,7 +1,7 @@ { "version": 2, "dependencies": { - "net10.0-windows7.0": { + "net11.0-windows7.0": { "Vortice.D3DCompiler": { "type": "Direct", "requested": "[3.8.3, )", @@ -84,6 +84,6 @@ "contentHash": "2X23RZxJrjRjOSZc20aqXY9jpmHLekDRy4PIMfrsi2LPNzxFYlnuqzX/nLdk77fbURHUeX+gMhUn2a1z9/wMTQ==" } }, - "net10.0-windows7.0/win-x64": {} + "net11.0-windows7.0/win-x64": {} } } \ No newline at end of file diff --git a/src/zStudio.Rendering/zStudio.Rendering.csproj b/src/zStudio.Rendering/zStudio.Rendering.csproj index a2fe1e00..39f42d2c 100644 --- a/src/zStudio.Rendering/zStudio.Rendering.csproj +++ b/src/zStudio.Rendering/zStudio.Rendering.csproj @@ -3,7 +3,7 @@ zStudio.Rendering zStudio.Rendering - net10.0-windowstrue + net11.0-windowstrue diff --git a/tests/zStudio.Desktop.Tests/packages.lock.json b/tests/zStudio.Desktop.Tests/packages.lock.json index bdb7d770..e39579fd 100644 --- a/tests/zStudio.Desktop.Tests/packages.lock.json +++ b/tests/zStudio.Desktop.Tests/packages.lock.json @@ -1,7 +1,7 @@ { "version": 2, "dependencies": { - "net10.0-windows7.0": { + "net11.0-windows7.0": { "Microsoft.NET.Test.Sdk": { "type": "Direct", "requested": "[18.11.1, )", @@ -47,19 +47,6 @@ "resolved": "10.11.0", "contentHash": "h4DX/TdJU4fk1GGaf19n6Kujkj6VXbGeL4UEOsQ8+ZJC5fVApPauokCtvBP684BYbczUYZQNfo1mbmyHG4WVSg==" }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "Transitive", - "resolved": "10.0.14", - "contentHash": "QtpQzuSZVyTPCuHW058yCs9Nj0394uUkNyFHS813nOmK9UgUdBdaprJ5PPsBgsQIpxADTsTkbaMMonykem6qdw==" - }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "10.0.14", - "contentHash": "SwcbEBtkECq3D2oywvHkm46fyrX9Dd2JPWphDnHUc2+cUWR1Mdo41atAjh/9iZjgQxuvbKfZKXqostT/LZfefA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.14" - } - }, "Microsoft.Testing.Extensions.Telemetry": { "type": "Transitive", "resolved": "2.5.2", @@ -269,8 +256,7 @@ "resolved": "2.4.0", "contentHash": "q98pZMlcxhsh0LpGXcT2ow7sGNveCPhDlJT3zJ7Cz5nNyPmPkm8P57dUIUpzv1w6qWbdSZcR/Z+RbZtNYjEmXQ==", "dependencies": { - "Microsoft.Extensions.AI.Abstractions": "10.11.0", - "Microsoft.Extensions.Logging.Abstractions": "10.0.14" + "Microsoft.Extensions.AI.Abstractions": "10.11.0" } }, "NAudio.Core": { @@ -333,7 +319,7 @@ } } }, - "net10.0-windows7.0/win-x64": { + "net11.0-windows7.0/win-x64": { "Microsoft.Win32.Registry": { "type": "Transitive", "resolved": "5.0.0", diff --git a/tests/zStudio.Desktop.Tests/zStudio.Desktop.Tests.csproj b/tests/zStudio.Desktop.Tests/zStudio.Desktop.Tests.csproj index 9a04c807..94659c70 100644 --- a/tests/zStudio.Desktop.Tests/zStudio.Desktop.Tests.csproj +++ b/tests/zStudio.Desktop.Tests/zStudio.Desktop.Tests.csproj @@ -3,7 +3,7 @@ zStudio.Desktop.Tests zStudio.Desktop.Tests - Exenet10.0-windowstruetruefalse + Exenet11.0-windowstruetruefalse diff --git a/tests/zStudio.PrWatch.Tests/packages.lock.json b/tests/zStudio.PrWatch.Tests/packages.lock.json index edad6038..0ccbd3f6 100644 --- a/tests/zStudio.PrWatch.Tests/packages.lock.json +++ b/tests/zStudio.PrWatch.Tests/packages.lock.json @@ -1,7 +1,7 @@ { "version": 2, "dependencies": { - "net10.0": { + "net11.0": { "Microsoft.NET.Test.Sdk": { "type": "Direct", "requested": "[18.11.1, )", @@ -167,7 +167,7 @@ "type": "Project" } }, - "net10.0/win-x64": { + "net11.0/win-x64": { "Microsoft.Win32.Registry": { "type": "Transitive", "resolved": "5.0.0", diff --git a/tests/zStudio.Tests/AnimationGraphTests.cs b/tests/zStudio.Tests/AnimationGraphTests.cs index 7f7f83e6..336f3b3f 100644 --- a/tests/zStudio.Tests/AnimationGraphTests.cs +++ b/tests/zStudio.Tests/AnimationGraphTests.cs @@ -14,6 +14,16 @@ public sealed class AnimationGraphTests private static CancellationToken Token => TestContext.Current.CancellationToken; private static readonly string[] Nodes = ["bridge", "healthy", "piece", "rail_1", "rail_2", "rail_3"]; + [Fact] + public void TimesOnAGridLineSnapToIt() + { + // Must-have: .NET 11 made the cast from double to decimal exact, which put 0.1 s just beside its grid line (a drag + // snapped a tick early and the threshold's + did nothing). The grid works on the time's plain decimal instead. + Assert.Equal(0.1m, AnimationSeconds.Plain(0.1)); + Assert.Equal(0.1, AnimationSeconds.Snap(0.1)); Assert.Equal(0.125, AnimationSeconds.Snap(0.1125)); Assert.Equal(0.1, AnimationSeconds.Snap(0.112)); + Assert.Equal(-0.125, AnimationSeconds.SnapSigned(-0.1125)); Assert.Equal(23.1, AnimationSeconds.Snap(23.1, AnimationSnap.Coarse)); + } + // A small destroy_tr_bridge: prerequisites on the rails it calls, which call it back; an "if not"; an ELSEIF; a release // into a waiting, looping sequence; and an invalidate of itself. private static string Bridge(bool thirdCall = true, string root = "bridge") => $$""" diff --git a/tests/zStudio.Tests/packages.lock.json b/tests/zStudio.Tests/packages.lock.json index c55a3fcb..5edfc75d 100644 --- a/tests/zStudio.Tests/packages.lock.json +++ b/tests/zStudio.Tests/packages.lock.json @@ -1,7 +1,7 @@ { "version": 2, "dependencies": { - "net10.0": { + "net11.0": { "Microsoft.NET.Test.Sdk": { "type": "Direct", "requested": "[18.11.1, )", @@ -176,7 +176,7 @@ "contentHash": "2X23RZxJrjRjOSZc20aqXY9jpmHLekDRy4PIMfrsi2LPNzxFYlnuqzX/nLdk77fbURHUeX+gMhUn2a1z9/wMTQ==" } }, - "net10.0/win-x64": { + "net11.0/win-x64": { "Microsoft.Win32.Registry": { "type": "Transitive", "resolved": "5.0.0", diff --git a/tools/pr-watch.ps1 b/tools/pr-watch.ps1 index 7685834a..15a77a82 100644 --- a/tools/pr-watch.ps1 +++ b/tools/pr-watch.ps1 @@ -20,7 +20,7 @@ if ($ReleaseOnApproval) { $watchArgs += '--release-on-approval' } if ($NotifyTest) { $watchArgs += '--notify-test' } if ($DeliveryCheck) { $watchArgs += '--delivery-check' } if ($Claude) { $watchArgs += '--claude' } -$dll = Join-Path $PSScriptRoot 'zStudio.PrWatch/bin/Release/net10.0/zStudio.PrWatch.dll' +$dll = Join-Path $PSScriptRoot 'zStudio.PrWatch/bin/Release/net11.0/zStudio.PrWatch.dll' if ($Action -eq 'listen') { # Listen from a private content-addressed copy so solution builds remain possible while it waits. $runtimeArgs = @('runtime', '--workspace', $workspace, '--pr', [string]$Pr) diff --git a/tools/verify-package.ps1 b/tools/verify-package.ps1 index d96e91ca..92a8f653 100644 --- a/tools/verify-package.ps1 +++ b/tools/verify-package.ps1 @@ -78,8 +78,10 @@ foreach ($required in @(@('zStudio.Desktop.dll', 1), @('zStudio.Desktop.deps.jso } if ($entries['zStudio.Desktop.dll'].CompressedSize -le 0) { throw 'The bundle is not compressed.' } $natives = @($bundle.Entries | Where-Object Type -eq 2 | ForEach-Object Path | Sort-Object) -$expectedNatives = @('D3DCompiler_47_cor3.dll', 'PenImc_cor3.dll', 'PresentationNative_cor3.dll', 'vcruntime140_cor3.dll', 'wpfgfx_cor3.dll') +$expectedNatives = @('D3DCompiler_47_cor3.dll', 'ijwhost.dll', 'PenImc_cor3.dll', 'PresentationNative_cor3.dll', 'vcruntime140_cor3.dll', 'wpfgfx_cor3.dll') if (@(Compare-Object $expectedNatives $natives).Count -ne 0) { throw "Unexpected native libraries in the bundle: $($natives -join ', ')" } +# .NET 11's WPF mixed-mode assemblies cannot load from the bundle: the app carries them as resources and writes them beside ijwhost.dll. +foreach ($mixed in @('DirectWriteForwarder.dll', 'System.Printing.dll')) { if ($entries.ContainsKey($mixed)) { throw "The bundle holds the mixed-mode assembly $mixed, which cannot load from it." } } # Per-assembly ReadyToRun: a composite image (the SDK default) is larger and starts slower. if ($bundle.Entries.Where({ $_.Path -like '*.r2r.dll' }).Count -gt 0) { throw 'The bundle holds a composite ReadyToRun image.' } # Symbols stay embedded in the assemblies; a symbols entry would be a loose PDB. diff --git a/tools/zStudio.AnimationCheck/packages.lock.json b/tools/zStudio.AnimationCheck/packages.lock.json index 23b238dd..4169707b 100644 --- a/tools/zStudio.AnimationCheck/packages.lock.json +++ b/tools/zStudio.AnimationCheck/packages.lock.json @@ -1,7 +1,7 @@ { "version": 2, "dependencies": { - "net10.0": { + "net11.0": { "zstudio.core": { "type": "Project", "dependencies": { @@ -15,6 +15,6 @@ "contentHash": "2X23RZxJrjRjOSZc20aqXY9jpmHLekDRy4PIMfrsi2LPNzxFYlnuqzX/nLdk77fbURHUeX+gMhUn2a1z9/wMTQ==" } }, - "net10.0/win-x64": {} + "net11.0/win-x64": {} } } \ No newline at end of file diff --git a/tools/zStudio.ExportCheck/packages.lock.json b/tools/zStudio.ExportCheck/packages.lock.json index 23b238dd..4169707b 100644 --- a/tools/zStudio.ExportCheck/packages.lock.json +++ b/tools/zStudio.ExportCheck/packages.lock.json @@ -1,7 +1,7 @@ { "version": 2, "dependencies": { - "net10.0": { + "net11.0": { "zstudio.core": { "type": "Project", "dependencies": { @@ -15,6 +15,6 @@ "contentHash": "2X23RZxJrjRjOSZc20aqXY9jpmHLekDRy4PIMfrsi2LPNzxFYlnuqzX/nLdk77fbURHUeX+gMhUn2a1z9/wMTQ==" } }, - "net10.0/win-x64": {} + "net11.0/win-x64": {} } } \ No newline at end of file diff --git a/tools/zStudio.PrWatch/packages.lock.json b/tools/zStudio.PrWatch/packages.lock.json index 0f43b377..8ba3d0f4 100644 --- a/tools/zStudio.PrWatch/packages.lock.json +++ b/tools/zStudio.PrWatch/packages.lock.json @@ -1,7 +1,7 @@ { "version": 2, "dependencies": { - "net10.0": {}, - "net10.0/win-x64": {} + "net11.0": {}, + "net11.0/win-x64": {} } } \ No newline at end of file diff --git a/tools/zStudio.PreviewCheck/packages.lock.json b/tools/zStudio.PreviewCheck/packages.lock.json index 46f29e42..93b2286d 100644 --- a/tools/zStudio.PreviewCheck/packages.lock.json +++ b/tools/zStudio.PreviewCheck/packages.lock.json @@ -1,25 +1,12 @@ { "version": 2, "dependencies": { - "net10.0-windows7.0": { + "net11.0-windows7.0": { "Microsoft.Extensions.AI.Abstractions": { "type": "Transitive", "resolved": "10.11.0", "contentHash": "h4DX/TdJU4fk1GGaf19n6Kujkj6VXbGeL4UEOsQ8+ZJC5fVApPauokCtvBP684BYbczUYZQNfo1mbmyHG4WVSg==" }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "Transitive", - "resolved": "10.0.14", - "contentHash": "QtpQzuSZVyTPCuHW058yCs9Nj0394uUkNyFHS813nOmK9UgUdBdaprJ5PPsBgsQIpxADTsTkbaMMonykem6qdw==" - }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "10.0.14", - "contentHash": "SwcbEBtkECq3D2oywvHkm46fyrX9Dd2JPWphDnHUc2+cUWR1Mdo41atAjh/9iZjgQxuvbKfZKXqostT/LZfefA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.14" - } - }, "SharpGen.Runtime": { "type": "Transitive", "resolved": "2.4.2-beta", @@ -108,8 +95,7 @@ "resolved": "2.4.0", "contentHash": "q98pZMlcxhsh0LpGXcT2ow7sGNveCPhDlJT3zJ7Cz5nNyPmPkm8P57dUIUpzv1w6qWbdSZcR/Z+RbZtNYjEmXQ==", "dependencies": { - "Microsoft.Extensions.AI.Abstractions": "10.11.0", - "Microsoft.Extensions.Logging.Abstractions": "10.0.14" + "Microsoft.Extensions.AI.Abstractions": "10.11.0" } }, "NAudio.Core": { @@ -172,6 +158,6 @@ } } }, - "net10.0-windows7.0/win-x64": {} + "net11.0-windows7.0/win-x64": {} } } \ No newline at end of file diff --git a/tools/zStudio.PreviewCheck/zStudio.PreviewCheck.csproj b/tools/zStudio.PreviewCheck/zStudio.PreviewCheck.csproj index 3b008e92..ee255897 100644 --- a/tools/zStudio.PreviewCheck/zStudio.PreviewCheck.csproj +++ b/tools/zStudio.PreviewCheck/zStudio.PreviewCheck.csproj @@ -3,7 +3,7 @@ zStudio.PreviewCheck zStudio.PreviewCheck - Exenet10.0-windowstrue../../src/zStudio.Desktop/app.manifest + Exenet11.0-windowstrue../../src/zStudio.Desktop/app.manifest diff --git a/tools/zStudio.Verify/packages.lock.json b/tools/zStudio.Verify/packages.lock.json index 23b238dd..4169707b 100644 --- a/tools/zStudio.Verify/packages.lock.json +++ b/tools/zStudio.Verify/packages.lock.json @@ -1,7 +1,7 @@ { "version": 2, "dependencies": { - "net10.0": { + "net11.0": { "zstudio.core": { "type": "Project", "dependencies": { @@ -15,6 +15,6 @@ "contentHash": "2X23RZxJrjRjOSZc20aqXY9jpmHLekDRy4PIMfrsi2LPNzxFYlnuqzX/nLdk77fbURHUeX+gMhUn2a1z9/wMTQ==" } }, - "net10.0/win-x64": {} + "net11.0/win-x64": {} } } \ No newline at end of file