From 42840bd7e15135f2de8f74d684b15ab59d51b00f Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Fri, 28 Jan 2022 14:01:24 +0200 Subject: [PATCH] GUI development --- build-installer.bat | 4 ++++ build-installer_clean.bat | 6 ++++++ dist.bat | 3 +++ horsy_installer.py | 1 + modules/liker.py | 14 +++++++++++++- 5 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 build-installer.bat create mode 100644 build-installer_clean.bat create mode 100644 dist.bat create mode 100644 horsy_installer.py diff --git a/build-installer.bat b/build-installer.bat new file mode 100644 index 0000000..3ebf9cb --- /dev/null +++ b/build-installer.bat @@ -0,0 +1,4 @@ +pip install -r requirements.txt +pyinstaller --noconfirm --icon "img/icon.ico" --windowed --onefile "horsy_installer.py" +rmdir /s /q __pycache__ +del horsy_installer.spec \ No newline at end of file diff --git a/build-installer_clean.bat b/build-installer_clean.bat new file mode 100644 index 0000000..53c9100 --- /dev/null +++ b/build-installer_clean.bat @@ -0,0 +1,6 @@ +pip install -r requirements.txt +rmdir /s /q build +pyinstaller --noconfirm --icon "img/icon.ico" --windowed --onefile "horsy_installer.py" +rmdir /s /q __pycache__ +del horsy_installer.spec +rmdir /s /q build \ No newline at end of file diff --git a/dist.bat b/dist.bat new file mode 100644 index 0000000..00cd5e5 --- /dev/null +++ b/dist.bat @@ -0,0 +1,3 @@ +xcopy /s /Y dist\horsy.exe bin\horsy.exe* +xcopy /s /Y dist\horsygui.exe bin\horsygui.exe* +xcopy /s /Y dist\horsy_installer.exe bin\installer-horsy-win.exe* \ No newline at end of file diff --git a/horsy_installer.py b/horsy_installer.py new file mode 100644 index 0000000..b41e3ee --- /dev/null +++ b/horsy_installer.py @@ -0,0 +1 @@ +print(1) \ No newline at end of file diff --git a/modules/liker.py b/modules/liker.py index ef57f58..be4280e 100644 --- a/modules/liker.py +++ b/modules/liker.py @@ -1 +1,13 @@ -print("|"*100) \ No newline at end of file +import requests +import modules.vars as horsy_vars +from modules.auth import get_auth + + +def like(package, is_gui=False, login_ui=None, Ui_LoginWindow=None): + body = { + "auth": get_auth(is_gui, login_ui, Ui_LoginWindow), + "rate": 1, + "packageName": package + } + r = requests.post(f"{horsy_vars.protocol}{horsy_vars.server_url}/packages/rate", json=body).text +