zufuliu / notepad4

Notepad4 (Notepad2⨯2, Notepad2++) is a light-weight Scintilla based text editor for Windows with syntax highlighting, code folding, auto-completion and API list for many programming languages and documents, bundled with file browser plugin matepath.
Other
3.28k stars 212 forks source link

Updating through winget is not smooth #834

Closed stevenlele closed 6 days ago

stevenlele commented 2 months ago

https://github.com/zufuliu/notepad4/blob/77c708f5717acc0876e1b956dfd7be51046aa584/doc/release.md?plain=1#L22-L23

When updating through winget, it will check if the SHA256 of all files match the installation. Typically, the INI file is modified, so it will stop updating. Adding --force will let winget remove the configuration file and update. So basically the user need to copy the INI files out of the installation folder, force update, then copy the INI files back. The same thing happens upon uninstallation.

To make the update smooth, you need to move the default configuration directory to %APPDATA%/AppName. This might be a breaking change, but you could, for example, automatically move existing old configuration files to that folder upon opening Notepad4 (if detected). It will also mean that you need to hardcode the default INI files into an executable and extract them if they are absent.

You can close this issue if you don't bother implementing it.

zufuliu commented 2 months ago

cc winget package maintainer @MerrickZ.

MerrickZ commented 2 months ago

I am worried that currently, when notepad4 is presented as a zip archive, winget does not support this operation.

Potential solutions might include:

  1. Provide an installer (msi / msix / nullsoft / Inno / wix , etc.).
  2. Move the INI file to %userProfile% directory, as previously mentioned. by @stevenlele
  3. Use registry as default and provide export/import INI as an option.
  4. maybe some unknown winget configurations..?

I'll investigate what I can do this weekend.

stevenlele commented 6 days ago

Might as well use scoop:

zufuliu commented 2 days ago

Is this fixed? @stevenlele what's command to install Notepad4 using Scoop, scoop install notepad4?

stevenlele commented 2 days ago

Is this fixed?

No, I don't think this will ever be fixed from either side. Nobody here seems interested in working on changing the config directory, while pushing WinGet to support such a "complicated" feature is nearly impossible. Therefore I closed this issue as "not planned".

what's command to install Notepad4 using Scoop, scoop install notepad4?

No. The package is still named notepad2-zufuliu at version 4.24.05r5242. To install it, user need to manually install Scoop, run scoop bucket add extras, then install the package.

As you can see in https://github.com/ScoopInstaller/Extras/pull/13920, the only active maintainer reviewer of the official Scoop extras bucket, @aliesbelik, currently silently refuses to review or merge any PRs they are not interested in, so you can say the repo is not actually under good maintenance.

Of course, you can maintain your own bucket with https://github.com/ScoopInstaller/BucketTemplate.

Since the package is outdated and the installation steps are complicated, I don't recommend putting it in the instructions.