Skip to content

cherry-studio@1.6.7: add support for data persistence#16591

Closed
jbwfu wants to merge 1 commit intoScoopInstaller:masterfrom
jbwfu:cherry-studio
Closed

cherry-studio@1.6.7: add support for data persistence#16591
jbwfu wants to merge 1 commit intoScoopInstaller:masterfrom
jbwfu:cherry-studio

Conversation

@jbwfu
Copy link
Copy Markdown

@jbwfu jbwfu commented Nov 14, 2025

  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

  • Change target to *portable.exe to support data persistence.
  • Ensure full portability by no longer copying files from $Env:AppData\CherryStudio

Related to ScoopInstaller/Versions#2587

Note: Hash retrieval is dependent on the implementation of CherryHQ/cherry-studio#11288 .

Summary by CodeRabbit

  • Chores
    • Switched distribution to portable executables for 64-bit and ARM64 to simplify installation.
    • Removed intermediate pre-/post-install steps to streamline setup.
    • Added persistent data configuration to preserve user data.
    • Updated auto-update behavior with improved artifact detection and explicit integrity hashes.
    • Renamed desktop shortcut target to ensure consistent app naming.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 14, 2025

Walkthrough

Manifest switches Cherry Studio from installer packages to portable executables: URLs and SHA-512 hashes updated for x64 and arm64, pre_install/post_install removed, persist: "data" added, shortcut target renamed, and autoupdate entries adjusted to reference portable artifacts and new regexes.

Changes

Cohort / File(s) Summary
Cherry Studio Portable Migration
bucket/cherry-studio.json
Replaced x64/arm64 installer URLs with portable executable URLs; updated SHA-512 hashes; removed pre_install/post_install blocks; added persist: "data"; renamed shortcut target to Cherry-Studio.exe; updated autoupdate URLs and regexes and added explicit arm64 autoupdate hash entry.

Sequence Diagram(s)

