Where do you prefer save preference files?
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 182 from 2003/7/26
    From: Wroclaw/Poland
    I have simple question (kind of poll) to MorphOS users. The question is:

    Where do you prefer save preference file of an application?
      1. PROGDIR:settings
      2. ENV: and ENVARC:
      3. SYS:Prefs/Applications


    In my opinion the first case is not good solution. The second case is classic AmigaOS solution. The third place is new MorphOS standard. This directory contains preference files of e.g.: Jukebox, MagicBeacon, Shuffle.
  • »12.06.17 - 19:56
    Profile Visit Website
  • MorphOS Developer
    geit
    Posts: 882 from 2004/9/23
    Well, basically it depends on why kind of application you create.

    If you have a commodity the user may drag around storing config inside the icon may be even better.

    Progdir: only works if you have one. If there is just the application + icon there is no way to store data in progdir:.

    Sys:Data/<appname>/... is a good and unify way to store data and config, too. When using MUI it is probably a good idea to use its config feature and store data using muis data space feature.

    Probably it is the best to store data in sys:data/<appname> and config in sys:prefs/<appname> if mui setings do not work for the case.
  • »12.06.17 - 20:44
    Profile
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 182 from 2003/7/26
    From: Wroclaw/Poland
    Good answer. :) Where would you save preferences of demoscene production (demo)?
  • »13.06.17 - 06:20
    Profile Visit Website
  • Moderator
    Kronos
    Posts: 1641 from 2003/2/24
    NIL:

    *runs*

    For something like this I'd prefer either the icon (tooltypes) or progdir: so you can delete the whole thing after watching it twice.
    --------------------- May the 4th be with you ------------------
    Mother Russia dance of the Zar, don't you know how lucky you are
  • »13.06.17 - 10:02
    Profile
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 182 from 2003/7/26
    From: Wroclaw/Poland
    Quote:

    Kronos wrote:
    NIL:

    *runs*

    For something like this I'd prefer either the icon (tooltypes) or progdir: so you can delete the whole thing after watching it twice.


    It is interesting point of view. Thank you.

    Generally I don’t like preferences in PROGDIR because during updating application to new version I have to remember keep settings. If preferences are in ENV/ENVARC or SYS:Prefs/Applications/<AppName> I can just delete all files in application folder and install new.

    However in case of demoscene productions I can accept your solution. :) I don’t like a lot of preference files in ENVARC (and especially ENV in RAM) saved by applications which I use once or twice. :)

    This is not easy issue. Maybe in future MorphOS Team should add something like AppCleaner for macOS which removes application with all its preferences and data outside the application folder. It is very simple solution but works very well…
  • »13.06.17 - 13:21
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    polluks
    Posts: 261 from 2007/10/23
    From: Gelsenkirchen,...
    Quote:

    MDW schrieb:
    This is not easy issue. Maybe in future MorphOS Team should add something like AppCleaner for macOS which removes application with all its preferences and data outside the application folder. It is very simple solution but works very well…


    Maybe you simply uninstall for example by Grunch :-)
    Pegasos II G4: MorphOS 3.9, Zalman M220W
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.9
  • »13.06.17 - 13:39
    Profile
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 182 from 2003/7/26
    From: Wroclaw/Poland
    Quote:

    polluks wrote:
    Maybe you simply uninstall for example by Grunch :-)

    I like Grunch (especially for updates)! However I don't remember if the Grunch deletes preference files when I delete an application.
  • »13.06.17 - 13:42
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Crumb
    Posts: 698 from 2003/2/24
    From: aGaS & CUAZ Al...
    Quote:

    MDW wrote:
    I have simple question (kind of poll) to MorphOS users. The question is:

    Where do you prefer save preference file of an application?
      1. PROGDIR:settings
      2. ENV: and ENVARC:
      3. SYS:Prefs/Applications


    In my opinion the first case is not good solution. The second case is classic AmigaOS solution. The third place is new MorphOS standard. This directory contains preference files of e.g.: Jukebox, MagicBeacon, Shuffle.


    1. Tooltypes or config files are ok
    2&3 it's not ok because it pollutes my system with files without my consent. Each app can do unexpected things and scatter files all over my hd. It's easier for me to do a backup with lha of the contents of a directory than looking for each individual file at envarc/prefs/whatever.

    Tooltypes are a good idea for a demo.

    An app should be unpacked to a directory and that's all. No installers, no package managers. Grunch is nice but I prefer to keep backups of my lhas... If author dissapears and repository dies no backups Will be available. Aminet IS prefered: mirrors worldwide and enough visible. Checking out each author webpage is a pain in the ass. Grunch installing stuff located at aminet servers os nice... Personal servers aren't good in the long term... See itix server for example.

    [ Edited by Crumb 13.06.2017 - 16:56 ]
  • »13.06.17 - 15:45
    Profile Visit Website
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 182 from 2003/7/26
    From: Wroclaw/Poland
    Quote:

    Crumb wrote:
    An app should be unpacked to a directory and that's all. No installers, no package managers.

    Yes, you are right but settings should be kept after update application. I also don't like when an application saves files outside its directory. However I accept if application saves prefs in directory for preferences (ENV/ENVARC, SYS:Prefs/Applications/<AppName>). It is consistent with rules of operating system.
  • »13.06.17 - 16:02
    Profile Visit Website
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 182 from 2003/7/26
    From: Wroclaw/Poland
    Thank you for the discussion. Generally Amiga-people don't like if an application saves something outside its directory. So I will save preference file in PROGDIR. In case of demoscene productions it is acceptable for me. :)
    I hope nobody starts demos from CD/DVD. ;) ;)

    [ Edited by MDW 13.06.2017 - 17:09 ]
  • »13.06.17 - 16:08
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    connor
    Posts: 469 from 2007/7/29
    You should always consider that not everybody uses Grunch, so you must think of the plain way to install/update your demo in any case. And what is the problem to exclude one file from delete “~(myconfigfile)”? Or why do you have to delete existing files at all when you install an update? If you delete everything and then copy everything then this is not really an “update”. In that case you can tell the user “throw away the old directory and unpack the new one”. Not what I expect from an update btw. And wouldn’t your demo need a nice icon? So why not store all settings in its tooltypes? If the programmer thinks well, then there is no need for things like AppCleaner, CCleaner and all that stuff.
  • »13.06.17 - 16:57
    Profile
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 182 from 2003/7/26
    From: Wroclaw/Poland
    In my opinion tooltypes in icon is solution for small programs which don’t have GUI for settings.

    Each operating system specifies folder outside the application folder where preferences and application data are stored. Amiga-users (me too) don’t like ENV because it occupies RAM. :) I am happy that MorphOS team tries to force new standard (SYS:Prefs/Applications/<AppName>). In my opinion ENV/ENVARC should be used only for common preference which are used by more applications (e.g. MUI, global environment variables).

    Generally is not good if application modifies its folder. Application on iOS and macOS (only apps installed from MacAppStore) today can't do it.

    All additional data (like plugins, extensions) shouldn't be installed in application folder. After delete application (or "reinstall"), user settings and data should be kept and user should know where it is stored.

    In MorphOS we add libraries to SYS:Libs. MOSSYS:Libs shouldn't be modified. It is very good solution - now update of MorphOS is easy and non-problematic. Try to update AmigaOS 3.x... It is impossible without big user intervention. :) :)
  • »13.06.17 - 18:18
    Profile Visit Website
  • jPV
  • Paladin of the Pegasos
    Paladin of the Pegasos
    jPV
    Posts: 1273 from 2003/2/24
    From: po-RNO
    Quote:

    MDW wrote:
    Quote:

    polluks wrote:
    Maybe you simply uninstall for example by Grunch :-)

    I like Grunch (especially for updates)! However I don't remember if the Grunch deletes preference files when I delete an application.

    If the database item is written correctly by the rules, it will also remove the preference files. I've been using ENV/ENVARC for my programs, and if you uninstall them with Grunch, these will be cleared too.
  • »13.06.17 - 21:11
    Profile Visit Website
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 182 from 2003/7/26
    From: Wroclaw/Poland
    Quote:

    jPV wrote:
    If the database item is written correctly by the rules, it will also remove the preference files. I've been using ENV/ENVARC for my programs, and if you uninstall them with Grunch, these will be cleared too.

    I didn't know. Great!
  • »15.06.17 - 15:57
    Profile Visit Website
  • MorphOS Developer
    itix
    Posts: 1511 from 2003/2/24
    From: Finland
    ENV/ENVARC has one advantage: it supports Use/Save pattern out of the box. That is, if you want/need this particular preferences model.
    1 + 1 = 3 with very large values of 1
  • »15.06.17 - 21:03
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    r-tea
    Posts: 253 from 2005/3/27
    From: Opole, Poland
    Quote:

    MDW wrote:
    I can just delete all files in application folder and install new.


    Keep in mind, we DO NOT have folders at all. We do have directories or (better) drawers.
    :-D

    I miss draggable screens... and do you? I know I'm in a minority unfortunately.
  • »15.06.17 - 21:52
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Minuous
    Posts: 111 from 2010/2/13
    The official User Interface Style Guide (http://amigan.1emu.net/aw/style.zip) already gives lengthy guidance to developers on this matter.
  • »16.06.17 - 09:17
    Profile Visit Website
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 182 from 2003/7/26
    From: Wroclaw/Poland
    Quote:

    itix wrote:
    ENV/ENVARC has one advantage: it supports Use/Save pattern out of the box. That is, if you want/need this particular preferences model.

    I am not sure if we need the Use/Save model in 2017. :) However if we need, it is very easy way for support this model.
  • »16.06.17 - 21:12
    Profile Visit Website
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 182 from 2003/7/26
    From: Wroclaw/Poland
    Quote:

    r-tea wrote:
    Keep in mind, we DO NOT have folders at all. We do have directories or (better) drawers.
    :-D


    You are right! I am lame! It is result of use other operating systems... :(
  • »16.06.17 - 21:14
    Profile Visit Website
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 182 from 2003/7/26
    From: Wroclaw/Poland
    Quote:

    Minuous wrote:
    The official User Interface Style Guide (http://amigan.1emu.net/aw/style.zip) already gives lengthy guidance to developers on this matter.

    Thank you for the documentation. I didn't know the official user interface style guide specifies reading app name.prefs from PROGDIR: before ENV:. It is good solution! I will implement my preferences according the specification. Thanks!
  • »16.06.17 - 21:28
    Profile Visit Website
  • jPV
  • Paladin of the Pegasos
    Paladin of the Pegasos
    jPV
    Posts: 1273 from 2003/2/24
    From: po-RNO
    Quote:

    MDW wrote:
    Quote:

    itix wrote:
    ENV/ENVARC has one advantage: it supports Use/Save pattern out of the box. That is, if you want/need this particular preferences model.

    I am not sure if we need the Use/Save model in 2017. :) However if we need, it is very easy way for support this model.



    Of course we need, I would really hate to give up with it! I just hate the automatic saving trend on other platforms. If I play around with settings to try different things, it's hard to revert them back to original well-working ones. Who can remember all changes they have been making while playing around? And if you temporarily need some different settings, Use is just good for it. Again, no need to trying to memorize how they were before you made your temporary changes, and you just don't need to go tune them again in the next session, because they're already back to saved ones after a boot. This model is one of the best inventions on Amiga and I want to keep it.
  • »17.06.17 - 07:18
    Profile Visit Website