diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 2facec7..070f5df 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -69,6 +69,8 @@ jobs: run: | mkdir package cp zig-out/bin/UsaProject package/ + # Ship the bundled font's OFL license (M PLUS 1p is embedded in the binary). + cp assets/fonts/OFL.txt package/MPLUS1p-OFL.txt zip -r UsaProject-linux.zip package/ - name: Upload artifact diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 490a1c6..a9123d5 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -56,6 +56,8 @@ jobs: run: | mkdir package copy zig-out\bin\UsaProject.exe package\ + # Ship the bundled font's OFL license (M PLUS 1p is embedded in the binary). + copy assets\fonts\OFL.txt package\MPLUS1p-OFL.txt Compress-Archive -Path package\* -DestinationPath UsaProject-windows.zip - name: Upload artifact diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e71cb28 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 bubio + +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. diff --git a/README.md b/README.md index 17255b1..89744ae 100644 --- a/README.md +++ b/README.md @@ -39,12 +39,15 @@ This project aims to provide a lightweight, modern, and cross-platform PC-98 exp ## License -This project incorporates several open-source components: +UsaProject is released under the [MIT License](LICENSE). + +It also incorporates several open-source components: * **NP2kai**: MIT License (AZO) * **Zig**: MIT License * **sokol**: zlib/libpng License * **nativefiledialog-extended**: Zlib License +* **M PLUS 1p**: SIL Open Font License 1.1 — Copyright 2016 The M+ Project Authors ([OFL.txt](assets/fonts/OFL.txt)) ## Build diff --git a/build.zig b/build.zig index 594b401..a296412 100644 --- a/build.zig +++ b/build.zig @@ -273,12 +273,21 @@ pub fn build(b: *std.Build) void { cp_icon.step.dependOn(&mkdir.step); bundle_step.dependOn(&cp_icon.step); - // 5. Touch the bundle to refresh Finder cache + // 5. Copy the bundled font's OFL license text. M PLUS 1p is embedded in + // the binary, so the SIL Open Font License 1.1 + copyright notice must + // travel with the distributed .app per the OFL's redistribution terms. + const cp_ofl = b.addSystemCommand(&.{ "cp", "assets/fonts/OFL.txt" }); + cp_ofl.addArg(b.getInstallPath(.prefix, b.fmt("{s}/MPLUS1p-OFL.txt", .{resources_dir}))); + cp_ofl.step.dependOn(&mkdir.step); + bundle_step.dependOn(&cp_ofl.step); + + // 6. Touch the bundle to refresh Finder cache const touch = b.addSystemCommand(&.{ "touch" }); touch.addArg(b.getInstallPath(.prefix, app_name)); touch.step.dependOn(&cp_exe.step); touch.step.dependOn(&cp_plist.step); touch.step.dependOn(&cp_icon.step); + touch.step.dependOn(&cp_ofl.step); bundle_step.dependOn(&touch.step); } diff --git a/packaging/nfpm.yaml b/packaging/nfpm.yaml index 7b3292d..fcee2a3 100644 --- a/packaging/nfpm.yaml +++ b/packaging/nfpm.yaml @@ -25,6 +25,11 @@ contents: dst: /usr/share/applications/usaproject.desktop - src: ./assets/AppIcon.png dst: /usr/share/pixmaps/usaproject.png + # Bundled font's OFL license (M PLUS 1p is embedded in the binary). + - src: ./assets/fonts/OFL.txt + dst: /usr/share/doc/usaproject/MPLUS1p-OFL.txt + file_info: + mode: 0644 overrides: deb: