setvisible / ArrowDL

ArrowDL (Arrow Downloader) is a download manager for Windows, MacOS and Linux
https://www.arrow-dl.com/
GNU Lesser General Public License v3.0
553 stars 30 forks source link

Feature: Portable version with local config file #23

Open setvisible opened 3 years ago

setvisible commented 3 years ago

Portable version with local config file

-> Add the choice (local or user registry) as an option in Preferences -> Modify the build scripts to enable the option for the Portable builds, but disable it for other builds.

Plus:

Regards

smaragdus commented 2 years ago

I was about to open an issue for portable mode but I saw that such an issue already exists so I will just comment on it.

Currently DownZemAll! uses Windows registry for saving settings:

HKEY_CURRENT_USER\Software\Sebastien Vavassori\DownZemAll!

I will appreciate if DownZemAll! can save program settings (Windows) in configuration file (for example- CONFIG, INI, JSON, XML, any type of configuration file would be fine) in stead of in Windows registry.

Portabile mode can be implemented in different ways, I will provide several examples below:

  1. command-line argument - if the executable, DownZemAll.exe, is started with a special parameter, for example DownZemAll.exe -portable, settings are saved in program folder, not in Windows registry;
  2. portable flag - special file in program folder (for example portable without extension or portable.txt) triggers portable mode, when DownZemAll! starts it checks program folder for such file and if it is there settings are saved in configuration file in program folder, not in Windows registry;
  3. configuration file - when DownZemAll! starts it checks program folder for a configuration file (for example- DownZemAll!.ini) and if it is there the program saves its settings in this configuration file in program folder, not in Windows registry;
  4. special sub-folder - when DownZemAll! starts it checks program folder for a special sub-folder (for example Data or Settings) and if it is there it saves settings in configuration file in this sub-folder, not in Windows registry;
  5. option in preferences - new check box- Portable Mode, which, if selected, forces the program to save settings in configuration file in program folder, not in Windows registry;

There are other ways of triggering portable mode but I suppose the ones I suggested above are the most common ones. Any of these would be fine for me but I don't like command-line arguments that much because it happens that the user might forget to start the program with a special parameter and then the settings would be saved in Windows registry.

I always prefer to use portable versions of programs if such versions exist or if programs can be run in portable mode because of several advantages portable mode offers:

In my opinion if portable mode is implemented it will make the program more flexible and mobile. Information about how to use the program in portable mode may be included in the ReadMe help file.