feat: 飞牛应用商店打包工程(fnpack fpk,已真机全生命周期验证)
This commit is contained in:
1 parent
cfdbcc73fd
commit
769f085afb
20 files changed
+165
No files matched your search
@@ -0,0 +1,17 @@
|
||||
# 飞牛应用商店打包(fpk)
|
||||
|
||||
打包工具:`fnpack`(官方,https://developer.fnnas.com/ 下载,本机已装)
|
||||
|
||||
```bash
|
||||
cd fpk/moyu-qile
|
||||
fnpack build . # 生成 moyu-qile.fpk
|
||||
appcenter-cli install-fpk moyu-qile.fpk # NAS 本机测试安装
|
||||
appcenter-cli status moyu-qile # running / stopped
|
||||
appcenter-cli uninstall moyu-qile # 测试完卸载
|
||||
```
|
||||
|
||||
结构:`manifest`(商店元数据)· `app/docker/docker-compose.yaml`(镜像/端口/数据卷)·
|
||||
`app/ui/config`(桌面入口)· `cmd/`(生命周期脚本)· `ICON.PNG`/`ICON_256.PNG`(64/256 图标)。
|
||||
|
||||
已真机验证(fnOS):安装 → running + HTTP 200 → 停/起 → 卸载,全流程通过。
|
||||
提交上架:注册 https://developer.fnnas.com/ 开发者 → 「我的的应用」上传 .fpk + 图标 + 截图 + 更新说明。
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
@@ -0,0 +1,10 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
webapp:
|
||||
image: ghcr.io/personal82555/moyu-qile:latest
|
||||
container_name: docker-moyu-qile
|
||||
ports:
|
||||
- "7025:7025"
|
||||
volumes:
|
||||
- "/var/apps/moyu-qile/shares/moyu-qile/data:/app/data"
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
".url": {
|
||||
"moyu-qile.Application": {
|
||||
"title": "摸鱼棋乐",
|
||||
"icon": "images/icon_{0}.png",
|
||||
"type": "url",
|
||||
"protocol": "http",
|
||||
"port": "7025",
|
||||
"url": "/",
|
||||
"allUsers": false
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This script is called after the user change environment variables in application setting page.
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This script is called before the user change environment variables in application setting page.
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This script is called after the user installs the application.
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This script is called before the user installs the application.
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
FILE_PATH="${TRIM_APPDEST}/docker/docker-compose.yaml"
|
||||
|
||||
is_docker_running () {
|
||||
DOCKER_NAME=""
|
||||
|
||||
if [ -f "$FILE_PATH" ]; then
|
||||
DOCKER_NAME=$(cat $FILE_PATH | grep "container_name" | awk -F ':' '{print $2}' | xargs)
|
||||
echo "DOCKER_NAME is set to: $DOCKER_NAME"
|
||||
fi
|
||||
|
||||
if [ -n "$DOCKER_NAME" ]; then
|
||||
docker inspect $DOCKER_NAME | grep -q "\"Status\": \"running\"," || exit 1
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
# run start command. exit 0 if success, exit 1 if failed
|
||||
# do nothing, docker application will be started by appcenter
|
||||
exit 0
|
||||
;;
|
||||
stop)
|
||||
# run stop command. exit 0 if success, exit 1 if failed
|
||||
# do nothing, docker application will be stopped by appcenter
|
||||
exit 0
|
||||
;;
|
||||
status)
|
||||
# check application status command. exit 0 if running, exit 3 if not running
|
||||
# check first container by default, you cound modify it by yourself
|
||||
if is_docker_running; then
|
||||
exit 0
|
||||
else
|
||||
exit 3
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This script is called after the user uninstalls the application.
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This script is called after the user uninstalls the application.
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This script is called after the user upgrades the application.
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This script is called before the user upgrades the application.
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"defaults":
|
||||
{
|
||||
"run-as": "package"
|
||||
},
|
||||
"username": "docker-moyu-qile",
|
||||
"groupname": "docker-moyu-qile"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"docker-project": {
|
||||
"projects": [
|
||||
{
|
||||
"name": "moyu-qile",
|
||||
"path": "docker"
|
||||
}
|
||||
]
|
||||
},
|
||||
"data-share": {
|
||||
"shares": [
|
||||
{
|
||||
"name": "moyu-qile"
|
||||
},
|
||||
{
|
||||
"name": "moyu-qile/data"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
appname = moyu-qile
|
||||
version = 1.0.0
|
||||
display_name = 摸鱼棋乐
|
||||
desc = <b>三合一网页棋类:中国象棋 · 五子棋 · 军棋</b></br>纯 Node.js 自研、MIT 开源,装完即玩:</br>✅ AI 对战(3 档难度 / 5 种教练人格 / 走法点评 / 赛后复盘)</br>✅ 自动存档 + 战绩排行,刷新不丢局(每 5 分钟保存)</br>✅ 残局挑战 · 每日一题 · 战绩海报 · 棋风统计</br>✅ 手机竖屏适配,不填模型 AI 功能也有本地兜底</br>源码与反馈: github.com/personal82555/moyu-qile
|
||||
platform = x86
|
||||
source = thirdparty
|
||||
maintainer = personal82555
|
||||
maintainer_url = https://github.com/personal82555/moyu-qile
|
||||
distributor = personal82555
|
||||
distributor_url = https://github.com/personal82555/moyu-qile
|
||||
os_min_version = 1.1.8
|
||||
desktop_uidir = ui
|
||||
desktop_applaunchname = moyu-qile.Application
|
||||
service_port = 7025
|
||||
ctl_stop = true
|
||||
Binary file not shown.
Reference in new issue
Block a user