安装打包说明
This commit is contained in:
1 parent
59f0d2553e
commit
df2097ff1a
5 files changed
+92
-3
No files matched your search
@@ -0,0 +1,26 @@
|
|||||||
|
Spine Runtimes License Agreement
|
||||||
|
Last updated April 5, 2025. Replaces all prior versions.
|
||||||
|
|
||||||
|
Copyright (c) 2013-2025, Esoteric Software LLC
|
||||||
|
|
||||||
|
Integration of the Spine Runtimes into software or otherwise creating
|
||||||
|
derivative works of the Spine Runtimes is permitted under the terms and
|
||||||
|
conditions of Section 2 of the Spine Editor License Agreement:
|
||||||
|
https://esotericsoftware.com/spine-editor-license
|
||||||
|
|
||||||
|
Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||||
|
or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||||
|
"Products"), provided that each user of the Products must obtain their own
|
||||||
|
Spine Editor license and redistribution of the Products in any form must
|
||||||
|
include this license and copyright notice.
|
||||||
|
|
||||||
|
THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "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 ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||||
|
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||||
|
BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) 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
|
||||||
|
THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2020 lynweklm@gmail.com
|
||||||
|
|
||||||
|
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.
|
||||||
@@ -37,6 +37,7 @@ SpineViewer/
|
|||||||
│ ├─ 4.1/ spine-canvas.js
|
│ ├─ 4.1/ spine-canvas.js
|
||||||
│ ├─ 4.2/ spine-canvas.js
|
│ ├─ 4.2/ spine-canvas.js
|
||||||
│ └─ 4.3/ spine-canvas.js
|
│ └─ 4.3/ spine-canvas.js
|
||||||
|
├─ LICENSES/ # 第三方运行时及依赖的再分发许可证
|
||||||
└─ node_modules/ # 可选:@napi-rs/canvas(用于高质量缩略图渲染)
|
└─ node_modules/ # 可选:@napi-rs/canvas(用于高质量缩略图渲染)
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -87,3 +88,44 @@ SpineViewer/
|
|||||||
- 若删除 `node_modules/`,插件仍可正常预览动画,缩略图会显示一条纯 JS 占位图。
|
- 若删除 `node_modules/`,插件仍可正常预览动画,缩略图会显示一条纯 JS 占位图。
|
||||||
|
|
||||||
如需在多个平台分发,请安装对应平台的 `@napi-rs/canvas` 原生二进制。
|
如需在多个平台分发,请安装对应平台的 `@napi-rs/canvas` 原生二进制。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 分享与打包
|
||||||
|
|
||||||
|
### 分享源码
|
||||||
|
|
||||||
|
仓库中的 `node_modules/` 被 `.gitignore` 忽略是正常的。接收者克隆源码后,需要在插件目录执行:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm ci --omit=dev
|
||||||
|
```
|
||||||
|
|
||||||
|
`@napi-rs/canvas` 会按当前操作系统和 CPU 下载预编译的 N-API 二进制,正常情况下不需要编译,也不需要安装 Rust/C++ 工具链。安装完成后,再从 Eagle 插件面板加载或打包插件。
|
||||||
|
|
||||||
|
### 分享可直接安装的插件
|
||||||
|
|
||||||
|
1. 在准备出包的目标系统上执行 `npm ci --omit=dev`。
|
||||||
|
2. 确认插件目录中保留了 `node_modules/`。否则骨骼动画仍可预览,但自动缩略图只能使用占位图。
|
||||||
|
3. 在 Eagle 中打开插件面板(快捷键 `P`),右键此插件并选择“打包插件”。
|
||||||
|
4. 把生成的 `.eagleplugin` 文件发给对方。对方直接安装,不需要再执行 npm,也不需要编译。
|
||||||
|
|
||||||
|
当前工作目录安装的是 **macOS Apple 芯片(darwin-arm64)** 的 Canvas 原生二进制。它不能直接作为 Windows 或 Intel Mac 的完整缩略图版本分发。建议分别在以下目标环境执行安装、测试和打包:
|
||||||
|
|
||||||
|
- macOS Apple 芯片
|
||||||
|
- macOS Intel
|
||||||
|
- Windows x64
|
||||||
|
|
||||||
|
如果每个安装包只携带一个平台的原生二进制,出包时还应把 `manifest.json` 的 `platform` / `arch` 改为对应的 `mac` + `arm`、`mac` + `x64` 或 `win` + `x64`。只有安装包确实包含并测试过所有目标平台的原生二进制时,才保留当前的 `all` + `all`。
|
||||||
|
|
||||||
|
### 出包文件检查
|
||||||
|
|
||||||
|
完整功能包至少应包含:
|
||||||
|
|
||||||
|
- `manifest.json`、`logo.png`
|
||||||
|
- `viewer/`、`thumbnail/`、`js/`、`lib/`、`assets/`
|
||||||
|
- `LICENSES/`
|
||||||
|
- `package.json`、`package-lock.json`
|
||||||
|
- 与目标平台匹配的 `node_modules/`
|
||||||
|
|
||||||
|
无需放入发布包的开发文件包括 `.git/`、日志、`.DS_Store`、`debug*.js`、`test-*.js`、`SpineViewer.code-workspace`,以及未在 `manifest.json` 中使用的 ICNS 测试文件。
|
||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "spineviewer",
|
"name": "spineviewer",
|
||||||
"version": "1.0.0",
|
"version": "1.1.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "spineviewer",
|
"name": "spineviewer",
|
||||||
"version": "1.0.0",
|
"version": "1.1.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@napi-rs/canvas": "^0.1.66"
|
"@napi-rs/canvas": "^0.1.66"
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "spineviewer",
|
"name": "spineviewer",
|
||||||
"version": "1.0.0",
|
"version": "1.1.0",
|
||||||
"description": "Eagle 插件:离线预览 Spine 导出的骨骼动画(skel / skel.bytes / json / atlas / atlas.txt / png / jpg / jpeg / webp)",
|
"description": "Eagle 插件:离线预览 Spine 导出的骨骼动画(skel / skel.bytes / json / atlas / atlas.txt / png / jpg / jpeg / webp)",
|
||||||
"main": "thumbnail/spine.js",
|
"main": "thumbnail/spine.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
Reference in new issue
Block a user