Skip to content

implement: Portable Mode #4171

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

MiguVT
Copy link

@MiguVT MiguVT commented Aug 14, 2025

This pull request adds support for a "portable mode" to the Modrinth App, allowing users to run the application from any location with all data stored alongside the executable. The implementation includes both backend and documentation updates to detect and describe portable mode activation via either an environment variable or a portable.txt file.

Portable Mode Implementation:

  • Added detection logic for portable mode in DirectoryInfo by checking for the MODRINTH_PORTABLE environment variable or the presence of a portable.txt file next to the executable. When enabled, all app data is stored in a ModrinthAppData directory beside the executable.
  • Updated the settings and config directory resolution to use the portable directory when portable mode is detected.

API and Command Updates:

  • Introduced a new Tauri command is_portable in main.rs to expose portable mode status to the frontend, and registered it in the app’s invoke handler. [1] [2]

Documentation:

  • Added a comprehensive guide on portable mode (portable-mode.md), including activation methods, directory structure, use cases, conversion instructions, troubleshooting, and security considerations.

@IMB11 IMB11 added enhancement New feature or request app Relates to Modrinth App labels Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Relates to Modrinth App enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants