Skip to content

FR: Portable mode on windows #5

@AtmanActive

Description

@AtmanActive

Hi,

Thanks for this project, it looks really interesting.

This is about using it on windows.

The hardcoded config file path makes it unusable in portable mode (where an app is independent of the Installation path or a particular windows installation). Yes, command-line options can override this, true, but there is an even easier way to allow someone to use it in portable mode.

Advantages of running windows software in portable mode are numerous: never lose your config and time invested in setting up the software, and, also, have many versions set up in parallel (just by using different folder names), for testing, or for multiple use cases or multiple machines.

Here is how to make your app work in portable mode, in addition to the existing windows-way mode:

  • on app startup, first self-discover your own executed path (do not try to presume some well-known path, like Program Files, for example, but relly on what your run-time exe reports back once running)
  • then, check for the existence of a config dir/file in the same folder on that same path.
  • If it exists, use that config dir/file. If not, continue as normal.

In this way, advanced users can copy or create an empty config file in the same folder where the exe is and take it from there, having all data encapsulated in that one folder, without creating anything on well known windows paths (like C:\Users\xxx). Then, if needed, advanced users can easily copy the whole folder for backups, copy the whole folder to other machines, or, make copies to maintain several versions in parallel.

For non-advanced users, the app continues to work as described in your ReadMe (using C:\Users\xxx).

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions