-
Notifications
You must be signed in to change notification settings - Fork 276
Use %LOCALAPPDATA% to store ini file for WinGet installation #1069
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
base: main
Are you sure you want to change the base?
Conversation
|
Also I remove %USERPROFILE% and %APPDATA% support. Update: restored USERPROFILE and APPDATA support since people may already depend on that. |
|
Instead of checking |
Unfortunately Notepad4.ini is writable in WinGet installation folder, so we can't rely on that to check. |
|
@zufuliu any other comments? |
There are a lot of settings that I wish to roam, such as my configurations for some custom syntax highlighting. Can we refer to the approach of Total Commander in this regard, using redirection to split the ini? For example, the following excerpt [Layout]
BreadCrumbBar=1
CmdLine=1
CurDir=1
DirectoryTabs=1
DriveBar1=1
DriveBar2=1
DriveBarFlat=1
DriveCombo=0
HistoryHotlistButtons=1
InterfaceFlat=1
KeyButtons=1
StatusBar=1
TabHeader=1
XPthemeBg=1
[Associations]
RedirectSection=%COMMANDER_PATH%\User\User.ini
[Command line history]
RedirectSection=%COMMANDER_PATH%\User\History.ini
[SplitPerFile]
RedirectSection=%COMMANDER_PATH%\User\History.ini
[SyncOptions]
RedirectSection=%COMMANDER_PATH%\User\User.ini
[USER]
RedirectSection=%COMMANDER_PATH%\User\User.iniIf there is a RedirectSection value encountered during the section, redirect to another ini file. This method can also be used to set different configurations for different users on the same computer. |
This goes beyond the scope of this change. You should open a different issue to track it. |
|
@zufuliu I updated the PR to restore support for PROFILE and APPDATA, please take another look. |
|
Before applying the change, I'm going to rewrite Lines 546 to 548 in fd22083
|
|
I'm going to integrate the change with some simplifications:
Maybe these could be removed, and restored when people use these folders. |
I think check the parent folder with |
|
Should we also copy |
|
The changes (changed to case sensitive search Lines 6418 to 6422 in ae37bce
in any cases, it will become out of sync when a new scheme is added. |
Instead of search path for magic strings, maybe we can add a registry (e.g. |
Just coped (commit 99498e4) on first run that requires less code. |
With this change, notepad4 will use %LOCALAPPDATA%\notepad4 folder to store ini file if it is running from WinGet installation and keep the ini file in the exe folder unchanged. This will fix the WinGet upgrade issue.