mherrmann / fbs

Create Python GUIs with Qt in minutes

Home Page:https://build-system.fman.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom directory structure

rainman110 opened this issue · comments

This is probably asked already, but I could not find it here in the issue tracker.

Is there any plan to support a customized directory structure?

Currently, adding FBS to a already existing app needs a complete restructuring of the app, whose new structure does not comply to regular python projects. This seems to be very intrusive for me. A build system / packing system should not require this.

Ideally, the directory structure could be configured with a lets say json file.

By the way, I am willing to support coding - maybe just need some hints where the directory structure is defined etc...

Implementation hints to myself:

  • The default settings are stored in _defaults/src/build/settings. In particular the base.json file seems to be a good candidate for storing the default paths.
  • the function path from __init__.py allows to query paths that are stored in the settings using the syntax ${my_path}
  • The custom path configuration must be stored in a new file (e.g. fbs_directories.json), that replaces the custom paths if defined. This file path cannot be configured though but must be fixed.

The code for importing the settings need to be altered though:

  • Currently, since the settings paths are fixed, the paths are generated via get_settings_paths, which uses a fixed array of potential setting paths
  • With the proposed change, this needs to be changed such that:
    • Load default (path) settings
    • Load and overwrite paths settings from fbs_directories.json if available
    • Use the imported settings path to read the remaining user settings.
  • The change affects the following functions:
    • activate_profile from fbs/__init__.py
    • load_build_settings from fbs_runtime/_source.py

What is the syntax for adding custom directories under main/python? How do we specify the directories where we can import scripts from that work in frozen versions of the application?