Skip to content

godot(-mono): Persist user data#17407

Merged
z-Fng merged 8 commits intoScoopInstaller:masterfrom
haussmann:manifest/godot
Mar 15, 2026
Merged

godot(-mono): Persist user data#17407
z-Fng merged 8 commits intoScoopInstaller:masterfrom
haussmann:manifest/godot

Conversation

@haussmann
Copy link
Copy Markdown
Contributor

@haussmann haussmann commented Mar 14, 2026

Converts godot and godot-mono manifests to use the portable mode (self-contained feature in godot)

Closes #13483
Relates to #13484

Changes:

Issues
⚠️ Currently both manifests godot and godot-mono use the same $env:AppData\\Godot folder. By implementing these changes the current behavior for users using both packages is changed. They will have separate setting stores. According to their documentation "The Steam release of Godot uses self-contained mode by default.", so this type of separated storage behavior between godot and godot-mono seems to be acceptable.

Tests

  • ✅Tested clean install of both packages

  • ✅Tested update procedure

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

  • I have read the Contributing Guide

Summary by CodeRabbit

  • New Features

    • Portable-mode data persistence for Godot and Godot‑Mono: existing user data is automatically migrated to persistent storage.
    • .NET SDK suggestion added for Godot‑Mono (multiple supported versions).
  • Improvements

    • Godot and Godot‑Mono now use separate persistent settings and project stores.
    • Informational and warning messages during migration and a small support file created to enable portable behavior.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 14, 2026

Walkthrough

Adds portable/self-contained handling to Godot manifests: both manifests declare persist: "editor_data", pre_install scripts now migrate existing %AppData%\Godot into persist_dir\editor_data and create a ._sc_ marker file. godot-mono.json also adds a .NET SDK suggestion mapping.

Changes

Cohort / File(s) Summary
Godot manifests
bucket/godot.json, bucket/godot-mono.json
Added top-level persist: "editor_data" and extended pre_install to conditionally copy %AppData%\Godotpersist_dir\editor_data, emit info/warn logs, ensure directories, and create a ._sc_ placeholder file for portable/self-contained mode.
godot-mono suggestions
bucket/godot-mono.json
Added top-level suggest mapping for ".NET SDK" pointing to multiple dotnet SDK entries: dotnet-sdk, versions/dotnet-sdk-lts, versions/dotnet8-sdk, versions/dotnet9-sdk, versions/dotnet10-sdk.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Installer
    participant PreInstall as "pre_install script"
    participant AppData as "AppData\\Godot"
    participant Persist as "persist_dir\\editor_data"
    participant InstallDir as "Package directory"

    Installer->>PreInstall: invoke pre_install
    PreInstall->>AppData: Test-Path AppData\\Godot?
    PreInstall->>Persist: Test-Path persist_dir\\editor_data?
    alt editor_data missing and AppData exists
        PreInstall->>Installer: info "[Portable Mode]: Copying user data..."
        PreInstall->>Persist: Ensure persist_dir exists
        PreInstall->>AppData: Copy-Item AppData\\Godot -> persist_dir\\editor_data
        PreInstall->>Installer: warn "godot and godot-mono now use separate persistent stores"
    end
    PreInstall->>InstallDir: New-Item ._sc_ (create marker)
    Installer->>PreInstall: pre_install complete
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

I'm a rabbit in a portable glen,
Hopping settings home again and again.
I copy, I warn, I tuck files neat,
I drop a tiny .sc for a self-contained seat. 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: enabling persistent user data for both godot and godot-mono manifests through portable mode.
Linked Issues check ✅ Passed The pull request successfully implements the core objective from issue #13483 by creating the .sc marker file to enable Godot's self-contained portable mode in both manifests.
Out of Scope Changes check ✅ Passed All changes align with the stated objectives: portable mode activation via .sc file, user data persistence, and .NET SDK suggestion for godot-mono. No unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description follows the required template with a clear conventional title, linked issues, detailed changes, testing notes, and completed checkboxes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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

All changes look good.

Wait for review from human collaborators.

godot-mono

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