(Skipped — changes are manifest/config updates without new runtime control flow.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify SHA-512 hashes for both architectures.
  • Confirm portable URLs point to correct artifacts and are accessible.
  • Validate autoupdate regexes correctly match new portable artifact names.
  • Ensure persist path and shortcut rename work with existing install logic.

Possibly related PRs

Suggested labels

review-needed

Suggested reviewers

  • z-Fng
  • HUMORCE

Poem

🐰 I hopped through bytes and manifest trees,
Replaced the installers with portable keys,
Data stays put, no scripts to obey,
Cherry-Studio bounces, light as a day,
A rabbit's nibble, quick and pleased. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'cherry-studio@1.6.7: add support for data persistence' directly describes the main change—updating the manifest to enable data persistence by switching to portable executables.
Description check ✅ Passed The description includes both required checkboxes marked, acknowledges the conventional PR title format, mentions reading the contributing guide, and provides relevant context linking to related issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f010184 and 4d6ddcc.

📒 Files selected for processing (1)
  • bucket/cherry-studio.json (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16378
File: bucket/compactgui.json:20-22
Timestamp: 2025-10-19T13:58:23.389Z
Learning: In the ScoopInstaller/Extras repository, the CompactGUI manifest removed hash verification from the autoupdate block because the hash verification mechanism (scraping SHA-256 from release page HTML) is no longer available in newer CompactGUI releases. GitHub asset digests exist in beta releases but not in v3.8.0, and Scoop doesn't have built-in support for extracting from GitHub API asset digests.
📚 Learning: 2025-10-19T13:58:23.389Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16378
File: bucket/compactgui.json:20-22
Timestamp: 2025-10-19T13:58:23.389Z
Learning: In the ScoopInstaller/Extras repository, the CompactGUI manifest removed hash verification from the autoupdate block because the hash verification mechanism (scraping SHA-256 from release page HTML) is no longer available in newer CompactGUI releases. GitHub asset digests exist in beta releases but not in v3.8.0, and Scoop doesn't have built-in support for extracting from GitHub API asset digests.

Applied to files:

  • bucket/cherry-studio.json
📚 Learning: 2025-10-16T15:59:21.258Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16349
File: bucket/fvim.json:45-49
Timestamp: 2025-10-16T15:59:21.258Z
Learning: In Scoop manifests, the `autoupdate.url` and `autoupdate.architecture.<arch>.url` fields must be valid URIs according to the JSON schema (defined with `"format": "uri"`). Variables like `$matchUrlx64` that contain only path segments must be combined with a base URL (e.g., `https://github.com/.../releases/download/`) to form a complete valid URI.

Applied to files:

  • bucket/cherry-studio.json
🔇 Additional comments (3)
bucket/cherry-studio.json (3)

29-40: Autoupdate URLs and regexes are correctly configured for portable executables.

The autoupdate section now references portable.exe artifacts for both x64 (line 29) and arm64 (line 36), and the hash extraction regexes correctly target the respective architectures:

  • Line 32: x64-portable regex for 64bit
  • Line 39: arm64-portable regex for arm64 (previously flagged as incorrect, now fixed)

The URLs are valid URIs and match the release artifact naming convention.


18-18: Data persistence mechanism properly updated for portable executables.

The shift from installer (setup.exe) to portable executables includes:

  • Line 18: Shortcut target corrected to Cherry-Studio.exe (matches actual executable name)
  • Line 22: "persist": "data" field added to persist user data directory

This replaces the previous pre_install/post_install copy logic. However, verify that the data directory is the correct path where Cherry Studio stores configuration and cache, especially since the pre_install logic that copied from $Env:AppData\CherryStudio has been removed.

Confirm that:

  1. The data directory in the portable package contains user-facing configuration
  2. Existing user installations will not lose settings when upgraded to this portable version
  3. The directory name data matches what Cherry Studio expects for persistence

Based on learnings: Previous Scoop manifest updates have required careful attention to persistence behavior when switching between installer and portable formats.

Also applies to: 22-22


8-14: Based on my search results, latest.yml files are generated and uploaded by electron-builder for auto-update functionality, but this is for Electron's electron-updater, not for Scoop's autoupdate mechanism. These are completely different systems:

  • electron-updater (used by Cherry Studio app itself): Uses latest.yml files for app-to-app updates
  • Scoop autoupdate (used by Scoop package managers): Uses regex patterns to extract version/hash from sources

The direct hashes in your manifest (lines 9, 13) are confirmed accurate – GitHub v1.6.7 release assets show SHA-256 hashes matching the portable executables you've added:

  • x64 portable: 30d70c878b7e4eca368fce08bd35d467e49a0289d16b2e25d3e5dc53b0a06d32
  • arm64 portable: 012daeddf5a6bb3c4638ea216285f2c4471ef06062e5337c3c455b9f1e9305ca

The original review comment is based on a misunderstanding. Scoop manifests do not use electron-builder's latest.yml files for autoupdate. The hash format concern is invalid because:

  1. Direct hashes are correctly SHA-256 format
  2. They match the portable.exe artifacts on GitHub
  3. Scoop's autoupdate regex would extract from a different source (not latest.yml)

No changes needed.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

Your changes did not pass all checks.

Please address the issues in the manifest and comment starting with /verify to rerun the checks.

cherry-studio

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e8bb8c0 and f010184.

📒 Files selected for processing (1)
  • bucket/cherry-studio.json (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16378
File: bucket/compactgui.json:20-22
Timestamp: 2025-10-19T13:58:23.389Z
Learning: In the ScoopInstaller/Extras repository, the CompactGUI manifest removed hash verification from the autoupdate block because the hash verification mechanism (scraping SHA-256 from release page HTML) is no longer available in newer CompactGUI releases. GitHub asset digests exist in beta releases but not in v3.8.0, and Scoop doesn't have built-in support for extracting from GitHub API asset digests.
Learnt from: Gitoffthelawn
Repo: ScoopInstaller/Extras PR: 16106
File: bucket/czkawka-gui.json:25-25
Timestamp: 2025-09-05T09:41:52.653Z
Learning: For czkawka-gui manifests in Scoop Extras, the correct upstream filename pattern for Windows GUI builds in recent versions uses "gtk46" (without underscore), not "gtk_46" (with underscore). The autoupdate URL should use "windows_czkawka_gui_gtk46.zip" format. This was confirmed by a working 10.0.0 update with valid hash.
Learnt from: Gitoffthelawn
Repo: ScoopInstaller/Extras PR: 16106
File: bucket/czkawka-gui.json:25-25
Timestamp: 2025-09-05T09:41:52.653Z
Learning: For czkawka-gui manifests in Scoop Extras, the correct upstream filename pattern for Windows GUI builds uses "gtk46" (without underscore), not "gtk_46" (with underscore). The autoupdate URL should use "windows_czkawka_gui_gtk46.zip" format.
Learnt from: SorYoshino
Repo: ScoopInstaller/Extras PR: 16333
File: bucket/potplayer.json:55-64
Timestamp: 2025-10-14T11:15:55.229Z
Learning: In PotPlayer manifests (bucket/potplayer.json), PotPlayer*.ini files (PotPlayer.ini, PotPlayer64.ini, PotPlayerMini.ini, PotPlayerMini64.ini) work correctly with Scoop's hard links and don't need special handling in post_install scripts.
📚 Learning: 2025-10-19T13:58:23.389Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16378
File: bucket/compactgui.json:20-22
Timestamp: 2025-10-19T13:58:23.389Z
Learning: In the ScoopInstaller/Extras repository, the CompactGUI manifest removed hash verification from the autoupdate block because the hash verification mechanism (scraping SHA-256 from release page HTML) is no longer available in newer CompactGUI releases. GitHub asset digests exist in beta releases but not in v3.8.0, and Scoop doesn't have built-in support for extracting from GitHub API asset digests.

Applied to files:

  • bucket/cherry-studio.json
📚 Learning: 2025-10-16T15:59:21.258Z
Learnt from: o-l-a-v
Repo: ScoopInstaller/Extras PR: 16349
File: bucket/fvim.json:45-49
Timestamp: 2025-10-16T15:59:21.258Z
Learning: In Scoop manifests, the `autoupdate.url` and `autoupdate.architecture.<arch>.url` fields must be valid URIs according to the JSON schema (defined with `"format": "uri"`). Variables like `$matchUrlx64` that contain only path segments must be combined with a base URL (e.g., `https://github.com/.../releases/download/`) to form a complete valid URI.

Applied to files:

  • bucket/cherry-studio.json
🔇 Additional comments (4)
bucket/cherry-studio.json (4)

8-9: Verify x64 portable executable hash against release artifacts.

The URL and extraction pattern are correct, but the hash value should be verified to ensure it matches the actual downloadable Cherry-Studio-1.6.7-x64-portable.exe file from the GitHub release.


12-13: Verify arm64 portable executable hash against release artifacts.

The URL and extraction pattern are correct, but the hash value should be verified to ensure it matches the actual downloadable Cherry-Studio-1.6.7-arm64-portable.exe file from the GitHub release.


18-18: Shortcut executable name is correctly aligned with extracted artifact.

The rename from "Cherry Studio.exe" to "Cherry-Studio.exe" correctly matches the extraction target in the URL fragments (lines 8, 12).


22-22: Verify that "data" is the correct persistence directory for Cherry Studio.

The persist field enables the "data" directory to persist across Scoop updates. Confirm that this is the correct directory name used by Cherry Studio to store user data, settings, and other persistent files.

Comment thread bucket/cherry-studio.json Outdated
@jbwfu jbwfu marked this pull request as draft November 15, 2025 18:32
@SorYoshino
Copy link
Copy Markdown
Contributor

Note

Since there is no checksum for *.portable.exe in the *.yml file, the following example demonstrates using the checksum available in the *.yml file.

The method for obtaining the corresponding hash value could be standardised.

┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ master ≡]
└─> jq '{autoupdate}' "D:\Temporary\Software\Microsoft\Windows Sandbox\cherry-studio.json"
{
  "autoupdate": {
    "architecture": {
      "64bit": {
        "url": "https://github.com/CherryHQ/cherry-studio/releases/download/v$version/Cherry-Studio-$version-x64-setup.exe"
      },
      "arm64": {
        "url": "https://github.com/CherryHQ/cherry-studio/releases/download/v$version/Cherry-Studio-$version-arm64-setup.exe"
      }
    },
    "hash": {
      "url": "$baseurl/latest.yml",
      "regex": "(?s)$basename.+?$base64"
    }
  }
}

┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ master ≡]
└─> .\checkver.ps1 -App "D:\Temporary\Software\Microsoft\Windows Sandbox\cherry-studio.json" -f
cherry-studio: 1.6.7 (scoop version is 1.6.7)
Forcing autoupdate!
Autoupdating cherry-studio
DEBUG[1763653151] [$updatedProperties] = [hash url] -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:491:5
DEBUG[1763653151] $substitutions (hashtable) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:221:5
DEBUG[1763653151] $substitutions.$dotVersion                    1.6.7
DEBUG[1763653151] $substitutions.$cleanVersion                  167
DEBUG[1763653151] $substitutions.$match1                        1.6.7
DEBUG[1763653151] $substitutions.$matchTail
DEBUG[1763653151] $substitutions.$version                       1.6.7
DEBUG[1763653151] $substitutions.$basenameNoExt                 Cherry-Studio-1.6.7-x64-setup
DEBUG[1763653151] $substitutions.$buildVersion
DEBUG[1763653151] $substitutions.$preReleaseVersion             1.6.7
DEBUG[1763653151] $substitutions.$baseurl                       https://github.com/CherryHQ/cherry-studio/releases/download/v1.6.7
DEBUG[1763653151] $substitutions.$matchHead                     1.6.7
DEBUG[1763653151] $substitutions.$underscoreVersion             1_6_7
DEBUG[1763653151] $substitutions.$minorVersion                  6
DEBUG[1763653151] $substitutions.$patchVersion                  7
DEBUG[1763653151] $substitutions.$url                           https://github.com/CherryHQ/cherry-studio/releases/download/v1.6.7/Cherry-Studio-1.6.7-x64-setup.exe
DEBUG[1763653151] $substitutions.$majorVersion                  1
DEBUG[1763653151] $substitutions.$dashVersion                   1-6-7
DEBUG[1763653151] $substitutions.$basename                      Cherry-Studio-1.6.7-x64-setup.exe
DEBUG[1763653151] $substitutions.$urlNoExt                      https://github.com/CherryHQ/cherry-studio/releases/download/v1.6.7/Cherry-Studio-1.6.7-x64-setup
DEBUG[1763653151] $hashfile_url = https://github.com/CherryHQ/cherry-studio/releases/download/v1.6.7/latest.yml -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:224:5
Searching hash for Cherry-Studio-1.6.7-x64-setup.exe in https://github.com/CherryHQ/cherry-studio/releases/download/v1.6.7/latest.yml
DEBUG[1763653152] $regex = (?si)Cherry-Studio-1\.6\.7-x64-setup\.exe.+?([a-zA-Z0-9+\/=]{24,88}) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:78:9
Found: sha512:2981b843b9f6383c8a2fa9dcc004e4635aeb8060edbdffdf58723f25c547d6aaab3c60e19439ce31d8418360f141d6ba10b7a60dace33d279cdbd1306bf12427 using Extract Mode
... ...
Writing updated cherry-studio manifest

Additionally, for cherry-studio-pre within the Versions bucket, capture variables may be employed in lieu of beta or rc.

┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ master ≡]
└─> jq '{checkver, autoupdate}' "D:\Temporary\Software\Microsoft\Windows Sandbox\cherry-studio-pre.json"
{
  "checkver": {
    "url": "https://api.github.com/repositories/805155266/releases",
    "jsonpath": "$[?(@.prerelease == true)].tag_name",
    "regex": "v([\\d.]+-(?<stage>\\w+)[\\d.]+)"
  },
  "autoupdate": {
    "architecture": {
      "64bit": {
        "url": "https://github.com/CherryHQ/cherry-studio/releases/download/v$version/Cherry-Studio-$version-x64-setup.exe"
      },
      "arm64": {
        "url": "https://github.com/CherryHQ/cherry-studio/releases/download/v$version/Cherry-Studio-$version-arm64-setup.exe"
      }
    },
    "hash": {
      "url": "$baseurl/$matchStage.yml",
      "regex": "(?s)$basename.+?$base64"
    }
  }
}

┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ master ≡]
└─> .\checkver.ps1 -App "D:\Temporary\Software\Microsoft\Windows Sandbox\cherry-studio-pre.json" -f
cherry-studio-pre: 1.7.0-rc.1 (scoop version is 1.7.0-rc.1)
Forcing autoupdate!
Autoupdating cherry-studio-pre
DEBUG[1763654628] [$updatedProperties] = [hash url] -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:491:5
DEBUG[1763654628] $substitutions (hashtable) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:221:5
DEBUG[1763654628] $substitutions.$dotVersion                    1.7.0.rc.1
DEBUG[1763654628] $substitutions.$cleanVersion                  170rc1
DEBUG[1763654628] $substitutions.$match1                        1.7.0-rc.1
DEBUG[1763654628] $substitutions.$matchTail                     -rc.1
DEBUG[1763654628] $substitutions.$version                       1.7.0-rc.1
DEBUG[1763654628] $substitutions.$basenameNoExt                 Cherry-Studio-1.7.0-rc.1-x64-setup
DEBUG[1763654628] $substitutions.$buildVersion
DEBUG[1763654628] $substitutions.$preReleaseVersion             rc.1
DEBUG[1763654628] $substitutions.$baseurl                       https://github.com/CherryHQ/cherry-studio/releases/download/v1.7.0-rc.1
DEBUG[1763654628] $substitutions.$matchHead                     1.7.0
DEBUG[1763654628] $substitutions.$underscoreVersion             1_7_0_rc_1
DEBUG[1763654628] $substitutions.$minorVersion                  7
DEBUG[1763654628] $substitutions.$patchVersion                  0
DEBUG[1763654628] $substitutions.$url                           https://github.com/CherryHQ/cherry-studio/releases/download/v1.7.0-rc.1/Cherry-Studio-1.7.0-rc.1-x64-setup.exe
DEBUG[1763654628] $substitutions.$majorVersion                  1
DEBUG[1763654628] $substitutions.$dashVersion                   1-7-0-rc-1
DEBUG[1763654628] $substitutions.$basename                      Cherry-Studio-1.7.0-rc.1-x64-setup.exe
DEBUG[1763654628] $substitutions.$urlNoExt                      https://github.com/CherryHQ/cherry-studio/releases/download/v1.7.0-rc.1/Cherry-Studio-1.7.0-rc.1-x64-setup
DEBUG[1763654628] $substitutions.$matchStage                    rc
DEBUG[1763654628] $hashfile_url = https://github.com/CherryHQ/cherry-studio/releases/download/v1.7.0-rc.1/rc.yml -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:224:5
Searching hash for Cherry-Studio-1.7.0-rc.1-x64-setup.exe in https://github.com/CherryHQ/cherry-studio/releases/download/v1.7.0-rc.1/rc.yml
DEBUG[1763654629] $regex = (?s)Cherry-Studio-1\.7\.0-rc\.1-x64-setup\.exe.+?([a-zA-Z0-9+\/=]{24,88}) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:78:9
Found: sha512:04b93851a9a81033cf02d7868e453793ac9c4634290913e039f02974241a5b9c2b34be239d0b246ea1147aeba7252d302003f0d595683e852ebe7dedc2230fd3 using Extract Mode
... ...
Writing updated cherry-studio-pre manifest

@jbwfu
Copy link
Copy Markdown
Author

jbwfu commented Nov 20, 2025

@SorYoshino Thank you for the review!

The method for obtaining the corresponding hash value could be standardised.

This regex is indeed simpler and more robust.

Additionally, for cherry-studio-pre within the Versions bucket, capture variables may be employed in lieu of beta or rc.

This is exactly what I was looking for; your solution is definitely superior. Now that the release workflow for cherry-studio has stabilized, having Scoop support it in this manner would be ideal.

@SorYoshino
Copy link
Copy Markdown
Contributor

If you are interested in this, you may wish to read Properties of autoupdate.hash.

@z-Fng z-Fng added the duplicate label Dec 3, 2025
@z-Fng
Copy link
Copy Markdown
Member

z-Fng commented Dec 3, 2025

@z-Fng
Copy link
Copy Markdown
Member

z-Fng commented Dec 4, 2025

Closing this in favor of #16045.

@z-Fng z-Fng closed this Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants