Skip to content

Commit

Permalink
resolve possible import error
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwangwyx committed Jun 5, 2024
1 parent 3461177 commit 7d14f31
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ For Mac users, you will want to have `groof` installed to be able to convert man
```
brew install groff
```
You can then run `main.py` from the `cmdcompass` directory to start the program in your IDE.
### Run From Local Env
Run `cmdcompass\main.py` from its current directory to start the program.

### Main GUI Classes Breakdown
<img width="703" alt="Screenshot 2024-05-30 at 3 05 12 PM" src="https://github.com/johnwangwyx/cmdCompass/assets/78456315/99e2d354-18ca-4564-a483-c273309fa23b">
Expand Down
12 changes: 9 additions & 3 deletions cmdcompass/main.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
from cmdcompass.gui.main_window import MainWindow
from cmdcompass.utils.utils import get_data_and_static_parent_dir, copy_data_and_static_to_app_support_dir
import os
import platform
import sys

path_to_add = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
if path_to_add not in sys.path:
sys.path.insert(0, path_to_add)

import platform
from cmdcompass.gui.main_window import MainWindow
from cmdcompass.utils.utils import get_data_and_static_parent_dir, copy_data_and_static_to_app_support_dir


if __name__ == "__main__":
if getattr(sys, 'frozen', False) and platform.system() == "Darwin":
copy_data_and_static_to_app_support_dir()
Expand Down

0 comments on commit 7d14f31

Please sign in to comment.