Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

上传至 AUR #11

Open
xuangeyouneihan opened this issue Jun 13, 2024 · 6 comments
Open

上传至 AUR #11

xuangeyouneihan opened this issue Jun 13, 2024 · 6 comments

Comments

@xuangeyouneihan
Copy link

xuangeyouneihan commented Jun 13, 2024

如题,本人根据模板改了份PKGBUILD,能正常打包,但安装后运行报错(很可能与 #10 是同一种错误),所幸运行安装后的包的错误日志与直接运行 AppImage 的极其相似
以下是PKGBUILD,如有不当酌情修改:

# Maintainer: My name <myemail at domain dot me>

pkgname=rimetool
# 发布新版本时需要更改此项
pkgver="1.2.9"
pkgrel=1
pkgdesc="中州韵助手重构版,基于 QML&CPP 框架,采用 FluentUI ,支持 Windows、Linux、MacOS,RIME 参数全面可视化工具,支持小狼毫、鼠须管主题渲染、以及百万级别词库管理"
arch=('x86_64')
# 不确定Gitee的那个链接是不是你们的,如果不是的话换下面注释里GitHub的链接
# https://github.com/yanhuacuo/rimetool
url="https://gitee.com/wubi98/rimetool"
# 协议最好也看一下
license=('custom:Unlicense')
depends=('librime' 'zlib' 'fuse2')
options=(!strip !debug)
_appimage="${pkgname}-x86_64.AppImage"
# 不确定Gitee的那个链接是不是你们的,如果不是的话换下面注释里GitHub的链接
# https://mirror.ghproxy.com/https://github.com/yanhuacuo/rimetool/releases/download/${pkgver}/${_appimage}
source_x86_64=("${_appimage}::https://gitee.com/wubi98/rimetool/releases/download/${pkgver}/${_appimage}")
noextract=("${_appimage}")
# 发布新版本时需要更改此项
sha256sums_x86_64=('173d0fa625310df09d4a4999a3d4c06e3b70ce7127b5294e38b16d457b65838a')
appname="rimetool"

prepare() {
    chmod +x "${_appimage}"
    ./"${_appimage}" --appimage-extract
}

build() {
    # Adjust .desktop so it will work outside of AppImage container
    sed -i -E "s|Exec=AppRun|Exec=env DESKTOPINTEGRATION=false /usr/bin/${appname}|"\
        "squashfs-root/${appname}.desktop"
    # Fix permissions; .AppImage permissions are 700 for all directories
    chmod -R a-x+rX squashfs-root/usr
}

package() {
    # AppImage
    install -Dm755 "${srcdir}/${_appimage}" "${pkgdir}/opt/${pkgname}/${pkgname}.AppImage"
    # 因为我没找到协议,所以下面一行注释掉了
    # install -Dm644 "${srcdir}/squashfs-root/LICENSE" "${pkgdir}/opt/${pkgname}/LICENSE"

    # Desktop file
    install -Dm644 "${srcdir}/squashfs-root/${appname}.desktop"\
            "${pkgdir}/usr/share/applications/${appname}.desktop"

    # Icon images
    install -dm755 "${pkgdir}/usr/share/"
    cp -a "${srcdir}/squashfs-root/usr/share/icons" "${pkgdir}/usr/share/"

    # Symlink executable
    install -dm755 "${pkgdir}/usr/bin"
    ln -s "/opt/${pkgname}/${pkgname}.AppImage" "${pkgdir}/usr/bin/${appname}"

    # Symlink license
    install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}/"
    ln -s "/opt/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname"
}
@xuangeyouneihan xuangeyouneihan changed the title 上传至AUR 上传至 AUR Jun 13, 2024
@xuangeyouneihan
Copy link
Author

运行以上 PKGBUILD 打包的版本产生的错误日志:pkg_log.txt
直接运行 AppImage 产生的错误日志:appimage_log.txt

@yanhuacuo
Copy link
Owner

2024/06/13 13:22:54.737[Warning][139850640169152]:QRhiGles2: Failed to create temporary context
2024/06/13 13:22:54.741[Warning][139850640169152]:QRhiGles2: Failed to create context
2024/06/13 13:22:54.741[Warning][139850640169152]:Failed to create RHI (backend 2)
2024/06/13 13:22:54.741[Fatal][139850640169152]:Failed to initialize graphics backend for OpenGL.

OpenGL 协议找不到,这可太奇怪了。
下午我发布一版,不使用 OpenGL 渲染协议的好了。

@yanhuacuo
Copy link
Owner

试试最新的,非 OpenGL 版吧,看看能不能运行起来。
先不着急打包,先试试 AppImage 非 OpenGL 能不能运行起来,能跑再说。

@xuangeyouneihan
Copy link
Author

@yanhuacuo 问下你用这个 PKGBUILD 的版本能正常跑起来不,如果能的话去传下 AUR?更新时只需要更改这个 PKGBUILD 里的版本号和 SHA256 应该就行

@yanhuacuo
Copy link
Owner

@yanhuacuo 问下你用这个 PKGBUILD 的版本能正常跑起来不,如果能的话去传下 AUR?更新时只需要更改这个 PKGBUILD 里的版本号和 SHA256 应该就行

没有试用你们打的包,我就试了一下我发布的 AppImage 包,我临时测了一下就退了,其他同事的开发机,不好整太多活儿。

@xuangeyouneihan
Copy link
Author

xuangeyouneihan commented Jun 15, 2024

把 Wayland 禁了试了试,能正常启动,应该可以算 PKGBUILD 没问题吧。作者之后每发一个版本就需要改下版本号和 Hash,工作量也不会有多大

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants