ShellAnything
ShellAnything copied to clipboard
Create another executable that can manage configurations
The first time ShellAnything is launched, it create the user's personal directory %USERPFOFILE%\ShellAnything and copies the "official" Configuration Files to this directory.
When a new version is installed, ShellAnything will not overwrite the existing configurations. Because of that, a user may not get the latest update on default.xml Configuration File.
An second application should be created that would properly manage configurations.
Possible feature of the application would be:
- Repair the configurations (factory reset). This would delete all existing configurations and install the official configurations that are published with the application.
- Merge official configuration with existing configurations. Don't really know how to do this yet. We will see.
- Host the application's icon to solve issue #63.
The merging problem:
For solving the merge issue, the application could have a database (an xml file) with the checksum (probably md5) of all_Configuration Files_ published with each previous version. This would provide a "safe" way of knowing if a given configuration was modified by the user.
- If the md5 checksum is equal to the one in the database, the file can be safely updated with no risk of loosing user's modifications.
- If the checksum is not equals, we can inform the user that a new version of the Configuration File is available and ask the user to manually merge the content.
If we need to do this per <menu> instead of per Configuration File, then a Menu::GetsignatureChecksum() method could be implemented. The method would need to "drill down" to the menu's sub classes: Icon, Validator, Actions, etc...
Another implementation to detect that a configuration is "out of date", is to add to each official Configurations File should have an xml node which contains the source url of the most up to date version. For example:
<?xml version="1.0" encoding="utf-8"?>
<root>
<information>
<url>https://raw.githubusercontent.com/end2endzone/ShellAnything/master/resources/configurations/default.xml</url>
<version>2.3</version>
<checksum type="crc32">2BF12893</checksum>
</information>
<shell>
<!-- ... -->
</shell>
</root>
With the <checksum> node, the application could compare the declared checksum with the content of the local Configuration File to validate if the file was locally modified. With the <version> and <url> nodes, the application can validate if the local file is out of date and propose to download a new version of the file.