app-id: com.qq.docs runtime: org.freedesktop.Platform runtime-version: '26.08' sdk: org.freedesktop.Sdk base: org.electronjs.Electron2.BaseApp base-version: '26.08' command: tdappdesktop finish-args: - --socket=wayland - --device=dri - --share=network - --filesystem=xdg-download - --talk-name=org.kde.StatusNotifierWatcher - --system-talk-name=org.freedesktop.login1 # required to fix cursor scaling on wayland - --env=XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons add-extensions: org.freedesktop.Platform.electron: version: '26.08' directory: electron cleanup: - '*.a' - '*.la' - /include - /lib/cmake - /lib/debug - /lib/pkgconfig - /man - /share/man - /share/doc - /share/gtk-doc modules: - name: docs buildsystem: simple build-options: no-debuginfo: true build-commands: - bsdtar --to-stdout -xvf docs.deb data.* | bsdtar -xvf - - mv -v opt/腾讯文档 ${FLATPAK_DEST}/docs - mkdir -pv ${FLATPAK_DEST}/electron - install -Dvm644 usr/share/icons/hicolor/scalable/apps/tdappdesktop.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.svg - install -Dvm644 usr/share/applications/tdappdesktop.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.deskstop - desktop-file-edit --set-key="Icon" --set-value="com.qq.docs" ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop - desktop-file-edit --set-key="Exec" --set-value="tdappdesktop %U" ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop - install -Dvm644 ${FLATPAK_ID}.metainfo.xml -t ${FLATPAK_DEST}/share/metainfo - install -Dvm755 tdappdesktop.sh ${FLATPAK_DEST}/bin/tdappdesktop sources: - type: file only-arches: [aarch64] dest-filename: docs.deb url: https://docs.qq.com/api/package/get?channel_id=30001&version_id=latest&package_name=TencentDocs-arm64.deb sha256: b157355045cc81b588574faf7c6076445115a27152308026ceb0e133d0d11e2a size: 302283212 x-checker-data: type: json url: https://docs.qq.com/api/package/update version-query: .result.update_info | fromjson | .version url-query: '"https://docs.qq.com/api/package/get?channel_id=30001&version_id=latest&package_name=TencentDocs-arm64.deb"' - type: file only-arches: [x86_64] dest-filename: docs.deb url: https://docs.qq.com/api/package/get?channel_id=30001&version_id=latest&package_name=TencentDocs-x64.deb sha256: 7093380cd864f8daed31f8708b55018eb4c7b50b08a581d158e706ddf38e3a62 size: 314941660 x-checker-data: type: json url: https://docs.qq.com/api/package/update version-query: .result.update_info | fromjson | .version url-query: '"https://docs.qq.com/api/package/get?channel_id=30001&version_id=latest&package_name=TencentDocs-x64.deb"' - type: file path: com.qq.docs.metainfo.xml - type: file path: com.qq.docs.svg - type: file path: com.qq.docs.desktop - type: script dest-filename: tdappdesktop.sh commands: - export TMPDIR=${XDG_RUNTIME_DIR}/app/${FLATPAK_ID} - exec zypak-wrapper "/app/electron/electron" "/app/docs/app.asar" "--enable-features=UseOzonePlatform" "--ozone-platform=wayland" "--enable-wayland-ime" "--wayland-text-input-version=3" "$@"