Open
Conversation
… data directory Co-authored-by: SteveZMTstudios <98326195+SteveZMTstudios@users.noreply.github.com>
Implement portable mode via `./config` directory detection
|
参照其他 App 设计的话最好在打包 Portable Version 的时候在目录下写一个文件表明是 Portable |
Author
|
flclash在打出release的时候有portable版本。我加这个主要是因为那个portable的版本也会把用户数据存储到c盘里面,不好随着u盘移动 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
正在尝试修复 #1882
此拉取请求更新了
lib/common/path.dart中的AppPath类,为桌面平台添加了便携模式支持。现在,如果可执行文件旁存在一个config目录,应用程序将使用该目录作为数据目录,而不是默认的平台特定位置。便携模式支持:
isPortable标志,用于指示应用程序是否以便携模式运行。_initDataDir方法,用于在桌面平台(Windows、macOS、Linux)上检查可执行文件旁是否存在config目录。如果找到,应用程序将使用该目录作为数据目录,并将isPortable设置为 true;否则,将回退到标准的应用程序支持目录。仍在测试。