Skip to content

Commit

Permalink
Updated hacks for PyInstaller compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
t0mmili committed Aug 9, 2024
1 parent 04799c3 commit d167e7c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

| Item | Details | Priority |
|---|---|---|
| Unit test | Investigate Python unit tests standards and implement. | <span style="color:red">High</span> |
| Unit tests | Investigate Python unit tests standards and implement. | <span style="color:red">High</span> |
| Documentation - user || <span style="color:orange">Medium</span> |
| User config | - Implement config in json format.<br>- Create default, if doesn't exist, on app start.<br>- In-app window to modify.<br>- Versioning, in case new config values appear in the future. | <span style="color:orange">Medium</span> |
| User config | - ~~Implement config in json format.~~<br>- ~~Create default, if doesn't exist, on app start.~~<br>- In-app window to modify.<br>- ~~Versioning, in case new config values appear in the future.~~ | <span style="color:orange">Medium</span> |
| Detailed message after completing scheme apply | Should mention what was done, e.g. DC config backup. | <span style="color:yellow">Low</span> |
| DC config compatibility | - Check scheme version against config version.<br>- Display warning if version mismatch. | <span style="color:yellow">Low</span> |
| Scheme export | Allow to export scheme from current DC config. | <span style="color:yellow">Low</span> |
Expand Down
9 changes: 7 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self) -> None:

icon_path: str = ICON_PATH
# This is necessary for compilation with PyInstaller
# icon_path = path.abspath(path.join(path.dirname(__file__), ICON_PATH))
# icon_path: str = path.abspath(path.join(path.dirname(__file__), ICON_PATH))

# Set application window properties
self.iconbitmap(icon_path)
Expand Down Expand Up @@ -64,8 +64,13 @@ def init_user_config() -> dict:
Returns:
user_config (dict): The user configuration dictionary.
"""

default_config_file: str = DEFAULT_USER_CONFIG
# This is necessary for compilation with PyInstaller
# default_config_file: str = path.abspath(path.join(path.dirname(__file__), DEFAULT_USER_CONFIG))

default_user_config: dict = UserConfigManager.get_config(
DEFAULT_USER_CONFIG
default_config_file
)
user_config_file = UserConfigManager(default_user_config, USER_CONFIG_PATH)

Expand Down

0 comments on commit d167e7c

Please sign in to comment.