Page 1 of 1

App - improve folder structure and file naming

Posted: Thu Nov 03, 2022 8:57 am
by user0
XnViewMP 1.3.1 64bit
Windows10 64bit (22H2), display resolution 3840x2160, win scaling 150%


There is a way to improve the organization of files in the application folder.


Suggestion
general cleanup
  • create config (OR profile) subfolder
    for all settings-related files (xnview.ini, presets, toolbars, shortcuts, layout, autocorrect, tagface_history, batch_convert_log, etc.)
  • create runtime subfolder
    for all runtime related files (api-ms-win.., Qt.., vc.., etc.), like in Foobar2000
  • create doc subfolder
    for license, WhatsNew, link_to_site
  • (optional) create data subfolder for all system files that are not in plugins, addons
    so root folder contain only few .exe files

UI
  • theme
    • expose theme files, eg like OBS:
      ../themes/theme_name/resources
      ../themes/theme_name.qss
    • add variables, eg like in OBS
  • organize icons
    • unify icons location, eg in UI folder
      Filetype → ../UI/icons/filetype
      icons → ../UI/icons/overlay (add folder to make this recourse exposed)
      ../UI/icons-48 → ../UI/icons/commands/48/
  • UI settings
    • rename settings files to setting_name_state
      default.bar → toolbar_default.ini
      default.keys → shortcuts_default.ini

presets
  • combine all presets into single file (.ini, .xml or .json)
    for all instruments that do not support creating custom preset files from UI (most instruments) - use single file to store presets.
    If for some reason merging presets into one file is not possible, see the next option.
  • rename preset files to preset_tool_name
    so they are grouped together (eg preset_draw, preset_print, preset_resize, preset_search)

catalog / settings
  • rename db/settings files into something more descriptive, eg:
    • XnView.db → xn_catalog.db
    • Thumb.db → xn_catalog_thumbnails.db
      so catalog and thumbs are grouped together
    • xnview.ini → xn_settings.ini (OR xn_config.ini)

misc
  • bring consistency to the settings' values:
    - some values are in quotes, some not, eg @ByteArray(..), "@ByteArray(..)"
    - sometimes separator is space, sometimes comma