#6 Path to Config file setting

closed-accepted
Config File (5)
5
2011-02-28
2011-02-18
Sam Gleske
No

I was also thinking of creating a setting called
[settings]
config=PATH_TO_CONFIG

Where PATH_TO_CONFIG would be a user defined path to the config settings. That way the user defined settings for keyfinder can be referenced to the Data path in portable apps. The paths within the settings would still remain relative to the executable of Keyfinder.

----------------------------------------------------------------------------------------------------------

It wouldn't be redundant. The reason being keyfinder.ini (which would be located with keyfinder.exe) would refer to the actual keyfinder.ini where all the settings are. Example:

KeyfinderPortable\App\keyfinder\keyfinder.cfg
KeyfinderPortable\App\keyfinder\keyfinder.exe
KeyfinderPortable\App\keyfinder\keyfinder.ini
KeyfinderPortable\Data\settings\keyfinder.cfg
KeyfinderPortable\Data\settings\keyfinder.ini

KeyfinderPortable\App\keyfinder\keyfinder.ini would contain the following...
[Settings]
AlternateSettingsPath=..\..\Data\settings\keyfinder.ini

KeyfinderPortable\Data\settings\keyfinder.ini would contain the users settings:
[Settings]
LogFilePath=.\ Logging=0
CSVDelim=,
AppendTop=0
AutoSave=0
LoadHive=0
LogOverwrite=0
PrintKeys=0
SavePath=C:\Users\Sam\Desktop\ ReportsPath=
UserHivePath=
SoftwareHivePath=
UnstableUpdates=1
[AppListFont]
Font=MS Sans Serif,1,-16777208,8,0
[KeyListFont]
Font=MS Sans Serif,1,-16777208,8,1

I could also define an AlternateConfigPath setting where user defined settings could be. So KeyfinderPortable\Data\settings\keyfinder.cfg could be the user defined keyfinder.cfg and KeyfinderPortable\App\keyfinder\keyfinder.cfg can be the official version.

That way keyfinder.cfg and keyfinder.ini (the user customized settings and config) will be backed up by the PortableApps backup utility.

[Settings]
AlternateSettingsPath=..\..\Data\settings\keyfinder.ini

----------------------------------------------------------------------------------------------------------

See the original conversation:
http://portableapps.com/node/26332#comment-168607

Discussion

  • Sam Gleske

    Sam Gleske - 2011-02-27

    This feature has been committed to the SVN repository. Currently there's a bug with user.cfg not correctly being read as a relative path when the user clicks "File > Refresh".

    I am tracking down the bug and will fix it before this method goes mainstream in the next release.

     
  • Sam Gleske

    Sam Gleske - 2011-02-28

    This has been implemented in v0.1 Beta 7.

     
  • Sam Gleske

    Sam Gleske - 2011-02-28
    • assigned_to: nobody --> sag47
    • status: open --> closed-accepted
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks