Skip to content

Commit

Permalink
add-cherry-studio
Browse files Browse the repository at this point in the history
  • Loading branch information
pugaizai committed Feb 22, 2025
1 parent 7201e1c commit d64e603
Show file tree
Hide file tree
Showing 17 changed files with 83 additions and 30 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
git config --global protocol.file.allow always
declare -a apps=(
"manifests/com.cherry_ai.cherrystudio/com.cherry_ai.cherrystudio.yml"
"manifests/io.github.wgh136.pixes/io.github.wgh136.pixes.yml"
"manifests/io.github.venera_app.venera/io.github.venera_app.venera.yml"
"manifests/com.xiaoyaocz.simplelive/com.xiaoyaocz.simplelive.yml"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
appid: # list all flatpak application id to check
# - io.github.arvinlovegood.go-stock
# - com.cherry_ai.cherrystudio
- com.cherry_ai.cherrystudio
- io.github.venera_app.venera
- io.github.wgh136.pixes
- top.jtmonster.jhentai
Expand Down
1 change: 0 additions & 1 deletion manifests/cn.wps.office/apply_extra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,3 @@ rm -r wps-office.deb deb-package

# Remove plugin path so we can override the default path with based on QT_PLUGIN_PATH
sed -i 's|^Plugins=.*||g' wps-office/office6/qt.conf

Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@
</screenshots>

<releases>
<release version="0.9.27" date="2025-02-19">
<description></description>
</release>
<release version="0.9.27" date="2025-02-19">
<description/>
</release>
<release version="1.0.0" date="2024-03-15"/>
</releases>

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 66 additions & 17 deletions manifests/com.cherry_ai.cherrystudio/com.cherry_ai.cherrystudio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ app-id: com.cherry_ai.cherrystudio
runtime: org.freedesktop.Platform
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.node22
base: org.electronjs.Electron2.BaseApp
base-version: '24.08'
command: cherrystudio
Expand All @@ -13,27 +11,78 @@ finish-args:
- --socket=wayland
- --share=network
- --device=dri
- --talk-name=org.kde.StatusNotifierWatcher
# 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: '24.08'
directory: electron

cleanup:
- '*.a'
- '*.la'
- /include
- /lib/cmake
- /lib/debug
- /lib/pkgconfig
- /man
- /share/man
- /share/doc
- /share/gtk-doc

modules:
- name: cherrystudio
buildsystem: simple
build-options:
build-args:
- --share=network
append-path: /usr/lib/sdk/node22/bin
no-debuginfo: true
build-commands:
- yarn
- yarn build:linux
- mkdir -p ${FLATPAK_DEST}/app
- cp -r dist/* ${FLATPAK_DEST}/app/
- ln -s ${FLATPAK_DEST}/app/dist/main.js ${FLATPAK_DEST}/bin/cherrystudio
- mkdir -p ${FLATPAK_DEST}/electron
- chmod +x Cherry-Studio.AppImage
- ./Cherry-Studio.AppImage --appimage-extract
- mv squashfs-root/resources ${FLATPAK_DEST}/cherrystudio
- desktop-file-edit --set-key="Icon" --set-value="com.cherry_ai.cherrystudio"
--set-key="Categories" --set-value="Utility;Network;" --set-key="Exec" --set-value="cherrystudio
%U" --remove-key="X-AppImage-Version" squashfs-root/cherrystudio.desktop
- install -Dm644 squashfs-root/cherrystudio.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop
- install -Dm644 ${FLATPAK_ID}.metainfo.xml -t ${FLATPAK_DEST}/share/metainfo
- install -Dm644 ${FLATPAK_ID}.png -t ${FLATPAK_DEST}/share/icons/hicolor/512x512/apps
- install -Dm755 cherrystudio.sh ${FLATPAK_DEST}/bin/cherrystudio
sources:
- type: git
url: https://github.com/CherryHQ/cherry-studio.git
tag: v0.9.27
commit: 7f05626a8fe76b99a22ed4e36e436533a10d902d
- type: file
only-arches: [x86_64]
url: https://github.com/CherryHQ/cherry-studio/releases/download/v0.9.27/Cherry-Studio-0.9.27-x86_64.AppImage
sha256: ff2531c0cf95a3eb9ddc6a11275e8404a2b64c7ac5400929b7a757ff00ef2da3
dest-filename: Cherry-Studio.AppImage
x-checker-data:
type: git
tag-pattern: ^v([\d.]+)$
type: json
url: https://api.github.com/repos/CherryHQ/cherry-studio/releases/latest
version-query: .tag_name | sub("^v"; "")
url-query: .assets[] | select(.name | endswith("x86_64.AppImage")) | .browser_download_url
- type: file
only-arches: [aarch64]
url: https://github.com/CherryHQ/cherry-studio/releases/download/v0.9.27/Cherry-Studio-0.9.27-arm64.AppImage
sha256: 04a523121feefe0c48bdecbd46b8ab2067eddc51c23ce5aa577b81e92377a49b
dest-filename: Cherry-Studio.AppImage
x-checker-data:
type: json
url: https://api.github.com/repos/CherryHQ/cherry-studio/releases/latest
version-query: .tag_name | sub("^v"; "")
url-query: .assets[] | select(.name | endswith("arm64.AppImage")) | .browser_download_url
- type: file
path: com.cherry_ai.cherrystudio.metainfo.xml
- type: file
path: com.cherry_ai.cherrystudio.metainfo.xml
path: com.cherry_ai.cherrystudio.png
- type: script
dest-filename: cherrystudio.sh
commands:
- export TMPDIR=${XDG_RUNTIME_DIR}/app/${FLATPAK_ID}
- WAYLAND_SOCKET=${WAYLAND_DISPLAY:-"wayland-0"}
- |
if [[ -e "${XDG_RUNTIME_DIR}/${WAYLAND_SOCKET}" || -e "${WAYLAND_DISPLAY}" ]]
then
FLAGS="--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime --wayland-text-input-version=3"
fi
- exec zypak-wrapper "/app/electron/electron" "/app/cherrystudio/app.asar"
$FLAGS "$@"
2 changes: 1 addition & 1 deletion manifests/com.cursor.cursor/com.cursor.cursor.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Icon=com.cursor.cursor
StartupWMClass=Cursor
Comment=Cursor is an AI-first coding environment.
MimeType=x-scheme-handler/cursor;
Categories=TextEditor;Development;IDE;
Categories=TextEditor;Development;IDE;
2 changes: 1 addition & 1 deletion manifests/com.cursor.cursor/cursor
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ fi
exec env ELECTRON_RUN_AS_NODE=1 PATH="${EXTRA_PATH}:${PATH}:${XDG_DATA_HOME}/node_modules/bin" \
/app/bin/zypak-wrapper.sh /app/extra/cursor/cursor /app/extra/cursor/resources/app/out/cli.js \
--ms-enable-electron-run-as-node --extensions-dir=${XDG_DATA_HOME}/cursor/extensions \
"$@" ${WARNING_FILE} ${CODE_USER_FLAGS}
"$@" ${WARNING_FILE} ${CODE_USER_FLAGS}
2 changes: 1 addition & 1 deletion manifests/com.cursor.cursor/npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
userconfig=${XDG_CONFIG_HOME}/npmrc
prefix=${XDG_DATA_HOME}/node_modules
init-module=${XDG_CONFIG_HOME}/npm-init.js
tmp=${XDG_CACHE_HOME}
tmp=${XDG_CACHE_HOME}
2 changes: 1 addition & 1 deletion manifests/com.qq.docs/com.qq.docs.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Icon=com.qq.docs
StartupWMClass=腾讯文档
Comment=腾讯文档
MimeType=application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/msword;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel;application/pdf;application/x-xmind;text/csv;
Categories=Office;
Categories=Office;
2 changes: 1 addition & 1 deletion manifests/com.qq.qqmusic/com.qq.qqmusic.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Icon=com.qq.qqmusic
StartupWMClass=QQMusic
Comment=QQMusic
Comment[zh_CN]=QQ音乐
Categories=AudioVideo;
Categories=AudioVideo;
1 change: 0 additions & 1 deletion manifests/com.qq.qqmusic/com.qq.qqmusic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,3 @@ modules:
FLAGS="--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime --wayland-text-input-version=3"
fi
- exec zypak-wrapper "/app/electron/electron" "/app/qqmusic/app.asar" $FLAGS "$@"

Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Icon=com.xiaoyaocz.simplelive
Exec=simple_live_app %U
Categories=AudioVideo;Audio;Video;Network;
Keywords=SimpleLive;
StartupNotify=true
StartupNotify=true
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Comment=Auto ban unwanted bittorrent client.
Exec=peerbanhelper
Icon=io.github.pbh_btn.peerbanhelper
Categories=Network;
Terminal=false
Terminal=false
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ modules:
# Workaround: To keep engine.version and allow shallow clones: https://github.com/flutter/flutter/issues/163308
- type: shell
commands:
- rm -f flutter/engine/src/.gn
- rm -f flutter/engine/src/.gn
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ modules:
# Workaround: To keep engine.version and allow shallow clones: https://github.com/flutter/flutter/issues/163308
- type: shell
commands:
- rm -f flutter/engine/src/.gn
- rm -f flutter/engine/src/.gn
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,3 @@ modules:
project-id: 17779
stable-only: true
url-template: https://github.com/electron/electron/releases/download/v$version/electron-v$version-linux-x64.zip

0 comments on commit d64e603

Please sign in to comment.