Skip to content

Commit

Permalink
Big refactoring into driver based structure, for pyisntaller to work
Browse files Browse the repository at this point in the history
  • Loading branch information
lipeeeee committed Feb 4, 2024
1 parent f584322 commit b64f79a
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 30 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
c:
python3 sightstone/main.py
d:
python3 driver.py
4 changes: 4 additions & 0 deletions driver.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Driver code for sightstone
from sightstone import main

main.main()
5 changes: 0 additions & 5 deletions lib/__init__.py

This file was deleted.

24 changes: 12 additions & 12 deletions sightstone/__init__.py
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
File renamed without changes.
8 changes: 3 additions & 5 deletions sightstone/gui.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 2 additions & 3 deletions sightstone/lca_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions sightstone/main.py
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
6 changes: 3 additions & 3 deletions sightstone/sightstone.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.

0 comments on commit b64f79a

Please sign in to comment.