Skip to content

Allow portable mode to use a custom folder #572

@lwcorp

Description

@lwcorp

Thanks for making this launcher portable in #364!

As https://theforceengine.github.io/Documentation.html states:

Note that TFE stores saves, set up info, screenshots, log files, and similar items under Documents/TheForceEngine/. A portable installation option, where all data is kept in the local directory, is planned for the future.

But that's not actually true, as there is already a way to avoid that by creating an empty settings.ini - see #571 for the documentation request of this.

In any case, what's still missing is a way to define a custom folder or even a subfolder, so as to separate the launcher's static data from the dynamic settings.

TheForceEngine/TFE_FileSystem/paths.cpp checks for settings.ini via bool isPortableInstall().

What I suggest is to support having a setting in that file like custompath_generic=.\data and/or custompath_darkforces=.\data\Dark Forces, which will make sure the following will be saved there:

  1. [custompath_generic]\settings.ini
  2. [custompath_generic]\settings_default.ini
  3. [custompath_generic]\the_force_engine_log.txt
  4. [custompath_generic]\the_force_engine_log.txt.1
  5. [custompath_generic]\tfe_input_remapping.bin
  6. [custompath_generic]\Replays\
  7. [custompath_generic]\Saves\
  8. [custompath_generic]\Screenshots\
  9. [custompath_generic]\Temp\

Or - per @darkstar252's request in the comments:

  1. [custompath_darkforces]\settings.ini
  2. [custompath_darkforces]\settings_default.ini
  3. [custompath_darkforces]\the_force_engine_log.txt
  4. [custompath_darkforces]\the_force_engine_log.txt.1
  5. [custompath_darkforces]\tfe_input_remapping.bin
  6. [custompath_darkforces]\Replays\
  7. [custompath_darkforces]\Saves\
  8. [custompath_darkforces]\Screenshots\
  9. [custompath_darkforces]\Temp\

i.e. all dynamic files and folder under just 1 root folder (or sub folder) e.g. custompath_generic=.\data will be a folder called dark under the launcher's own folder.

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