diff --git a/Makefile b/Makefile index 6472d1c..ba9ad82 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,4 @@ c: python3 sightstone/main.py +d: + python3 driver.py diff --git a/driver.py b/driver.py new file mode 100644 index 0000000..0646e51 --- /dev/null +++ b/driver.py @@ -0,0 +1,4 @@ +# Driver code for sightstone +from sightstone import main + +main.main() diff --git a/lib/__init__.py b/lib/__init__.py deleted file mode 100644 index f8940aa..0000000 --- a/lib/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# Represents some libraries and packages used by sightstone(developed by me, MIT licensed) - -from .background_thread import BackgroundThread -from .config import Config -from .windows_calls import execute_cmd_command, search_hndw_by_name, get_thread_id_process_id diff --git a/sightstone/__init__.py b/sightstone/__init__.py index 66f1a90..3ddc579 100644 --- a/sightstone/__init__.py +++ b/sightstone/__init__.py @@ -1,14 +1,14 @@ # Sightstone as a package(depends on ../lib/) -# sightstone.py -from .sightstone import Sightstone - -# league_api_hook.py -from .lca_hook import LeagueConnection - -# gui.py -from .gui import WIDTH, HEIGHT -from .gui import init_gui - -# main.py -from .main import main +# # sightstone.py +# from .sightstone import Sightstone +# +# # league_api_hook.py +# from .lca_hook import LeagueConnection +# +# # gui.py +# from .gui import WIDTH, HEIGHT +# from .gui import init_gui +# +# # main.py +# from .main import main diff --git a/lib/background_thread.py b/sightstone/background_thread.py similarity index 100% rename from lib/background_thread.py rename to sightstone/background_thread.py diff --git a/lib/config.py b/sightstone/config.py similarity index 100% rename from lib/config.py rename to sightstone/config.py diff --git a/sightstone/gui.py b/sightstone/gui.py index 582fd41..4ef3364 100644 --- a/sightstone/gui.py +++ b/sightstone/gui.py @@ -1,13 +1,11 @@ # Module that handles gui -import sys import string import random import dearpygui.dearpygui as dpg -sys.path.append("./") # Fixes unknown import when compiled from repo root -from lib.background_thread import BackgroundThread -import sightstone_constants as SC -from sightstone import Sightstone +from sightstone.background_thread import BackgroundThread +import sightstone.sightstone_constants as SC +from sightstone.sightstone import Sightstone WIDTH = 600 HEIGHT = 400 diff --git a/sightstone/lca_hook.py b/sightstone/lca_hook.py index e00b26d..cb1f45f 100644 --- a/sightstone/lca_hook.py +++ b/sightstone/lca_hook.py @@ -9,9 +9,8 @@ from collections import defaultdict from typing import DefaultDict -sys.path.append("./") # Fixes unknown import when compiled from repo root -from lib.background_thread import BackgroundThread -from lib.windows_calls import execute_cmd_command +from sightstone.background_thread import BackgroundThread +from sightstone.windows_calls import execute_cmd_command class LeagueConnection: """A hacked hook of `LCA`(League client api) diff --git a/sightstone/main.py b/sightstone/main.py index 03c26db..ed64032 100644 --- a/sightstone/main.py +++ b/sightstone/main.py @@ -1,7 +1,7 @@ # Sightstone entry point -from gui import init_gui -from sightstone import Sightstone +from sightstone.gui import init_gui +from sightstone.sightstone import Sightstone def main(): sightstone_engine = Sightstone() diff --git a/sightstone/sightstone.py b/sightstone/sightstone.py index 02c04ff..1119d75 100644 --- a/sightstone/sightstone.py +++ b/sightstone/sightstone.py @@ -2,9 +2,9 @@ import requests import webbrowser -from lca_hook import LeagueConnection -from lib.background_thread import BackgroundThread -import sightstone_constants as SC +from sightstone.lca_hook import LeagueConnection +from sightstone.background_thread import BackgroundThread +import sightstone.sightstone_constants as SC class Sightstone: """Sightstone engine for league QOL hacking diff --git a/lib/windows_calls.py b/sightstone/windows_calls.py similarity index 100% rename from lib/windows_calls.py rename to sightstone/windows_calls.py