gopeed icon indicating copy to clipboard operation
gopeed copied to clipboard

帮忙打包了两个威联通NAS的安装包

Open WHJWNAVY opened this issue 1 year ago • 6 comments

Gopeed_1.5.7_arm64_and_x86-64_qnap_qpkg

帮忙打包了两个威联通NAS的安装包,ARM64和X86-64架构的,解压后用AppCenter手动安装qpkg文件

WHJWNAVY avatar Jul 19 '24 04:07 WHJWNAVY

感谢分享,希望可以帮到有需要的人!

monkeyWie avatar Aug 09 '24 10:08 monkeyWie

还可以打包1.5.9吗,或者能不能交一下打包方法。谢谢

yaobohan888 avatar Sep 08 '24 18:09 yaobohan888

还可以打包1.5.9吗,或者能不能交一下打包方法。谢谢

quick start

$ qbuild --create-env Hello # 在当前目录创建Hello工程文件夹
$ cd Hello
$ tree # 工程目录结构
├── arm-x09
├── arm-x19
├── arm-x31
├── arm-x41
├── arm_64
├── x86
├── x86_64
├── x86_ce53xx
├── build_sign.csv
├── config
├── icons
├── package_routines
├── qpkg.cfg
└── shared
    └── Hello.sh
$ rm -rf x86_ce53xx x86 arm-x09 arm-x19 arm-x31 arm-x41 # 去掉不需要的平台
$ tree
├── arm_64
│   └── hello # arm64平台可执行文件
├── x86_64
│   └── hello # x64平台可执行文件
├── build_sign.csv
├── config
├── icons
│   ├── Hello.gif # 小图标, 64x64
│   ├── Hello_80.gif # 大图标 80x80
│   └── Hello_gray.gif # 灰度图标, 64x64
├── package_routines
├── qpkg.cfg # 配置文件
└── shared
    └── Hello.sh # 启动脚本
$ qbuild # 在build文件夹下生成QPKG文件

example

qpkg.cfg

# Name of the packaged application.
QPKG_NAME="Hello"
# Name of the display application.
QPKG_DISPLAY_NAME="Hello World"
# Version of the packaged application. 
QPKG_VER="1.0.0"
# Author or maintainer of the package
QPKG_AUTHOR="Hello"
# License for the packaged application
QPKG_LICENSE="GNU General Public License v3.0"
# One-line description of the packaged application
QPKG_SUMMARY="A Hello World Example!"

# Preferred number in start/stop sequence.
QPKG_RC_NUM="101"
# Init-script used to control the start and stop of the installed application.
QPKG_SERVICE_PROGRAM="Hello.sh"
QPKG_SERVICE_PIDFILE="/var/run/hello.pid"
# Relative path to web interface
QPKG_WEBUI="/"
# Port number for the web interface.
QPKG_WEB_PORT="9999" # 不加此选项应用程序图标不会在桌面和程序栏显示

Hello.sh

#!/bin/sh
CONF=/etc/config/qpkg.conf
QPKG_NAME="Hello" # 应用程序名
EXE_NAME="hello" # 可执行文件名
QPKG_ROOT=`/sbin/getcfg $QPKG_NAME Install_Path -f ${CONF}`
APACHE_ROOT=`/sbin/getcfg SHARE_DEF defWeb -d Qweb -f /etc/config/def_share.info`
export QNAP_QPKG=$QPKG_NAME
export QPKG_NAME QPKG_ROOT APACHE_ROOT

export SHELL=/bin/sh
export LC_ALL=en_US.UTF-8
export USER=admin
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
export HOME=$QPKG_ROOT

export PIDF=/var/run/$EXE_NAME.pid

case "$1" in
    start)
        ENABLED=$(/sbin/getcfg $QPKG_NAME Enable -u -d FALSE -f $CONF)
        if [ "$ENABLED" != "TRUE" ]; then
            echo "$QPKG_NAME is disabled."
            exit 1
        fi

        /bin/ln -sf $QPKG_ROOT /opt/$QPKG_NAME
        /bin/ln -sf $QPKG_ROOT/$EXE_NAME /usr/bin/$EXE_NAME

        cd $QPKG_ROOT
        $EXE_NAME & # 后台运行对应平台的可执行文件
        echo $! > $PIDF
        ;;
    stop)
        if [ -e $PIDF ]; then
            ID=$(more $PIDF)
            kill -9 $ID
            rm -f $PIDF
        fi
        killall -9 $EXE_NAME
        rm -rf /opt/$QPKG_NAME
        rm -rf /usr/bin/$EXE_NAME
        ;;
    restart)
        $0 stop
        $0 start
        ;;
    *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
esac

exit 0

另外你可以看看这个我就是按照这个里面的方法打包的:QDK 快速开发指南中文版

WHJWNAVY avatar Sep 10 '24 02:09 WHJWNAVY

还可以打包1.5.9吗,或者能不能交一下打包方法。谢谢

Gopeed_1.5.9_arm_64.zip Gopeed_1.5.9_x86_64.zip

WHJWNAVY avatar Sep 10 '24 03:09 WHJWNAVY

@WHJWNAVY hello,如果方便的话可以提交一个PR,用github action自动打包,相关代码在这:https://github.com/GopeedLab/gopeed/blob/main/.github/workflows/build.yml

如果需要帮助的话请随时联系我

monkeyWie avatar Sep 10 '24 03:09 monkeyWie

谢谢

Levi @.***> 于 2024年9月10日周二 11:24写道:

@WHJWNAVY https://github.com/WHJWNAVY hello,如果方便的话可以提交一个PR,用github action自动打包,相关代码在这: https://github.com/GopeedLab/gopeed/blob/main/.github/workflows/build.yml

如果需要帮助的话请随时联系我

— Reply to this email directly, view it on GitHub https://github.com/GopeedLab/gopeed/issues/614#issuecomment-2339532317, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANSAECECR3D623WW3S6GAW3ZVZRABAVCNFSM6AAAAABLD2WTZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZZGUZTEMZRG4 . You are receiving this because you commented.Message ID: @.***>

yaobohan888 avatar Sep 10 '24 06:09 yaobohan888

太强了了了! 谢谢

yaobohan888 avatar Mar 06 '25 19:03 yaobohan888