godot

  • 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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@bucket/godot-mono.json`:
- Around line 29-34: The wildcard Copy-Item from "$env:AppData\\Godot\\*" can
fail when the source folder exists but is empty; change the migration to first
enumerate the source with Get-ChildItem (e.g., $items = Get-ChildItem -Path
"$env:AppData\\Godot" -Force -ErrorAction SilentlyContinue) and only call
Copy-Item (or loop Copy-Item per item) if $items has any entries; update the
block around ensure "$persist_dir\\editor_data" and the Copy-Item invocation so
the copy is skipped when the source contains no items to avoid the
non-terminating error.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 22563162-0c65-41a1-b0aa-2040a7299e11

📥 Commits

Reviewing files that changed from the base of the PR and between 652c6a2 and de1bb66.

📒 Files selected for processing (2)
  • bucket/godot-mono.json
  • bucket/godot.json

Comment thread bucket/godot-mono.json
@z-Fng z-Fng changed the title godot(-mono): portable mode, suggest godot(-mono): Persist user data Mar 15, 2026
Comment thread bucket/godot-mono.json Outdated
@z-Fng z-Fng mentioned this pull request Mar 15, 2026
1 task
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

♻️ Duplicate comments (1)
bucket/godot.json (1)

23-27: ⚠️ Potential issue | 🟠 Major

Apply the same non-destructive migration here.

Line 27 has the same first-package-wins behavior as bucket/godot-mono.json: once godot moves $env:AppData\Godot, the companion manifest or any other Godot install no longer sees the existing editor state. Please switch this block to the same copy-based migration.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bucket/godot.json` around lines 23 - 27, The migration block currently
performs a destructive Move-Item of "$env:AppData\Godot" into
$persist_dir\editor_data (first-package-wins); change it to a non-destructive
copy-based migration like the one used in the companion manifest
(godot-mono.json): instead of Move-Item, use a copy operation that preserves the
source (ensuring $persist_dir exists with ensure $persist_dir) and merge
contents into $persist_dir\editor_data (e.g., Copy-Item with recursion/overwrite
semantics and appropriate checks so files are copied only when destination files
are absent or intentionally overwritten), keeping the same log messages and
variables ($persist_dir, editor_data) and removing the destructive Move-Item
call.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@bucket/godot-mono.json`:
- Around line 35-39: The current pre_install uses Move-Item to migrate
$env:AppData\Godot into the package's persist ($persist_dir) which is
destructive; change the migration in the block that references ensure
$persist_dir and Move-Item to instead copy the contents (e.g., use Copy-Item
-Path "$env:AppData\Godot\*" -Destination "$persist_dir\editor_data" -Recurse
-Force) so the original AppData folder remains intact, and remove any redundant
pre-copy item-count guard since copying with wildcard and -Recurse -Force is
sufficient.

---

Duplicate comments:
In `@bucket/godot.json`:
- Around line 23-27: The migration block currently performs a destructive
Move-Item of "$env:AppData\Godot" into $persist_dir\editor_data
(first-package-wins); change it to a non-destructive copy-based migration like
the one used in the companion manifest (godot-mono.json): instead of Move-Item,
use a copy operation that preserves the source (ensuring $persist_dir exists
with ensure $persist_dir) and merge contents into $persist_dir\editor_data
(e.g., Copy-Item with recursion/overwrite semantics and appropriate checks so
files are copied only when destination files are absent or intentionally
overwritten), keeping the same log messages and variables ($persist_dir,
editor_data) and removing the destructive Move-Item call.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 68e99617-fc32-41ea-ad37-9b646503a4d6

📥 Commits

Reviewing files that changed from the base of the PR and between de1bb66 and 4e7570d.

📒 Files selected for processing (2)
  • bucket/godot-mono.json
  • bucket/godot.json

Comment thread bucket/godot-mono.json Outdated
@ScoopInstaller ScoopInstaller deleted a comment from github-actions bot Mar 15, 2026
@z-Fng
Copy link
Copy Markdown
Member

z-Fng commented Mar 15, 2026

/verify

@github-actions
Copy link
Copy Markdown
Contributor

All changes look good.

Wait for review from human collaborators.

godot-mono

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

godot

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

Check the full log for details.

@z-Fng z-Fng merged commit 14a9bb3 into ScoopInstaller:master Mar 15, 2026
3 checks passed
@haussmann haussmann deleted the manifest/godot branch March 20, 2026 05:34
@z-Fng
Copy link
Copy Markdown
Member

z-Fng commented Mar 20, 2026

Please also sync these changes to the following manifests in the Versions bucket:

  • godot-alpha
  • godot-beta
  • godot-dev
  • godot-rc
  • godot-mono-beta
  • godot-mono-dev
  • godot-mono-rc

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.

Godot: Self-contained mode

2 participants